I'm testing my Web App on Ubuntu ec2 instance with JBoss 7.1.1. Application Server but I have one problem.
When I start instance after some hours of stop, I need to modify the standalone.xml configuration of jboss with new EC2 instance IP.
My question is how to modify this standalone.xml tag with hostname of my ec2 instance :
from ubuntu shell when i write hostname the result is like: ip-10.4.5.5 (that is my ec2 instance private ip and his hostname).
I would like change the 127.0.0.1 in the standalone.xml with hostname command line ... but i don't know how to do it.
I need to find a solution that is automatic to plan the autoscaling function.
Thanks for your help.
One solution might be to listen on all IPs and interfaces, i.e., either replace 127.0.0.1 with 0.0.0.0 or start the server using -b and -bmanagement (./standalone.sh -b 0.0.0.0 -bmanagement 0.0.0.0).
Alternatively, another solution might be to start the server with -b `hostname` -bmanagement `hostname`.