Confluence Synchrony and Microsoft SQL Server
Asked by Andreas Essigkrug:

Dear all,

Using Confluence 6.5.2 with MS SQL, I am facing a problem with Synchrony:

It fails. Editing pages take neverending time sometimes I get an error at the top saying, that Synchrony has an error.

Looking int the status, I realize, that Synchrony seems to use the Microsoft jdbc driver, even we use the jdts driver for Conflunce itself (because it is the only one, where we can get Windows Authentication running).

I didn't find any way to configure the database connection for Synchrony, at least for the server version (not datacenter).

There shold be any way to specify the database connection for Synchrony?

Regards,

Andreas


Answers:
author: Andreas Essigkrug
body: Hello Shannon,

Atlassian support is working on it in parallel...

But anyway:

We use MS SQL 2012.

I already wen through the troubleshootig guide with no luck.

Pretty shure, that he port 8091 is not accupied.

We don't use a proxy or reverse proxy.

Here are some interesting error messages from the log files:

WARN \[lifecycle:thread-31\] \[plugins.synchrony.bootstrap.SynchronyInteropBootstrap\] onStart An exception occurred while waiting for Synchrony to start: Timeout waiting for task.

2018-03-19 17:39:24,736 WARN \[http-nio-9095-exec-2\] \[confluence.util.profiling.DefaultActivityMonitor\] close Exceeded the threshold of 60000 ms: ActivitySnapshot{startTime=1521477502142, threadId=38, threadName='http-nio-9095-exec-2', userId='\<unknown\>', type='web-request', summary='/setup/finishsetup.action'}  
-- referer: http://localhost:9095/setup/setupadministrator-start.action \| url: /setup/finishsetup.action \| traceId: 808fd282f9304435 \| userName: anonymous  
2018-03-19 17:39:32,460 INFO \[ListenableFutureAdapter-thread-1\] \[plugins.synchrony.config.DefaultSynchronyConfigurationManager\] postConfigToSynchrony \[Collab editing plugin\] Synchrony response (500): Could not verify AppID/Secret for real-time collaboration service at endpoint: <http://127.0.0.1:8091/synchrony/v1/apps/secret>

2018-03-19 17:40:02,511 WARN \[ListenableFutureAdapter-thread-1\] \[plugins.synchrony.config.DefaultSynchronyConfigurationManager\] logJSONResponseField \[Collab editing plugin\] Response message for Synchrony-df09eb74-2720-3780-b106-a4e9ea72ceb7-debug: Internal Server Error  
-- referer: http://localhost:9095/setup/setupadministrator-start.action \| url: /setup/finishsetup.action \| traceId: 808fd282f9304435 \| userName: anonymous \| action: finishsetup  
2018-03-19 17:40:02,576 WARN \[ListenableFutureAdapter-thread-1\] \[plugins.synchrony.config.DefaultSynchronyConfigurationManager\] enableSharedDrafts \[Collab editing plugin\] Enabling Shared Drafts

2018-03-20 14:53:04,656 WARN \[synchrony-interop-executor:thread-1\] \[plugins.synchrony.bootstrap.DefaultSynchronyProxyMonitor\] pollHealthcheck Could not ping the synchrony-proxy \[<http://127.0.0.1:9095/synchrony-proxy/healthcheck>\]: {}  
-- url: /longrunningtaskxml.action \| traceId: 431413d7a0548e6f \| userName: admin \| referer: http://localhost:9095/admin/restore.action?synchronous=false \| action: longrunningtaskxml  
java.net.SocketTimeoutException: Read timed out  
at java.net.SocketInputStream.socketRead0(Native Method)  
at java.net.SocketInputStream.socketRead(SocketInputStream.java:116)  
at java.net.SocketInputStream.read(SocketInputStream.java:171)  
at java.net.SocketInputStream.read(SocketInputStream.java:141)  
at org.apache.http.impl.io.SessionInputBufferImpl.streamRead(SessionInputBufferImpl.java:139)  
at org.apache.http.impl.io.SessionInputBufferImpl.fillBuffer(SessionInputBufferImpl.java:155)  
at org.apache.http.impl.io.SessionInputBufferImpl.readLine(SessionInputBufferImpl.java:284)  
at org.apache.http.impl.conn.DefaultHttpResponseParser.parseHead(DefaultHttpResponseParser.java:140)  
at org.apache.http.impl.conn.DefaultHttpResponseParser.parseHead(DefaultHttpResponseParser.java:57)  
at org.apache.http.impl.io.AbstractMessageParser.parse(AbstractMessageParser.java:261)  
at org.apache.http.impl.DefaultBHttpClientConnection.receiveResponseHeader(DefaultBHttpClientConnection.java:165)  
at org.apache.http.impl.conn.CPoolProxy.receiveResponseHeader(CPoolProxy.java:167)  
at org.apache.http.protocol.HttpRequestExecutor.doReceiveResponse(HttpRequestExecutor.java:272)  
at org.apache.http.protocol.HttpRequestExecutor.execute(HttpRequestExecutor.java:124)  
at org.apache.http.impl.execchain.MainClientExec.execute(MainClientExec.java:271)  
at org.apache.http.impl.execchain.ProtocolExec.execute(ProtocolExec.java:184)  
at org.apache.http.impl.client.InternalHttpClient.doExecute(InternalHttpClient.java:184)  
at org.apache.http.impl.client.CloseableHttpClient.execute(CloseableHttpClient.java:82)  
at org.apache.http.impl.client.CloseableHttpClient.execute(CloseableHttpClient.java:107)  
at com.atlassian.confluence.plugins.synchrony.bootstrap.DefaultSynchronyProxyMonitor.pollHealthcheck(DefaultSynchronyProxyMonitor.java:76)  
at java.util.concurrent.Executors$RunnableAdapter.call(Executors.java:511)  
at java.util.concurrent.FutureTask.runAndReset(FutureTask.java:308)  
at java.util.concurrent.ScheduledThreadPoolExecutor$ScheduledFutureTask.access$301(ScheduledThreadPoolExecutor.java:180)  
at java.util.concurrent.ScheduledThreadPoolExecutor$ScheduledFutureTask.run(ScheduledThreadPoolExecutor.java:294)  
at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1149)  
at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:624)  
at java.lang.Thread.run(Thread.java:748)

