OpenWrt Forum Archive

Topic: Problems with apache on bleeding edge

The content of this topic has been archived on 28 Apr 2018. There are no obvious gaps in this topic, but there may still be some posts missing at the end.

Hello,

I'm new to openwrt and experience some problems with apache on bleeding edge.

[b]Hardware Details:[/b]
MikroTik Routerboard RB433AH (mipsbe)

MetaROUTER  Memory: 100MiB

I followed the instructions from MikroTik http://wiki.mikrotik.com/wiki/Manual:Metarouter and compiled the package with apache+php5.

The installation worked like a charm, the apache server starts but the test.html doesn't show up in the browser window.

Here's the /var/log/error.log output:

[Thu Aug 25 16:23:21 2011] [notice] child pid 25418 exit signal Bus error (10)
[Thu Aug 25 16:23:21 2011] [notice] child pid 25419 exit signal Bus error (10)
[Thu Aug 25 16:23:21 2011] [notice] child pid 25420 exit signal Bus error (10)
[Thu Aug 25 16:23:21 2011] [notice] child pid 25421 exit signal Bus error (10)
[Thu Aug 25 16:23:21 2011] [notice] child pid 25422 exit signal Bus error (10)
[Thu Aug 25 16:23:21 2011] [notice] child pid 25423 exit signal Bus error (10)
[Thu Aug 25 16:23:21 2011] [notice] child pid 25424 exit signal Bus error (10)
[Thu Aug 25 16:23:22 2011] [info] server seems busy, (you may need to increase StartServers, or Min/MaxSpareServers), spawning 32 children, there are 2 idle, and 2 total children
...

Here are some config. snippets:

OpenWrt Version: bleeding edge, r27891
Linux OpenWrt 2.6.31.10 #1 Wed Aug 24 16:41:24 CEST 2011 mips GNU/Linux


[b]apache conf[/b]
root@OpenWrt:~# grep -v '#' /etc/apache/httpd.conf

ServerRoot "/usr"

Listen 192.168.2.99:80


<IfModule !mpm_netware_module>
<IfModule !mpm_winnt_module>
User nobody
Group nogroup

</IfModule>
</IfModule>


ServerAdmin hostmaster@test.net

ServerName 192.168.2.99:80

DocumentRoot "/usr/share/htdocs"

<Directory />
    Options FollowSymLinks
    AllowOverride None
    Order deny,allow
    Deny from all
</Directory>


<Directory "/usr/share/htdocs">
    Options Indexes FollowSymLinks

    AllowOverride None

    Order allow,deny
    Allow from all

</Directory>

<IfModule dir_module>
    DirectoryIndex index.html
</IfModule>

<FilesMatch "^\.ht">
    Order allow,deny
    Deny from all
    Satisfy All
</FilesMatch>

ErrorLog "/var/log/error_log"

LogLevel debug

<IfModule log_config_module>
    LogFormat "%h %l %u %t \"%r\" %>s %b \"%{Referer}i\" \"%{User-Agent}i\"" combined
    LogFormat "%h %l %u %t \"%r\" %>s %b" common

    <IfModule logio_module>
      LogFormat "%h %l %u %t \"%r\" %>s %b \"%{Referer}i\" \"%{User-Agent}i\" %I %O" combinedio
    </IfModule>

    CustomLog "/var/log/access_log" common

</IfModule>

<IfModule alias_module>


    ScriptAlias /cgi-bin/ "/usr/share/cgi-bin/"

</IfModule>

<IfModule cgid_module>
</IfModule>

<Directory "/usr/share/cgi-bin">
    AllowOverride None
    Options None
    Order allow,deny
    Allow from all
</Directory>

DefaultType text/plain

<IfModule mime_module>
    TypesConfig /etc/apache/mime.types

    AddType application/x-compress .Z
    AddType application/x-gzip .gz .tgz



</IfModule>

MIMEMagicFile /etc/apache/magic


EnableSendfile off


Include /etc/apache/extra/httpd-mpm.conf

httpd-mpm.conf

<IfModule !mpm_netware_module>
    PidFile "/var/log/httpd.pid"
</IfModule>

<IfModule !mpm_winnt_module>
<IfModule !mpm_netware_module>
LockFile "/var/log/accept.lock"
</IfModule>
</IfModule>


<IfModule mpm_prefork_module>
    StartServers          5
    MinSpareServers       5
    MaxSpareServers      10
    MaxClients          150
    MaxRequestsPerChild   0
</IfModule>

<IfModule mpm_worker_module>
    StartServers          2
    MaxClients          150
    MinSpareThreads      25
    MaxSpareThreads      75
    ThreadsPerChild      25
    MaxRequestsPerChild   0
