views:

20

answers:

1

I am looking into a strange problem where a JBoss 4.2.2 server is not binding to the correct AJP port. We have configured it to bind to 8009, but it is binding to 18129.

After attaching the debugger, I can see that for some reason, org.jboss.services.binding.XSLTFileDelegate is generating a temp file with this in it. The XSLTFileDelegate does an XSLT transform which includes the following variable declaration:

<xsl:variable name="portAJP" select="$port - 71"/>

And sets the value of $port to be 18200, hence the binding to 18129.

What I don't understand is why JBoss is choosing to run XSLTFileDelegate in the first place. We have explicitly chosen to bind to 8009 in <server>\deploy\jboss-web.deployer\server.xml. We also have other JBoss instances in the same directory tree which are correctly binding to 8019, 8029 and so-on.

Is anyone able to shed some light on what is happening?

+1  A: 

It sounds like your JBoss server has been configured to use a different port mapping than the default. This is sometimes done in order to allow multiple JBoss instances to run on the same IP address.

Check out conf/jboss-service.xml, and look for a reference to ServiceBindingManager. It's normally commented out, but if you see it uncommented, then look for the attribute that looks something like this:

<attribute name="ServerName">ports-01</attribute>

This ports-01 specifies a "shifted" set of ports for each network service, including AJP. These mappings are defined in $JBOSS_HOME/docs/examples/binding-manager/sample-bindings.xml.

If you comment out the ServiceBindingManager in conf/jboss-service.xml, the ports should revert back to their defaults.

skaffman