Migration from 5.x to 6.0.2 - Confluence fills connections with TIME_WAIT status
Asked by Laurent Bazinet:

Hi,

I am trying to upgrade from 5.x to 6.0.2. I am working with a proxy in front of Confluence and seems to be working well since I can access the Marketplace.

I read a few threads on the fact that the editor can't start. I corrected one thing that was wrong but still happens. I think it mostly because Confluence tries to create connections to the database but some process filled all my sockets already. I get errors like:

```
WARN [C3P0PooledConnectionPoolManager[identityToken-&gt;1hge1vn9k1d1daca1kx52t8|57148f46]-HelperThread-#0] [mchange.v2.resourcepool.BasicResourcePool] log com.mchange.v2.resourcepool.BasicResourcePool$ScatteredAcquireTask@280e10f -- Acquisition Attempt Failed!!! Clearing pending acquires. While trying to acquire a needed new resource, we failed to succeed more than the maximum number of allowed acquisition attempts (30). Last acquisition attempt exception
```

I am puzzled and am desesperably trying to fix this thing.

Can anyone help please?

Thanks


Answers:
author: Laurent Bazinet
body: Hi,

I found also something weird in the logs with regard to synchrony. How does it figure out the proxy? It is doing it wrong on my server. My proxy's name if conf0.domain and synchrony takes [www.domain.](http://www.domain.) I agree that [www.domain](http://www.domain) exists but it not related to the machine where I am accessing confluence..... How do I force it to use the proper URL?

```
2016-11-30 20:58:21,802 INFO [ListenableFutureAdapter-thread-1] [plugins.synchrony.bootstrap.DefaultSynchronyProcessManager] isSynchronyProxyEnabled proxy port present: true2016-11-30 20:58:22,074 INFO [ListenableFutureAdapter-thread-1] [plugins.synchrony.bootstrap.DefaultSynchronyProcessManager] updateSynchronyConfiguration Synchrony External Base URL: http://www.domain.net/synchrony2016-11-30 20:58:22,075 INFO [ListenableFutureAdapter-thread-1] [plugins.synchrony.bootstrap.DefaultSynchronyProcessManager] updateSynchronyConfiguration Synchrony External ServiceURL: http://www.domain.net/synchrony/v12016-11-30 20:58:22,077 INFO [ListenableFutureAdapter-thread-1] [plugins.synchrony.bootstrap.DefaultSynchronyProcessManager] updateSynchronyConfiguration Synchrony Internal ServiceURL: http://localhost:8091/synchrony/v12016-11-30 20:58:22,077 INFO [ListenableFutureAdapter-thread-1] [plugins.synchrony.bootstrap.DefaultSynchronyProcessManager] updateSynchronyConfiguration Synchrony Resources URL: http://www.domain.net/synchrony/resources
```

This generates other errors, of course:

```
2016-11-30 20:58:36,849 ERROR [AtlassianEvent::CustomizableThreadFactory-4] [renderer.internal.http.HttpClientFetcher] fetch Unable to perform a request to: http://www.domain.net/rest/gadgets/1.0/g/messagebundle/und/gadget.common%2Cgadget.activity.stream%2Cstreams.comment.action%2Cstream.error.unexpectedjava.net.UnknownHostException: www.domain.net: hostname nor servname provided, or not known
```


author: Laurent Bazinet
body: Hi Reinhard,

I did look at the second link but missed the first one which showed me a missing module mod_proxy_wstunnel in apache. I enabled it and restarted everything but got the same result. All my connections are taken and almost all of them are TIME_WAIT and a few CLOSE_WAIT (pillar03 connections); same errors in the logs and the editor won't come.

Mind you I got the editor to work yesterday a single time probably because it got a socket connection available and took it before whatever process is opening them (all in regard to postgres database).

To complete my help request, I am adding parts of my configurations (I removed all SSL related entried from my configurations to have one less variable in the path). I started the configurations from scratch. Didn't touch web.xml at all.

```
&lt;Connector port="8090" connectionTimeout="20000" redirectPort="8443"                maxThreads="48" minSpareThreads="10"                enableLookups="false" acceptCount="10" debug="0" URIEncoding="UTF-8"                protocol="org.apache.coyote.http11.Http11NioProtocol"				proxyName="www.domain1.net" proxyPort="80" secure="false" scheme="http" /&gt;
```

```
&lt;VirtualHost *:80&gt;  ServerName  conf0.domain1.net  ServerAlias conf0  SSLEngine Off  &lt;Proxy *&gt;    Require all granted  &lt;/Proxy&gt;  &lt;Location /synchrony&gt;    Require all granted    RewriteEngine on    RewriteCond %{HTTP:UPGRADE} ^WebSocket$ [NC]    RewriteCond %{HTTP:CONNECTION} Upgrade$ [NC]    RewriteRule .* ws://confluence.domain0.net:8091%{REQUEST_URI} [P]  &lt;/Location&gt;  SSLProxyEngine       Off  ProxyVia          Off  ProxyRequests           Off  ProxyPreserveHost      On  Proxypass        /synchrony    http://confluence.domain0.net:8091/synchrony  ProxyPass               /    http://confluence.domain0.net:8090/ timeout=600  ProxyPassReverse        /    http://confluence.domain0.net:8090/&lt;/VirtualHost&gt;
```

Thanks.


author: Reinhard Piltz
body: Hi Norman,

Already read the two links?

<https://confluence.atlassian.com/doc/troubleshooting-collaborative-editing-858772087.html><https://confluence.atlassian.com/kb/proxying-atlassian-server-applications-with-apache-http-server-mod_proxy_http-806032611.html>[](https://confluence.atlassian.com/doc/troubleshooting-collaborative-editing-858772087.html)

Do you use original web.xml and server.xml or was copied from version 5?


Tags: confluence-administration