skip to Main Content

I recently requested a change to my root password which was successful and I am able to use it on the console. However, my IP address stopped working. Both visiting my domain and SSH are responding with a connection timed out error.

It was working fine until my root password changed and the server was restarted.

I checked the error log using this command:

tail -50 /var/log/apache2/error.log

And this is what i got:

[Mon Jan 20 00:47:06.157921 2020] [mpm_prefork:notice] [pid 994] AH00163: Apache/2.4.18 (Ubuntu) OpenSSL/1.0.2g configured -- resuming normal operations
[Mon Jan 20 00:47:06.157921 2020] [core:notice] [pid 994] AH00094: Command line: '/usr/sbin/apache2'
[Mon Jan 20 00:47:06.157921 2020] [mpm_prefork:notice] [pid 981] AH00169: caught SIGTERM, shutting down
[Mon Jan 20 00:47:06.157921 2020] [mpm_prefork:notice] [pid 970] AH00163: Apache/2.4.18 (Ubuntu) OpenSSL/1.0.2g configured -- resuming normal operations
[Mon Jan 20 00:47:06.157921 2020 [core:notice] [pid 970] AH00094: Command line: '/usr/sbin/apache2'
[Mon Jan 20 00:47:06.157921 2020] [mpm_prefork:notice] [pid 903] AH00169: caught SIGTERM, shutting down
[Mon Jan 20 00:47:06.157921 2020] [mpm_prefork:notice] [pid 903] AH00163: Apache/2.4.18 (Ubuntu) OpenSSL/1.0.2g configured -- resuming normal operations
[Mon Jan 20 00:47:06.157921 2020] [core:notice] [pid 994] AH00094: Command line: '/usr/sbin/apache2'
[Mon Jan 20 00:47:06.157921 2020] [mpm_prefork:notice] [pid 994] AH00169: caught SIGTERM, shutting down
[Mon Jan 20 00:47:06.157921 2020] [mpm_prefork:notice] [pid 970] AH00163: Apache/2.4.18 (Ubuntu) OpenSSL/1.0.2g configured -- resuming normal operations
[Mon Jan 20 00:47:06.157921 2020] [core:notice] [pid 990] AH00094: Command line: '/usr/sbin/apache2'

Notice the SIGTERM, shutting down? I think Apache is crashing and the service is auto-restarting.

At first I thought it was as a result of low memory usage then I checked with this command free -mh

here are the results. My Ram is enough:

              total        used        free      shared  buff/cache   available
Mem:           1.9G        259M        1.4G         612K        258M        1.6G
Swap:            0B          0B          0B

Firewall is inactive so nothing is blocking port 80

sudo ufw status
Status: Inactive

I also run this command to see what’s being listened on

sudo lsof -iTCP -sTCP:LISTEN -P

COMMAND    PID           USER   FD   TYPE DEVICE SIZE/OFF NODE NAME
sshd      812           root    3u  IPv4  18468      0t0  TCP  localhost:53 (LISTEN)
sshd      812           root    4u  IPv6  18468      0t0  TCP *:22 (LISTEN)
mysqld      899           mysql    29u  IPv4  19368      0t0  TCP localhost:3306 (LISTEN)
master      1089           root    13u  IPv4  19478      0t0  TCP *:25 (LISTEN)
master      1089           root    14u  IPv6  19479      0t0  TCP *:25 (LISTEN)

Could I be my Apache configurations?
here is what is being listened to on my /etc/apache2/ports.conf

grep "Listen" /etc/apache2/*.conf

etc/apache2/ports.conf: Listen 0.0.0.0

etc/apache2/ports.conf: Listen 433
etc/apache2/ports.conf: Listen 433

I can’t even restart apache it doesn’t let me

service apache2 restart

Job for apache2.service failed because the control proccess exited with error code. See "systemctl status apache2.service" and "journalctl -xe" for details.

On running that command I got this:

apache2.service - The Apache HTTP Server
Loaded: loaded (/lib/systemd/system/apache2.service; enabled; vendor preset
Drop-In: /lib/systemd/system/apache2.service.d
         apache-system.conf
Active: failed (Result: exit-code) since Mon 2020-01-20 12:16:35 UTC; 4min 9s
Process: 1616 ExecStart=/usr/sbin/apachectl start (code=exited, status=1/FAILURE

Is this normal? Please help

2

Answers


  1. Your conf file has the wrong port numbers for HTTPS. It should be "443" not "433".

    Login or Signup to reply.
  2. in my case got this error from a untidy composed tutorial

    nano /etc/apache2/sites-enabled/laravel.conf
    

    I had syntax error on line 9, i removed word ‘combined’ in it and cntrl-X ed file and now it runs ok. Also there renamed ‘CustomErrorLog’ to ‘AccessLog’ next to ${APACHE_LOG_DIR}/access.log

    Login or Signup to reply.
Please signup or login to give your own answer.
Back To Top
Search