[Date Prev][Date Next] [Thread Prev][Thread Next] [Date Index] [Thread Index]

Bug#838932: simliar problem with proxy_balancer / slotmem_shm



Dear Maintainer,

in my further on configuration with prox_balancer. i figured out a
another start/reboot problem with proxy_balancer configuration.

remember

:~# systemctl disable apache2
default apache is disabled -> reboot -> /var/run/apache2/ don't exist


:~# sh /usr/share/doc/apache2/examples/setup-instance proxy-balancer
Setting up /etc/apache2-proxy-balancer ...
Setting up /etc/init.d/apache2-proxy-balancer ...
Setting up symlinks: a2enmod-proxy-balancer a2dismod-proxy-balancer
a2ensite-proxy-balancer a2dissite-proxy-balancer a2enconf-proxy-balancer
a2disconf-proxy-balancer apache2ctl-proxy-balancer
Setting up /etc/logrotate.d/apache2-proxy-balancer and
/var/log/apache2-proxy-balancer ...


:~# systemctl enable apache2-proxy-balancer
apache2-proxy-balancer.service is not a native service, redirecting to
systemd-sysv-install
Executing /lib/systemd/systemd-sysv-install enable apache2-proxy-balancer

:~# cd /etc/apache2-proxy-balancer/

:~# vim sites-enabled/proxy-balancer.conf
[...]
<Proxy balancer://twoways/>
    BalancerMember https://192.168.168.10/
    BalancerMember https://192.168.168.20/
    ProxySet lbmethod=bytraffic
</Proxy>
[...]
ProxyPass /site-twoways/           balancer://twoways/
[...]


:~# a2enmod-proxy-balancer proxy_balancer
Considering dependency proxy for proxy_balancer:
Enabling module proxy.
Considering dependency alias for proxy_balancer:
Module alias already enabled
Considering dependency slotmem_shm for proxy_balancer:
Enabling module slotmem_shm.
Enabling module proxy_balancer.
To activate the new configuration, you need to run:
  service apache2-proxy-balancer restart


:~# a2enmod-proxy-balancer lbmethod_bytraffic
Considering dependency proxy_balancer for lbmethod_bytraffic:
Considering dependency proxy for proxy_balancer:
Module proxy already enabled
Considering dependency alias for proxy_balancer:
Module alias already enabled
Considering dependency slotmem_shm for proxy_balancer:
Module slotmem_shm already enabled
Module proxy_balancer already enabled
Enabling module lbmethod_bytraffic.
To activate the new configuration, you need to run:
  service apache2-proxy-balancer restart


:~# apache2ctl-proxy-balancer configtest
Syntax OK


:~# service apache2-proxy-balancer start
Job for apache2-proxy-balancer.service failed because the control
process exited with error code. See "systemctl status
apache2-proxy-balancer.service" and "journalctl -xe" for details.


:~# cat /var/log/apache2-proxy-balancer/error.log
[...]
[Fri Oct 21 20:44:33.144445 2016] [slotmem_shm:error] [pid 2120] (2)No
such file or directory: AH02611: create:
apr_shm_create(/var/run/apache2/slotmem-shm-p6c23514b.shm) failed
[Fri Oct 21 20:44:33.144483 2016] [proxy_balancer:emerg] [pid 2120]
(2)No such file or directory: AH01179: balancer slotmem_create failed
[Fri Oct 21 20:44:33.144487 2016] [:emerg] [pid 2120] AH00020:
Configuration Failed, exiting


the module slotmem_shm has only .load files no .conf files

:~# ls -la mods-enabled/
[...]
lrwxrwxrwx 1 root root   34 Okt 21 20:40 slotmem_shm.load ->
../mods-available/slotmem_shm.load


https://httpd.apache.org/docs/trunk/mod/mod_slotmem_shm.html

in the dokumentation is described that the module writes in the
"DefaultRuntimeDir"


in my opinion that directory is set in the envvars file with the $SUFFIX in
the right way.

:~# cat /etc/apache2-proxy-balancer/envvars
[...]
export APACHE_RUN_DIR=/var/run/apache2$SUFFIX
[...]


but see above the module looks like, don't follow that entry

my solution extra set from DefaultRuntimeDir in the multiple apache
.conf file

:~# vim sites-enabled/proxy-balancer.conf
DefaultRuntimeDir /var/run/apache2-proxy-balancer/
[...]


:~# apache2ctl-proxy-balancer configtest
Syntax OK

:~# service apache2-proxy-balancer start

:~# ls -l /var/run/apache2-proxy-balancer/
insgesamt 12
-rw-r--r-- 1 root root 5 Okt 21 20:48 apache2-proxy-balancer.pid
-rw-r--r-- 1 root root 8 Okt 21 20:48 slotmem-shm-p6c23514b.shm
-rw-r--r-- 1 root root 8 Okt 21 20:48 slotmem-shm-p6c23514b_twoways.shm


:~# systemctl status apache2-proxy-balancer
? apache2-proxy-balancer.service - LSB: Start/stop apache2 web server
(config /etc/apache2-proxy-balancer)
   Loaded: loaded (/etc/init.d/apache2-proxy-balancer; bad; vendor
preset: enabled)
   Active: active (running) since Fr 2016-10-21 20:48:45 CEST; 33s ago
     Docs: man:systemd-sysv-generator(8)
  Process: 2203 ExecStart=/etc/init.d/apache2-proxy-balancer start
(code=exited, status=0/SUCCESS)
    Tasks: 6
   Memory: 16.2M
      CPU: 63ms
   CGroup: /system.slice/apache2-proxy-balancer.service
           +-2220 /usr/sbin/apache2 -d /etc/apache2-proxy-balancer -k start
           +-2223 /usr/sbin/apache2 -d /etc/apache2-proxy-balancer -k start
           +-2224 /usr/sbin/apache2 -d /etc/apache2-proxy-balancer -k start
           +-2225 /usr/sbin/apache2 -d /etc/apache2-proxy-balancer -k start
           +-2226 /usr/sbin/apache2 -d /etc/apache2-proxy-balancer -k start
           +-2227 /usr/sbin/apache2 -d /etc/apache2-proxy-balancer -k start

Okt 21 20:48:44 ubudev systemd[1]: Starting LSB: Start/stop apache2 web
server (config /etc/apache2-proxy-balancer)...
Okt 21 20:48:44 ubudev apache2-proxy-balancer[2203]:  * Starting Apache
httpd web server apache2
Okt 21 20:48:45 ubudev apache2-proxy-balancer[2203]:  *
Okt 21 20:48:45 ubudev systemd[1]: Started LSB: Start/stop apache2 web
server (config /etc/apache2-proxy-balancer).

the apache instance is now up & running


Reply to: