Problem in starting service

Keywords: MySQL - AWS - Technical issue - Permissions
Description:
When I key in the command

sudo /opt/bitnami/ctlscript.sh start
sudo /opt/bitnami/ctlscript.sh restart apache
sudo /opt/bitnami/ctlscript.sh restart

I got “mysql not running” and cannot start
and “/etc/gonit/gonitrc must own by you”

Please help!

Hi @macjobhk,

Did you make any change in the gonit folder? These commands will show the permissions configuration of that folder

sudo ls -la /etc/gonit/

Apart from that, can you take a look at the MySQL’s log file to see if there is any problem there?

sudo tail -n 30 /opt/bitnami/mysql/data/mysqld.log

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

Happy to help!


Was my answer helpful? Click on :heart:

Dear Jota,

after typing

sudo ls -la /etc/gonit/

I got

total 8
drwxr-xr-x  2 root root 4096 Jun 15  2020 .
drwxr-xr-x 78 root root 4096 Mar 29 04:04 ..
lrwxrwxrwx  1 root root   38 Jun 15  2020 gonitrc -> /opt/bitnami/config/monit/bitnami.conf

after typing

sudo tail -n 30 /opt/bitnami/mysql/data/mysqld.log

I got long lists of errors that I can’t analyse.

Please see attachment of help us.

B/R
Jacky

Hi @macjobhk,

It seems you modified the permissions configuration of the installation and that’s why the server can’t be started properly now. We have a Support Tool that will gather relevant information for us to analyze your configuration and logs. Could you please execute it on the machine where the stack is running by following the steps described in the guide below?

Please note that you need to paste the code ID that is shown at the end.

Can you get the permissions configuration of that file now?

sudo ls -la /opt/bitnami/config/monit/bitnami.conf

I got the Bitnami Support ticket but don’t know what is “paste the code ID that is shown at the end.”

Here is the screen capture.
Please tell me what is the exact command I need to type. Thanks!

Hi @macjobhk,

It seems you modified the permissions configuration of the whole installation folder and that’s why you can’t start the services now. Let’s try to recover the permissions …

  • First of all, you will need to update the monit’s configuration
sudo chown root:root /opt/bitnami/config/monit/bitnami.conf
  • After that, try to recover the main components’ folders’ permissions

Can you start the services now? Can you access your site?

Happy to help!


Was my answer helpful? Click on :heart:

Dear Jota,

It seems the services start again, but my website still can’t access
Please help to see what;s wrong.

Anyway thanks to your kindly assistance.
Looking forwards to one day all problem could be solved.

B/R
Jacky

one more screen capture for you
it seems something can’t access

Hello @macjobhk,

Checking it via screenshots is a little bit difficult. Could you please execute Support Tool on the machine where the stack is running by following the steps described in the guide below?

Please note that you need to paste the code ID that is shown at the end. That means that it should show an ID code after the execution. You should copy that code and paste it here some we can access it.

Regards

Thanks, I finally understand what you need me to do

the code is 629c7691-e7b0-ae35-59f4-cebfb997ad31

Hi @macjobhk,

You disabled the Apache’s control script and that’s why you can’t start it. Please run these commands

sudo mv /opt/bitnami/apache2/scripts/ctl.sh.disabled /opt/bitnami/apache2/scripts/ctl.sh
sudo /opt/bitnami/ctlscript.sh start apache

I can see that MySQL and PHP-FPM are now running so you should be able to access your site when you start Apache.

Happy to help!


Was my answer helpful? Click on :heart:

Dear Jota,

Thanks for your follow up but still have problem

After running your given commands, I got:

"bitnami@ip-172-26-1-117:~$ sudo mv /opt/bitnami/apache2/scripts/ctl.sh.disabled /opt/bitnami/apache2/scripts/ctl.sh
bitnami@ip-172-26-1-117:~$ 
bitnami@ip-172-26-1-117:~$ sudo /opt/bitnami/ctlscript.sh start apache
AH00558: httpd.bin: Could not reliably determine the server's fully qualified domain name, using 127.0.0.1. Set the 'ServerName' directive globally to suppress this message
Syntax OK
AH00558: httpd.bin: Could not reliably determine the server's fully qualified domain name, using 127.0.0.1. Set the 'ServerName' directive globally to suppress this message"

Please tell me how to set the “Server Name”
Thanks!

I run more commands suggested by AWS and got following response:

/opt/bitnami/apache2/scripts/ctl.sh : httpd (pid 15426) already running
Monitored apache
bitnami@ip-172-26-1-117:~$ sudo /opt/bitnami/ctlscript.sh status apache
apache already running
bitnami@ip-172-26-1-117:~$ sudo /opt/bitnami/ctlscript.sh start apache
AH00558: httpd.bin: Could not reliably determine the server's fully qualified domain name, using 127.0.0.1. Set the 'ServerName' directive globally to suppress this message
Syntax OK
/opt/bitnami/apache2/scripts/ctl.sh : httpd (pid 15426) already running
Monitored apache
bitnami@ip-172-26-1-117:~$ sudo netstat -tunlp
Active Internet connections (only servers)
Proto Recv-Q Send-Q Local Address           Foreign Address         State       PID/Progra
m name    
tcp        0      0 127.0.0.1:3306          0.0.0.0:*               LISTEN      17598/mysq
ld.bin    
tcp        0      0 0.0.0.0:22              0.0.0.0:*               LISTEN      571/sshd  
          
