0

I have two different servers (i.e. a tomcat on port 8082 and a jboss on port 9080) on a Suse Linux machine. The first one has been installed some time ago and the second one I just installed recently. Now I have problem to access the second one from another machine.

If I look at the netstat output there is a difference:

user@server:/etc> netstat -l -n|grep 8082
tcp 0 0 :::8082 :::* LISTEN
ser@server:/etc> netstat -l -n|grep 9080
tcp 0 0 127.0.0.1:9080 0.0.0.0:* LISTEN

it seems that the 9080 server is restricted to 127.0.0.1 whereas the first one has :::.

UPDATE:

I changed the standalone.xml configuration file from

<interface name="public">
    <inet-address value="127.0.0.1"/>
</interface>

to

<interface name="public">
    <any-address />
</interface>

but there is still a difference when I call netstat, and I can still not connect to the server from remote:

netstat -l -n |grep 9080
tcp        0      0 0.0.0.0:9080            0.0.0.0:*               LISTEN

Where does this difference originate and what is the semantic of this difference?

bertolami
  • 101
  • 1
  • 4

4 Answers4

2

JBoss 4.2 and later only listens on localhost by default, you need to add -b 0.0.0.0 to your run.sh launcher (init scripts etc) to make it listen on all available interfaces.

HampusLi
  • 3,478
  • 17
  • 14
  • is it possible that jboss 7 has a different handling there? – bertolami Aug 24 '11 at 09:02
  • Possibly, I'd expect both solutions to work. Yours is slightly better as it will persist across restarts etc with no risk of the person starting jboss forgetting the bind. – HampusLi Aug 24 '11 at 09:50
  • This is wrong for JBoss AS 7, the -b ... syntax only works up to JBoss AS 6. – fgysin Sep 15 '11 at 12:11
0

Where I work we configure our JBoss AS 7 like this:

<interface name="management">
    <inet-address value="..."/>
</interface>
<interface name="public">
   <inet-address value="..."/>
</interface>

Where '...' is the actual IP or hostname of the machine the JBoss AS 7 is installed on. Works without problems up to now - what exactly is it that is not working in your case?

fgysin
  • 448
  • 2
  • 5
  • 15
0

If it does not work for you try to check iptables. (sudo iptables -F temporarily remove all rules so you can check if iptables blocks you communication).

To check if JBoss is listening: sudo netstat -tlnp
To list iptables rules: sudo iptables -L -n

Scott Pack
  • 14,907
  • 10
  • 53
  • 83
0

Perhaps your socket is bound to an IPv6, try to use any-ipv4-address element instead

<interfaces>
        <interface name="management">
            <inet-address value="127.0.0.1"/>
        </interface>
        <interface name="public">
            <inet-address value="127.0.0.1"/>
        </interface>

        <!-- IPv4 -->
        <interface name="any">
            <any-ipv4-address/>
        </interface>
</interfaces>

You can also try to use any interface in the socket-binding-group

<socket-binding-group name="standard-sockets" default-interface="any">