Bug 1176513

Summary: module proxy_ajp_module is already loaded
Product: [Retired] JBoss Web Server 3 Reporter: Libor Fuka <lfuka>
Component: unspecifiedAssignee: Weinan Li <weli>
Status: CLOSED EOL QA Contact: Libor Fuka <lfuka>
Severity: medium Docs Contact:
Priority: unspecified    
Version: 3.0.0CC: jclere, mbabacek, mturk, pslavice
Target Milestone: DR02   
Target Release: 3.0.0   
Hardware: Unspecified   
OS: Linux   
Whiteboard:
Fixed In Version: Doc Type: Bug Fix
Doc Text:
Story Points: ---
Clone Of: Environment:
Last Closed: 2020-03-27 18:34:37 UTC Type: Bug
Regression: --- Mount Type: ---
Documentation: --- CRM:
Verified Versions: Category: ---
oVirt Team: --- RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: --- Target Upstream Version:
Embargoed:
Bug Depends On:    
Bug Blocks: 1178630    

Description Libor Fuka 2014-12-22 08:16:23 UTC
Description of problem:
mod_proxy_ajp module is loaded twice. First in conf.d/proxy_ajp.conf and second time in conf.modules.d/00-proxy.conf

Version-Release number of selected component (if applicable):
JWS 3.0.0-DR0.1

Steps to Reproduce:
1. start httpd

Actual results:
[Mon Dec 22 09:09:41.063666 2014] [so:warn] [pid 2644] AH01574: module proxy_ajp_module is already loaded, skipping
in httpd.log and error_log

Expeced result:
mod_proxy_ajp should be loaded once.

Comment 1 Weinan Li 2014-12-24 08:48:51 UTC
Fix:

[weli@dhcp-66-78-87 jws-compose]$ git diff
diff --git a/jws-compose.spec b/jws-compose.spec
index 6b90846..fc0bb71 100644
--- a/jws-compose.spec
+++ b/jws-compose.spec
@@ -385,6 +385,11 @@ sed -i -e '/IncludeOptional conf\.d\/\*\.conf/d' -e  's/Include conf\.modules\.d
 echo -e "0r httpd/conf.d/00-ssl.conf\nw" | ed httpd/conf.d/ssl.conf
 rm httpd/conf.d/00-ssl.conf

+# bz1176513 merge mod_proxy conf
+sed -i -e '/LoadModule proxy_ajp_module modules\/mod_proxy_ajp\.so/d' httpd/conf.d/proxy_ajp.conf
+cat httpd/conf.d/proxy_ajp.conf >> httpd/conf.d/00-proxy.conf
+rm -f httpd/conf.d/proxy_ajp.conf
+
 %ifnarch ppc64
 #jsvc
 mkdir -p extras

---

Verification:

[weli@dhcp-66-78-87 sbin]$ sudo ./apachectl start
[weli@dhcp-66-78-87 logs]$ tail error_log
[Wed Dec 24 16:47:30.144466 2014] [core:notice] [pid 31213] SELinux policy enabled; httpd running as context unconfined_u:unconfined_r:unconfined_t:s0-s0:c0.c1023
[Wed Dec 24 16:47:30.194785 2014] [auth_digest:notice] [pid 31214] AH01757: generating secret for digest authentication ...
[Wed Dec 24 16:47:30.195726 2014] [lbmethod_heartbeat:notice] [pid 31214] AH02282: No slotmem from mod_heartmonitor
[Wed Dec 24 16:47:30.198767 2014] [:notice] [pid 31214] Advertise initialized for process 31214
[Wed Dec 24 16:47:30.203694 2014] [mpm_prefork:notice] [pid 31214] AH00163: Apache/2.4.6 (Red Hat) mod_auth_kerb/5.4 mod_cluster/1.3.1.Beta1 OpenSSL/1.0.1e-fips configured -- resuming normal operations
[Wed Dec 24 16:47:30.203740 2014] [core:notice] [pid 31214] AH00094: Command line: '/home/weli/rpmbuild/RPMS/x86_64/jws-3.0/httpd/sbin/httpd -f /home/weli/rpmbuild/RPMS/x86_64/jws-3.0/httpd/conf/httpd.conf -E /home/weli/rpmbuild/RPMS/x86_64/jws-3.0/httpd/logs/httpd.log'

