1

I was happily running apache2 and mysql on a Ubuntu 16.04 server with no problems, but yesterday I noticed that there were a bunch of updates available and I installed them using apt-get.

One of the updates was apache2, upgraded to 2.4.46. Since then, apache stopped working. It returns this error when I try to start it: (38)Function not implemented: AH00141: Could not initialize random number generator. After reading some post online, I decided to upgrade my Ubuntu version to 18.04, the process just finished, but the situation didn't change, apache is still not working with the same error.

I read to check if /dev/random or /dev/urandom are present on the system, and they are there.

I do not know what to do to have apache working again. Can someone help me? Maybe give me some direction on how to downgrade it, I don't know, I really have no idea.

Thank in advance, S.

UPDATE

I think the problem is the kernel, too old to work with the latest Apache version. I see that I have a 3.13.xxx and a 5.4.xxx kernel available, but I cannot switch to the latest. Neither update-grub nor update-grub2 seem to be able to change the kernel. I think I need some help with grub config to solve this problem.

I tried to edit grub.cfg and point GRUB_DEFAULT=1 but it didn't work. I was wondering if changing it to

GRUB_DEFAULT="Ubuntu, with Linux 5.4.0-67-generic"

(I can see that entry in grub.cfg) might work.

  • I am now doing another upgrade to 20.04 to see if something changes... – simonelippolis Mar 22 '21 at 10:26
  • Does this answer your question? https://stackoverflow.com/questions/17884176/apache-could-not-initialize-random-number-generator – Andrew Schulman Mar 22 '21 at 10:31
  • I saw that thread, didn't check the solution because the OP was referring to a windows installation, I'll check soon, thanks. – simonelippolis Mar 22 '21 at 10:45
  • No, my path is `PATH="/usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin:/sbin:/bin:/usr/games:/usr/local/games:/snap/bin"` I don't see any strage char. – simonelippolis Mar 22 '21 at 11:00
  • And upgrading to 20.04 did not solve my problem... – simonelippolis Mar 22 '21 at 11:01
  • 1
    You should have test it the upgrade in a dev/test environment first but I guess you have a working backup of that server and if not I would encourage you to start taking/testing backups/restores. Have you tried to for example strace Apache? Perhaps it will return more inside into what is failing? – cyzczy Mar 24 '21 at 07:23
  • Be sure to run `update-grub` after you update /etc/default/grub. – Andrew Schulman Mar 25 '21 at 11:27
  • Thanks @AndrewSchulman I did. And then I noticed some error from grub. I'm starting to think that restoring a backup and setting up a new VM from scratch might be the only safe thing to do. – simonelippolis Mar 26 '21 at 09:03

0 Answers0