Dynamically Changing JBoss Ports

Changing Http Port:

Add the required http port to ${jboss}/server/default/deploy/jbossweb.sar/server.xml in the the following element:

Changing JNDI and RMI Port:

  • Add the correct port to your ${jboss}/server/default/conf/jndi.properties (see above). The entry might look like java.naming.provider.url=jnp://myhost:1199.
  • Change the settings in ${jboss}/server/default/conf/jboss-service.xml: Find the entry for mbean code=”org.jboss.naming.NamingService” and change the attributes Port and RmiPort to the appropriate.

Dynamically Changing the Http/JNDI/RMI Port:

When two JBoss servers are running on one physical machine, you can dynamically change the Http/JNDI/RMI Ports by executing the following command during server start-up in JBoss bin folder:

nohup ./run.sh -c SERVER_NAME -b -Djboss.service.binding.set=ports-02 -Dconfiguration.url=CONFIG_FOLDER

The above command increments the port numbers by +200 i.e. 8080 becomes 8280 , 1099 becomes 1299, etc


nohup generates the nohup.out file in the same jboss bin folder where we need to execute the above command

Note: Default JBoss Http port=8080, JNDI port=1099, RMI port=1098, AJP port=8009

Courtesy: JFire


Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out /  Change )

Google+ photo

You are commenting using your Google+ account. Log Out /  Change )

Twitter picture

You are commenting using your Twitter account. Log Out /  Change )

Facebook photo

You are commenting using your Facebook account. Log Out /  Change )


Connecting to %s