title: Error when JBoss starts: address already in use
body: <p>I have a problem when I want to start my JBoss server. I'm working on Netbeans and I added my server with <code>Server &gt; Add Server &gt; JBoss Application Server</code>.</p>
  
  <p>I configured my server with the port <code>8181</code> because the port <code>8080</code> is already in use. But when I start it, it fails because it's trying to connect to the port <code>8080</code>:</p>
  
  <blockquote>
    <p>10:10:48,071 ERROR [org.jboss.msc.service.fail] (MSC service thread
    1-5) MSC00001: <strong>Failed to start service</strong> jboss.web.connector.http:
    org.jboss.msc.service.StartException in service
    jboss.web.connector.http: JBAS018007: </p>
    
    <p>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] </p>
    
    <p>Caused by: LifecycleException:  L'initialisation du
    gestionnaire de protocole a échoué: java.net.BindException: <strong>Address
    already in use: JVM_Bind /127.0.0.1:8080</strong>    at
    org.apache.catalina.connector.Connector.init(Connector.java:985)  at
    org.jboss.as.web.WebConnectorService.start(WebConnectorService.java:267)
      ... 5 more</p>
  </blockquote>
  
  <p>I'm using JDK 1.7. My environnment variables are well configured: <code>JAVA_HOME = path/to/jdk1.7</code>. And in Netbeans, in the properties of the server, my Java Platform is JDK 1.7. </p>
  
  <p>Here is the beginning of the log to check the values:</p>
  
  <blockquote>
    <p>Calling "C:\Server\jboss-as-7.1.0.Final\bin\standalone.conf.bat"
    "JAVA_OPTS already set in environment; overriding default settings</p>
    
    <h1>with values: -Xms128m -Xmx512m -XX:MaxPermSize=256m"</h1>
    
    <p>JBoss Bootstrap Environment</p>
    
    <p>JBOSS_HOME: C:\Server\jboss-as-7.1.0.Final</p>
    
    <p>JAVA: C:\Program Files\Java\jdk1.7.0_79\bin\java</p>
    
    <p>JAVA_OPTS: -XX:+TieredCompilation -Dprogram.name=standalone.bat
    -Xms128m -Xmx512m -XX:MaxPermSize=256m</p>
  </blockquote>
  
  <p>Thanks in advance for your help !</p>