For example, how do I determine that my simple JBoss 4.2.3 server is listening on port 8080?
This is the closest I have been able to come, but this doesn't work:
MBeanServerConnection server = (MBeanServerConnection)new InitialContext()
.lookup("jmx/rmi/RMIAdaptor");
ObjectName on = new ObjectName(
"jboss:readonly=true,service=invoker,target=Naming,type=http");
String port = (String)server.getAttribute(on, "InvokerURLSuffix");
By default the native interface listens on port 9999 and the http interface listens on port 9990.
Executeps -ef
to check the jboss process.
There check for the following parameter.
-Djboss.socket.binding.port-offset=1010
Add 8080 to the offset value, you will get the port that jboss is listening to. Example, for me jboss is listening to 9090 port. So (8080 + offset<1010> = 9090)
It's late for answer but you could read the server.xml in jbossweb.sar under deploy directory of your profile. In that file you has the port of Coyote and others configuration parameters. This file is really usefull and it is the same that you use in Tomcat.
Also you can use "lsof -i tcp:8080" to check if this port is binding to JBoss AS or "netstat -nlp". But if you don't know the port I think the best is read server.xml.
I hope the answer could help to anyone who read it.
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With