Counfluence fails to start - Failed to initialize component [Connector[HTTP/1.1-8090]]
Asked by m.sancho:

Confluence fails to start. (Ubuntu 18 server)  
Atlassian an Bitbucket work fine.  

- When I reboot the server and ( sudo lsof -i -P -n \| grep LISTEN ) I see the confluence user on port 8090. But it disappears after some seconds.

- Firewall is not blocking the Port  

I found and tried this steps:

- chmod the confluence user  
- disable all other atlassian (jira, bitbucket) products on the server  
- check the ports 8000 and 8090 (are not beeing used by something else)  
- change the confluence ports (8020, 8091)  
- (re)start confluence with all apps temporarily disabled

This is the catalina.log I get:

```
16-Apr-2019 09:48:29.121 WARNING [main] org.apache.tomcat.util.digester.SetPropertiesRule.begin [SetPropertiesRule]{Server} Setting property 'debug' to '0' did not find a matching property.
16-Apr-2019 09:48:29.314 WARNING [main] org.apache.catalina.startup.SetAllPropertiesRule.begin [SetAllPropertiesRule]{Server/Service/Connector} Setting property 'debug' to '0' did not find a matching property.
16-Apr-2019 09:48:29.587 WARNING [main] org.apache.catalina.startup.SetAllPropertiesRule.begin [SetAllPropertiesRule]{Server/Service/Connector} Setting property 'debug' to '0' did not find a matching property.
16-Apr-2019 09:48:29.613 WARNING [main] org.apache.tomcat.util.digester.SetPropertiesRule.begin [SetPropertiesRule]{Server/Service/Engine} Setting property 'debug' to '0' did not find a matching property.
16-Apr-2019 09:48:29.622 WARNING [main] org.apache.tomcat.util.digester.SetPropertiesRule.begin [SetPropertiesRule]{Server/Service/Engine/Host} Setting property 'debug' to '0' did not find a matching property.
16-Apr-2019 09:48:29.719 WARNING [main] org.apache.tomcat.util.digester.SetPropertiesRule.begin [SetPropertiesRule]{Server/Service/Engine/Host/Context} Setting property 'debug' to '0' did not find a matching property.
16-Apr-2019 09:48:29.771 WARNING [main] org.apache.tomcat.util.digester.SetPropertiesRule.begin [SetPropertiesRule]{Server/Service/Engine/Host/Context} Setting property 'debug' to '0' did not find a matching property.
16-Apr-2019 09:48:30.420 INFO [main] org.apache.coyote.AbstractProtocol.init Initializing ProtocolHandler ["http-nio-8090"]
16-Apr-2019 09:48:30.453 INFO [main] org.apache.tomcat.util.net.NioSelectorPool.getSharedSelector Using a shared selector for servlet write/read
16-Apr-2019 09:48:30.472 INFO [main] org.apache.coyote.AbstractProtocol.init Initializing ProtocolHandler ["http-nio-8090"]
16-Apr-2019 09:48:30.473 SEVERE [main] org.apache.catalina.util.LifecycleBase.handleSubClassException Failed to initialize component [Connector[HTTP/1.1-8090]] 
org.apache.catalina.LifecycleException: Protocol handler initialization failed    
  at org.apache.catalina.connector.Connector.initInternal(Connector.java:935)    
  at org.apache.catalina.util.LifecycleBase.init(LifecycleBase.java:136)    
  at org.apache.catalina.core.StandardService.initInternal(StandardService.java:533)    
  at org.apache.catalina.util.LifecycleBase.init(LifecycleBase.java:136)    
  at org.apache.catalina.core.StandardServer.initInternal(StandardServer.java:852)    
  at org.apache.catalina.util.LifecycleBase.init(LifecycleBase.java:136)    
  at org.apache.catalina.startup.Catalina.load(Catalina.java:633)    
  at org.apache.catalina.startup.Catalina.start(Catalina.java:670)    
  at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)    
  at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:62)    
  at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)    
  at java.lang.reflect.Method.invoke(Method.java:498)    
  at org.apache.catalina.startup.Bootstrap.start(Bootstrap.java:350)    
  at org.apache.catalina.startup.Bootstrap.main(Bootstrap.java:492)
Caused by: java.net.BindException: Address already in use    
  at sun.nio.ch.Net.bind0(Native Method)    
  at sun.nio.ch.Net.bind(Net.java:433)    
  at sun.nio.ch.Net.bind(Net.java:425)    
  at sun.nio.ch.ServerSocketChannelImpl.bind(ServerSocketChannelImpl.java:223)    
  at sun.nio.ch.ServerSocketAdaptor.bind(ServerSocketAdaptor.java:74)    
  at org.apache.tomcat.util.net.NioEndpoint.initServerSocket(NioEndpoint.java:236)    
  at org.apache.tomcat.util.net.NioEndpoint.bind(NioEndpoint.java:210)    
  at org.apache.tomcat.util.net.AbstractEndpoint.init(AbstractEndpoint.java:1044)    
  at org.apache.coyote.AbstractProtocol.init(AbstractProtocol.java:540)    
  at org.apache.coyote.http11.AbstractHttp11Protocol.init(AbstractHttp11Protocol.java:74)    
  at org.apache.catalina.connector.Connector.initInternal(Connector.java:932)    
... 13 more

16-Apr-2019 09:48:30.474 INFO [main] org.apache.catalina.startup.Catalina.load Initialization processed in 1588 ms
16-Apr-2019 09:48:30.496 INFO [main] org.apache.catalina.core.StandardService.startInternal Starting service [Tomcat-Standalone]
16-Apr-2019 09:48:30.497 INFO [main] org.apache.catalina.core.StandardEngine.startInternal Starting Servlet Engine: Apache Tomcat/9.0.11
```


