File APIs for Java Developers
Manipulate DOC, XLS, PPT, PDF and many others from your application.
http://aspose.com/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


Win a copy of Murach's Java Servlets and JSP this week in the Servlets forum!
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: 9912
    
158

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: 9912
    
158

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: 9912
    
158

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.
 
Don't get me started about those stupid light bulbs.
 
subject: How to make JBoss Application Server listen on two IPs?
 
Similar Threads
read property file and store it in hashMap
Does jboss bind to 0.0.0.0 on a non-clustered server ?
Configuring Websphere to listen to multiple IPs
JBoss clustering
2 different IPs, same port