Win a copy of Programmer's Guide to Java SE 8 Oracle Certified Associate (OCA) this week in the OCAJP forum!
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic

How to make JBoss Application Server listen on two IPs?

 
Anoop Nair
Ranch Hand
Posts: 70
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
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
Posts: 70
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
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
Pie
Posts: 10447
227
IntelliJ IDE Ubuntu
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Anoop Nair wrote:Is there a way to specify specific IP address ?



run.sh -b <Specific IP address> should work.
 
Anoop Nair
Ranch Hand
Posts: 70
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
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
Pie
Posts: 10447
227
IntelliJ IDE Ubuntu
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
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
Posts: 70
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Thanks Jaikiran.

I have made the server listen on 0.0.0.0 now.
 
Jaikiran Pai
Marshal
Pie
Posts: 10447
227
IntelliJ IDE Ubuntu
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
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.
 
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic