Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Cannot upgrade from 16.2 to 17.2 due to cipher conversion failure #3288

Closed
m17kea opened this issue Mar 20, 2017 · 2 comments
Closed

Cannot upgrade from 16.2 to 17.2 due to cipher conversion failure #3288

m17kea opened this issue Mar 20, 2017 · 2 comments

Comments

@m17kea
Copy link

m17kea commented Mar 20, 2017

Issue Type
  • Bug Report
Summary

Cannot upgrade from 16.2 to 17.2 due to cipher conversion

Environment

Windows Server 2016

Basic environment details
  • Go Version: 17.2
  • JAVA Version: Bundled
  • OS: Windows Server 2016
  • Browser vendor and version (if relevant): Chrome (latest)
Additional Environment Details
Steps to Reproduce
  1. Backup 16.2 config with encrypted variables
  2. Restore in 17.2 environment
  3. Start service
Expected Results

Go starts

Actual Results

Go fails to start

Possible Fix

?

Log snippets
2017-03-20 11:37:35,612  WARN [WrapperJarAppMain] GoConfigMigrator:97 - Error upgrading config file, trying to upgrade using the versioned config file.
2017-03-20 11:37:35,808  WARN [WrapperJarAppMain] GoConfigMigrator:136 - Go encountered an invalid configuration file while starting up. The invalid configuration file has been renamed to ‘C:\Go Server\config\cruise-config.xml.invalid.2017-03-20-11-37-35’ and a new configuration file has been automatically created using the last good configuration. Cause: 'Encrypted value for variable named 'SqlServerPassword' is invalid. This usually happens when the cipher text is modified to have an invalid value.'
2017-03-20 11:37:40,459  WARN [WrapperJarAppMain] GoConfigMigrator:125 - The versioned config file could be invalid or migrating the versioned config resulted in an invalid configuration
2017-03-20 11:37:40,463 ERROR [WrapperJarAppMain] GoConfigMigrator:143 - There are errors in the Cruise config file.  Please read the error message and correct the errors.
Once fixed, please restart Cruise.
Error: Encrypted value for variable named 'connectionStringsMongoDbReportsServer' is invalid. This usually happens when the cipher text is modified to have an invalid value.
2017-03-20 11:37:40,595  WARN [WrapperJarAppMain] CachedGoConfig:97 - Error loading cruise-config.xml from disk, keeping previous one
com.thoughtworks.go.util.XsdValidationException: Value '78' of attribute 'schemaVersion' of element 'cruise' is not valid with respect to the corresponding attribute use. Attribute 'schemaVersion' has a fixed value of '89'.
	at com.thoughtworks.go.util.XmlUtils.buildXmlDocument(XmlUtils.java:59)
	at com.thoughtworks.go.util.XmlUtils.buildXmlDocument(XmlUtils.java:46)
	at com.thoughtworks.go.config.MagicalGoConfigXmlLoader.parseInputStream(MagicalGoConfigXmlLoader.java:154)
	at com.thoughtworks.go.config.MagicalGoConfigXmlLoader.deserializeConfig(MagicalGoConfigXmlLoader.java:97)
	at com.thoughtworks.go.config.GoFileConfigDataSource.forceLoad(GoFileConfigDataSource.java:175)
	at com.thoughtworks.go.config.GoFileConfigDataSource.load(GoFileConfigDataSource.java:151)
	at com.thoughtworks.go.config.CachedGoConfig.forceReload(CachedGoConfig.java:92)
	at com.thoughtworks.go.config.CachedGoConfig.loadConfigIfNull(CachedGoConfig.java:131)
	at com.thoughtworks.go.server.initializers.ApplicationInitializer.onApplicationEvent(ApplicationInitializer.java:106)
	at com.thoughtworks.go.server.initializers.ApplicationInitializer.onApplicationEvent(ApplicationInitializer.java:47)
	at org.springframework.context.event.SimpleApplicationEventMulticaster.multicastEvent(SimpleApplicationEventMulticaster.java:97)
	at org.springframework.context.support.AbstractApplicationContext.publishEvent(AbstractApplicationContext.java:327)
	at org.springframework.context.support.AbstractApplicationContext.finishRefresh(AbstractApplicationContext.java:941)
	at org.springframework.context.support.AbstractApplicationContext.refresh(AbstractApplicationContext.java:475)
	at org.springframework.web.context.ContextLoader.configureAndRefreshWebApplicationContext(ContextLoader.java:383)
	at org.springframework.web.context.ContextLoader.initWebApplicationContext(ContextLoader.java:283)
	at org.springframework.web.context.ContextLoaderListener.contextInitialized(ContextLoaderListener.java:111)
	at org.eclipse.jetty.server.handler.ContextHandler.callContextInitialized(ContextHandler.java:800)
	at org.eclipse.jetty.servlet.ServletContextHandler.callContextInitialized(ServletContextHandler.java:444)
	at org.eclipse.jetty.server.handler.ContextHandler.startContext(ContextHandler.java:791)
	at org.eclipse.jetty.servlet.ServletContextHandler.startContext(ServletContextHandler.java:294)
	at org.eclipse.jetty.webapp.WebAppContext.startWebapp(WebAppContext.java:1349)
	at org.eclipse.jetty.webapp.WebAppContext.startContext(WebAppContext.java:1342)
	at org.eclipse.jetty.server.handler.ContextHandler.doStart(ContextHandler.java:741)
	at org.eclipse.jetty.webapp.WebAppContext.doStart(WebAppContext.java:505)
	at org.eclipse.jetty.util.component.AbstractLifeCycle.start(AbstractLifeCycle.java:68)
	at org.eclipse.jetty.util.component.ContainerLifeCycle.start(ContainerLifeCycle.java:132)
	at org.eclipse.jetty.util.component.ContainerLifeCycle.doStart(ContainerLifeCycle.java:114)
	at org.eclipse.jetty.server.handler.AbstractHandler.doStart(AbstractHandler.java:61)
	at org.eclipse.jetty.util.component.AbstractLifeCycle.start(AbstractLifeCycle.java:68)
	at org.eclipse.jetty.util.component.ContainerLifeCycle.start(ContainerLifeCycle.java:132)
	at org.eclipse.jetty.server.Server.start(Server.java:387)
	at org.eclipse.jetty.util.component.ContainerLifeCycle.doStart(ContainerLifeCycle.java:114)
	at org.eclipse.jetty.server.handler.AbstractHandler.doStart(AbstractHandler.java:61)
	at org.eclipse.jetty.server.Server.doStart(Server.java:354)
	at org.eclipse.jetty.util.component.AbstractLifeCycle.start(AbstractLifeCycle.java:68)
	at com.thoughtworks.go.server.Jetty9Server.start(Jetty9Server.java:93)
	at com.thoughtworks.go.server.GoServer.startServer(GoServer.java:71)
	at com.thoughtworks.go.server.GoServer.go(GoServer.java:63)
	at com.thoughtworks.go.server.util.GoLauncher.main(GoLauncher.java:35)
	at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
	at sun.reflect.NativeMethodAccessorImpl.invoke(Unknown Source)
	at sun.reflect.DelegatingMethodAccessorImpl.invoke(Unknown Source)
	at java.lang.reflect.Method.invoke(Unknown Source)
	at com.simontuffs.onejar.Boot.run(Boot.java:306)
	at com.simontuffs.onejar.Boot.main(Boot.java:159)
	at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
	at sun.reflect.NativeMethodAccessorImpl.invoke(Unknown Source)
	at sun.reflect.DelegatingMethodAccessorImpl.invoke(Unknown Source)
	at java.lang.reflect.Method.invoke(Unknown Source)
	at org.tanukisoftware.wrapper.WrapperJarApp.run(WrapperJarApp.java:427)
	at java.lang.Thread.run(Unknown Source)