Answers:
author: Moses Thomas
body: [@m.sancho](/t5/user/viewprofilepage/user-id/683504) [@admin](/t5/user/viewprofilepage/user-id/360317)

Even better explanation, In fact you need to look at the java process running on 8090 which is the default bind port.

[Startup Fails Due to 'java.net.BindException Address already in use](https://confluence.atlassian.com/confkb/startup-fails-due-to-java-net-bindexception-address-already-in-use-196837806.html)

if you want to have change the port, you would need to change server.xml

**More also the redirect port should not be used by another application/process**

see the link, properly describe. [Change listen port for Confluence](https://confluence.atlassian.com/doc/change-listen-port-for-confluence-165823.html)

You should be fine, and good luck.

Best regards,

Mo


author: admin
body: I have the same Problem, confluence was working fine and since a few days its making absolutly the same as you discrypt...


author: Petr Van??ek
body: Hi,

what is output of command below?

```
netstat -pantu | grep 8090
```

Based on error line with

```
Caused by: java.net.BindException: Address already in use
```

it looks like something another is using port and/or IP?

comments: author: m.sancho
body: Hi Petr,  
the command has no output for that port.  
For testing purposes I called the same command with port 8080 (jira is running).

```
user@server:/# netstat -pantu | grep 8090
user@server:/# netstat -pantu | grep 8080
tcp6 0 0 :::8080 :::* LISTEN 1961/java 
tcp6 1 0 <my-ip>:34956 <my-ip>:8080 CLOSE_WAIT 903/java 
tcp6 1 0 <my-ip>:33936 <my-ip>:8080 CLOSE_WAIT 903/java 
```

I have Jira, Confluence and Bitbucket running over the same IP.


author: Petr Van??ek
body: Can you share your server.xml (in code block)? There could be some misconfiguration I think.


author: m.sancho
body: Sure, here it is. I deleted the commented connectors.

```
<Server port="8000" shutdown="SHUTDOWN" debug="0"> 
  <Service name="Tomcat-Standalone"> 
    <!-- 
      ============================================================================================================== 
      DEFAULT - Direct connector with no proxy, for unproxied HTTP access to Confluence.
      If using a http/https proxy, comment out this connector. 
      ============================================================================================================== 
     -->   
     
     <Connector port="8090" connectionTimeout="20000" redirectPort="8091" 
                maxThreads="48" minSpareThreads="10" 
                enableLookups="false" acceptCount="10" debug="0" URIEncoding="UTF-8" 
                protocol="org.apache.coyote.http11.Http11NioProtocol" />   

      <Engine name="Standalone" defaultHost="localhost" debug="0"> 
          <Host name="localhost" debug="0" appBase="webapps" unpackWARs="true" autoDeploy="false" startStopThreads="4"> 
              <Context path="" docBase="../confluence" debug="0" reloadable="false" useHttpOnly="true"> 
                  <!-- Logging configuration for Confluence is specified in confluence/WEB-INF/classes/log4j.properties --> 
                  <Manager pathname=""/> 
                  <Valve className="org.apache.catalina.valves.StuckThreadDetectionValve" threshold="60"/> 
              </Context>
 
              <Context path="${confluence.context.path}/synchrony-proxy" docBase="../synchrony-proxy" debug="0" reloadable="false" useHttpOnly="true"> 
                  <Valve className="org.apache.catalina.valves.StuckThreadDetectionValve" threshold="60"/> 
              </Context> 
          </Host> 
      </Engine> 
   </Service>
</Server>
```


Tags: confluence-server

server