Take the 2-minute tour ×
Server Fault is a question and answer site for professional system and network administrators. It's 100% free, no registration required.

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?

share|improve this question

4 Answers 4

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">
share|improve this answer

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

share|improve this answer

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?

share|improve this answer

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.

share|improve this answer
    
is it possible that jboss 7 has a different handling there? –  bertolami Aug 24 '11 at 9: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 9: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

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.