Ghost cannot start

Keywords: Ghost - AWS - Technical issue - Other

bnsupport ID: 772eef93-0ee7-c223-c14d-8245ada11b3f

bndiagnostic output:

? Apache: Found possible issues
? Resources: Found possible issues
https://docs.bitnami.com/general/apps/wordpress/troubleshooting/debug-errors-apache/
https://docs.bitnami.com/bch/apps/moodle/troubleshooting/deny-connections-bots-apache/

bndiagnostic failure reason: The suggested guides are not related with my issue

Description:
Ghost seems to be up then down and the site shows a 404. I tried updating Ghost and managed to get node.js updated, but Ghost can’t because node.js is not up to date.

I have even managed to apparently update it (I also did new bindings, though can’t remember how, to no effect).

Hi @jose.fandos,

Your instance does not have a lot of RAM available and is using Swap memory. I recommend upgrading to a more powerful instance:

https://docs.bitnami.com/aws/faq/administration/upgrade-ami/

Regards,
Michiel

Thanks @michiel. Any suggestion on the ideal instance for this? Also, the link provides details on how to backup MySQL. I’ll need to backup additional Ghost’s data. Any links to how to go about that? Setting this up now…

Hi @jose.fandos,

Not really I recommend just trying out a slightly bigger one and keep increasing if necessary.

Regards,
Michiel

Note: The current Ghost sits on AWS Lightsail (512 MB RAM, 1 vCPU, 20 GB SSD)

Upgraded to 4 GB RAM, 2 vCPUs, 80 GB SSD.

Now I need to move the data from the old machine (which has a Ghost that doesn’t start) to the new one. Any pointer on how to do this? I can figure out MySQL, but what about anything else from Ghost?

And any pointers on how to move Ghost to /blog subfolder? Thanks!

Hi @jose.fandos,

You would also need to copy the “/opt/bitnami/ghost/content” folder - or if it’s an old installation, the “/opt/bitnami/apps//ghost/htdocs/content” folder - to the new installation. Be sure to make a backup of the folder first.

Can you check this solution:

Regards,
Michiel

Hi, thanks for that. For anyone else attempting the /blog/ bit, I got it to work by:

  1. Edited the file /opt/bitnami/apache/conf/bitnami/bitnami.conf. I used the vi editor, so “vi bitnami.conf” and check this vi commands page (https://www.cs.colostate.edu/helpdocs/vi.html) for more help.
  2. Added the following to the file, at the bottom of it
    ProxyPreserveHost On
    ProxyPass /blog/ http://127.0.0.1:2368
    ProxyPassReverse /blog/ http://127.0.0.1:2368
  3. Restarted the services with
    sudo /opt/bitnami/ctlscript.sh restart
  4. Tried visiting the website (with the ip at the moment) followed by /blog/ and everything showed up there. Note that the ip without /blog/ does also work.

I have yet to attempt the mysql and docs transfer — doing this today — but I noticed that the browser shows the site not being secure (using http vs https) and that in the logs (/opt/bitnami/apache/logs/error_log) there is the following line:
[ssl:warn] [pid 15215:tid 13962361462668
8] AH01909: www.example.com:443:0 server certificate does NOT include an I
D which matches the server name

Any pointers?

Hi @jose.fandos,

For the first issue, you need to issue an SSL certificate and force redirection the HTTPS. You can execute the bncert tool to do that automatically.

https://docs.bitnami.com/aws/how-to/understand-bncert/

This is just a warning. It will disappear when you configured the SSL certificate.

Regards,
Michiel

Seems like the new Lightsail instance with bitnami Ghost doesn’t include rsync, which I will need. I wasn’t able to find a straight forward way to install rsync. Any pointers?

Note: the old instance shows rsync as being there, by running ‘which rsync’ on the terminal. On the new instance, the same command returns nothing.

Found this page on information on how to install rsync. I’ve done the one for Debian, as that’s what the lightsail instance seems to have.

After running the command ‘sudo apt-get install rsync grsync’, rsync is now installed and ‘which rsync’ and ‘rsync --version’ both report the same thing as the old instance.

Sorry, forgot to mention the page with the rsync installation instructions for different linux OSs:

https://www.addictivetips.com/ubuntu-linux-tips/set-up-rsync-on-linux/

Now I have been able to upload a number of files to the htdocs folder of the new instance. These files are the ones that should be served on example.com, and the ghost blog should appear on example.com/blog/.

At the moment, on both example.com and example.com/blog/ I see the ghost blog. Also, I have a file called privacy.html, and typing example.com/privacy.html redirects or appends ‘/’ to the URL and displays a ghost 404 template.

What do I need to change to have example.com display the new index.html and other files in the htdocs folder, while still keeping example.com/blog/ resolving to the ghost blog?

I managed to get / resolving to the index.html and /blog/ to ghost. I followed that with the installation of clako, a theme, enabling the theme, copying the old data, and updating the database, and I am back to square one, with a /blog/ that now shows a 404 error and no images. Any help really appreciated.

bnsupport ID: f855a163-89b8-0644-9955-cc2275bf6460

andiagnostic output:
[Apache]

Found recent error or warning messages in the Apache error log.

[Sun Aug 29 16:29:55.047324 2021] [autoindex:error] [pid 23885:tid 
140284735506176] [client **ip_address**:57221] AH01276: Cannot serve directory 
/opt/bitnami/apps/letsencrypt/.well-known/: No matching DirectoryIndex 
(index.html) found, and server-generated directory index forbidden by Options 
directive, referer: binance.com

Please check the following guide to troubleshoot server issues:

https://docs.bitnami.com/general/apps/wordpress/troubleshooting/debug-errors-apache/

A high number of incoming requests originate from one or more unique IP addresses. This could indicate a bot attack. The following guide shows how to check for and block suspicious IP addresses.

https://docs.bitnami.com/bch/apps/moodle/troubleshooting/deny-connections-bots-apache/

[Mariadb]

Found recent error messages in the MariaDB error log:

2021-08-29 18:01:07 22 [Warning] Aborted connection 22 to db: 'bitnami_ghost' 
user: 'bn_ghost' host: '**ip_address**' (Got an error reading communication 
packets)

Please check the following guide to troubleshoot MariaDB issues:

https://docs.bitnami.com/aws/apps/wordpress/troubleshooting/debug-errors-mariadb/

[Resources]

Your instance has little available RAM memory.

              total        used        free      shared  buff/cache   available
Mem:           3947         677         394          40        2875        2967
Swap:             0           0           0

You could try to increase your instance’s memory. Please check your cloud
provider’s documentation for more information.

You can also enable swap memory to improve performance.

https://docs.bitnami.com/installer/faq/linux-faq/administration/increase-memory-linux/

Hi @jose.fandos,

Is Ghost accesible on the root domain? I’ve tried with a fresh installation and it should work with:

ProxyPreserveHost On 
ProxyPass /blog/ http://127.0.0.1:2368 
ProxyPassReverse /blog/ http://127.0.0.1:2368

Can you confirm that that works and that it breaks after installing the theme?

Regards,
Michiel