I am using JBoss 7 AS. I am deploying the projects via the linux box by the cmd like so
bin/standalone.sh -b [ipaddress]
This works fine only when i am on the network, however it doesn’t work when i’m outside the network or over the internet.
How do i launch it so people can access it over the internet?
I tried this but it doesnt work.
bin/standalone.sh -b 0.0.0.0
It says:
Google Chrome could not load the webpage because took too long to respond. The website may be down, or you may be experiencing issues with your Internet connection.
Your first step is to understand and configure your interface and port bindings. Before we get to that, it should be clarified that the
-bruntime switch has been active since JBoss AS7.0.2, but wasn’t present in previous releases of AS 7. Refer to the following link for more information via the JBoss Application Server 7 community forums.https://community.jboss.org/thread/168789
For your question, you will need to consider both the interface and the port attribute of the socket binding group. Assuming that you’re using the standalone instance, you can find the socket binding groups declared in the
standalone.xmlconfiguration file as follows.Socket Groups and Port Bindings
You can see that the http connector is bound to port 8080, and you can also see that the management API port bindings are bound to java tokens. These are values that you can override (hence the
"${thing:value}"syntax), but you lose the power to override them if you hardcode them. This is relevant because the default interface is a java token, allowing you to use the-bswitch to override it.Interfaces
Here’s the default public interface in the
standalone.xmlfile. The word “public” is just a relative handle. You can “call” it anything that you want, just as long as it means something to you and you can associate server groups and socket bindings to it later. This is a great feature of AS 7, allowing you to declare a set of attributes in one element, and inherit their attributes elsewhere by referencing that element name.The following example allows you to reference the
publicinterface elsewhere without needing to know what the actual Inet Address value is.Getting Gooey
You can change these values either via the Management CLI or the Management Console (keeping with the workflow guidance that it’s better to use the Management APIs and leave the XML alone). Like most GUIs, Management Console is the easiest to jump into first. Here’s the socket binding screen. Notice that there’s only really one “socket binding group” in the standalone instance, in this case the
standard-socketsgroup.You can edit the
httpbinding if you need, but you should also think about the interface that you are using to connect to the internet. I’m going to assume that you have set up your webserver to suit your needs (which is probably more a question for apache than JBoss). Here’s the console view for interface settings.This shows the
publicinterface that thestandard-socketsbinding group is relating itself to in the config file. Advanced configurations can use the Advanced section to create ordered conditions for partitioning traffic. You can even enable the<any-address/>element that is described in the first link I posted above.From these two screens, you should be able to configure the required interface and port bindings to expose your application to the internet.