Overview
When deploying a new instance, the JBoss connection is refused and does not launch. Running the script conntest.sh, the following error is thrown:
Failed to connect to Connect application server; nested exception is:
java.net.ConnectException: Connection refused
There was a problem connecting to the application server.
Please verify your connection information.
Important Note: If you are unsure about securely performing the steps mentioned in this article, always make a backup before making any changes or reach out to support for more help.
Root Cause
Sometimes when a user is deploying a new instance, they just copy everything from another instance without changing the port number.
Resolution
Identify the port value depending on your JBoss version as indicated below and change them manually to fix the issue:
- Follow these steps for JBoss version 6 and above:
- Locate the standalone.XML file in the location:
$JBOSS_HOME/standalone/configuration/standalone.xml
. - Open the file and search for the code:
<socket-binding-group>
- The
<socket-binding-group/>
element contains all the details of the running process and the ports they run on. The code section looks like this:
<socket-binding-group name="standard-sockets" default-interface="public" port-offset="${jboss.socket.binding.port-offset:0}">
<socket-binding name="management-native" interface="management" port="${jboss.management.native.port:9999}"/>
<socket-binding name="management-http" interface="management" port="${jboss.management.http.port:9990}"/>
<socket-binding name="management-https" interface="management" port="${jboss.management.https.port:9443}"/>
<socket-binding name="ajp" port="8009"/>
<socket-binding name="http" port="8080"/>
<socket-binding name="https" port="8443"/>
<socket-binding name="remoting" port="4447"/>
<socket-binding name="txn-recovery-environment" port="4712"/>
<socket-binding name="txn-status-manager" port="4713"/>
<outbound-socket-binding name="mail-smtp">
<remote-destination host="localhost" port="25"/>
</outbound-socket-binding>>
</socket-binding-group>
- The
- Update the
<port>
values here with the correct values manually. - Save and close the file.
- Restart the machine.
- Locate the standalone.XML file in the location:
- Follow these steps for versions older than JBoss version 6:
- Locate jboss-service.xml in the location:
<jboss>/server/default/conf/jboss-service.xml
. - Open the file and search for the following code section which describes the port configuration.
<mbean code="org.jboss.services.binding.ServiceBindingManager" name="jboss.system:service=ServiceBindingManager">
<attribute name="ServerName">ports-01</attribute>
<attribute name="StoreURL">${jboss.home.url}/server/default/conf/bindings.xml</attribute>
<attribute name="StoreFactoryClassName">
org.jboss.services.binding.XMLServicesStoreFactory
</attribute>
</mbean> - Identify the path and file JBoss is referring to for ports configuration.
In this example above, JBoss is referring to a "ports-01" configuration in the/server/default/conf/bindings.xml
file. - Update the
<port>
value with the correct value manually in bindings.xml. - Save and close the file.
- Restart the machine.
- Locate jboss-service.xml in the location:
Confirmation
JBoss should start running after the port number is fixed.
Comments
0 comments
Please sign in to leave a comment.