2018-03-21 12:03:34,035 DEBUG \[163:StdOutHandler \[C:\\Program Files\\Atlassian\\Confluence\\jre\\bin\\java.exe\]\] Could not load driverClass net.sourceforge.jtds.jdbc.Driver  
2018-03-21 12:03:34,035 DEBUG \[163:StdOutHandler \[C:\\Program Files\\Atlassian\\Confluence\\jre\\bin\\java.exe\]\] java.lang.ClassNotFoundException: net.sourceforge.jtds.jdbc.Driver  
2018-03-21 12:03:34,035 DEBUG \[163:StdOutHandler \[C:\\Program Files\\Atlassian\\Confluence\\jre\\bin\\java.exe\]\] at java.net.URLClassLoader.findClass(URLClassLoader.java:381)  
2018-03-21 12:03:34,035 DEBUG \[163:StdOutHandler \[C:\\Program Files\\Atlassian\\Confluence\\jre\\bin\\java.exe\]\] at java.lang.ClassLoader.loadClass(ClassLoader.java:424)  
2018-03-21 12:03:34,035 DEBUG \[163:StdOutHandler \[C:\\Program Files\\Atlassian\\Confluence\\jre\\bin\\java.exe\]\] at sun.misc.Launcher$AppClassLoader.loadClass(Launcher.java:338)  
2018-03-21 12:03:34,035 DEBUG \[163:StdOutHandler \[C:\\Program Files\\Atlassian\\Confluence\\jre\\bin\\java.exe\]\] at java.lang.ClassLoader.loadClass(ClassLoader.java:357)  
2018-03-21 12:03:34,035 DEBUG \[163:StdOutHandler \[C:\\Program Files\\Atlassian\\Confluence\\jre\\bin\\java.exe\]\] at java.lang.Class.forName0(Native Method)  
2018-03-21 12:03:34,035 DEBUG \[163:StdOutHandler \[C:\\Program Files\\Atlassian\\Confluence\\jre\\bin\\java.exe\]\] at java.lang.Class.forName(Class.java:264)  
2018-03-21 12:03:34,035 DEBUG \[163:StdOutHandler \[C:\\Program Files\\Atlassian\\Confluence\\jre\\bin\\java.exe\]\] at com.mchange.v2.c3p0.DriverManagerDataSource.ensureDriverLoaded(DriverManagerDataSource.java:143)  
2018-03-21 12:03:34,035 DEBUG \[163:StdOutHandler \[C:\\Program Files\\Atlassian\\Confluence\\jre\\bin\\java.exe\]\] at com.mchange.v2.c3p0.DriverManagerDataSource.getConnection(DriverManagerDataSource.java:173)  
2018-03-21 12:03:34,035 DEBUG \[163:StdOutHandler \[C:\\Program Files\\Atlassian\\Confluence\\jre\\bin\\java.exe\]\] at com.mchange.v2.c3p0.WrapperConnectionPoolDataSource.getPooledConnection(WrapperConnectionPoolDataSource.java:220)  
2018-03-21 12:03:34,035 DEBUG \[163:StdOutHandler \[C:\\Program Files\\Atlassian\\Confluence\\jre\\bin\\java.exe\]\] at com.mchange.v2.c3p0.WrapperConnectionPoolDataSource.getPooledConnection(WrapperConnectionPoolDataSource.java:206)  
2018-03-21 12:03:34,035 DEBUG \[163:StdOutHandler \[C:\\Program Files\\Atlassian\\Confluence\\jre\\bin\\java.exe\]\] at com.mchange.v2.c3p0.impl.C3P0PooledConnectionPool$1PooledConnectionResourcePoolManager.acquireResource(C3P0PooledConnectionPool.java:203)  
2018-03-21 12:03:34,035 DEBUG \[163:StdOutHandler \[C:\\Program Files\\Atlassian\\Confluence\\jre\\bin\\java.exe\]\] at com.mchange.v2.resourcepool.BasicResourcePool.doAcquire(BasicResourcePool.java:1138)  
2018-03-21 12:03:34,035 DEBUG \[163:StdOutHandler \[C:\\Program Files\\Atlassian\\Confluence\\jre\\bin\\java.exe\]\] at com.mchange.v2.resourcepool.BasicResourcePool.doAcquireAndDecrementPendingAcquiresWithinLockOnSuccess(BasicResourcePool.java:1125)  
2018-03-21 12:03:34,035 DEBUG \[163:StdOutHandler \[C:\\Program Files\\Atlassian\\Confluence\\jre\\bin\\java.exe\]\] at com.mchange.v2.resourcepool.BasicResourcePool.access$700(BasicResourcePool.java:44)  
2018-03-21 12:03:34,035 DEBUG \[163:StdOutHandler \[C:\\Program Files\\Atlassian\\Confluence\\jre\\bin\\java.exe\]\] at com.mchange.v2.resourcepool.BasicResourcePool$ScatteredAcquireTask.run(BasicResourcePool.java:1870)  
2018-03-21 12:03:34,035 DEBUG \[163:StdOutHandler \[C:\\Program Files\\Atlassian\\Confluence\\jre\\bin\\java.exe\]\] at com.mchange.v2.async.ThreadPoolAsynchronousRunner$PoolThread.run(ThreadPoolAsynchronousRunner.java:696)

