HTTPd fails from 2.4.39 to 2.4.41 update

JamesW

Verified User
Joined
Aug 15, 2019
Messages
7
Unfortunately, downgrading does not fix it.

I'm on a CentOS7 64 bit image, and even installing fresh causes the following issue with Apache/HTTPD:
====
[Thu Aug 15 05:26:14.994352 2019] [:crit] [pid 15388] (38)Function not implemented: AH00141: Could not initialize random number generator
====

No errors located in apache's error log, either.

Anyone else having this issue, or know of a fix?
 
APR was recently upgraded to 1.7.0, I guess APR 1.7.0 coud be the problem. Try downgrading APR to 1.6.5 and let us know if it solves the problem:

cd /usr/local/directadmin/custombuild
echo "apr:1.6.5:0759294408daace192c935b7c9e76e04" > custom_versions.txt
./build update
./build apache

(Remember when you in the future want to upgrade APR again, you have to remove the custom_versions.txt file or the new line in it)
 
Please double check APR version by doing:

Code:
httpd -V

Is this the result you get, or do you get 1.7.0?:

Code:
Server loaded:  APR 1.6.5, APR-UTIL 1.6.1
Compiled using: APR 1.6.5, APR-UTIL 1.6.1
 
I've tried, i get:

[Thu Aug 15 10:31:15.686310 2019] [:crit] [pid 28940] (38)Function not implemented: AH00141: Could not initialize random number generator
 
That didn't work, ditto.

apr was downgraded to 1.6.5 successfully:
Code:
Found /usr/local/directadmin/custombuild/httpd-2.4.41.tar.gz
Extracting /usr/local/directadmin/custombuild/httpd-2.4.41.tar.gz...
Found /usr/local/directadmin/custombuild/apr-1.6.5.tar.gz
Extracting /usr/local/directadmin/custombuild/apr-1.6.5.tar.gz...
Found /usr/local/directadmin/custombuild/apr-util-1.6.1.tar.gz
Extracting /usr/local/directadmin/custombuild/apr-util-1.6.1.tar.gz...
Patching apache for hardened symlinks patch...

However, httpd doesn't even return what version it is anymore (and hasn't since the upgrade to 2.4.41:
Code:
Installing man pages and online manual                                                                                                                                                                                                        
make[1]: Leaving directory `/usr/local/directadmin/custombuild/httpd-2.4.41'                                                                                                                                                                  
Restoring certificate and key, and turning on httpd for DirectAdmins's check.                                                                                                                                                                 
Checking to ensure /etc/httpd/conf/ssl.crt/server.ca is set.                                                                                                                                                                                  
Enabling httpd in systemd...                                                                                                                                                                                                                  
[Thu Aug 15 06:27:28.789948 2019] [:crit] [pid 9020] (38)Function not implemented: AH00141: Could not initialize random number generator                                                                                                      
                                                                                                                                                                                                                                              
                                                                                                                                                                                                                                              
                                                                                                                                                                                                                                              
****                                                                                                                                                                                                                                          
[Thu Aug 15 06:27:28.805871 2019] [:crit] [pid 9022] (38)Function not implemented: AH00141: Could not initialize random number generator                                                                                                      
****                                                                                                                                                                                                                                          
/etc/systemd/system/httpd.service has NOT been installed because of no HAVE_SYSTEMD in the otuput!!                                                                                                                                           
****  

chmod: cannot access '/etc/systemd/system/httpd.service': No such file or directory
Failed to execute operation: No such file or directory
Checking to ensure /etc/httpd/conf/ssl.crt/server.ca is set.
Using xx.xxx.xxx.xxx for your server IP
[Thu Aug 15 06:27:31.145301 2019] [:crit] [pid 9244] (38)Function not implemented: AH00141: Could not initialize random number generator
./build: line 15181: [: : integer expression expected

[root@cluster custombuild]# systemctl status httpd
* httpd.service
   Loaded: not-found (Reason: No such file or directory)
   Active: failed (Result: exit-code) since Thu 2019-08-15 05:08:06 EDT; 1h 19min ago
 Main PID: 8671 (code=exited, status=1/FAILURE)

Aug 15 05:08:06 cluster systemd[1]: Starting The Apache HTTP Server...
Aug 15 05:08:06 cluster httpd[8671]: [Thu Aug 15 05:08:06.706584 2019] [:crit] [pid 8671] (38)Function not implemented: AH00141: Could not initialize random number generator
Aug 15 05:08:06 cluster systemd[1]: httpd.service: main process exited, code=exited, status=1/FAILURE
Aug 15 05:08:06 cluster kill[8674]: kill: cannot find process ""
Aug 15 05:08:06 cluster systemd[1]: httpd.service: control process exited, code=exited status=1
Aug 15 05:08:06 cluster systemd[1]: Failed to start The Apache HTTP Server.
Aug 15 05:08:06 cluster systemd[1]: Unit httpd.service entered failed state.
Aug 15 05:08:06 cluster systemd[1]: httpd.service failed.
[root@cluster custombuild]# 
[root@cluster custombuild]# httpd -V
[Thu Aug 15 06:29:24.484514 2019] [:crit] [pid 10201] (38)Function not implemented: AH00141: Could not initialize random number generator
 
@Imtek, Please run the command:

Code:
httpd -V

And give us the output, so that we can rule out if the new APR version is the problem or not.
 
Ghtsx

Ditto,

Running httpd -V does not print anything but the following:
---
[root@cluster custombuild]# httpd -V
[Thu Aug 15 06:29:24.484514 2019] [:crit] [pid 10201] (38)Function not implemented: AH00141: Could not initialize random number generator
----
 
Gives me:
[root@hostname ~]# httpd -V
[Thu Aug 15 12:39:44.539578 2019] [:crit] [pid 3983221] (38)Function not implemented: AH00141: Could not initialize random number generator

@Imtek, Please run the command:

Code:
httpd -V

And give us the output, so that we can rule out if the new APR version is the problem or not.
 
Maybe it is the other way around, because APR 1.7.0 was very recently added, so maybe you upgraded Apache before the new APR 1.7.0 was added to custombuild, meaning you have been running APR 1.6.5 all the time, and maybe the problem only is when running APR 1.6.5. To rule out this, please delete the custom_versions.txt (or the APR line in the file), then do:

Code:
./build update
./build apache

If it still does not work, then it would seem it is not related to APR at all.
 
I was unable to reproduce it, however, got access to one box affected. Checking it right now.
 
Update over 30 VMs without problems (centos 7 64 bit).

httpd -V
Server version: Apache/2.4.41 (Unix)
Server built: Aug 15 2019 09:39:18
Server's Module Magic Number: 20120211:88
Server loaded: APR 1.7.0, APR-UTIL 1.6.1
Compiled using: APR 1.7.0, APR-UTIL 1.6.1
Architecture: 64-bit
 
Quick fix for now:
Code:
rm -f /usr/lib/apache/libapr-1.so.0.7.0 /usr/lib/apache/libapr-1.so.0
cd /usr/local/directadmin/custombuild
perl -pi -e 's|apr:1.7.0:757239852b082b844e268a86f2806fd2|apr:1.6.5:|g' versions.txt
./build apache

Continuing to investigate.
 
Last edited:
The ones affected - are you running CloudLinux kernel? I see this in changelog of APR 1.7.0:
*) rand: Use arc4random_buf() on BSD platforms and getrandom() on Linux, when available. [Christian Weisgerber <naddy openbsd.org, Yann Ylavic]
 
Back
Top