JBoss Port Renumbering

07 April 2006, Charles Roth
25 April 2008, updated with note about JBoss 5.0.

JBoss 4 is a very powerful, open-source, Java application server.  JBoss at Work is an otherwise excellent introduction to JBoss, with one teensy little annoyance...

...that is the reason for this page.  Specifically, when it describes installing and starting JBoss, it says:

"If you don't see any exceptions scroll by, JBoss is up and running when you see the final line: Started in xx ms. To stop JBoss, press ctrl+C.

Now that we're sure that everything runs, let's explore JBoss a bit more closely."

And if you do see any exceptions, what should you do?  Sing a verse or two of Titwillow?

Seriously folks, the most common problem one is likely to encounter when installing JBoss on a working server, is a port-number collision.  JBoss is not particularly helpful about telling you which port numbers were already in use, what they are for, and how you can change them.  Hence, this page.

The following refers to JBoss version 4.03, for the "default" set of services.  All file references are relative to $JBOSS_HOME/server/default.  Be careful -- a given parameter may appear multiple times in a single file, make sure you catch all of them.  I've shown an example set of new port numbers, but the actual choices are up to you.  As usual, your mileage may vary.

File Service   What   Parameter   Port   New Port 
deploy/http-invoker.sar/META-INF/jboss-service.xml  Tomcat InvokerURLSuffix   8080  11080
deploy/jboss-ws4ee.sar/META-INF/jboss-service.xml   Tomcat WebServicePort 8080  11080
WebServiceSecurePort  8443 11443
deploy/jbossweb-tomcat55.sar/server.xml Tomcat HTTP port 8080  11080
HTTP redirectPort 8443 11443
AJP port 8009 11009
SSL port 8443 11443
conf/jboss-service.xml JBoss WebService   Port 8080  11080
Naming   Port 1099 11099
Naming   RmiPort 1098 11098
invoker,type=jrmp   RMIObjectPort  4444 14444
invoker,type=pooled   ServerBindPort  4445 14445
deploy/jms/uil2-service.xml JMS ServerBindPort 1093 11093
deploy/hsqldb-ds.xml HSQLDB  Hypersonic Port 1701 11701
deploy/cache-invalidation-service.xml ProviderUrl 1099 11099

The above information was gained the hard way -- by 'grep'ing through all the .xml files for things that looked like port numbers, and trying it all on a server that already had multiple instances of Tomcat, Apache, other java app servers, etc.  There is some additional info on the JBoss wiki, at wiki.jboss.org/wiki/Wiki.jsp?page=ConfigurePorts

Any feedback is most welcome (roth@thedance.net).  Good luck!

Footnote: As of April 2008, Dennis Kornbluh wrote in to say that most of this information still seems to be accurate for JBoss-5.0.0.Beta4.  Thanks, Dennis!