tcp6       0      0 :::33060                :::*                    LISTEN      17598/mysq
ld.bin    
tcp6       0      0 :::80                   :::*                    LISTEN      15426/http
d.bin     
tcp6       0      0 :::21                   :::*                    LISTEN      568/vsftpd
          
tcp6       0      0 :::22                   :::*                    LISTEN      571/sshd  
          
udp        0      0 0.0.0.0:68              0.0.0.0:*                           344/dhclie
nt        
udp        0      0 127.0.0.1:323           0.0.0.0:*                           518/chrony
d         
udp6       0      0 fe80::497:80ff:fe23:546 :::*                                426/dhclie
nt        
udp6       0      0 ::1:323                 :::*                                518/chrony
d         
bitnami@ip-172-26-1-117:~$ sudo systemctl status apache2.service
● apache2.service - The Apache HTTP Server
   Loaded: loaded (/lib/systemd/system/apache2.service; enabled; vendor preset: enabled)
   Active: failed (Result: exit-code) since Wed 2021-03-24 08:46:30 UTC; 2 weeks 0 days ag
     Docs: https://httpd.apache.org/docs/2.4/

Warning: Journal has been rotated since unit was started. Log output is incomplete or unav
lines 1-6/6 (END)

Please tell me what is these outcome means

Hi @macjobhk,

Apache is running and it’s only showing a warning to change the ServerName configuration. If you have a valid domain, you can change the ServerName value using your domain in the /opt/bitnami/apache2/conf/httpd.conf file.

However, as I mentioned, Apache works properly and you should be able to access your site now, did you try to access the application?

Happy to help!


Was my answer helpful? Click on :heart:

Dear Jota,

Thanks to your kindly support. However, it is sad that our website still can’t access.
Now I had instructure to check "website accessibility of outside of Bitnami environment. " by following commands:

  1. After running 1, ls /opt/bitnami/apps/wordpress/htdocs/
    The output is following:
bitnami@ip-172-26-1-117:~$ ls /opt/bitnami/apps/wordpress/htdocs/
google33ef026f993404a4.html  wp-admin              wp-content         wp-mail.php
index.php                    wp-blog-header.php    wp-cron.php        wp-settings.php
license.txt                  wp-comments-post.php  wp-includes        wp-signup.php
readme.html                  wp-config.php         wp-links-opml.php  wp-trackback.php
robots.txt                   wp-config.php.backup  wp-load.php        xmlrpc.php
wp-activate.php              wp-config-sample.php  wp-login.php
  1. after running 2, sudo /opt/bitnami/ctlscript.sh stop apache
Unmonitored apache
AH00558: httpd.bin: Could not reliably determine the server's fully qualified domain name,
 using 127.0.0.1. Set the 'ServerName' directive globally to suppress this message
Syntax OK
/opt/bitnami/apache2/scripts/ctl.sh : httpd stopped
  1. After running 3, sudo /opt/bitnami/ctlscript.sh status apache
apache not running
  1. after running 4, sudo systemctl start apache2.service
Job for apache2.service failed because the control process exited with error code.
See "systemctl status apache2.service" and "journalctl -xe" for details.
  1. after running 5, sudo systemctl status apache2.service
● apache2.service - The Apache HTTP Server
   Loaded: loaded (/lib/systemd/system/apache2.service; enabled; vendor preset: enabled)
   Active: failed (Result: exit-code) since Fri 2021-04-09 02:01:44 UTC; 1min 27s ago
     Docs: https://httpd.apache.org/docs/2.4/ 
  Process: 22283 ExecStart=/usr/sbin/apachectl start (code=exited, status=1/FAILURE)

Apr 09 02:01:44 ip-172-26-1-117 systemd[1]: Starting The Apache HTTP Server...
Apr 09 02:01:44 ip-172-26-1-117 apachectl[22283]: apache2: Could not open configuration fil
Apr 09 02:01:44 ip-172-26-1-117 apachectl[22283]: Action 'start' failed.
Apr 09 02:01:44 ip-172-26-1-117 apachectl[22283]: The Apache error log may have more inform
Apr 09 02:01:44 ip-172-26-1-117 systemd[1]: apache2.service: Control process exited, code=e
Apr 09 02:01:44 ip-172-26-1-117 systemd[1]: apache2.service: Failed with result 'exit-code'
Apr 09 02:01:44 ip-172-26-1-117 systemd[1]: Failed to start The Apache HTTP Server.

You had mentioned on the reply that: " If you have a valid domain, you can change the ServerName value using your domain in the /opt/bitnami/apache2/conf/httpd.conf file."

I don’t know the file mentioned located, on Bitnami, AWS or Bluehost?

Hope the receive your feedback soon and wish that it is close to solve the problem.

B/R
Jacky

Hi @macjobhk,

Let’s review the Apache’s log file

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

Can you try to run the Bitnami Support tool again so we can review the latest changes?

https://docs.bitnami.com/general/how-to/understand-bnsupport/

You do not need to start the Apache system’s service, that one has nothing to do with the Bitnami installation. Please start the Bitnami’s service again and forget about the sudo systemctl start apache2.service command.

sudo /opt/bitnami/ctlscript.sh start

This topic was automatically closed 14 days after the last reply. New replies are no longer allowed.