</IfModule>

<IfModule mpm_beos_module>
    StartThreads            10
    MaxClients              50
    MaxRequestsPerThread 10000
</IfModule>

<IfModule mpm_netware_module>
    ThreadStackSize      65536
    StartThreads           250
    MinSpareThreads         25
    MaxSpareThreads        250
    MaxThreads            1000
    MaxRequestsPerChild      0
    MaxMemFree             100
</IfModule>

<IfModule mpm_mpmt_os2_module>
    StartServers           2
    MinSpareThreads        5
    MaxSpareThreads       10
    MaxRequestsPerChild    0
</IfModule>

<IfModule mpm_winnt_module>
    ThreadsPerChild      150
    MaxRequestsPerChild    0
</IfModule>

apachectl -l

root@OpenWrt:~# apachectl -l
Compiled in modules:
  core.c
  mod_authn_file.c
  mod_authn_default.c
  mod_authz_host.c
  mod_authz_groupfile.c
  mod_authz_user.c
  mod_authz_default.c
  mod_auth_basic.c
  mod_include.c
  mod_filter.c
  mod_log_config.c
  mod_env.c
  mod_mime_magic.c
  mod_setenvif.c
  mod_version.c
  mod_proxy.c
  mod_proxy_connect.c
  mod_proxy_ftp.c
  mod_proxy_http.c
  mod_proxy_scgi.c
  mod_proxy_ajp.c
  mod_proxy_balancer.c
  mod_ssl.c
  prefork.c
  http_core.c
  mod_mime.c
  mod_status.c
  mod_autoindex.c
  mod_asis.c
  mod_cgi.c
  mod_negotiation.c
  mod_dir.c
  mod_actions.c
  mod_userdir.c
  mod_alias.c

netstat -tulpen

root@OpenWrt:~# netstat -tulpen
Active Internet connections (only servers)
Proto Recv-Q Send-Q Local Address           Foreign Address         State       PID/Program name
tcp        0      0 192.168.2.99:80         0.0.0.0:*               LISTEN      25484/httpd
tcp        0      0 0.0.0.0:22              0.0.0.0:*               LISTEN      1308/dropbear

I tried to change the httpd-mpm.conf settings (like MinSpareServers) without any effect. Does anybody have an idea why apache won't start properly? Maybe I did something wrong while compiling?

thanks in advance
chris

I am running r28500 and facing same problem. Are you able to solve it?

Hello,

For some reasons, package in trunk (/snapshots/trunk/ar71xx/packages/apache_2.2.15-2_ar71xx.ipk | 21-Oct-2011 07:37 | 408525) failed to work properly.

To solve, install another package, for example, from backfire: (for newbies)
1) remove apache if exist:

opkg update
opkg remove apache

2) edit "/etc/opkg.conf":

cp /etc/opkg.conf /etc/orig_opkg.conf
vi /etc/opkg.conf

replace string "src/gz snapshots http://downloads.openwrt.org/snapshots/trunk/ar71xx/packages"
to "src/gz snapshots http://downloads.openwrt.org/backfire/10.03.1-rc5/ar71xx/packages"
and save changes

2) install apache from backfire:

opkg update
opkg install apache

it will install (/backfire/10.03.1-rc5/ar71xx/packages/apache_2.2.15-2_ar71xx.ipk | 15-Jul-2011 10:24 | 437823)

3) try to start apache
If "can't load library..." error, try to create symlinks from newer versions:

cd /usr/lib/
cp -s libssl.so.1.0.0 libssl.so.0.9.8
cp -s libcrypto.so.1.0.0 libcrypto.so.0.9.8

0.9.8 is version in error message.
1.0.0 is my current version of library.

After that, apache works as it is.

I have same problem. Try apache from  last trunk, backfire and backfire rc5. No result.

(Last edited by .//Hack on 19 Jul 2012, 15:51)

Please help!

Does somebody has a solution for this problem?

Want to run apache but still get the an error
get the error when "apachectl start" ,  "apachectl stop" or "apachectl restart"

error =
root@swatknows26:/# apachectl start
Segmentation fault

I tried the workaround, but no results.

I tried also lighttpd, but also the same error sad

OpenWrt Attitude Adjustment r32706 | Load: 0.12 0.11 0.07
On a netgear WNDR3800 with the img from downloads.openwrt.org/snapshots/trunk/ar71xx/openwrt-ar71xx-generic-wndr3800-jffs2-factory.img

Changing "LogLevel" in httpd.conf to anything else then "debug" (ex, "info") solving the problem.

I can confirm that solution provided by loknar works!  smile

(Last edited by mitja.kukovec on 31 Jul 2013, 21:14)

The discussion might have continued from here.