--- 

[weli@dhcp-66-78-87 httpd]$ cat conf.d/00-proxy.conf
# This file configures all the proxy modules:
LoadModule proxy_module modules/mod_proxy.so
LoadModule lbmethod_bybusyness_module modules/mod_lbmethod_bybusyness.so
LoadModule lbmethod_byrequests_module modules/mod_lbmethod_byrequests.so
LoadModule lbmethod_bytraffic_module modules/mod_lbmethod_bytraffic.so
LoadModule lbmethod_heartbeat_module modules/mod_lbmethod_heartbeat.so
LoadModule proxy_ajp_module modules/mod_proxy_ajp.so
LoadModule proxy_balancer_module modules/mod_proxy_balancer.so
LoadModule proxy_connect_module modules/mod_proxy_connect.so
LoadModule proxy_express_module modules/mod_proxy_express.so
LoadModule proxy_fcgi_module modules/mod_proxy_fcgi.so
LoadModule proxy_fdpass_module modules/mod_proxy_fdpass.so
LoadModule proxy_ftp_module modules/mod_proxy_ftp.so
LoadModule proxy_http_module modules/mod_proxy_http.so
LoadModule proxy_scgi_module modules/mod_proxy_scgi.so


#
# When loaded, the mod_proxy_ajp module adds support for
# proxying to an AJP/1.3 backend server (such as Tomcat).
# To proxy to an AJP backend, use the "ajp://" URI scheme;
# Tomcat is configured to listen on port 8009 for AJP requests
# by default.
#

#
# Uncomment the following lines to serve the ROOT webapp
# under the /tomcat/ location, and the jsp-examples webapp
# under the /examples/ location.
#
#ProxyPass /tomcat/ ajp://localhost:8009/
#ProxyPass /examples/ ajp://localhost:8009/jsp-examples/


[weli@dhcp-66-78-87 httpd]$ pwd

Comment 2 Weinan Li 2015-01-23 11:42:05 UTC
This should be fixed in httpd24 package because it also affect RPM:

[weli@dhcp-66-78-87 httpd24-jws3-el7]$ git diff
diff --git a/00-proxy.conf b/00-proxy.conf
index 6ce89a4..fa9c0d3 100644
--- a/00-proxy.conf
+++ b/00-proxy.conf
@@ -15,3 +15,18 @@ LoadModule proxy_http_module modules/mod_proxy_http.so
 LoadModule proxy_scgi_module modules/mod_proxy_scgi.so

 LoadModule proxy_wstunnel_module modules/mod_proxy_wstunnel.so
+#
+# When loaded, the mod_proxy_ajp module adds support for
+# proxying to an AJP/1.3 backend server (such as Tomcat).
+# To proxy to an AJP backend, use the "ajp://" URI scheme;
+# Tomcat is configured to listen on port 8009 for AJP requests
+# by default.
+#
+
+#
+# Uncomment the following lines to serve the ROOT webapp
+# under the /tomcat/ location, and the jsp-examples webapp
+# under the /examples/ location.
+#
+#ProxyPass /tomcat/ ajp://localhost:8009/
+#ProxyPass /examples/ ajp://localhost:8009/jsp-examples/
diff --git a/proxy_ajp.conf b/proxy_ajp.conf
deleted file mode 100644
index 9347aab..0000000
--- a/proxy_ajp.conf
+++ /dev/null
@@ -1,20 +0,0 @@
-
-LoadModule proxy_ajp_module modules/mod_proxy_ajp.so
-
-#
-# When loaded, the mod_proxy_ajp module adds support for
-# proxying to an AJP/1.3 backend server (such as Tomcat).
-# To proxy to an AJP backend, use the "ajp://" URI scheme;
-# Tomcat is configured to listen on port 8009 for AJP requests
-# by default.
-#
-
-#
-# Uncomment the following lines to serve the ROOT webapp
-# under the /tomcat/ location, and the jsp-examples webapp
-# under the /examples/ location.
-#
-#ProxyPass /tomcat/ ajp://localhost:8009/
-#ProxyPass /examples/ ajp://localhost:8009/jsp-examples/
-
-

