Binding to a different IP address in JBoss

Answered

Hi,

I am creating a website that runs Vaadin in JBoss 6. I work under Linux/Firefox but I also want to view it using a virtual machine/Windows /Internet Explorer. Unfortunately JBoss does not accept my request from IE. Reason is that JBoss is bound to 127.0.0.1. Fine if you test it locally, but not if you need to access the page from another machine. So I added the parameter "-b 10.0.0.100" to the JBoss run/debug config to tell JBoss to bind to my external IP address. Now it runs on 10.0.0.100, but the debugger that deploys the .war file cannot connect anymore, since it tries to find JBoss on 127.0.0.1 where JBoss does not respond to.

I want the debugger to connect to 10.0.0.100 and not 127.0.0.1. I know that, technically, it's remote debugging. I have tried to use a remote jboss run/debug configuration, but that requires me to start up JBoss myself while this was a cool feature that IntelliJ did when ran with the local run/debug configuration.

So, is there a way to bind the debugger to my "real" IP address 10.0.0.100, and not localhost 127.0.0.1?

(I hope I am making some sense  :))

Cheers,

WarnerJan

5 comments
Comment actions Permalink

Hi

You could try changing the option to -b 0.0.0.0 and it should bind to all interfaces allowing you to connect remotely and debug locally. There's info on the following page http://community.jboss.org/wiki/JBossRunParameters

cheers,
Rod

0
Comment actions Permalink

You sir, are brilliant! Thanks, it works like a charm!

0
Comment actions Permalink

I'm doing the very same and for some reason there's no support for passing the host as a parameter in WildFly nor IntelliJ.

In my case I have multiple network interfaces and I can't let WildFly bind to all available interfaces because it will potentially break my other networking components.

In my case I simply hardcoded the host:port combo in standalone.bat:

set "JAVA_OPTS=%JAVA_OPTS% -agentlib:jdwp=transport=dt_socket,address=10.10.10.30:8787,server=y,suspend=n"

I actually tried to set up a couple of --debug-host parameter but WildFly refuses to start because it doesn't know the parameter internally.

0
Comment actions Permalink

Wildfly accepts the -Djboss.bind.address=10.10.10.30 JVM parameter to bind to an address. Is that what you are looking for?

0
Comment actions Permalink

No, I was trying to tell you that I am using -b10.10.10.30 and in order for intellij to reach the server I just changed the "address" part of the debug settings in standalone.bat to include my ip:port. So now I can run WildFly on 10.10.10.30 and debug from IntelliJ

 

 

0

Please sign in to leave a comment.