Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Can't access JBoss AS 7 from remote machine

Tags:

jboss7.x

I am running JBoss AS 7 on port 8080. I am able to access it from my local machine (http://localhost:8080). However I am not able to access it from another machine on the same network, e.g. http://192.168.1.104:8080 does not work. I have disabled the Windows firewall on the local machine. In fact, if I start a Tomacat server on the local machine at port 8080 it is easily accessible from a remote machine. So it is something about the JBoss server that is causing the problem. Any idea on how to fix this?

Thanks.

like image 672
Naresh Avatar asked Jan 18 '14 22:01

Naresh


People also ask

How can I access JBoss from another machine?

From the server console, launch the Jboss GUI from http://127.0.0.1:8080, and click on “Profile” -> General Configuration -> Interfaces. From here, you can change the ip-address of the management and public interfaces. Restart the JBoss AS after this change.

How do I access JBoss?

JBoss AS 7, by default, does not use any more port 8080 to serve the admin console. You can access it at the https://localhost:9990/console as configured in your standalone.

What is JBoss bind address?

It tells JBoss which local address to bind to. The server will only listen on that specific interface, not on all local interfaces. (e.g. if you have bind address set to 127.0. 0.1 , it will not listen to connection from other hosts, only on localhost.)

Where is JBoss listening port?

Also you can use "lsof -i tcp:8080" to check if this port is binding to JBoss AS or "netstat -nlp".


2 Answers

If you are running JBoss from an IDE there should be a checkbox that allows for remote web access. It is unchecked by default. In eclipse, double click on JBoss under the servers tab and there should be a checkbox labeled "Listen on all interfaces to allow remote web connections." under the Server Behaviour tab.

like image 84
AhmedAly Avatar answered Sep 27 '22 23:09

AhmedAly


Start the server with -Djboss.bind.address=192.168.1.104 option

OR

add the server IP address in your standalone.xml

<interfaces>
  <interface name="management">
    <inet-address value="${jboss.bind.address.management:127.0.0.1}"/>
  </interface>
  <interface name="public">
    <inet-address value="${jboss.bind.address:192.168.1.104}"/>
  </interface>
</interfaces>

You can use 0.0.0.0 instead of 192.168.1.104 if you want to bind to all IP addresses.

like image 38
Alf Avatar answered Sep 28 '22 01:09

Alf