I am using jboss-7 and I want to change the port number from 8080 to 7001. Which file do I need to change?
8 Answers
The file is $JBOSS_HOME/standalone/configuration/standalone.xml
. Find <socket-binding-group>
and <socket-binding>
there.
EDIT
There's multiple ways to do this. The recommended way is to use the management console.
If JBoss AS runs on your local computer, open the URL http://localhost:9990/console/App.html#socket-bindings
and edit the socket-bindings there. I tested it on Wildfly 8.1.0 Final, don't know if the URL is valid for other versions of JBoss AS.
- 4,655
- 1
- 25
- 28
When starting use
./standalone.sh -b 0.0.0.0 -Djboss.socket.binding.port-offset=1000 &
- for linux
standalone.bat -Djboss.socket.binding.port-offset=1000
- windows
here 1000 is the offset value. 8080 + 1000 = 9080 the application will start
- 1,078
- 16
- 18
go to installation directory .... Mine directory like that
C:\wildfly-10.0.0.CR5\standalone\configuration\
find standalone.xml
file, open and change the http port 8080
inside
<socket-binding-group>
Here I change my port number 8080 to 3333
<socket-binding name="http" port="${jboss.http.port:3333}"/>
- 3,073
- 10
- 28
- 41
- 31
- 1
For Windows:
standalone.bat
is using
standalone.conf.bat
Open in notepad
Add the last 2 lines (as seen below, aka the 2 "Alter Port Settings Offset" lines) (the first 3 lines should already be there...and provide the breadcrumb to where to place the 2 new lines that you need)
rem # Make Byteman classes visible in all module loaders
rem # This is necessary to inject Byteman rules into AS7 deployments
set "JAVA_OPTS=%JAVA_OPTS% -Djboss.modules.system.pkgs=org.jboss.byteman"
REM NEW LINE HERE Alter Port Settings Offset
set "JAVA_OPTS=%JAVA_OPTS% -Djboss.socket.binding.port-offset=1000"
- 21,474
- 7
- 81
- 117
Change the socket-binding of http to your desire port number you want to use inside the socket-binding-group in your standalone.xml file of jboss.For example i am using 8090 as my port number.
<socket-binding name="http" port="8090"/>
- 169
- 2
- 9
Go to jboss directory exp - jboss-7.0.0.CR1\jboss-7.0.0.CR1\standalone\configuration
open standalone.xml file then change port number according to you.
- 22,887
- 12
- 43
- 49
- 11
- 1
In eclipse I open port-offset (that corrispondes to standalone.xml) and modify jboss.socket.binding.port-offset from 0 to 1000
- 912
- 11
- 19
To change the port for JBoss in local, when running multiple instances below are the steps.
- In the JBoss folder, go to standalone.xml.
- search for
- change the "port-offset=${jboss.socket.binding.port-offset:0} to 100 like below port-offset="${jboss.socket.binding.port-offset:100}
- Then when ran standalone.bat, then Jboss will run on port 10090
- 69
- 1
- 6