Confluence editing/symphony does not work after NIC card change
Asked by Lifeng Song:

Hi,

I am running confluence server (6.6.1) on virtual machine, recently I have to tear down the NIC card to trouble resolve a network issue, after that I re-installed NIC card with different MAC address, after that I still can log in to confluence, but editing of existing page or creation of new page does not work.   
I googled a little bit, and followed instruction to try to disable collaborative editing, the page keeps popping up "Something went wrong, please try again"


Answers:
author: Nic Brough -Adaptavist-
body: A change of MAC should not have affected the setup (IP address maybe). You'll need to read the log files to try to see what has gone wrong.

One quick test though - go to Admin -\> Collaborative editing and disable it (temporarily) - can you edit pages ok then?

The have a look at the files in \<confluence home\>/log - atlassian-confluence.log is probably the first one that I'd expect to see errors in, but there may be others in there. Look for synchrony errors.

comments: author: Lifeng Song
body: Hi I've already tried disabling collaborative editing as I stated in the description:

on the right side keep popping up   
**"Something went wrong**   
**Please try again."** I went to log folder, there is no log file by name "atlassian-confluence.log"  
in file **catalina.out** , i can see it keeps getting below entries.  
Thu Dec 20 08:35:14 EST 2018 WARN: Establishing SSL connection without server's identity verification is not recommended. According to MySQL 5.5.45+, 5.6.26+ and 5.7.6+ requirements SSL connection must be established by default if explicit option isn't set. For compliance with existing applications not using SSL the verifyServerCertificate property is set to 'false'. You need either to explicitly disable SSL by setting useSSL=false, or set useSSL=true and provide truststore for server certificate verification  
How can I fix it?  

<br />

<br />


author: Nic Brough -Adaptavist-
body: Please look in the application log folder, there is definitely an atlassian-confluence.log file in the \<confluence home\>/log directory.

Your connection to MySQL is insecure, but not the problem. We need to see the application log errors, not the Tomcat errors.


author: Lifeng Song
body: Hi, I found the confluence log, the failure is caused by unable to retrieve public key for synchrony. the log atlassian-synchrony.log is empty, thanks  
2018-12-21 07:45:54,229 INFO \[http-nio-8222-exec-4\] \[plugins.synchrony.config.DefaultSynchronyConfigurationManager\] retrievePublicKey \[Collab editing plugin\] Could not retrieve public key for real-time collaboration service at http://localhost:8091/synchrony/jwt-key with exception: Connect to localhost:8091 \[localhost/127.0.0.1, localhost/0:0:0:0:0:0:0:1\] failed: Connection refused (Connection refused)  
2018-12-21 07:45:54,231 ERROR \[http-nio-8222-exec-4\] \[confluence.plugins.synchrony.SynchronyContextProvider\] getContextMap Could not retrieve Synchrony public key.


author: Nic Brough -Adaptavist-
body: That suggests Synchrony is not running at all. Could you restart Confluence (after enabling collaborative editing) and then look at the application log to see why Synchrony is not starting?


author: Lifeng Song
body: below pasted is the error message related to synchrony

