Dear Friends,
At times we might have to hit the apps running in Linux machine or another machine connected through the same network.
If you want to hit an application deployed in tomcat which is running in the same network that you are connected in, then you have to use http://IP_or_hostname:port_number/contextRoot
for example http://JaiRam-PC:8080/app that's it, you are good to go.
But if the application is running in JBoss you might see "This webpage is not available" as shown below.
Reason:
By default (due to security reasons) JBoss AS binds only to localhost.
Resolution or work around:
1. While running the JBoss use another param as follows
Going one step further:
Form JBoss 7 on wards configuring the server and deployments can be done by admin console app (management). It runs on port number 9990 by default (http://localhost:9990/console/App.html) Which is again by default enabled for localhost, to be enable on network mode we have to run the server as follows
standalone.sh -bmanagement 0.0.0.0
(on windows as follows)
standalone.bat -bmanagement 0.0.0.0
I used to run my server as follows:
Lengthy param names are as below
-Djboss.bind.address=0.0.0.0
-Djboss.bind.address.management=0.0.0.0
Where did I apply this:
standalone.sh -b 0.0.0.0 -bmanagement=0.0.0.0
Hope this post is useful to you, please drop in your comments.
At times we might have to hit the apps running in Linux machine or another machine connected through the same network.
If you want to hit an application deployed in tomcat which is running in the same network that you are connected in, then you have to use http://IP_or_hostname:port_number/contextRoot
for example http://JaiRam-PC:8080/app that's it, you are good to go.
But if the application is running in JBoss you might see "This webpage is not available" as shown below.
Reason:
By default (due to security reasons) JBoss AS binds only to localhost.
Resolution or work around:
1. While running the JBoss use another param as follows
run.sh -b 0.0.0.0
(on windows as follows)
run.bat -b 0.0.0.0
2. From JBoss AS 7, we have one more option,
that is we can edit the JBOSS_HOME/standalone/configuration/standalone.xml to change the "public" and "management" interfaces to point to the hostname of your system or 0.0.0.0Going one step further:
Form JBoss 7 on wards configuring the server and deployments can be done by admin console app (management). It runs on port number 9990 by default (http://localhost:9990/console/App.html) Which is again by default enabled for localhost, to be enable on network mode we have to run the server as follows
standalone.sh -bmanagement 0.0.0.0
(on windows as follows)
standalone.bat -bmanagement 0.0.0.0
I used to run my server as follows:
Lengthy param names are as below
-Djboss.bind.address=0.0.0.0
-Djboss.bind.address.management=0.0.0.0
Where did I apply this:
- At work I have got a Linux box (Performance Testing Environment) and I have to deploy my app in JBoss 7.1.1 in that box from another machine (my Laptop).
- One of my friends (middle-ware guy) was asked to start JBoss as said above like both the public (deployed apps) and management console app should be accessed in the same network. I suggested him to add both parameters when running server as below and that worked like a charm.
standalone.sh -b 0.0.0.0 -bmanagement=0.0.0.0
Hope this post is useful to you, please drop in your comments.
Good One - Praveen :)
ReplyDeleteGood Work, Praveen :)
ReplyDelete