6 Replies Latest reply on Jan 27, 2017 12:06 PM by Anup Dey

    Error initializing endpoint: java.net.BindException: Address already in use:

    Benedict Leahy Newbie

      Hi there,

       

      I'm exploring how to migrate a product from Jboss 5 to Jboss
      7 (and ultimately on to the latest vision of Wildfly)

       

      After my migration I'm getting ERROR [org.apache.coyote.http11.Http11Protocol] (MSC service thread 1-3) Error initializing endpoint: java.net.BindException: Address already in use.

       

      I've tried changing the port to something custom like 8181 and there's still a clash somewhere. Checking Process Explorer I only have one Java process running. It's as if something is being called twice.

       

      I'd like to understand what might be happening. Please let me know if you require any further info. Thanks in advance.

       

       

      15:55:01,796 INFO  [org.jboss.as.naming] (MSC service thread 1-3) JBAS011802: Starting Naming Service
      15:55:01,867 INFO  [org.xnio.nio] (MSC service thread 1-4) XNIO NIO Implementation Version 3.0.3.GA
      15:55:01,890 INFO  [org.jboss.remoting] (MSC service thread 1-4) JBoss Remoting version 3.2.3.GA
      15:55:01,902 INFO  [org.jboss.as.connector] (MSC service thread 1-3) JBAS010408: Starting JCA Subsystem (JBoss IronJacamar 1.0.9.Final)
      15:55:01,925 INFO  [org.jboss.as.osgi] (ServerService Thread Pool -- 39) JBAS011940: Activating OSGi Subsystem
      15:55:01,931 INFO  [org.jboss.as.security] (ServerService Thread Pool -- 44) JBAS013101: Activating Security Subsystem
      15:55:01,934 INFO  [org.jboss.as.webservices] (ServerService Thread Pool -- 48) JBAS015537: Activating WebServices Extension
      15:55:02,158 INFO  [org.jboss.as.mail.extension] (MSC service thread 1-1) JBAS015400: Bound mail session [java:jboss/mail/Default]
      15:55:02,264 INFO  [org.apache.coyote.http11.Http11Protocol] (MSC service thread 1-1) Starting Coyote HTTP/1.1 on http--127.0.0.1-8181
      15:55:02,226 ERROR [org.apache.coyote.http11.Http11Protocol] (MSC service thread 1-3) Error initializing endpoint: java.net.BindException: Address already in use: JVM_Bind /127.0.0.1:8181
      at org.apache.tomcat.util.net.JIoEndpoint.init(JIoEndpoint.java:983) [jbossweb-7.0.13.Final.jar:]
      at org.apache.coyote.http11.Http11Protocol.init(Http11Protocol.java:190) [jbossweb-7.0.13.Final.jar:]
      at org.apache.catalina.connector.Connector.init(Connector.java:983) [jbossweb-7.0.13.Final.jar:]
      at org.jboss.as.web.WebConnectorService.start(WebConnectorService.java:267) [jboss-as-web-7.1.1.Final.jar:7.1.1.Final]
      at org.jboss.msc.service.ServiceControllerImpl$StartTask.startService(ServiceControllerImpl.java:1811) [jboss-msc-1.0.2.GA.jar:1.0.2.GA]
      at org.jboss.msc.service.ServiceControllerImpl$StartTask.run(ServiceControllerImpl.java:1746) [jboss-msc-1.0.2.GA.jar:1.0.2.GA]
      at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1145) [rt.jar:1.7.0_79]
      at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:615) [rt.jar:1.7.0_79]
      at java.lang.Thread.run(Thread.java:745) [rt.jar:1.7.0_79]

      15:55:02,683 ERROR [org.jboss.msc.service.fail] (MSC service thread 1-3) MSC00001: Failed to start service jboss.web.connector.connector2: org.jboss.msc.service.StartException in service jboss.web.connector.connector2: JBAS018007: Error starting web connector
      at org.jboss.as.web.WebConnectorService.start(WebConnectorService.java:271)
      at org.jboss.msc.service.ServiceControllerImpl$StartTask.startService(ServiceControllerImpl.java:1811) [jboss-msc-1.0.2.GA.jar:1.0.2.GA]
      at org.jboss.msc.service.ServiceControllerImpl$StartTask.run(ServiceControllerImpl.java:1746) [jboss-msc-1.0.2.GA.jar:1.0.2.GA]
      at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1145) [rt.jar:1.7.0_79]
      at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:615) [rt.jar:1.7.0_79]
      at java.lang.Thread.run(Thread.java:745) [rt.jar:1.7.0_79]
      Caused by: LifecycleException:  Protocol handler initialization failed: java.net.BindException: Address already in use: JVM_Bind /127.0.0.1:8181
      at org.apache.catalina.connector.Connector.init(Connector.java:985)
      at org.jboss.as.web.WebConnectorService.start(WebConnectorService.java:267)
      ... 5 more

        • 1. Re: Error initializing endpoint: java.net.BindException: Address already in use:
          Anup Dey Apprentice

          Hi,

          There are various root cause:

           

          • Port already in use by another process (another JBoss EAP instance or another service running on the platform)
          • Verify whether If same JBoss process/database server process/ etc... had been already listened same port
          • Check whether another instance of JBoss is already running. And Check whether there is a port conflict between the JBoss instances by running the grep for the port in each of the AS instances.
          • Check whether any firewall or security software could prevent JBoss from opening the port
          • If there are duplicate ports, in the JBoss AS instances, make the necessary updates so that the port setting in each configuration is unique.
          • You can check all your java process in your operating system and kill them all the be sure that nothing else is running in the 8181 port.

           

          • 2. Re: Error initializing endpoint: java.net.BindException: Address already in use:
            Panagiotis Chavariotis Novice

            First of all, try to identify which service/process is using the port 8181.

            As far as I can understand, your are using Windows.

            If this is the case, try the following commands:

            netstat -ao

            netstat -b

            • 3. Re: Error initializing endpoint: java.net.BindException: Address already in use:
              Benedict Leahy Newbie

              It's a bit strange, before I run standalone.bat nothing is using port 8181

               

              netstat -b | find "8181"

               

              returns no results.

               

              This is a non production VM so I've turned the firewall off and taken it off the network. I host the VM on my dev machine on VMware.

               

              Nothing is using port 8181 and no Java's are running before running standalone.bat

               

              After I run standalone.bat I have a single Java.exe running with the following results from netstat.

               

              C:\Users\Administrator>netstat -na | find "8181"
                TCP    127.0.0.1:8181         0.0.0.0:0              LISTENING

              C:\Users\Administrator>netstat -ao | find "8181"
                TCP    127.0.0.1:8181         jmeter:0               LISTENING       3380

              C:\Users\Administrator>netstat -b | find "8181"

              C:\Users\Administrator>

               

              I'll include my standalone.xml below. I'm a novice at jboss and apart from the Address already in use issue I have a novice type question.

               

              As best practise do you if you are just using standalone.xml to you remove the standalone-full and standalone-full-ha and standalone-ha xml files or do you tend to just leave them?

               

               

              <?xml version='1.0' encoding='UTF-8'?>

              <server xmlns="urn:jboss:domain:1.2">

                  <extensions>
                      <extension module="org.jboss.as.clustering.infinispan"/>
                      <extension module="org.jboss.as.configadmin"/>
                      <extension module="org.jboss.as.connector"/>
                      <extension module="org.jboss.as.deployment-scanner"/>
                      <extension module="org.jboss.as.ee"/>
                      <extension module="org.jboss.as.ejb3"/>
                      <extension module="org.jboss.as.jaxrs"/>
                      <extension module="org.jboss.as.jdr"/>
                      <extension module="org.jboss.as.jmx"/>
                      <extension module="org.jboss.as.jpa"/>
                      <extension module="org.jboss.as.logging"/>
                      <extension module="org.jboss.as.mail"/>
                      <extension module="org.jboss.as.naming"/>
                      <extension module="org.jboss.as.osgi"/>
                      <extension module="org.jboss.as.pojo"/>
                      <extension module="org.jboss.as.remoting"/>
                      <extension module="org.jboss.as.sar"/>
                      <extension module="org.jboss.as.security"/>
                      <extension module="org.jboss.as.threads"/>
                      <extension module="org.jboss.as.transactions"/>
                      <extension module="org.jboss.as.web"/>
                      <extension module="org.jboss.as.webservices"/>
                      <extension module="org.jboss.as.weld"/>
                  </extensions>

                  <management>
                      <security-realms>
                          <security-realm name="ManagementRealm">
                              <authentication>
                                  <properties path="mgmt-users.properties" relative-to="jboss.server.config.dir"/>
                              </authentication>
                          </security-realm>
                          <security-realm name="ApplicationRealm">
                              <authentication>
                                  <properties path="application-users.properties" relative-to="jboss.server.config.dir"/>
                              </authentication>
                          </security-realm>
                      </security-realms>
                      <management-interfaces>
                          <native-interface security-realm="ManagementRealm">
                              <socket-binding native="management-native"/>
                          </native-interface>
                          <http-interface security-realm="ManagementRealm">
                              <socket-binding http="management-http"/>
                          </http-interface>
                      </management-interfaces>
                  </management>

                  <profile>
                      <subsystem xmlns="urn:jboss:domain:logging:1.1">
                          <console-handler name="CONSOLE">
                              <level name="INFO"/>
                              <formatter>
                                  <pattern-formatter pattern="%d{HH:mm:ss,SSS} %-5p [%c] (%t) %s%E%n"/>
                              </formatter>
                          </console-handler>
                          <console-handler name="createdCONSOLE">
                              <level name="INFO"/>
                              <formatter>
                                  <pattern-formatter pattern="%d{HH:mm:ss,SSS} %-5p [%c{1}] %m%n"/>
                              </formatter>
                              <target name="System.out"/>
                          </console-handler>
                          <periodic-rotating-file-handler name="FILE">
                              <formatter>
                                  <pattern-formatter pattern="%d{HH:mm:ss,SSS} %-5p [%c] (%t) %s%E%n"/>
                              </formatter>
                              <file relative-to="jboss.server.log.dir" path="server.log"/>
                              <suffix value=".yyyy-MM-dd"/>
                              <append value="true"/>
                          </periodic-rotating-file-handler>
                          <periodic-rotating-file-handler name="createdFILE">
                              <formatter>
                                  <pattern-formatter pattern="%d %-5p [%c] (%t) %m%n"/>
                              </formatter>
                              <file relative-to="jboss.server.log.dir" path="server.log"/>
                              <suffix value="'.'yyyy-MM-dd"/>
                              <append value="true"/>
                          </periodic-rotating-file-handler>
                          <logger category="com.arjuna">
                              <level name="WARN"/>
                          </logger>
                          <logger category="org.apache.tomcat.util.modeler">
                              <level name="WARN"/>
                          </logger>
                          <logger category="sun.rmi">
                              <level name="WARN"/>
                          </logger>
                          <logger category="org.jasig">
                              <level name="WARN"/>
                          </logger>
                          <logger category="jacorb">
                              <level name="WARN"/>
                          </logger>
                          <logger category="org.jboss.management">
                              <level name="INFO"/>
                          </logger>
                          <logger category="org.jgroups">
                              <level name="WARN"/>
                          </logger>
                          <logger category="sun">
                              <level name="INFO"/>
                          </logger>
                          <logger category="org.springframework.webflow">
                              <level name="WARN"/>
                          </logger>
                          <logger category="org.soulwing">
                              <level name="WARN"/>
                          </logger>
                          <logger category="javax.enterprise.resource.webcontainer.jsf">
                              <level name="INFO"/>
                          </logger>
                          <logger category="org.springframework">
                              <level name="WARN"/>
                          </logger>
                          <logger category="com.bottomline.logging">
                              <level name="INFO"/>
                          </logger>
                          <logger category="com.sun">
                              <level name="INFO"/>
                          </logger>
                          <logger category="org.rhq">
                              <level name="WARN"/>
                          </logger>
                          <logger category="org.apache">
                              <level name="INFO"/>
                          </logger>
                          <logger category="org.jboss.serial">
                              <level name="INFO"/>
                          </logger>
                          <logger category="org.quartz">
                              <level name="INFO"/>
                          </logger>
                          <logger category="javax.xml.bind">
                              <level name="INFO"/>
                          </logger>
                          <logger category="facelets.compiler">
                              <level name="WARN"/>
                          </logger>
                          <logger category="org.ajax4jsf.cache">
                              <level name="WARN"/>
                          </logger>
                          <logger category="org.jboss.resteasy">
                              <level name="WARN"/>
                          </logger>
                          <logger category="org.jboss.seam">
                              <level name="WARN"/>
                          </logger>
                          <root-logger>
                              <level name="INFO"/>
                              <handlers>
                                  <handler name="CONSOLE"/>
                                  <handler name="FILE"/>
                              </handlers>
                          </root-logger>
                      </subsystem>
                      <subsystem xmlns="urn:jboss:domain:configadmin:1.0"/>
                      <subsystem xmlns="urn:jboss:domain:datasources:1.0">
                  <datasources>
                              <datasource jndi-name="java:jboss/datasources/jdbc/ADMIN/ADMIN" pool-name="jdbc/ADMIN/ADMIN" enabled="true">
                                  <connection-url>jdbc:sqlserver://JMETER:1433;database=BenWare</connection-url>
                                  <driver>createdDriver1</driver>
                                  <security>
                                      <security-domain>ADMINADMIN</security-domain>
                                  </security>
                              </datasource>
                              <datasource jndi-name="java:jboss/datasources/jdbc/ADMIN/INIT" pool-name="jdbc/ADMIN/INIT" enabled="true">
                                  <connection-url>jdbc:sqlserver://JMETER:1433;database=BenWare</connection-url>
                                  <driver>createdDriver1</driver>
                                  <security>
                                      <security-domain>ADMININIT</security-domain>
                                  </security>
                              </datasource>
                              <datasource jndi-name="java:jboss/datasources/jdbc/ADMIN/SYSTEM" pool-name="jdbc/ADMIN/SYSTEM" enabled="true">
                                  <connection-url>jdbc:sqlserver://JMETER:1433;database=BenWare</connection-url>
                                  <driver>createdDriver1</driver>
                                  <security>
                                      <security-domain>ADMINSYSTEM</security-domain>
                                  </security>
                              </datasource>
                              <datasource jndi-name="java:jboss/datasources/jdbc/ADMIN/RPT" pool-name="jdbc/ADMIN/RPT" enabled="true">
                                  <connection-url>jdbc:sqlserver://JMETER:1433;database=BenWare</connection-url>
                                  <driver>createdDriver1</driver>
                                  <security>
                                      <security-domain>ADMINRPT</security-domain>
                                  </security>
                              </datasource>
                              <datasource jndi-name="java:jboss/datasources/jdbc/ADMIN/HUBSYSTEM" pool-name="jdbc/ADMIN/HUBSYSTEM" enabled="true">
                                  <connection-url>jdbc:sqlserver://JMETER:1433;database=BenWare</connection-url>
                                  <driver>createdDriver1</driver>
                                  <security>
                                      <security-domain>ADMINHUBSYSTEM</security-domain>
                                  </security>
                              </datasource>
                              <datasource jndi-name="java:jboss/datasources/jdbc/ADMIN/ARCHIVE" pool-name="jdbc/ADMIN/ARCHIVE" enabled="true">
                                  <connection-url>jdbc:sqlserver://JMETER:1433;database=BenWare</connection-url>
                                  <driver>createdDriver1</driver>
                                  <security>
                                      <security-domain>ADMINARCHIVE</security-domain>
                                  </security>
                              </datasource>
                              <datasource jndi-name="java:jboss/datasources/jdbc/ADMIN/WEB" pool-name="jdbc/ADMIN/WEB" enabled="true">
                                  <connection-url>jdbc:sqlserver://JMETER:1433;database=BenWare</connection-url>
                                  <driver>createdDriver1</driver>
                                  <security>
                                      <security-domain>ADMINWEB</security-domain>
                                  </security>
                              </datasource>
                              <datasource jndi-name="java:jboss/datasources/jdbc/CLIENT/WEB" pool-name="jdbc/CLIENT/WEB" enabled="true">
                                  <connection-url>jdbc:sqlserver://JMETER:1433;database=BenWare</connection-url>
                                  <driver>createdDriver1</driver>
                                  <security>
                                      <security-domain>CLIENTWEB</security-domain>
                                  </security>
                              </datasource>
                              <datasource jndi-name="java:jboss/datasources/jdbc/CLIENT/HUBSYSTEM" pool-name="jdbc/CLIENT/HUBSYSTEM" enabled="true">
                                  <connection-url>jdbc:sqlserver://JMETER:1433;database=BenWare</connection-url>
                                  <driver>createdDriver1</driver>
                                  <security>
                                      <security-domain>CLIENTHUBSYSTEM</security-domain>
                                  </security>
                              </datasource>
                              <datasource jndi-name="java:jboss/datasources/jdbc/CLIENT/ARCHIVE" pool-name="jdbc/CLIENT/ARCHIVE" enabled="true">
                                  <connection-url>jdbc:sqlserver://JMETER:1433;database=BenWare</connection-url>
                                  <driver>createdDriver1</driver>
                                  <security>
                                      <security-domain>CLIENTARCHIVE</security-domain>
                                  </security>
                              </datasource>
                              <datasource jndi-name="java:jboss/datasources/jdbc/CLIENT/RPT" pool-name="jdbc/CLIENT/RPT" enabled="true">
                                  <connection-url>jdbc:sqlserver://JMETER:1433;database=BenWare</connection-url>
                                  <driver>createdDriver1</driver>
                                  <security>
                                      <security-domain>CLIENTRPT</security-domain>
                                  </security>
                              </datasource>
                              <datasource jndi-name="java:jboss/datasources/jdbc/CLIENT/SYSTEM" pool-name="jdbc/CLIENT/SYSTEM" enabled="true">
                                  <connection-url>jdbc:sqlserver://JMETER:1433;database=BenWare</connection-url>
                                  <driver>createdDriver1</driver>
                                  <security>
                                      <security-domain>CLIENTSYSTEM</security-domain>
                                  </security>
                              </datasource>
                              <datasource jndi-name="java:jboss/datasources/jdbc/CLIENT/INIT" pool-name="jdbc/CLIENT/INIT" enabled="true">
                                  <connection-url>jdbc:sqlserver://JMETER:1433;database=BenWare</connection-url>
                                  <driver>createdDriver1</driver>
                                  <security>
                                      <security-domain>CLIENTINIT</security-domain>
                                  </security>
                              </datasource>
                              <datasource jndi-name="java:jboss/datasources/jdbc/CLIENT/ADMIN" pool-name="jdbc/CLIENT/ADMIN" enabled="true">
                                  <connection-url>jdbc:sqlserver://JMETER:1433;database=BenWare</connection-url>
                                  <driver>createdDriver1</driver>
                                  <security>
                                      <security-domain>CLIENTADMIN</security-domain>
                                  </security>
                              </datasource>
                              <drivers>
                                  <driver name="h2" module="com.h2database.h2">
                                      <xa-datasource-class>org.h2.jdbcx.JdbcDataSource</xa-datasource-class>
                                  </driver>
                                  <driver name="createdDriver1" module="migration.drivers.createdDriver1">
                                      <driver-class>com.microsoft.sqlserver.jdbc.SQLServerDriver</driver-class>
                                  </driver>
                              </drivers>
                          </datasources>
                      </subsystem>
                      <subsystem xmlns="urn:jboss:domain:deployment-scanner:1.1">
                          <deployment-scanner path="deployments" relative-to="jboss.server.base.dir" scan-interval="5000"/>
                      </subsystem>
                      <subsystem xmlns="urn:jboss:domain:ee:1.0"/>
                      <subsystem xmlns="urn:jboss:domain:ejb3:1.2">
                          <session-bean>
                              <stateless>
                                  <bean-instance-pool-ref pool-name="slsb-strict-max-pool"/>
                              </stateless>
                              <stateful default-access-timeout="5000" cache-ref="simple"/>
                              <singleton default-access-timeout="5000"/>
                          </session-bean>
                          <pools>
                              <bean-instance-pools>
                                  <strict-max-pool name="slsb-strict-max-pool" max-pool-size="20" instance-acquisition-timeout="5" instance-acquisition-timeout-unit="MINUTES"/>
                                  <strict-max-pool name="mdb-strict-max-pool" max-pool-size="20" instance-acquisition-timeout="5" instance-acquisition-timeout-unit="MINUTES"/>
                              </bean-instance-pools>
                          </pools>
                          <caches>
                              <cache name="simple" aliases="NoPassivationCache"/>
                              <cache name="passivating" passivation-store-ref="file" aliases="SimpleStatefulCache"/>
                          </caches>
                          <passivation-stores>
                              <file-passivation-store name="file"/>
                          </passivation-stores>
                          <async thread-pool-name="default"/>
                          <timer-service thread-pool-name="default">
                              <data-store path="timer-service-data" relative-to="jboss.server.data.dir"/>
                          </timer-service>
                          <remote connector-ref="remoting-connector" thread-pool-name="default"/>
                          <thread-pools>
                              <thread-pool name="default">
                                  <max-threads count="10"/>
                                  <keepalive-time time="100" unit="milliseconds"/>
                              </thread-pool>
                          </thread-pools>
                      </subsystem>
                      <subsystem xmlns="urn:jboss:domain:infinispan:1.2" default-cache-container="hibernate">
                          <cache-container name="hibernate" default-cache="local-query">
                              <local-cache name="entity">
                                  <transaction mode="NON_XA"/>
                                  <eviction strategy="LRU" max-entries="10000"/>
                                  <expiration max-idle="100000"/>
                              </local-cache>
                              <local-cache name="local-query">
                                  <transaction mode="NONE"/>
                                  <eviction strategy="LRU" max-entries="10000"/>
                                  <expiration max-idle="100000"/>
                              </local-cache>
                              <local-cache name="timestamps">
                                  <transaction mode="NONE"/>
                                  <eviction strategy="NONE"/>
                              </local-cache>
                          </cache-container>
                      </subsystem>
                      <subsystem xmlns="urn:jboss:domain:jaxrs:1.0"/>
                      <subsystem xmlns="urn:jboss:domain:jca:1.1">
                          <archive-validation enabled="true" fail-on-error="true" fail-on-warn="false"/>
                          <bean-validation enabled="true"/>
                          <default-workmanager>
                              <short-running-threads>
                                  <core-threads count="50"/>
                                  <queue-length count="50"/>
                                  <max-threads count="50"/>
                                  <keepalive-time time="10" unit="seconds"/>
                              </short-running-threads>
                              <long-running-threads>
                                  <core-threads count="50"/>
                                  <queue-length count="50"/>
                                  <max-threads count="50"/>
                                  <keepalive-time time="10" unit="seconds"/>
                              </long-running-threads>
                          </default-workmanager>
                          <cached-connection-manager/>
                      </subsystem>
                      <subsystem xmlns="urn:jboss:domain:jdr:1.0"/>
                      <subsystem xmlns="urn:jboss:domain:jmx:1.1">
                          <show-model value="true"/>
                          <remoting-connector/>
                      </subsystem>
                      <subsystem xmlns="urn:jboss:domain:jpa:1.0">
                          <jpa default-datasource=""/>
                      </subsystem>
                      <subsystem xmlns="urn:jboss:domain:naming:1.1"/>
                      <subsystem xmlns="urn:jboss:domain:osgi:1.2" activation="lazy">
                          <properties>
                              <property name="org.osgi.framework.startlevel.beginning">
                                  1
                              </property>
                          </properties>
                          <capabilities>
                              <capability name="javax.servlet.api:v25"/>
                              <capability name="javax.transaction.api"/>
                              <capability name="org.apache.felix.log" startlevel="1"/>
                              <capability name="org.jboss.osgi.logging" startlevel="1"/>
                              <capability name="org.apache.felix.configadmin" startlevel="1"/>
                              <capability name="org.jboss.as.osgi.configadmin" startlevel="1"/>
                          </capabilities>
                      </subsystem>
                      <subsystem xmlns="urn:jboss:domain:pojo:1.0"/>
                      <subsystem xmlns="urn:jboss:domain:remoting:1.1">
                          <connector name="remoting-connector" socket-binding="remoting" security-realm="ApplicationRealm"/>
                      </subsystem>
                      <subsystem xmlns="urn:jboss:domain:resource-adapters:1.0">
                          <resource-adapters>
                              <resource-adapter>
                                  <archive>
                                      jms-ra.rar
                                  </archive>
                                  <transaction-support>XATransaction</transaction-support>
                                  <connection-definitions>
                                      <connection-definition class-name="org.jboss.resource.adapter.jms.JmsConnectionFactory" jndi-name="java:jboss/JmsXA" enabled="true" use-java-context="true" pool-name="JmsXA">
                                          <config-property name="JmsProviderAdapterJNDI">
                                              java:/DefaultJMSProvider
                                          </config-property>
                                          <config-property name="SessionDefaultType">
                                              javax.jms.Topic
                                          </config-property>
                                          <xa-pool>
                                              <max-pool-size>20</max-pool-size>
                                          </xa-pool>
                                          <security>
                                              <security-domain-and-application>JmsXARealm</security-domain-and-application>
                                          </security>
                                      </connection-definition>
                                  </connection-definitions>
                              </resource-adapter>
                          </resource-adapters>
                      </subsystem>
                      <subsystem xmlns="urn:jboss:domain:sar:1.0"/>
                      <subsystem xmlns="urn:jboss:domain:security:1.1">
                          <security-domains>
                              <security-domain name="jboss-web-policy" cache-type="default">
                                  <authorization>
                                      <policy-module code="Delegating" flag="required"/>
                                  </authorization>
                              </security-domain>
                              <security-domain name="jboss-ejb-policy" cache-type="default">
                                  <authorization>
                                      <policy-module code="Delegating" flag="required"/>
                                  </authorization>
                              </security-domain>
                              <security-domain name="CLIENTWEB">
                                  <authentication>
                                      <login-module code="SecureIdentity" flag="required">
                                          <module-option name="username" value="JB7WEBSYSTEM"/>
                                          <module-option name="password" value="146e09c3c28cebdcfe28e2ec98617786"/>
                                          <module-option name="managedConnectionFactoryName" value="jboss.jca:name=jdbc/CLIENT/WEB,service=LocalTxCM"/>
                                      </login-module>
                                  </authentication>
                              </security-domain>
                              <security-domain name="CLIENTINIT">
                                  <authentication>
                                      <login-module code="SecureIdentity" flag="required">
                                          <module-option name="managedConnectionFactoryName" value="jboss.jca:name=jdbc/CLIENT/INIT,service=LocalTxCM"/>
                                          <module-option name="username" value="JB7WEBSYSTEM"/>
                                          <module-option name="password" value="146e09c3c28cebdcfe28e2ec98617786"/>
                                      </login-module>
                                  </authentication>
                              </security-domain>
                              <security-domain name="ADMININIT">
                                  <authentication>
                                      <login-module code="SecureIdentity" flag="required">
                                          <module-option name="password" value="146e09c3c28cebdcfe28e2ec98617786"/>
                                          <module-option name="managedConnectionFactoryName" value="jboss.jca:name=jdbc/ADMIN/INIT,service=LocalTxCM"/>
                                          <module-option name="username" value="JB7WEBSYSTEM"/>
                                      </login-module>
                                  </authentication>
                              </security-domain>
                              <security-domain name="JBossWS">
                                  <authentication>
                                      <login-module code="UsersRoles" flag="required">
                                          <module-option name="unauthenticatedIdentity" value="anonymous"/>
                                          <module-option name="rolesProperties" value="${jboss.server.config.dir}/jbossws-roles.properties"/>
                                          <module-option name="usersProperties" value="${jboss.server.config.dir}/jbossws-users.properties"/>
                                      </login-module>
                                  </authentication>
                              </security-domain>
                              <security-domain name="CLIENTSYSTEM">
                                  <authentication>
                                      <login-module code="SecureIdentity" flag="required">
                                          <module-option name="password" value="146e09c3c28cebdcfe28e2ec98617786"/>
                                          <module-option name="username" value="JB7WEBSYSTEM"/>
                                          <module-option name="managedConnectionFactoryName" value="jboss.jca:name=jdbc/CLIENT/SYSTEM,service=LocalTxCM"/>
                                      </login-module>
                                  </authentication>
                              </security-domain>
                              <security-domain name="CLIENTADMIN">
                                  <authentication>
                                      <login-module code="SecureIdentity" flag="required">
                                          <module-option name="managedConnectionFactoryName" value="jboss.jca:name=jdbc/CLIENT/ADMIN,service=LocalTxCM"/>
                                          <module-option name="username" value="JB7ADMSYSTEM"/>
                                          <module-option name="password" value="146e09c3c28cebdcfe28e2ec98617786"/>
                                      </login-module>
                                  </authentication>
                              </security-domain>
                              <security-domain name="ADMINADMIN">
                                  <authentication>
                                      <login-module code="SecureIdentity" flag="required">
                                          <module-option name="managedConnectionFactoryName" value="jboss.jca:name=jdbc/ADMIN/ADMIN,service=LocalTxCM"/>
                                          <module-option name="password" value="146e09c3c28cebdcfe28e2ec98617786"/>
                                          <module-option name="username" value="JB7ADMSYSTEM"/>
                                      </login-module>
                                  </authentication>
                              </security-domain>
                              <security-domain name="application-server"/>
                              <security-domain name="ADMINARCHIVE">
                                  <authentication>
                                      <login-module code="SecureIdentity" flag="required">
                                          <module-option name="managedConnectionFactoryName" value="jboss.jca:name=jdbc/ADMIN/ARCHIVE,service=LocalTxCM"/>
                                          <module-option name="username" value="JB7ARCHIVE"/>
                                          <module-option name="password" value="146e09c3c28cebdcfe28e2ec98617786"/>
                                      </login-module>
                                  </authentication>
                              </security-domain>
                              <security-domain name="ADMINWEB">
                                  <authentication>
                                      <login-module code="SecureIdentity" flag="required">
                                          <module-option name="managedConnectionFactoryName" value="jboss.jca:name=jdbc/ADMIN/WEB,service=LocalTxCM"/>
                                          <module-option name="password" value="146e09c3c28cebdcfe28e2ec98617786"/>
                                          <module-option name="username" value="JB7WEBSYSTEM"/>
                                      </login-module>
                                  </authentication>
                              </security-domain>
                              <security-domain name="HsqlDbRealm">
                                  <authentication>
                                      <login-module code="ConfiguredIdentity" flag="required">
                                          <module-option name="principal" value="sa"/>
                                          <module-option name="password" value=""/>
                                          <module-option name="userName" value="sa"/>
                                          <module-option name="managedConnectionFactoryName" value="jboss.jca:service=LocalTxCM,name=DefaultDS"/>
                                      </login-module>
                                  </authentication>
                              </security-domain>
                              <security-domain name="CornflowerClient"/>
                              <security-domain name="JmsXARealm">
                                  <authentication>
                                      <login-module code="ConfiguredIdentity" flag="required">
                                          <module-option name="principal" value="guest"/>
                                          <module-option name="managedConnectionFactoryName" value="jboss.jca:service=TxCM,name=JmsXA"/>
                                          <module-option name="password" value="guest"/>
                                          <module-option name="userName" value="guest"/>
                                      </login-module>
                                  </authentication>
                              </security-domain>
                              <security-domain name="CLIENTHUBSYSTEM">
                                  <authentication>
                                      <login-module code="SecureIdentity" flag="required">
                                          <module-option name="managedConnectionFactoryName" value="jboss.jca:name=jdbc/CLIENT/HUBSYSTEM,service=LocalTxCM"/>
                                          <module-option name="password" value="146e09c3c28cebdcfe28e2ec98617786"/>
                                          <module-option name="username" value="JB7WEBSYSTEM"/>
                                      </login-module>
                                  </authentication>
                              </security-domain>
                              <security-domain name="ADMINHUBSYSTEM">
                                  <authentication>
                                      <login-module code="SecureIdentity" flag="required">
                                          <module-option name="password" value="146e09c3c28cebdcfe28e2ec98617786"/>
                                          <module-option name="managedConnectionFactoryName" value="jboss.jca:name=jdbc/ADMIN/HUBSYSTEM,service=LocalTxCM"/>
                                          <module-option name="username" value="JB7WEBSYSTEM"/>
                                      </login-module>
                                  </authentication>
                              </security-domain>
                              <security-domain name="other"/>
                              <security-domain name="CLIENTARCHIVE">
                                  <authentication>
                                      <login-module code="SecureIdentity" flag="required">
                                          <module-option name="username" value="JB7ARCHIVE"/>
                                          <module-option name="password" value="146e09c3c28cebdcfe28e2ec98617786"/>
                                          <module-option name="managedConnectionFactoryName" value="jboss.jca:name=jdbc/CLIENT/ARCHIVE,service=LocalTxCM"/>
                                      </login-module>
                                  </authentication>
                              </security-domain>
                              <security-domain name="ADMINRPT">
                                  <authentication>
                                      <login-module code="SecureIdentity" flag="required">
                                          <module-option name="username" value="JB7WEBSYSTEM"/>
                                          <module-option name="managedConnectionFactoryName" value="jboss.jca:name=jdbc/ADMIN/RPT,service=LocalTxCM"/>
                                          <module-option name="password" value="146e09c3c28cebdcfe28e2ec98617786"/>
                                      </login-module>
                                  </authentication>
                              </security-domain>
                              <security-domain name="client-login">
                                  <authentication>
                                      <login-module code="Client" flag="required">
                                          <module-option name="restore-login-identity" value="true"/>
                                      </login-module>
                                  </authentication>
                              </security-domain>
                              <security-domain name="CLIENTRPT">
                                  <authentication>
                                      <login-module code="SecureIdentity" flag="required">
                                          <module-option name="managedConnectionFactoryName" value="jboss.jca:name=jdbc/CLIENT/RPT,service=LocalTxCM"/>
                                          <module-option name="password" value="146e09c3c28cebdcfe28e2ec98617786"/>
                                          <module-option name="username" value="JB7WEBSYSTEM"/>
                                      </login-module>
                                  </authentication>
                              </security-domain>
                              <security-domain name="ADMINSYSTEM">
                                  <authentication>
                                      <login-module code="SecureIdentity" flag="required">
                                          <module-option name="password" value="146e09c3c28cebdcfe28e2ec98617786"/>
                                          <module-option name="username" value="JB7ADMSYSTEM"/>
                                          <module-option name="managedConnectionFactoryName" value="jboss.jca:name=jdbc/ADMIN/SYSTEM,service=LocalTxCM"/>
                                      </login-module>
                                  </authentication>
                              </security-domain>
                          </security-domains>
                      </subsystem>
                      <subsystem xmlns="urn:jboss:domain:threads:1.1"/>
                      <subsystem xmlns="urn:jboss:domain:transactions:1.1">
                          <core-environment>
                              <process-id>
                                  <uuid/>
                              </process-id>
                          </core-environment>
                          <recovery-environment socket-binding="txn-recovery-environment" status-socket-binding="txn-status-manager"/>
                          <coordinator-environment default-timeout="300"/>
                      </subsystem>
                      <subsystem xmlns="urn:jboss:domain:web:1.1" default-virtual-server="default-host" native="false">
                          <connector name="http" protocol="HTTP/1.1" scheme="http" socket-binding="http"/>
                          <connector name="connector1" protocol="AJP/1.3" scheme="http" socket-binding="createdSocket" redirect-port="8444"/>
                          <connector name="connector2" protocol="HTTP/1.1" scheme="http" socket-binding="http" redirect-port="8444"/>
                          <connector name="connector3" protocol="HTTP/1.1" scheme="https" socket-binding="https" secure="true">
                              <ssl name="ssl" password="changeit" certificate-key-file="${jboss.server.config.dir}/keys/server.keystore" protocol="TLS" verify-client="false"/>
                          </connector>
                          <virtual-server name="default-host" enable-welcome-root="true">
                              <alias name="localhost"/>
                              <alias name="example.com"/>
                          </virtual-server>
                          <virtual-server name="jboss.web" enable-welcome-root="true">
                              <alias name="localhost"/>
                          </virtual-server>
                      </subsystem>
                      <subsystem xmlns="urn:jboss:domain:webservices:1.1">
                          <modify-wsdl-address>true</modify-wsdl-address>
                          <wsdl-host>${jboss.bind.address:127.0.0.1}</wsdl-host>
                          <endpoint-config name="Standard-Endpoint-Config"/>
                          <endpoint-config name="Recording-Endpoint-Config">
                              <pre-handler-chain name="recording-handlers" protocol-bindings="##SOAP11_HTTP ##SOAP11_HTTP_MTOM ##SOAP12_HTTP ##SOAP12_HTTP_MTOM">
                                  <handler name="RecordingHandler" class="org.jboss.ws.common.invocation.RecordingServerHandler"/>
                              </pre-handler-chain>
                          </endpoint-config>
                      </subsystem>
                      <subsystem xmlns="urn:jboss:domain:weld:1.0"/>
                  </profile>

                  <interfaces>
                      <interface name="management">
                          <inet-address value="${jboss.bind.address.management:127.0.0.1}"/>
                      </interface>
                      <interface name="public">
                          <inet-address value="${jboss.bind.address:127.0.0.1}"/>
                      </interface>
                      <interface name="unsecure">
                          <inet-address value="${jboss.bind.address.unsecure:127.0.0.1}"/>
                      </interface>
                  </interfaces>

                  <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="8181"/>
                      <socket-binding name="https" port="8444"/>
                      <socket-binding name="osgi-http" interface="management" port="8090"/>
                      <socket-binding name="remoting" port="4447"/>
                      <socket-binding name="txn-recovery-environment" port="4712"/>
                      <socket-binding name="txn-status-manager" port="4713"/>
                      <socket-binding name="createdSocket" port="8010"/>
                      <outbound-socket-binding name="mail-smtp">
                          <remote-destination host="localhost" port="25"/>
                      </outbound-socket-binding>
                  </socket-binding-group>

                  <deployments>
                      <deployment name="webseries-client.war" runtime-name="webseries-client.war" enabled="true">
                          <content sha1="da39a3ee5e6b4b0d3255bfef95601890afd80709"/>
                      </deployment>
                      <deployment name="webseries-admin.war" runtime-name="webseries-admin.war" enabled="true">
                          <content sha1="da39a3ee5e6b4b0d3255bfef95601890afd80709"/>
                      </deployment>
                  </deployments>
              </server>

              • 4. Re: Error initializing endpoint: java.net.BindException: Address already in use:
                Anup Dey Apprentice

                @Benedict Leahy I suggest you find out what is already running on port 8181

                 

                some proess/instance is running on  port 8181. I guess there is another server listening on this port number

                 

                The error "Address already in use: JVM_Bind /127.0.0.1:8181" means that some other app is already using port 8181. This should help:

                https://community.jboss.org/wiki/DebugBindException

                 

                So make sure there isn't another server running, or switch to a different port.  You can be sure after you check running processes to see which ones are holding open the port; this is a lot easier with something like  http://wj32.org/processhacker/

                 

                But both localhost and 127.0.0.1 refer to the same computer

                • 5. Re: Error initializing endpoint: java.net.BindException: Address already in use:
                  Benedict Leahy Newbie

                  I did the naïve noobie thing of commenting out the other HTTP/1.1 connectors and I no longer get the Address already in use errors.

                   

                          <subsystem xmlns="urn:jboss:domain:web:1.1" default-virtual-server="default-host" native="false">

                              <connector name="http" protocol="HTTP/1.1" scheme="http" socket-binding="http"/>

                              <connector name="connector1" protocol="AJP/1.3" scheme="http" socket-binding="createdSocket" redirect-port="8443"/>

                              <!-- <connector name="connector2" protocol="HTTP/1.1" scheme="http" socket-binding="http" redirect-port="8443"/> -->

                              <!-- <connector name="connector3" protocol="HTTP/1.1" scheme="https" socket-binding="https" secure="true">

                                  <ssl name="ssl" password="changeit" certificate-key-file="${jboss.server.config.dir}/keys/server.keystore" protocol="TLS" verify-client="false"/>

                              </connector> -->

                   

                  I'm going to move on to tackle the next error in my server.log , thanks for your help I do appreciate the replies.

                  • 6. Re: Error initializing endpoint: java.net.BindException: Address already in use:
                    Anup Dey Apprentice

                    @Benedict : It would be great if you make the reply be like / make the reply be helpful.