Pages

Thursday, June 4, 2015

JBoss 7 – Changing Port Number

As a system admin it is very important to identify the details of the running ports on a JBoss server. On some cases we need to change the port numbers since some other service may be running on that Port. This article tells you on how to change Port numbers in JBoss 7

Way -1
Change the port manually , the port details are handled on the configuration file ( for stand-alone the file is standalone.xml )

Go to $JBOSS_HOME/standalone/configuration/standalone.xml.
Open the file and search for <socket-binding-group>

The <socket-binding-group/> element contains all the details of the running process and the ports they run on. Change the port details here and restart the machine. It looks like this

<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"/>
<socket-binding name="remoting" port="4447"/>
<socket-binding name="txn-recovery-environment" port="4712"/>
<socket-binding name="txn-status-manager" port="4713"/>
<outbound-socket-binding name="mail-smtp">
<remote-destination host="localhost" port="25"/>
</outbound-socket-binding>
</socket-binding-group>

Way-2
Start the standalone server by passing the socket.binding parameter as
standalone.bat -Djboss.socket.binding.port-offset=1000

Way -3
Once the server is started , access the socket-binding URL using this link
and we can change the port details from here

Hope this helps , more to come J

6 comments :

  1. Maxmunus Providing Free Webinar/Demo on JBoss. JBoss tutorial step to step process will help understanding JBoss tutorial in better way. also JBoss tutorial pdf include each and every detail of JBoss basics for beginners.


    For Registration Contact:
    Name : Arunkumar U
    Email : arun@maxmunus.com
    Skype id: arun@maxmunus.com
    Contact No: +91- 9738507310,
    Company Website :- http://www.maxmunus.com

    ReplyDelete
  2. Hi there mates, how is everything, and what you want to say regarding this post, in my view its in fact remarkable for
    me.

    ReplyDelete
  3. I want to change port number like as changing context path adding jboss-web.xml file in-case of context path it's picking context path from jboss-web.xml same as i want pick port number also from this or some other file

    ReplyDelete
  4. Keep on writing, great job!

    ReplyDelete
  5. Magnificent beat ! I would like to apprentice while you amend your website, how can i subscribe for a
    blog site? The account helped me a acceptable deal.
    I had been tiny bit acquainted of this your broadcast offered bright clear
    idea

    ReplyDelete
  6. I need to to thank you for this very good read!! I definitely loved every little bit of it.
    I've got you bookmarked to look at new things you post...

    ReplyDelete