JBoss Binding IP addresses

28,095

Never mind.

Start JBoss binding to all IP's works.

./run.sh -b 0.0.0.0
Share:
28,095
jeph perro
Author by

jeph perro

programmer/analyst/web developer

Updated on October 02, 2020

Comments

  • jeph perro
    jeph perro over 3 years

    I need some help from someone who understands JBoss Hostname Binding. I think the solution is easy, although it's complicated to explain.

    I am deploying an application using JBoss (v4.2) and am having troubles configuring the application.

    This application has two parts, a web site on port 8080 and web services on port 8080 using SOAP APIs.

    My server sits behind a firewall, and has an alias, let's say it's called orange.mycompany.com

    My problem is that I cannot get the console to connect to the web services. The website works, but I see an connection refused error connecting to the web services.

    [xfire.transport.http.HttpChannel] java.net.ConnectException: Connection refused

    There are 2 things I can control, the bind IP on Tomcat, and the URL of the web services.

    If I start JBoss, and bind to the local IP address:

    ./run.sh -b 10.1.2.3
    

    And I set the URL of the web services to be that same IP

    url=http://10.1.2.3:8080/services
    

    I can see the website on port 8080 from outside the firewall, but the console cannot connect to webservices. From the server, orange, itself I cannot see the website by calling http://localhost:8080/ or http://10.1.2.3:8080 or orange.mycompany.com:8080

    However, if I start JBoss and bind to 127.0.0.1:

    ./run.sh -b 127.0.0.1
    

    And I set the URL of the web services to localhost

    url=http://localhost:8080/services
    

    Now I can't see the website at all from outside the firewall. But from the server itself, I can see the website browsing http://localhost:8080 and the I can successfully connect to the web services. That's great, but I need the website to be accessible from outside.

    Can anyone suggest any combination of settings that will let me browse the website and also let the console call webservices on localhost?

  • jeph perro
    jeph perro over 14 years
    Yes, I am running JIRA, as well as 3 other apps on the same instance of JBoss ( using port 8080 ). Just to complicate things, I am also running a second instance of JBoss on port 80.
  • Admin
    Admin over 14 years
    Ops, any app require to know where IP or host it's running? This sounds bad! Even build "HTML elements", like "a", "img" etc, with complete URL (proto://host.domain:port/dir/file?args#fragments) seens bad to me. Maybe your app is doing this without you coded it. Think about fix this. Anyway, what about merge 8080 and 80 tomcats and then add an apache as a front-end? Between apache and tomcat everythings is accessed on localhost!