Connection refused: proxy: AJP: attempt to connect to 127.0.0.1:8009 (127.0.0.1) failed
max010 Apr 3, 2013 12:02 AMHi,
I have succesfully deployed a web.war inside a JBoss 7.1.1 and in my dev environment everything works fine.
I have then succesfully deployed the same JBoss instance into another machine outside my office.
My dev environrmet is the same as the machine I have deployed JBoss to;
Apache2
Ubuntu 12.04
OpenJdk
When I try to access the site at http://123.456.78.90:8080 or http://123.456.78.90 I get the following error in the /var/log/apache2/error.log:
[notice] Apache/2.2.22 (Ubuntu) proxy_html/3.0.1 configured -- resuming normal operations
[error] (111)Connection refused: proxy: AJP: attempt to connect to 127.0.0.1:8009 (127.0.0.1) failed
[error] ap_proxy_connect_backend disabling worker for (127.0.0.1)
[error] proxy: AJP: failed to make connection to backend: 127.0.0.1
[ [error] proxy: AJP: disabled connection for (127.0.0.1)
So I am thinking that the problem might be in Apache2 but I am not sure.
My standalone.xml has:
<subsystem xmlns="urn:jboss:domain:web:1.1" default-virtual-server="default-host" native="false">
<connector name="http" protocol="HTTP/1.1" scheme="http" socket-binding="http"/>
<connector name="ajp" protocol="AJP/1.3" socket-binding="ajp" enabled="true" scheme="http"/>
.
.
.
<interfaces>
<interface name="management">
<inet-address value="${jboss.bind.address.management:127.0.0.1}"/>
</interface>
<interface name="public">
<inet-address value="${jboss.bind.address:127.0.0.1}"/>
</interface>
.
.
.
<socket-binding-group name="standard-sockets" default-interface="public" port-offset="${jboss.socket.binding.port-offset:0}">
<socket-binding name="management-native" interface="management" port="${jboss.management.native.port:9999}"/>
<socket-binding name="management-http" interface="management" port="${jboss.management.http.port:9990}"/>
<socket-binding name="management-https" interface="management" port="${jboss.management.https.port:9443}"/>
<socket-binding name="ajp" port="8009"/>
<socket-binding name="http" port="8080"/>
<socket-binding name="https" port="8443"/>
Can anyone confirm that I am not doing anything wrong in the standalone.xml?
Then Apache2 is where I am getting lost this is what I have as mods_enabled:
alias.conf
authn_file.load
authz_host.load
autoindex.load
dir.load
mime.conf
negotiation.load
proxy_html.conf
proxy.load
setenvif.conf
status.load
alias.load
authz_default.load
authz_user.load
cgi.load
env.load
mime.load
proxy_ajp.load
proxy_html.load
reqtimeout.conf
setenvif.load
userdir.conf
auth_basic.load
authz_groupfile.load
autoindex.conf
dir.conf
headers.load
negotiation.conf
proxy.conf
proxy_http.load
reqtimeout.load
status.conf
userdir.load
In the /etc/apache2/sites-enabled I have the following settings:
NameVirtualHost *:80
<VirtualHost *:80>
DocumentRoot /home/ftp/ftpadmin
<Directory />
Options FollowSymLinks
AllowOverride None
</Directory>
ErrorLog /var/log/apache2/error.log
# Possible values include: debug, info, notice, warn, error, crit,
# alert, emerg.
LogLevel warn
CustomLog /var/log/apache2/access.log combined
ServerSignature On
ProxyPass /images/thumbs !
ProxyPass /images/display !
ProxyPass /images/zoom !
ProxyPass / ajp://127.0.0.1:8009/
ProxyPassReverse / ajp://127.0.0.1:8009/
ProxyPass /opac-rest ajp://127.0.0.1:8009/opac-rest
ProxyPassReverse /opac-rest ajp://127.0.0.1:8009/opac-rest
</VirtualHost>
When I check the 8009 port on the machine 123.456.78.90 with the following command netstat -na|grep 8009 the port is listening:
tcp 0 0 123.456.78.90:8009 0.0.0.0:* LISTEN
Do I need to remove all the proxy modules and install the mod_jk as documented in https://docs.jboss.org/author/display/AS7/AJP+Connectors?
Thanks
Max