Jboss FAQs, How to change default port jboss

Once you setup JBoss on your system, there are a lot of Frequently asked questions which comes to your mind, which includes

how do we change or see the admin console password,
what is the default port used,
How do we change the default port,
How can we run multiple servers on single jboss installation.
What are the different profiles available on Jboss.

Few of these are answered here.

How to find the password for Jboss admin console it is used to shutdown also

C:\JBoss5\jboss-eap-5.1\jboss-as\server\default\conf\props\jmx-console-users.properties

How to change default port(8080) in JBoss
You need to edit the following file and restart the JBoss
C:\JBoss5\jboss-eap-5.1\jboss-as\server\default\deploy\jbossweb.sar\server.xml
<!– A HTTP/1.1 Connector on port 8080 –>
<Connector protocol=”HTTP/1.1? port=”8080? address=”${jboss.bind.address}”
connectionTimeout=”20000? redirectPort=”8443? />
How to setup Multiple applications servers with one jboss installation
1) Create two servers by copying default profile, edit jbossweb.sar\server.xml , change the port number
C:\JBoss5\jboss-eap-5.1\jboss-as\server\default\deploy\jbossweb.sar\server.xml

<!– A HTTP/1.1 Connector on port 9090 –>
<Connector protocol=”HTTP/1.1? port=”9090? address=”${jboss.bind.address}”
connectionTimeout=”20000? redirectPort=”8443? />

2) Start the server as follows
run.bat -Djboss.service.binding.set=<ports-01> -c <servername>
run.bat -Djboss.service.binding.set=ports-01 -c default

3) shutdown a specific server in multi server setup
shutdown -s jnp://localhost:1199 -u <username> -p <password> –> increment 100 if you use ports-02 (1299)

Note : – Djboss.service.binding.set=ports-01 instruct jboss to increment the ports used internally by 100. There are lots of ports used by jboss for each instance of servers.
If you use ports-02 then it will increment it by 200. These values are important to know as it is required to stop the instance using JNP.

Add Comment