P
P
Pavel Kornilov2021-03-24 20:45:04
Apache HTTP Server
Pavel Kornilov, 2021-03-24 20:45:04

How to fix Apache?

Hello!
After trying to install and enable the http/2 module, something went wrong. Apache refuses to start outright. Who can help?

Logs:

root@info129:~# systemctl restart apache2
Job for apache2.service failed because the control process exited with error code. See "systemctl status apache2.service" and "journalctl -xe" for details.
root@info129:~# journalctl -xe
Mar 24 13:37:45 info129 sshd[21391]: Disconnected from 119.45.167.104 port 47968 [preauth]
Mar 24 13:37:48 info129 sshd[21393]: pam_unix(sshd:auth): authentication failure; logname= uid=0 euid=0 tty=ssh ruser= rhost=77.39.117.226  user=root
Mar 24 13:37:50 info129 sshd[21393]: Failed password for root from 77.39.117.226 port 56034 ssh2
Mar 24 13:37:50 info129 sshd[21393]: Received disconnect from 77.39.117.226 port 56034:11: Normal Shutdown, Thank you for playing [preauth]
Mar 24 13:37:50 info129 sshd[21393]: Disconnected from 77.39.117.226 port 56034 [preauth]
Mar 24 13:38:03 info129 sshd[21403]: pam_unix(sshd:auth): authentication failure; logname= uid=0 euid=0 tty=ssh ruser= rhost=133.242.155.85  user=root
Mar 24 13:38:05 info129 sshd[21403]: Failed password for root from 133.242.155.85 port 46860 ssh2
Mar 24 13:38:05 info129 sshd[21403]: Received disconnect from 133.242.155.85 port 46860:11: Bye Bye [preauth]
Mar 24 13:38:05 info129 sshd[21403]: Disconnected from 133.242.155.85 port 46860 [preauth]
Mar 24 13:38:21 info129 postfix/anvil[21313]: statistics: max connection rate 1/60s for (smtp:193.56.29.31) at Mar 24 13:35:01
Mar 24 13:38:21 info129 postfix/anvil[21313]: statistics: max connection count 1 for (smtp:193.56.29.31) at Mar 24 13:35:01
Mar 24 13:38:21 info129 postfix/anvil[21313]: statistics: max cache size 1 at Mar 24 13:35:01
Mar 24 13:38:23 info129 systemd[1]: Stopped The Apache HTTP Server.
-- Subject: Unit apache2.service has finished shutting down
-- Defined-By: systemd
-- Support: http://lists.freedesktop.org/mailman/listinfo/systemd-devel
--
-- Unit apache2.service has finished shutting down.
Mar 24 13:38:23 info129 systemd[1]: Starting The Apache HTTP Server...
-- Subject: Unit apache2.service has begun start-up
-- Defined-By: systemd
-- Support: http://lists.freedesktop.org/mailman/listinfo/systemd-devel
--
-- Unit apache2.service has begun starting up.
Mar 24 13:38:23 info129 apachectl[21410]: [Wed Mar 24 13:38:23.021429 2021] [:crit] [pid 21413] (38)Function not implemented: AH00141: Could not initialize random number generator
Mar 24 13:38:23 info129 apachectl[21410]: Action 'start' failed.
Mar 24 13:38:23 info129 apachectl[21410]: The Apache error log may have more information.
Mar 24 13:38:23 info129 systemd[1]: apache2.service: Control process exited, code=exited status=1
Mar 24 13:38:23 info129 systemd[1]: Failed to start The Apache HTTP Server.
-- Subject: Unit apache2.service has failed
-- Defined-By: systemd
-- Support: http://lists.freedesktop.org/mailman/listinfo/systemd-devel
--
-- Unit apache2.service has failed.
--
-- The result is failed.
Mar 24 13:38:23 info129 systemd[1]: apache2.service: Unit entered failed state.
Mar 24 13:38:23 info129 systemd[1]: apache2.service: Failed with result 'exit-code'.
Mar 24 13:38:39 info129 sshd[21417]: pam_unix(sshd:auth): authentication failure; logname= uid=0 euid=0 tty=ssh ruser= rhost=43.228.79.23  user=root
Mar 24 13:38:41 info129 sshd[21417]: Failed password for root from 43.228.79.23 port 45050 ssh2
Mar 24 13:38:41 info129 sshd[21417]: Received disconnect from 43.228.79.23 port 45050:11: Bye Bye [preauth]
Mar 24 13:38:41 info129 sshd[21417]: Disconnected from 43.228.79.23 port 45050 [preauth]
Mar 24 13:38:46 info129 sshd[21419]: Invalid user ts2 from 208.109.9.14
Mar 24 13:38:46 info129 sshd[21419]: input_userauth_request: invalid user ts2 [preauth]
Mar 24 13:38:46 info129 sshd[21419]: pam_unix(sshd:auth): check pass; user unknown
Mar 24 13:38:46 info129 sshd[21419]: pam_unix(sshd:auth): authentication failure; logname= uid=0 euid=0 tty=ssh ruser= rhost=208.109.9.14


