Problem
[root@dbappweb bin]# vi /etc/httpd/conf.d/proxy_ajp.conf ProxyPass /TESTAPP/ ajp://10.20.2.22:8009/TESTAPP/
I have added the above line in proxy_ajp.conf file on my apache web server to access my application running on JBoss. but when tried to access my application through the url given below got the error.
Error on Browser while accessing the below URL:
https://dbappweb.com/TESTAPP/
Service Temporarily Unavailable
The server is temporarily unable to service your request due to maintenance downtime or capacity problems. Please try again later.
When i checked the apache ssl_error_log file, found the below error entries:
[Mon Mar 19 11:51:59 2018] [error] ajp_read_header: ajp_ilink_receive failed
[Mon Mar 19 11:51:59 2018] [error] (120007)APR does not understand this error code: proxy: read response failed from (null) (10.20.1.22)
Reason
Port 8009 was not being telnetted from apache machine to JBOSS machine. There was no firewall between these two and the local firewall of both the machines were also off. To access the application through proxy_ajp module port no 8009 should be telnetted.
[root@dbappweb ~]# telnet 10.20.2.22 8009 Trying 10.20.2.22... telnet: connect to address 10.20.2.22: Connection refused [root@dbappweb ~]#
Solution
Add the below line of code in the standalone.xml file of the JBoss application server.
<ajp-listener name=”ajp” socket-binding=”ajp” max-post-size=”1048576000″/>
[root@JBOSS bin]# vi /home/wildfly/wildfly-11.0.0.Final/standalone/configuration/standalone.xml
<server name="default-server"> <ajp-listener name="ajp" socket-binding="ajp" max-post-size="1048576000"/> <http-listener name="default" socket-binding="http" redirect-socket="https" enable-http2="true"/> <https-listener name="https" socket-binding="https" security-realm="ApplicationRealm" enable-http2="true"/> <host name="default-host" alias="localhost"> <location name="/" handler="welcome-content"/> <filter-ref name="server-header"/> <filter-ref name="x-powered-by-header"/> <http-invoker security-realm="ApplicationRealm"/> </host> </server>
Retarted the JBOSS application server services to reflect the above changes which i have made above.
[root@dbappweb ~]# telnet 10.20.2.22 8009 Trying 10.30.1.66... Connected to vip-dbrac2 (10.20.2.22). Escape character is '^]'. ^] telnet> Connection closed. [root@dbappweb ~]#
Now URL https://dbappweb.com/TESTAPP/ is accessible and application too.
Last Updated: Apr 06, 2018