View Issue Details

IDProjectCategoryView StatusLast Update
0007262Kali LinuxKali Package Bugpublic2021-07-23 17:52
ReporterLaraLang Assigned Tosteev  
PrioritynormalSeveritymajorReproducibilityalways
Status resolvedResolutionno change required 
Product Version2021.2 
Summary0007262: Nethunter Hammerhead Marshmallow - Apache2 is Broken
Description

Apache2 build is Broken.

Running Apache2 from App and Terminal doesn't work.

Error points to a missing or overridden function during compile.

Steps To Reproduce

Repro 1

  • Fresh Image flash with TWRP Recovery and Magisk using nethunter full - Re4son
  • Reboot
  • Update or unupdated Nethunter App, run Chroot Manager
  • Start Chroot
  • Nethunter Menu, custom run apt-get update && apt-get -y upgrade
    -- alternative is via Nethunter Terminal
    -- wait until completed
  • Nethunter Menu
  • Settings, ensure some settings it needs to set are set
  • Nethunter Menu
  • Services, start all services listed. sshd, postgresl, dnsmasq, apache
    -- alternative is via Nethunter Terminal, run apache2

Apache Fails

Error:

Function not implemented: AH00141: Could not initialize random number generator

Additional Information

Building httpd from scratch works but menu system is useless. Convenience provided negated by non working menu and applications in the image released.

Attached Files
Screenshot_20210718-212256.png (167,558 bytes)   
Screenshot_20210718-212256.png (167,558 bytes)   

Activities

Michu

Michu

2021-07-18 18:28

reporter   ~0014936

try this https://askubuntu.com/questions/1323305/apache-commands-failing-with-ah00141-could-not-initialize-random-number-genera

LaraLang

LaraLang

2021-07-18 20:07

reporter   ~0014937

Hi @Michu, thanks for the link. I've tried that with no success.

Perusing available online reports on AH00141 was the first thing I did.
I've tried most of what can be done up to recompiling httpd itself and symlinking the working binary but just could get the custom build to work with the provided convenience from the GUI.

I will retry downgrading all that can be downgraded soon using available binaries in the repository but at libaprutil1 alone, I could not downgrade that library.

I am still not sure though if Nethunter builds or issues from one of the official images should be reported here. If it should be on another bugtracking system, let me know so it can reach the right people.

Michu

Michu

2021-07-20 18:36

reporter   ~0014939

i found this article https://stackoverflow.com/questions/17884176/apache-could-not-initialize-random-number-generator and people there says that it could be PATH variable try it maybe it will work it don't cost you

LaraLang

LaraLang

2021-07-21 13:04

reporter   ~0014940

Managed to rebuild from source and by source this time, the source used in 2021.2 fullfs of the Nethunter release for Nexus 5

Last time I rebuilt it using apache repository.

tldr;
enable sources
apt source apache2
purge apache2 libapr1 libaprutil1
checked out an older version of libapr and libaprutil1
configure, compile, install, configure, run

rebuild-apache2-hammerhead-marshmallow.sh (857 bytes)   
#!/bin/bash

cd ~/Downloads
apt source apache2
cd apache2-2.4.48
apt purge apache2
apt remove libapr1
apt remove libaprutil1
# clean-up all apache2 directories to ensure what will be referenced
apt install subversion
svn co https://svn.apache.org/repos/asf/apr/apr/tags/1.5.2/ srclib/apr
svn co https://svn.apache.org/repos/asf/apr/apr-util/tags/1.5.4/ srclib/apr-util
autoconf
./buildconf
./configure --with-included-apr --enable-layout=Debian --with-program-name=apache2
sed -i 's/BUILD_DATETIME/"\`date +%FT%T\`";/`' server/buildmark.c
make
make install
cp support/apachectl /usr/sbin/apache2ctl
cp debian/config-dirs/envvars /etc/apache2/envvars
sed -i 's/\$SUFFIX\/apache2\.pid/\.pid/' /etc/apache2/envvars
sed -i 's/ServerRoot\ \"\"/ServerRoot\ \"\/etc\/apache2\"/' /etc/apache/apache2.conf
echo 'ServerName "localhost"' >> /etc/apache2/apache2.conf

Michu

Michu

2021-07-21 13:21

reporter   ~0014941

so this article helped you or you did it by yourself

LaraLang

LaraLang

2021-07-21 13:55

reporter   ~0014942

@Michu I took inspiration from the same first article we both found online. ex. Downgrade APR.

And figured out all the other necessary steps by myself to get an Apache build specific to the debian layout to ensure that Nethunter conveniences/menu are usable for the custom build.

Thank you all the same. :)

Michu

Michu

2021-07-23 17:11

reporter   ~0014945

good to hear that you figured out what you need to do to resolve your problem and i'm here to help just like the others that's what matters cheers :)

Issue History

Date Modified Username Field Change
2021-07-18 13:52 LaraLang New Issue
2021-07-18 13:52 LaraLang File Added: Screenshot_20210718-211849.png
2021-07-18 13:52 LaraLang File Added: Screenshot_20210718-212256.png
2021-07-18 18:28 Michu Note Added: 0014936
2021-07-18 20:07 LaraLang Note Added: 0014937
2021-07-20 18:36 Michu Note Added: 0014939
2021-07-21 13:04 LaraLang File Added: rebuild-apache2-hammerhead-marshmallow.sh
2021-07-21 13:04 LaraLang Note Added: 0014940
2021-07-21 13:21 Michu Note Added: 0014941
2021-07-21 13:55 LaraLang Note Added: 0014942
2021-07-23 17:11 Michu Note Added: 0014945
2021-07-23 17:52 steev Assigned To => steev
2021-07-23 17:52 steev Status new => resolved
2021-07-23 17:52 steev Resolution open => no change required