These days into a new company, and then the first day began to build a variety of environments, because the original Tomcat container has been used, and then the first contact with the JBoss container, after the build, launched in the MyEclipse JBoss container, and then want to visit in the browser to see, Directly enter the IP address +jboss port number, the browser can not access the report, I think is not because the IP address input is wrong, after the change to localhost and then try to find the normal can access, and then deliberately look at the IP address of the next machine, found that there is no error, but the browser can not access, This is a little depressed, and Tomcat is not the same? After that is the degree Niang, found is really different.
1, using localhost access to normal
2. Cannot access using IP address report
JBoss Version: jboss-4.2.3
Symptoms:
The server cannot be accessed via an IP address, only with 127.0.0.1 or localhost.
Workaround:
When you start JBoss, type: Run-b xxx.xxx.xxx.xxx
Where xxx.xxx.xxx.xxx is the IP address of the machine.
Here is the online search for the cause of problems and solutions:
Reason:
JBOSS version 4.2 or above service start if not add any parameters, only listen to 127.0.0.1, that is, only with 127.0.0.1 or localhost access, with the external address of the machine can not access the same network of other machines. Unless you use the parameter-B IP address to bind to the listening address.
This is not the same as the previous version of JBoss, the previous version of no parameter is to listen to all the IP address of this machine, now must use the parameter-B 0.0.0.0 to listen to all addresses.
===========================================
1.
Attached, here are the specific solutions:
In the Jboss-4.2.2.ga\bin directory, create a new Start.bat file with the following entries:
Run.bat-b 0.0.0.0
Save it. After you start the service with your newly crafted Start.bat file, you can have IP access.
===========================================
Locate Jboss_home's \server\default\deploy\jboss-web.deployer\server.xml file,
<Connector Port="8888" Address="0.0.0.0" MaxThreads="+" maxhttpheadersize="8192" Emptysessionpath="true" Protocol="http/1.1" enablelookups="false" Redirectport="8443" Acceptcount=" the" ConnectionTimeout="20000" Disableuploadtimeout="true"/>
<!-- Define an AJP 1.3 Connector on port 8009 --> <Connector port="8009" address="0.0.0.0" protocol="AJP/1.3" emptySessionPath="true" enableLookups="false" redirectPort="8443" />
Change all of the ${jboss.bind.address} to 0.0.0.0 (there are two places in total)
Also attached:
Jboss Change port number:
Locate the Jboss_home. \server\default\deploy\jboss-web.deployer\server.xml file and locate the following section:
<!--A http/1.1 Connector on port 8080 -- <Connector Port="8080" Address="${jboss.bind.address}" MaxThreads="+" Strategy="MS" maxhttpheadersize="8192" Emptysessionpath="true" enablelookups="false" Redirectport="8443" Acceptcount=" the" ConnectionTimeout="20000" Disableuploadtimeout="true"/>
Save after modification, restart JBoss in MyEclipse, and then access it in two different ways in the browser, which is normal.
Original address: http://feng88724.iteye.com/blog/263211
JBoss deployment project cannot be accessed via IP address, only via localhost or 127.0.0.1