UPD
Decided in a tough way, reinstall. But it doesn't work either. At least demolish the system ...

Actions:
apt-get --purge remove apache2
apt-get autoremove
apt-get install apache2


At the exit:

Job for apache2.service failed because the control process exited with error code. See "systemctl status apache2.service" and "journalctl -xe" for details.
invoke-rc.d: initscript apache2, action "start" failed.
● 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 14:59:10 EDT; 18ms ago
     Docs: https://httpd.apache.org/docs/2.4/
  Process: 27221 ExecStart=/usr/sbin/apachectl start (code=exited, status=1/FAILURE)

Mar 24 14:59:10 info129 systemd[1]: Starting The Apache HTTP Server...
Mar 24 14:59:10 info129 apachectl[27221]: [Wed Mar 24 14:59:10.221347 2021] [:crit] [pid 27231] (38)Function not implemented: AH00141: Could not initialize random number generator
Mar 24 14:59:10 info129 apachectl[27221]: Action 'start' failed.
Mar 24 14:59:10 info129 apachectl[27221]: The Apache error log may have more information.
Mar 24 14:59:10 info129 systemd[1]: apache2.service: Control process exited, code=exited status=1
Mar 24 14:59:10 info129 systemd[1]: Failed to start The Apache HTTP Server.
Mar 24 14:59:10 info129 systemd[1]: apache2.service: Unit entered failed state.
Mar 24 14:59:10 info129 systemd[1]: apache2.service: Failed with result 'exit-code'.
insserv: warning: current start runlevel(s) (empty) of script `apache-htcacheclean' overrides LSB defaults (2 3 4 5).
insserv: warning: current stop runlevel(s) (0 1 2 3 4 5 6) of script `apache-htcacheclean' overrides LSB defaults (0 1 6).
Processing triggers for systemd (229-4ubuntu21.29) ...



UPD


Now Apache removed once again, rebooted the system, after trying to install again it writes:
The following packages have unmet dependencies:
apache2 : Depends: apache2-bin (= 2.4.18-2ubuntu3.17) but 2.4.46-4+deb.sury.org+1+ubuntu16.04.1+deb.sury.org+5 is to be installed
Depends: apache2-data (= 2.4.18-2ubuntu3.17) but 2.4.46-4+deb.sury.org+1+ubuntu16.04.1+deb.sury.org+5 is to be installed
E : Unable to correct problems, you have held broken packages.

Answer the question

In order to leave comments, you need to log in

2 answer(s)
P
Pavel Kornilov, 2021-03-25
@KorniloFF

I apologize to everyone who tried to help, but I do not know what solution could work.
I took a radical path: I changed the server, installed Debian 10 on it, and uploaded all the backups over the new one. While the flight is normal, I will take a closer look tomorrow.

V
vreitech, 2021-03-24
@fzfx

Try installing the rng-tools5 package:
apt-get install rng-tools5
And start Apache again.

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question