Comment 3 Weinan Li 2015-01-23 11:44:10 UTC
Revert the changes in jws-compose:

[weli@dhcp-66-78-87 jws-compose]$ git diff
diff --git a/jws-compose.spec b/jws-compose.spec
index b91bc37..42c1aec 100644
--- a/jws-compose.spec
+++ b/jws-compose.spec
@@ -401,11 +401,6 @@ sed -i -e '/IncludeOptional conf\.d\/\*\.conf/d' -e  's/Inclu
 echo -e "0r httpd/conf.d/00-ssl.conf\nw" | ed httpd/conf.d/ssl.conf
 rm httpd/conf.d/00-ssl.conf

-# bz1176513 merge mod_proxy conf
-sed -i -e '/LoadModule proxy_ajp_module modules\/mod_proxy_ajp\.so/d' httpd/conf.
-cat httpd/conf.d/proxy_ajp.conf >> httpd/conf.d/00-proxy.conf
-rm -f httpd/conf.d/proxy_ajp.conf
-
 %ifnarch ppc64
 #jsvc
 mkdir -p extras

Comment 4 Weinan Li 2015-01-23 11:58:32 UTC
Verification:

[weli@dhcp-66-78-87 x86_64]$ rpm2cpio httpd24-2.4.6-42.el6.x86_64.rpm | cpio -idv
...

[weli@dhcp-66-78-87 etc]$ find . | grep proxy
./httpd24/conf.modules.d/00-proxy.conf

[weli@dhcp-66-78-87 x86_64]$ cat etc/httpd24/conf.modules.d/00-proxy.conf
# This file configures all the proxy modules:
LoadModule proxy_module modules/mod_proxy.so
LoadModule lbmethod_bybusyness_module modules/mod_lbmethod_bybusyness.so
LoadModule lbmethod_byrequests_module modules/mod_lbmethod_byrequests.so
LoadModule lbmethod_bytraffic_module modules/mod_lbmethod_bytraffic.so
LoadModule lbmethod_heartbeat_module modules/mod_lbmethod_heartbeat.so
LoadModule proxy_ajp_module modules/mod_proxy_ajp.so
LoadModule proxy_balancer_module modules/mod_proxy_balancer.so
LoadModule proxy_connect_module modules/mod_proxy_connect.so
LoadModule proxy_express_module modules/mod_proxy_express.so
LoadModule proxy_fcgi_module modules/mod_proxy_fcgi.so
LoadModule proxy_fdpass_module modules/mod_proxy_fdpass.so
LoadModule proxy_ftp_module modules/mod_proxy_ftp.so
LoadModule proxy_http_module modules/mod_proxy_http.so
LoadModule proxy_scgi_module modules/mod_proxy_scgi.so

LoadModule proxy_wstunnel_module modules/mod_proxy_wstunnel.so
#
# When loaded, the mod_proxy_ajp module adds support for
# proxying to an AJP/1.3 backend server (such as Tomcat).
# To proxy to an AJP backend, use the "ajp://" URI scheme;
# Tomcat is configured to listen on port 8009 for AJP requests
# by default.
#

#
# Uncomment the following lines to serve the ROOT webapp
# under the /tomcat/ location, and the jsp-examples webapp
# under the /examples/ location.
#
#ProxyPass /tomcat/ ajp://localhost:8009/
#ProxyPass /examples/ ajp://localhost:8009/jsp-examples/

Comment 5 Libor Fuka 2015-02-03 11:46:09 UTC
VERIFIED with DR2 RHEL6 RHEL7 zip