aspose file tools*
The moose likes JBoss/WildFly and the fly likes How to make JBoss Application Server listen on two IPs? Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login
JavaRanch » Java Forums » Products » JBoss/WildFly
Bookmark "How to make JBoss Application Server listen on two IPs?" Watch "How to make JBoss Application Server listen on two IPs?" New topic
Author

How to make JBoss Application Server listen on two IPs?

Anoop Nair
Ranch Hand

Joined: Oct 29, 2008
Posts: 70
Hi All,

I am using JBoss AS 4.3. I want the server to listen on two different IPs.
Please tell me how this can be achieved.
Anoop Nair
Ranch Hand

Joined: Oct 29, 2008
Posts: 70
I tried setting the run parameter bind.address.
If I set it to 0.0.0.0, it works. But then it listens to all the IPs of the system. Run Parameters Explained

Is there a way to specify specific IP address ?

Jaikiran Pai
Marshal

Joined: Jul 20, 2005
Posts: 10051
    
163

Anoop Nair wrote:Is there a way to specify specific IP address ?



run.sh -b <Specific IP address> should work.

[My Blog] [JavaRanch Journal]
Anoop Nair
Ranch Hand

Joined: Oct 29, 2008
Posts: 70
Hi Jaikiran,

Thanks for your reply.

I tried this. But it overwrites the IP specified in bind.address.
And so it listens only on the IP specified by -b.
Jaikiran Pai
Marshal

Joined: Jul 20, 2005
Posts: 10051
    
163

You can't bind to 2 different IPs for the same instance, exception ofcourse using 0.0.0.0 which binds to all available network interfaces as you already noticed.
Anoop Nair
Ranch Hand

Joined: Oct 29, 2008
Posts: 70
Thanks Jaikiran.

I have made the server listen on 0.0.0.0 now.
Jaikiran Pai
Marshal

Joined: Jul 20, 2005
Posts: 10051
    
163

Jaikiran Pai wrote:You can't bind to 2 different IPs for the same instance, exception ofcourse using 0.0.0.0 which binds to all available network interfaces as you already noticed.


Turns out, I might have been wrong about this. See these 2 threads where Peter has a suggestion which seems to work:

http://community.jboss.org/message/199697#199697
http://community.jboss.org/message/588393#588393

However, I'm not too sure how this affects the other non-HTTP bindings.
 
I agree. Here's the link: http://aspose.com/file-tools
 
subject: How to make JBoss Application Server listen on two IPs?