2018-03-21 12:04:46,114 WARN \[http-nio-9095-exec-2\] \[plugins.synchrony.config.DefaultSynchronyConfigurationManager\] logJSONResponseField \[Collab editing plugin\] Response message for Synchrony-447115f2-fd3a-3398-9012-b376b8d39a7d: Internal Server Error  
-- space: 7831555 \| url: /plugins/editor-loader/editor.action \| page: 7537301 \| traceId: ee28f6236a984d4d \| userName: deessi \| referer: [http://degtsaw487.de.miele.net:9095/pages/viewpage.action?pageId=7537301\&editingFailed](http://degtsaw487.de.miele.net:9095/pages/viewpage.action?pageId=7537301&editingFailed) \| action: editor  
2018-03-21 12:05:16,134 INFO \[http-nio-9095-exec-2\] \[plugins.synchrony.config.DefaultSynchronyConfigurationManager\] postConfigToSynchrony \[Collab editing plugin\] Synchrony response (500): Could not verify AppID/Secret for real-time collaboration service at endpoint: <http://127.0.0.1:8091/synchrony/v1/apps/secret>  
2018-03-21 12:05:16,136 WARN \[http-nio-9095-exec-2\] \[plugins.synchrony.config.DefaultSynchronyConfigurationManager\] logJSONResponseField \[Collab editing plugin\] Response message for Synchrony-447115f2-fd3a-3398-9012-b376b8d39a7d-debug: Internal Server Error  
-- space: 7831555 \| url: /plugins/editor-loader/editor.action \| page: 7537301 \| traceId: ee28f6236a984d4d \| userName: deessi \| referer: [http://degtsaw487.de.miele.net:9095/pages/viewpage.action?pageId=7537301\&editingFailed](http://degtsaw487.de.miele.net:9095/pages/viewpage.action?pageId=7537301&editingFailed) \| action: editor  
2018-03-21 12:05:16,137 WARN \[http-nio-9095-exec-2\] \[plugins.synchrony.service.SynchronyContentService\] runRecoveryInTransaction Could not reconcile content for limited. ID: 7537301 Caused by: com.atlassian.confluence.plugins.synchrony.model.SynchronyException: ERROR_CREATING_REQUEST  
-- space: 7831555 \| url: /plugins/editor-loader/editor.action \| page: 7537301 \| traceId: ee28f6236a984d4d \| userName: deessi \| referer: [http://degtsaw487.de.miele.net:9095/pages/viewpage.action?pageId=7537301\&editingFailed](http://degtsaw487.de.miele.net:9095/pages/viewpage.action?pageId=7537301&editingFailed) \| action: editor  
2018-03-21 12:05:16,138 WARN \[http-nio-9095-exec-2\] \[confluence.util.profiling.DurationThresholdWarningTimingHelperFactory\] logMessage Execution time for publishing event com.atlassian.confluence.event.events.content.page.synchrony.SynchronyRecoveryEvent@46e13b7b took 60041 ms (warning threshold is 5000 ms)  
-- space: 7831555 \| url: /plugins/editor-loader/editor.action \| page: 7537301 \| traceId: ee28f6236a984d4d \| userName: deessi \| referer: [http://degtsaw487.de.miele.net:9095/pages/viewpage.action?pageId=7537301\&editingFailed](http://degtsaw487.de.miele.net:9095/pages/viewpage.action?pageId=7537301&editingFailed) \| action: editor  
2018-03-21 12:05:16,139 WARN \[http-nio-9095-exec-2\] \[confluence.impl.hibernate.ConfluenceHibernateTransactionManager\] doRollback Performing rollback. Transactions:  
-\>\[null\]: PROPAGATION_REQUIRED,ISOLATION_DEFAULT (Session #1708513083)  
-- space: 7831555 \| url: /plugins/editor-loader/editor.action \| page: 7537301 \| traceId: ee28f6236a984d4d \| userName: deessi \| referer: [http://degtsaw487.de.miele.net:9095/pages/viewpage.action?pageId=7537301\&editingFailed](http://degtsaw487.de.miele.net:9095/pages/viewpage.action?pageId=7537301&editingFailed) \| action: editor  
2018-03-21 12:05:46,165 INFO \[http-nio-9095-exec-2\] \[plugins.synchrony.config.DefaultSynchronyConfigurationManager\] postConfigToSynchrony \[Collab editing plugin\] Synchrony response (500): Could not verify AppID/Secret for real-time collaboration service at endpoint: <http://127.0.0.1:8091/synchrony/v1/apps/secret>  
2018-03-21 12:05:46,166 WARN \[http-nio-9095-exec-2\] \[plugins.synchrony.config.DefaultSynchronyConfigurationManager\] logJSONResponseField \[Collab editing plugin\] Response message for Synchrony-447115f2-fd3a-3398-9012-b376b8d39a7d: Internal Server Error  
-- url: /plugins/editor-loader/editor.action \| traceId: ee28f6236a984d4d \| userName: deessi \| referer: [http://degtsaw487.de.miele.net:9095/pages/viewpage.action?pageId=7537301\&editingFailed](http://degtsaw487.de.miele.net:9095/pages/viewpage.action?pageId=7537301&editingFailed)

<br />

2018-03-21 14:17:28,158 WARN \[synchrony-interop-executor:thread-1\] \[plugins.synchrony.bootstrap.DefaultSynchronyProxyMonitor\] pollHealthcheck Could not ping the synchrony-proxy \[<http://127.0.0.1:9095/synchrony-proxy/healthcheck>\]: {}

Regards,

Andreas

comments: author: Shannon S
body: Andreas,

If Confluence Support is already working on this with you, then I will leave them to it as they will be able to receive full log files from you.

Once you're able to resolve it with support, please feel free to put the answer here under **Suggest an answer** so it can help other users.

Regards,  
Shannon


author: Andreas Essigkrug
body: Hi Shannon,

yes, I think this is the best way. I will post it here, if I know, whats going on...

Regards,

Andreas


author: Ratish Kumar
body: Hi Andreas,

My setup is behind a application gateway and database is Azure paas for MS SQL. I have a ticket opened with atlassian but till now no break through achieved.I am facing similar issues with MS SQL as backend. However Synchrony works fine with postgres database.

Did your issue got resolved ?

Regards

Ratish


author: andreas.essigkrug@novartis.com
body: Hi Ratish,  

no we postponed it, as we work without the feature.

Best Regards,

Andreas


author: Shannon S
body: Andreas,

Can you check the logs from the article [Troubleshooting Collaborative Editing](https://confluence.atlassian.com/doc/troubleshooting-collaborative-editing-858772087.html):
>
> #### Check the logs {#toc-hId-1399440732}
>
> You can find the Confluence application logs at `<home-directory>/logs/atlassian-confluence.log` and Synchrony specific logs at `<home-directory>/logs/atlassian-synchrony.log`.

Let us know exactly what errors occur. It could be a bug causing the issue.

I'd also like to just have you confirm your MS SQL version.

Thank you!

Shannon


Tags: synchrony