awsdocs / amazon-lightsail-developer-guide

The open source version of the Amazon Lightsail docs. To submit feedback or requests for changes, submit an issue or make changes and submit a pull request.
Other
211 stars 192 forks source link

sudo /opt/bitnami/ctlscript.sh start not working after Cert Update #63

Closed donmb1 closed 2 years ago

donmb1 commented 3 years ago

Hi all,

Following this guide which has been updated on 25th of October, the bitnami instance is not starting anymore after installing a certificate with certbot

https://lightsail.aws.amazon.com/ls/docs/en_us/articles/amazon-lightsail-using-lets-encrypt-certificates-with-wordpress#complete-the-prerequisites-lets-encrypt-wordpress

sudo /opt/bitnami/ctlscript.sh start Screenshot 2021-10-28 at 10 21 09

Something is broken - either in the guide or in the file structure of bitnami servers.

● bitnami.service - LSB: bitnami init script
   Loaded: loaded (/etc/init.d/bitnami; enabled; vendor preset: enabled)
   Active: failed (Result: exit-code) since Thu 2021-10-28 08:24:23 UTC; 8s ago
  Process: 851 ExecStart=/etc/init.d/bitnami start (code=exited, status=1/FAILURE)
    Tasks: 41 (limit: 558)
   Memory: 243.0M
   CGroup: /system.slice/bitnami.service
           ├─718 php-fpm: master process (/opt/bitnami/php/etc/php-fpm.conf)
           ├─722 php-fpm: pool www
           ├─723 php-fpm: pool www
           ├─724 php-fpm: pool www
           ├─725 php-fpm: pool www
           ├─726 php-fpm: pool www
           ├─727 php-fpm: pool www
           ├─728 php-fpm: pool www
           ├─729 php-fpm: pool www
           ├─730 php-fpm: pool www
           ├─731 php-fpm: pool www
           └─743 /opt/bitnami/mariadb/sbin/mysqld --defaults-file=/opt/bitnami/mariadb/con

Oct 28 08:24:23 ip-172-26-10-109 bitnami[851]: SSLCertificateFile: file '/opt/bitnami/apac
Oct 28 08:24:23 ip-172-26-10-109 bitnami[851]: 2021-10-28T08:24:23.511Z - error: Unable to
Oct 28 08:24:23 ip-172-26-10-109 bitnami[851]: ## 2021-10-28 08:24:23+00:00 ## INFO ## Run
Oct 28 08:24:23 ip-172-26-10-109 bitnami[851]: ## 2021-10-28 08:24:23+00:00 ## INFO ## Run
Oct 28 08:24:23 ip-172-26-10-109 bitnami[851]: ## 2021-10-28 08:24:23+00:00 ## INFO ## Run
Oct 28 08:24:23 ip-172-26-10-109 bitnami[851]: ## 2021-10-28 08:24:23+00:00 ## INFO ## Run
Oct 28 08:24:23 ip-172-26-10-109 bitnami[851]: ## 2021-10-28 08:24:23+00:00 ## INFO ## Run
Oct 28 08:24:23 ip-172-26-10-109 systemd[1]: bitnami.service: Control process exited, code
Oct 28 08:24:23 ip-172-26-10-109 systemd[1]: bitnami.service: Failed with result 'exit-cod
Oct 28 08:24:23 ip-172-26-10-109 systemd[1]: Failed to start LSB: bitnami init script.
rlatino commented 3 years ago

@donmb1 Can you please try the following? This assumes you've already completed the certbot steps that are in the doc.

  1. Run the following command. Important: In the command, replace "example.com" with the actual domain that you're configuring.

    DOMAIN=example.com

  1. Run the following commands one by one:

    sudo ln -s /etc/letsencrypt/live/$DOMAIN/privkey.pem /opt/bitnami/apache2/conf/bitnami/certs/server.key sudo ln -s /etc/letsencrypt/live/$DOMAIN/fullchain.pem /opt/bitnami/apache2/conf/bitnami/certs/server.crt

    1. Then try to start the services again:

    sudo /opt/bitnami/ctlscript.sh start

makerovski commented 3 years ago

I had the same problem and this solution worked... @rlatino Thank you so much!!!

donmb1 commented 3 years ago

Yes, I can confirm that it is working. Thanks a lo @rlatino

kcarra commented 2 years ago

@rlatino can the docs be updated to reflect this?

rlatino commented 2 years ago

I have updated the docs. Thanks all!