2018-12-23 20:34:21,936 INFO \[localhost-startStop-1\] \[com.atlassian.confluence.lifecycle\] contextInitialized Starting Confluence 6.6.1 \[build 7502 based on commit hash 85262de2dab440f060366aadca149a69d65c1f59\] - synchrony version 2.1.0-release-confluence_6.5-1a01ab2d  
2018-12-23 20:35:47,846 ERROR \[ThreadPoolAsyncTaskExecutor::Thread 47\] \[plugin.osgi.factory.OsgiPlugin\] onPluginContainerFailed Unable to start the plugin container for plugin 'com.atlassian.confluence.plugins.synchrony-interop'  
org.springframework.beans.factory.BeanDefinitionStoreException: Unexpected exception parsing XML document from URL \[bundle://245.0:0/META-INF/spring/spring-scanner.xml\]; nested exception is java.lang.IllegalStateException: Cannot execute atlassian-spring-scanner-runtime: plugin has an extra copy of atlassian-spring-scanner-annotation classes, perhaps embedded inside the target plugin 'com.atlassian.confluence.plugins.synchrony-interop'; embedding scanner-annotations is not supported since scanner version 2.0. Use 'mvn dependency:tree' and ensure the atlassian-spring-scanner-annotation dependency in your plugin has \<scope\>provided\</scope\>, not 'runtime' or 'compile', and you have NO dependency on atlassian-spring-scanner-runtime.  
Caused by: java.lang.IllegalStateException: Cannot execute atlassian-spring-scanner-runtime: plugin has an extra copy of atlassian-spring-scanner-annotation classes, perhaps embedded inside the target plugin 'com.atlassian.confluence.plugins.synchrony-interop'; embedding scanner-annotations is not supported since scanner version 2.0. Use 'mvn dependency:tree' and ensure the atlassian-spring-scanner-annotation dependency in your plugin has \<scope\>provided\</scope\>, not 'runtime' or 'compile', and you have NO dependency on atlassian-spring-scanner-runtime.  
2018-12-23 20:35:47,915 ERROR \[ThreadPoolAsyncTaskExecutor::Thread 47\] \[extender.internal.support.ExtenderConfiguration\] onOsgiApplicationEvent Application context refresh failed (NonValidatingOsgiBundleXmlApplicationContext(bundle=com.atlassian.confluence.plugins.synchrony-interop, config=osgibundle:/META-INF/spring/\*.xml))  
org.springframework.beans.factory.BeanDefinitionStoreException: Unexpected exception parsing XML document from URL \[bundle://245.0:0/META-INF/spring/spring-scanner.xml\]; nested exception is java.lang.IllegalStateException: Cannot execute atlassian-spring-scanner-runtime: plugin has an extra copy of atlassian-spring-scanner-annotation classes, perhaps embedded inside the target plugin 'com.atlassian.confluence.plugins.synchrony-interop'; embedding scanner-annotations is not supported since scanner version 2.0. Use 'mvn dependency:tree' and ensure the atlassian-spring-scanner-annotation dependency in your plugin has \<scope\>provided\</scope\>, not 'runtime' or 'compile', and you have NO dependency on atlassian-spring-scanner-runtime.  
Caused by: java.lang.IllegalStateException: Cannot execute atlassian-spring-scanner-runtime: plugin has an extra copy of atlassian-spring-scanner-annotation classes, perhaps embedded inside the target plugin 'com.atlassian.confluence.plugins.synchrony-interop'; embedding scanner-annotations is not supported since scanner version 2.0. Use 'mvn dependency:tree' and ensure the atlassian-spring-scanner-annotation dependency in your plugin has \<scope\>provided\</scope\>, not 'runtime' or 'compile', and you have NO dependency on atlassian-spring-scanner-runtime.  
2018-12-23 20:35:47,915 ERROR \[ThreadPoolAsyncTaskExecutor::Thread 47\] \[internal.dependencies.startup.DependencyWaiterApplicationContextExecutor\] fail Unable to create application context for \[com.atlassian.confluence.plugins.synchrony-interop\], unsatisfied dependencies: none  
org.springframework.beans.factory.BeanDefinitionStoreException: Unexpected exception parsing XML document from URL \[bundle://245.0:0/META-INF/spring/spring-scanner.xml\]; nested exception is java.lang.IllegalStateException: Cannot execute atlassian-spring-scanner-runtime: plugin has an extra copy of atlassian-spring-scanner-annotation classes, perhaps embedded inside the target plugin 'com.atlassian.confluence.plugins.synchrony-interop'; embedding scanner-annotations is not supported since scanner version 2.0. Use 'mvn dependency:tree' and ensure the atlassian-spring-scanner-annotation dependency in your plugin has \<scope\>provided\</scope\>, not 'runtime' or 'compile', and you have NO dependency on atlassian-spring-scanner-runtime.  
Caused by: java.lang.IllegalStateException: Cannot execute atlassian-spring-scanner-runtime: plugin has an extra copy of atlassian-spring-scanner-annotation classes, perhaps embedded inside the target plugin 'com.atlassian.confluence.plugins.synchrony-interop'; embedding scanner-annotations is not supported since scanner version 2.0. Use 'mvn dependency:tree' and ensure the atlassian-spring-scanner-annotation dependency in your plugin has \<scope\>provided\</scope\>, not 'runtime' or 'compile', and you have NO dependency on atlassian-spring-scanner-runtime.  
jvmInputArguments = -Djava.util.logging.config.file=/opt/atlassian/confluence/conf/logging.properties -Djava.util.logging.manager=org.apache.juli.ClassLoaderLogManager -Djdk.tls.ephemeralDHKeySize=2048 -Djava.protocol.handler.pkgs=org.apache.catalina.webresources -Dconfluence.context.path= -Datlassian.plugins.startup.options= -Dorg.apache.tomcat.websocket.DEFAULT_BUFFER_SIZE=32768 -Dsynchrony.enable.xhr.fallback=true -Xms1024m -Xmx1024m -XX:+UseG1GC -Datlassian.plugins.enable.wait=300 -Djava.awt.headless=true -XX:G1ReservePercent=20 -Xloggc:/opt/atlassian/confluence/logs/gc-2018-12-23_20-34-17.log -XX:+UseGCLogFileRotation -XX:NumberOfGCLogFiles=5 -XX:GCLogFileSize=2M -XX:-PrintGCDetails -XX:+PrintGCDateStamps -XX:-PrintTenuringDistribution -Dignore.endorsed.dirs= -Dcatalina.base=/opt/atlassian/confluence -Dcatalina.home=/opt/atlassian/confluence -Djava.io.tmpdir=/opt/atlassian/confluence/temp  
2018-12-23 20:36:38,840 INFO \[http-nio-8222-exec-1\] \[plugins.synchrony.config.DefaultSynchronyConfigurationManager\] retrievePublicKey \[Collab editing plugin\] Could not retrieve public key for real-time collaboration service at http://localhost:8091/synchrony/jwt-key with exception: Connect to localhost:8091 \[localhost/127.0.0.1, localhost/0:0:0:0:0:0:0:1\] failed: Connection refused (Connection refused)  
2018-12-23 20:36:38,847 ERROR \[http-nio-8222-exec-1\] \[confluence.plugins.synchrony.SynchronyContextProvider\] getContextMap Could not retrieve Synchrony public key.  
2018-12-23 20:36:57,265 INFO \[http-nio-8222-exec-1\] \[plugins.synchrony.config.DefaultSynchronyConfigurationManager\] retrievePublicKey \[Collab editing plugin\] Could not retrieve public key for real-time collaboration service at http://localhost:8091/synchrony/jwt-key with exception: Connect to localhost:8091 \[localhost/127.0.0.1, localhost/0:0:0:0:0:0:0:1\] failed: Connection refused (Connection refused)  
2018-12-23 20:36:57,266 ERROR \[http-nio-8222-exec-1\] \[confluence.plugins.synchrony.SynchronyContextProvider\] getContextMap Could not retrieve Synchrony public key.


author: sarath sasi
body: this error is a common synchrony error.

Could not retrieve public key for real-time collaboration service at <http://localhost:8091/synchrony/jwt-key> with exception:

1.Please try to generate a jwt pub and private key and update the confluence cfg.xml though tis has no relation to nic card change.

2.Check synchrony config file for some error entries or incorrect ipaddresses..


author: Lifeng Song
body: I don't know how to carry out steps 1 \& 2,  
Googling found <https://confluence.atlassian.com/confkb/confluence-cannot-connect-to-synchrony-due-to-error-validating-jwt-935899880.html>  
but when i go to Collaborative Editing to set mode to Off,   
the Admin page keeps popping up "

**Something went wrong**

Please try again.  
"  
Yes, the NIC address was changed to fix the network issue, due to the DHCP scheme, the IP address has changed temporarily then i re-assigned the same IP address back, since then, confluence editing does not work anymore. Can you advise me how to get it back working? also you should make confluence deal with IP address change transparently to user. also can you also give me a link on how to migrate confluence from old release to new release and preserve the data  
Thanks  

<br />


author: Nic Brough -Adaptavist-
body: You don't need to worry too much about shutting down Synchrony this way. Shutdown Confluence and if Synchrony continues to run, kill it with the operating system procedure for stopping something.


author: Lifeng Song
body: Hi I have repeated several times shutting down confluence and restart, the result is the same: editing is not working.

My problem is how do I get confluence editing working? specifically how do I perform following two tasks as suggested by [@sarath sasi](/t5/user/viewprofilepage/user-id/761457):

1.Please try to generate a jwt pub and private key and update the confluence cfg.xml though tis has no relation to nic card change.

2.Check synchrony config file for some error entries or incorrect ipaddresses..  


author: sarath sasi
body: <https://confluence.atlassian.com/confkb/confluence-cannot-connect-to-synchrony-due-to-error-validating-jwt-935899880.html>


author: Lifeng Song
body: thank you, that works

Suggestion:   
when this happens, it is impossible to stop collaborative editing since it keeps popping up errors. More verbosity of the error, rather than "Something goes wrong" would help better

I just stop confluence, perform the key generation and then restart  
thanks


Tags: confluence-server

server