2017-03-20 11:37:41,347 ERROR [WrapperJarAppMain] ContextLoader:307 - Context initialization failed
java.lang.RuntimeException: java.lang.RuntimeException: Peer (vm://go-server#1) disposed.
	at com.thoughtworks.go.server.initializers.ApplicationInitializer.onApplicationEvent(ApplicationInitializer.java:149)
	at com.thoughtworks.go.server.initializers.ApplicationInitializer.onApplicationEvent(ApplicationInitializer.java:47)
	at org.springframework.context.event.SimpleApplicationEventMulticaster.multicastEvent(SimpleApplicationEventMulticaster.java:97)
	at org.springframework.context.support.AbstractApplicationContext.publishEvent(AbstractApplicationContext.java:327)
	at org.springframework.context.support.AbstractApplicationContext.finishRefresh(AbstractApplicationContext.java:941)
	at org.springframework.context.support.AbstractApplicationContext.refresh(AbstractApplicationContext.java:475)
	at org.springframework.web.context.ContextLoader.configureAndRefreshWebApplicationContext(ContextLoader.java:383)
	at org.springframework.web.context.ContextLoader.initWebApplicationContext(ContextLoader.java:283)
	at org.springframework.web.context.ContextLoaderListener.contextInitialized(ContextLoaderListener.java:111)
	at org.eclipse.jetty.server.handler.ContextHandler.callContextInitialized(ContextHandler.java:800)
	at org.eclipse.jetty.servlet.ServletContextHandler.callContextInitialized(ServletContextHandler.java:444)
	at org.eclipse.jetty.server.handler.ContextHandler.startContext(ContextHandler.java:791)
	at org.eclipse.jetty.servlet.ServletContextHandler.startContext(ServletContextHandler.java:294)
	at org.eclipse.jetty.webapp.WebAppContext.startWebapp(WebAppContext.java:1349)
	at org.eclipse.jetty.webapp.WebAppContext.startContext(WebAppContext.java:1342)
	at org.eclipse.jetty.server.handler.ContextHandler.doStart(ContextHandler.java:741)
	at org.eclipse.jetty.webapp.WebAppContext.doStart(WebAppContext.java:505)
	at org.eclipse.jetty.util.component.AbstractLifeCycle.start(AbstractLifeCycle.java:68)
	at org.eclipse.jetty.util.component.ContainerLifeCycle.start(ContainerLifeCycle.java:132)
	at org.eclipse.jetty.util.component.ContainerLifeCycle.doStart(ContainerLifeCycle.java:114)
	at org.eclipse.jetty.server.handler.AbstractHandler.doStart(AbstractHandler.java:61)
	at org.eclipse.jetty.util.component.AbstractLifeCycle.start(AbstractLifeCycle.java:68)
	at org.eclipse.jetty.util.component.ContainerLifeCycle.start(ContainerLifeCycle.java:132)
	at org.eclipse.jetty.server.Server.start(Server.java:387)
	at org.eclipse.jetty.util.component.ContainerLifeCycle.doStart(ContainerLifeCycle.java:114)
	at org.eclipse.jetty.server.handler.AbstractHandler.doStart(AbstractHandler.java:61)
	at org.eclipse.jetty.server.Server.doStart(Server.java:354)
	at org.eclipse.jetty.util.component.AbstractLifeCycle.start(AbstractLifeCycle.java:68)
	at com.thoughtworks.go.server.Jetty9Server.start(Jetty9Server.java:93)
	at com.thoughtworks.go.server.GoServer.startServer(GoServer.java:71)
	at com.thoughtworks.go.server.GoServer.go(GoServer.java:63)
	at com.thoughtworks.go.server.util.GoLauncher.main(GoLauncher.java:35)
	at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
	at sun.reflect.NativeMethodAccessorImpl.invoke(Unknown Source)
	at sun.reflect.DelegatingMethodAccessorImpl.invoke(Unknown Source)
	at java.lang.reflect.Method.invoke(Unknown Source)
	at com.simontuffs.onejar.Boot.run(Boot.java:306)
	at com.simontuffs.onejar.Boot.main(Boot.java:159)
	at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
	at sun.reflect.NativeMethodAccessorImpl.invoke(Unknown Source)
	at sun.reflect.DelegatingMethodAccessorImpl.invoke(Unknown Source)
	at java.lang.reflect.Method.invoke(Unknown Source)
	at org.tanukisoftware.wrapper.WrapperJarApp.run(WrapperJarApp.java:427)
	at java.lang.Thread.run(Unknown Source)
Caused by: java.lang.RuntimeException: Peer (vm://go-server#1) disposed.
	at com.thoughtworks.go.util.ExceptionUtils.bomb(ExceptionUtils.java:36)
	at com.thoughtworks.go.server.messaging.activemq.ActiveMqMessagingService.addListener(ActiveMqMessagingService.java:95)
	at com.thoughtworks.go.server.messaging.GoMessageTopic.addListener(GoMessageTopic.java:39)
	at com.thoughtworks.go.server.service.PipelineScheduler.initialize(PipelineScheduler.java:80)
	at com.thoughtworks.go.server.initializers.ApplicationInitializer.onApplicationEvent(ApplicationInitializer.java:126)
	... 43 more
Caused by: javax.jms.JMSException: Peer (vm://go-server#1) disposed.
	at org.apache.activemq.util.JMSExceptionSupport.create(JMSExceptionSupport.java:62)
	at org.apache.activemq.ActiveMQConnection.doAsyncSendPacket(ActiveMQConnection.java:1267)
	at org.apache.activemq.ActiveMQConnection.asyncSendPacket(ActiveMQConnection.java:1259)
	at org.apache.activemq.ActiveMQSession.<init>(ActiveMQSession.java:250)
	at org.apache.activemq.ActiveMQConnection.createSession(ActiveMQConnection.java:318)
	at com.thoughtworks.go.server.messaging.activemq.ActiveMqMessagingService.addListener(ActiveMqMessagingService.java:91)
	... 46 more
Caused by: org.apache.activemq.transport.TransportDisposedIOException: Peer (vm://go-server#1) disposed.
	at org.apache.activemq.transport.vm.VMTransport.oneway(VMTransport.java:89)
	at org.apache.activemq.transport.MutexTransport.oneway(MutexTransport.java:40)
	at org.apache.activemq.transport.ResponseCorrelator.oneway(ResponseCorrelator.java:60)
	at org.apache.activemq.ActiveMQConnection.doAsyncSendPacket(ActiveMQConnection.java:1265)
	... 50 more
2017-03-20 11:37:41,351  WARN [WrapperJarAppMain] WebAppContext:514 - Failed startup of context o.e.j.w.WebAppContext@12bc06d3{/go,file:/C:/Go%20Server/work/jetty-0.0.0.0-8153-cruise.war-_go-any-/webapp/,STARTING}{cruise.war}
java.lang.RuntimeException: java.lang.RuntimeException: Peer (vm://go-server#1) disposed.
	at com.thoughtworks.go.server.initializers.ApplicationInitializer.onApplicationEvent(ApplicationInitializer.java:149)
	at com.thoughtworks.go.server.initializers.ApplicationInitializer.onApplicationEvent(ApplicationInitializer.java:47)
	at org.springframework.context.event.SimpleApplicationEventMulticaster.multicastEvent(SimpleApplicationEventMulticaster.java:97)
	at org.springframework.context.support.AbstractApplicationContext.publishEvent(AbstractApplicationContext.java:327)
	at org.springframework.context.support.AbstractApplicationContext.finishRefresh(AbstractApplicationContext.java:941)
	at org.springframework.context.support.AbstractApplicationContext.refresh(AbstractApplicationContext.java:475)
	at org.springframework.web.context.ContextLoader.configureAndRefreshWebApplicationContext(ContextLoader.java:383)
	at org.springframework.web.context.ContextLoader.initWebApplicationContext(ContextLoader.java:283)
	at org.springframework.web.context.ContextLoaderListener.contextInitialized(ContextLoaderListener.java:111)
	at org.eclipse.jetty.server.handler.ContextHandler.callContextInitialized(ContextHandler.java:800)
	at org.eclipse.jetty.servlet.ServletContextHandler.callContextInitialized(ServletContextHandler.java:444)
	at org.eclipse.jetty.server.handler.ContextHandler.startContext(ContextHandler.java:791)
	at org.eclipse.jetty.servlet.ServletContextHandler.startContext(ServletContextHandler.java:294)
	at org.eclipse.jetty.webapp.WebAppContext.startWebapp(WebAppContext.java:1349)
	at org.eclipse.jetty.webapp.WebAppContext.startContext(WebAppContext.java:1342)
	at org.eclipse.jetty.server.handler.ContextHandler.doStart(ContextHandler.java:741)
	at org.eclipse.jetty.webapp.WebAppContext.doStart(WebAppContext.java:505)
	at org.eclipse.jetty.util.component.AbstractLifeCycle.start(AbstractLifeCycle.java:68)
	at org.eclipse.jetty.util.component.ContainerLifeCycle.start(ContainerLifeCycle.java:132)
	at org.eclipse.jetty.util.component.ContainerLifeCycle.doStart(ContainerLifeCycle.java:114)
	at org.eclipse.jetty.server.handler.AbstractHandler.doStart(AbstractHandler.java:61)
	at org.eclipse.jetty.util.component.AbstractLifeCycle.start(AbstractLifeCycle.java:68)
	at org.eclipse.jetty.util.component.ContainerLifeCycle.start(ContainerLifeCycle.java:132)
	at org.eclipse.jetty.server.Server.start(Server.java:387)
	at org.eclipse.jetty.util.component.ContainerLifeCycle.doStart(ContainerLifeCycle.java:114)
	at org.eclipse.jetty.server.handler.AbstractHandler.doStart(AbstractHandler.java:61)
	at org.eclipse.jetty.server.Server.doStart(Server.java:354)
	at org.eclipse.jetty.util.component.AbstractLifeCycle.start(AbstractLifeCycle.java:68)
	at com.thoughtworks.go.server.Jetty9Server.start(Jetty9Server.java:93)
	at com.thoughtworks.go.server.GoServer.startServer(GoServer.java:71)
	at com.thoughtworks.go.server.GoServer.go(GoServer.java:63)
	at com.thoughtworks.go.server.util.GoLauncher.main(GoLauncher.java:35)
	at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
	at sun.reflect.NativeMethodAccessorImpl.invoke(Unknown Source)
	at sun.reflect.DelegatingMethodAccessorImpl.invoke(Unknown Source)
	at java.lang.reflect.Method.invoke(Unknown Source)
	at com.simontuffs.onejar.Boot.run(Boot.java:306)
	at com.simontuffs.onejar.Boot.main(Boot.java:159)
	at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
	at sun.reflect.NativeMethodAccessorImpl.invoke(Unknown Source)
	at sun.reflect.DelegatingMethodAccessorImpl.invoke(Unknown Source)
	at java.lang.reflect.Method.invoke(Unknown Source)
	at org.tanukisoftware.wrapper.WrapperJarApp.run(WrapperJarApp.java:427)
	at java.lang.Thread.run(Unknown Source)
Caused by: java.lang.RuntimeException: Peer (vm://go-server#1) disposed.
	at com.thoughtworks.go.util.ExceptionUtils.bomb(ExceptionUtils.java:36)
	at com.thoughtworks.go.server.messaging.activemq.ActiveMqMessagingService.addListener(ActiveMqMessagingService.java:95)
	at com.thoughtworks.go.server.messaging.GoMessageTopic.addListener(GoMessageTopic.java:39)
	at com.thoughtworks.go.server.service.PipelineScheduler.initialize(PipelineScheduler.java:80)
	at com.thoughtworks.go.server.initializers.ApplicationInitializer.onApplicationEvent(ApplicationInitializer.java:126)
	... 43 more
Caused by: javax.jms.JMSException: Peer (vm://go-server#1) disposed.
	at org.apache.activemq.util.JMSExceptionSupport.create(JMSExceptionSupport.java:62)
	at org.apache.activemq.ActiveMQConnection.doAsyncSendPacket(ActiveMQConnection.java:1267)
	at org.apache.activemq.ActiveMQConnection.asyncSendPacket(ActiveMQConnection.java:1259)
	at org.apache.activemq.ActiveMQSession.<init>(ActiveMQSession.java:250)
	at org.apache.activemq.ActiveMQConnection.createSession(ActiveMQConnection.java:318)
	at com.thoughtworks.go.server.messaging.activemq.ActiveMqMessagingService.addListener(ActiveMqMessagingService.java:91)
	... 46 more
Caused by: org.apache.activemq.transport.TransportDisposedIOException: Peer (vm://go-server#1) disposed.
	at org.apache.activemq.transport.vm.VMTransport.oneway(VMTransport.java:89)
	at org.apache.activemq.transport.MutexTransport.oneway(MutexTransport.java:40)
	at org.apache.activemq.transport.ResponseCorrelator.oneway(ResponseCorrelator.java:60)
	at org.apache.activemq.ActiveMQConnection.doAsyncSendPacket(ActiveMQConnection.java:1265)
	... 50 more

Code snippets/Screenshots
Any other info
@maheshp
Copy link
Contributor

maheshp commented Mar 20, 2017

@armitagemderivitec this could possibly happen if there was a change of cipher file which is used for encryption or because of this encoding issue.

The cipher file would change if you are doing a fresh installation of 17.2.0 over upgrading, can you confirm how you are upgrading.

The encoding issue has been fixed and the fix should be available as part of 17.3.0 which is due to be released this week.

@m17kea
Copy link
Author

m17kea commented Mar 20, 2017

@maheshp, I had tried both upgrading over the top of an installation as well as creating a new environment and copying over the backed up files for config, db etc. Both methods led to the same error.

Given the encoding issue I tried installing a fresh instance of 17.1 and adding my config and this worked successfully.

Thank you very much for the heads up, you've saved me lots of debug time. I'll keep an eye out for 17.3.

@m17kea m17kea closed this as completed Mar 20, 2017
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants