Jboss only works on localhost:8080 ,but doesnt reply when called by ip
Asked Answered
H

4

18

I installed JBoss 5.0.1 and ran it , but when i called it from the same computer on localhost:8080 it works but when i call it from other computer it doesnt work at all using the computer IP ... when i had tomcat it used to work on both.so Does anybody know the problem?

Henrieta answered 1/6, 2011 at 16:47 Comment(1)
What options are you using on startup? What is the value of the -b parameter in the run script?Cynic
A
18

If you want JBoss to communicate on all IP addresses that are on the machine, then you can start it with the -b option passing 0.0.0.0 as the ip address, e.g.

-b 0.0.0.0

Probably better is binding to the specific IP address that you want to. You can do this again by using the -b option, but passing the IP address you want to bind to or the DNS name you want to bind to, e.g.

-b 192.168.0.1

or -b jbosshostname

You can put the -b option in the run.bat file so it is used automatically if you are running JBoss as a service - assuming Windows. If you are not using Windows, you can place this option in the run.sh file.

If you do not wish to put the -b option in the run.sh/bat file, you can enter it at the command line:

run.bat -b 192.168.0.1
Alienism answered 3/6, 2011 at 15:22 Comment(0)
I
10

Solution to jboss 7 is the same, but with the addition of -bmanagement for the management interface

-b 0.0.0.0 -bmanagement 127.0.0.1

If you prefer do set this permanently in config file you may edit file standalone/configuration/standalone.xml from :

<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:127.0.0.1}"/>
    </interface>
    <interface name="unsecure">
        <inet-address value="${jboss.bind.address.unsecure:127.0.0.1}"/>
    </interface>
</interfaces>

to:

<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:0.0.0.0}"/>
    </interface>
    <interface name="unsecure">
        <inet-address value="${jboss.bind.address.unsecure:127.0.0.1}"/>
    </interface>
</interfaces>
Iams answered 21/2, 2013 at 9:35 Comment(2)
worth to mention, touching standalone.xml for a jboss started within eclipse, doesn't seem to work. You need to add -b 0.0.0.0 to program arguments (in launch configuration)Vespertine
Also, uncheck Always update arguments related to the runtime.Guild
C
1

Run JBoss with -b option:

$ ./run.sh -b 0.0.0.0

(on Windows):

> run.bat -b 0.0.0.0
Cyanite answered 1/6, 2011 at 16:58 Comment(0)
I
1

You have to edit the run.bat or run.sh accordingly including binding -b 0.0.0.0 .

or you can run the jboss by command line by following command.

run -b 0.0.0.0

Impassive answered 2/6, 2011 at 10:10 Comment(0)

© 2022 - 2024 — McMap. All rights reserved.