incubator-cloudstack-issues mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Abhinav Roy (JIRA)" <j...@apache.org>
Subject [jira] [Commented] (CLOUDSTACK-1498) Management server fail to start because of issues with DB password encryption/decryption
Date Mon, 04 Mar 2013 13:41:13 GMT

    [ https://issues.apache.org/jira/browse/CLOUDSTACK-1498?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=13592205#comment-13592205
] 

Abhinav Roy commented on CLOUDSTACK-1498:
-----------------------------------------

Devdeep Singh added a comment - 04/Mar/13 12:30
To verify, we updated the /etc/cloudstack/management/db.properties file to contain a clear
text password for the 'cloud' db. After that the setup came up from properly. The issue seems
to be between how the db password is encrypted and stored and how it is decrypted.

Ram Ganesh made changes - Today 12:36
Assignee	 Sateesh Chodapuneedi [ sateeshc ]	 Abhinav Roy [ abhinavr ]

Ram Ganesh added a comment - 04/Mar/13 12:37
Abhinav,
Can you please check your setup with the above findings and share if it resolves the issue?

Abhinav Roy added a comment - 04/Mar/13 12:40
I tried with the workaround suggested by Devdeep and was able to launch the Management server
UI.

Sudha Ponnaganti made changes - Today 12:51
Assignee	 Abhinav Roy [ abhinavr ]	 Devdeep Singh [ devdeep ]

Sudha Ponnaganti added a comment - 04/Mar/13 13:13
Devdeep,

Reassigned it back to you. Can you fix the PW Encryption??

thanks
/sudha

Sudha Ponnaganti added a comment - 04/Mar/13 13:26
Here is the workaround :

We need to update the db.cloud.password in db.properties file in clear-text (not encrypted).
As example :

1.	When we setup databases we run the following command cloudstack-setup-databases cloud:cloud@localhost
--deploy-as=root: [ Here <cloud: cloud> is the <username:password> of the cloud
DB which gets updated in the db.properties file]

2.	What we need to do now is >> cd /etc/cloudstack/management
                                                                          >> vi db.properties

3.	Make the entry db.cloud.password=cloud (as cloud is the password of DB as per step 1) and
save the file.
4.	Restart management server >> service cloudstack-management restart

After this the MS will come up. Then I configured CS and launched a user VM, that also is
working fine. So we can proceed with this workaround till this issue is fixed.

MS : 10.102.192.125 <root:freebsd>

Devdeep Singh made changes - Today 13:27
Assignee	 Devdeep Singh [ devdeep ]	 edison su [ edison ]

Devdeep Singh added a comment - 04/Mar/13 13:27
In commit 8e360f342d6e72ad3355008456bec13904fe3e2b, the file Transaction.java was updated
and the code to check if encryption should be used was commented out. Because of this when
the db.properties file is loaded we are always assuming all the fields to be unencrypted.

Putting the code back to check if encryption is used should be straight forward; just need
to uncomment the two lines that were commented out. However, need to confirm the reason why
the two lines were commented out in the first place.

Assigning the bug to Edison as he had made the change.
                
> Management server fail to start because of issues with DB password encryption/decryption
> ----------------------------------------------------------------------------------------
>
>                 Key: CLOUDSTACK-1498
>                 URL: https://issues.apache.org/jira/browse/CLOUDSTACK-1498
>             Project: CloudStack
>          Issue Type: Bug
>      Security Level: Public(Anyone can view this level - this is the default.) 
>          Components: Management Server
>    Affects Versions: 4.2.0
>         Environment: MS : Rhel/CentOS6.3
> Builds : latest master builds like http://repo-ccp.citrix.com/releases/ASF/rhel/6.3/master/CloudStack-non-OSS-MASTER-97-rhel6.3.tar.gz

>            Reporter: Abhinav Roy
>            Assignee: edison su
>            Priority: Blocker
>             Fix For: 4.2.0
>
>
> MS fails to start with the following exceptions :
> 2013-03-04 11:52:48,312 ERROR [web.context.ContextLoader] (main:null) Context initialization
failed
> org.springframework.beans.factory.BeanCreationException: Error creating bean with name
'apiServlet': Injection of autowired dependencies failed; nested exception is org.springframework.beans.factory.BeanCreationException:
Could not autowire field: com.cloud.api.ApiServer com.cloud.api.ApiServlet._apiServer; nested
exception is org.springframework.beans.factory.BeanCreationException: Error creating bean
with name 'apiServer': Invocation of init method failed; nested exception is com.cloud.utils.exception.CloudRuntimeException:
DB Exception on: null
>         at org.springframework.beans.factory.annotation.AutowiredAnnotationBeanPostProcessor.postProcessPropertyValues(AutowiredAnnotationBeanPostProcessor.java:287)
>         at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.populateBean(AbstractAutowireCapableBeanFactory.java:1106)
>         at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.doCreateBean(AbstractAutowireCapableBeanFactory.java:517)
>         at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.createBean(AbstractAutowireCapableBeanFactory.java:456)
>         at org.springframework.beans.factory.support.AbstractBeanFactory$1.getObject(AbstractBeanFactory.java:294)
>         at org.springframework.beans.factory.support.DefaultSingletonBeanRegistry.getSingleton(DefaultSingletonBeanRegistry.java:225)
>         at org.springframework.beans.factory.support.AbstractBeanFactory.doGetBean(AbstractBeanFactory.java:291)
>         at org.springframework.beans.factory.support.AbstractBeanFactory.getBean(AbstractBeanFactory.java:193)
>         at org.springframework.beans.factory.support.DefaultListableBeanFactory.preInstantiateSingletons(DefaultListableBeanFactory.java:609)
>         at org.springframework.context.support.AbstractApplicationContext.finishBeanFactoryInitialization(AbstractApplicationContext.java:918)
>         at org.springframework.context.support.AbstractApplicationContext.refresh(AbstractApplicationContext.java:469)
>         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.apache.catalina.core.StandardContext.listenerStart(StandardContext.java:3972)
>         at org.apache.catalina.core.StandardContext.start(StandardContext.java:4467)
>         at org.apache.catalina.core.ContainerBase.addChildInternal(ContainerBase.java:791)
>         at org.apache.catalina.core.ContainerBase.addChild(ContainerBase.java:771)
>         at org.apache.catalina.core.StandardHost.addChild(StandardHost.java:526)
>         at org.apache.catalina.startup.HostConfig.deployDirectory(HostConfig.java:1041)
>         at org.apache.catalina.startup.HostConfig.deployDirectories(HostConfig.java:964)
>         at org.apache.catalina.startup.HostConfig.deployApps(HostConfig.java:502)
>         at org.apache.catalina.startup.HostConfig.start(HostConfig.java:1277)
>         at org.apache.catalina.startup.HostConfig.lifecycleEvent(HostConfig.java:321)
>         at org.apache.catalina.util.LifecycleSupport.fireLifecycleEvent(LifecycleSupport.java:119)
>         at org.apache.catalina.core.ContainerBase.start(ContainerBase.java:1053)
>         at org.apache.catalina.core.StandardHost.start(StandardHost.java:722)
>         at org.apache.catalina.core.ContainerBase.start(ContainerBase.java:1045)
>         at org.apache.catalina.core.StandardEngine.start(StandardEngine.java:443)
>         at org.apache.catalina.core.StandardService.start(StandardService.java:516)
>         at org.apache.catalina.core.StandardServer.start(StandardServer.java:710)
>         at org.apache.catalina.startup.Catalina.start(Catalina.java:593)
>         at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
>         at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:57)
>         at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
>         at java.lang.reflect.Method.invoke(Method.java:616)
>         at org.apache.catalina.startup.Bootstrap.start(Bootstrap.java:289)
>         at org.apache.catalina.startup.Bootstrap.main(Bootstrap.java:414)
> Caused by: org.springframework.beans.factory.BeanCreationException: Could not autowire
field: com.cloud.api.ApiServer com.cloud.api.ApiServlet._apiServer; nested exception is org.springframework.beans.factory.BeanCreationException:
Error creating bean with name 'apiServer': Invocation of init method failed; nested exception
is com.cloud.utils.exception.CloudRuntimeException: DB Exception on: null
>         at org.springframework.beans.factory.annotation.AutowiredAnnotationBeanPostProcessor$AutowiredFieldElement.inject(AutowiredAnnotationBeanPostProcessor.java:506)
>         at org.springframework.beans.factory.annotation.InjectionMetadata.inject(InjectionMetadata.java:87)
>         at org.springframework.beans.factory.annotation.AutowiredAnnotationBeanPostProcessor.postProcessPropertyValues(AutowiredAnnotationBeanPostProcessor.java:284)
>         ... 37 more
> Caused by: org.springframework.beans.factory.BeanCreationException: Error creating bean
with name 'apiServer': Invocation of init method failed; nested exception is com.cloud.utils.exception.CloudRuntimeException:
DB Exception on: null
>         at org.springframework.beans.factory.annotation.InitDestroyAnnotationBeanPostProcessor.postProcessBeforeInitialization(InitDestroyAnnotationBeanPostProcessor.java:135)
>         at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.applyBeanPostProcessorsBeforeInitialization(AbstractAutowireCapableBeanFactory.java:394)
>         at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.initializeBean(AbstractAutowireCapableBeanFactory.java:1448)
>         at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.doCreateBean(AbstractAutowireCapableBeanFactory.java:519)
>         at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.createBean(AbstractAutowireCapableBeanFactory.java:456)
>         at org.springframework.beans.factory.support.AbstractBeanFactory$1.getObject(AbstractBeanFactory.java:294)
>         at org.springframework.beans.factory.support.DefaultSingletonBeanRegistry.getSingleton(DefaultSingletonBeanRegistry.java:225)
>         at org.springframework.beans.factory.support.AbstractBeanFactory.doGetBean(AbstractBeanFactory.java:291)
>         at org.springframework.beans.factory.support.AbstractBeanFactory.getBean(AbstractBeanFactory.java:193)
>         at org.springframework.beans.factory.support.DefaultListableBeanFactory.findAutowireCandidates(DefaultListableBeanFactory.java:876)
>         at org.springframework.beans.factory.support.DefaultListableBeanFactory.doResolveDependency(DefaultListableBeanFactory.java:818)
>         at org.springframework.beans.factory.support.DefaultListableBeanFactory.resolveDependency(DefaultListableBeanFactory.java:735)
>         at org.springframework.beans.factory.annotation.AutowiredAnnotationBeanPostProcessor$AutowiredFieldElement.inject(AutowiredAnnotationBeanPostProcessor.java:478)
>         ... 39 more
> Caused by: com.cloud.utils.exception.CloudRuntimeException: DB Exception on: null
>         at com.cloud.utils.db.GenericDaoBase.searchIncludingRemoved(GenericDaoBase.java:412)
>         at com.cloud.utils.db.GenericDaoBase.searchIncludingRemoved(GenericDaoBase.java:347)
>         at com.cloud.utils.db.GenericDaoBase.search(GenericDaoBase.java:331)
>         at com.cloud.utils.db.GenericDaoBase.search(GenericDaoBase.java:1233)
>         at net.sf.cglib.proxy.MethodProxy.invoke(MethodProxy.java:204)
>         at org.springframework.aop.framework.Cglib2AopProxy$CglibMethodInvocation.invokeJoinpoint(Cglib2AopProxy.java:689)
>         at org.springframework.aop.framework.ReflectiveMethodInvocation.proceed(ReflectiveMethodInvocation.java:150)
>         at org.springframework.aop.aspectj.MethodInvocationProceedingJoinPoint.proceed(MethodInvocationProceedingJoinPoint.java:80)
>         at com.cloud.utils.db.TransactionContextBuilder.AroundAnyMethod(TransactionContextBuilder.java:48)
>         at sun.reflect.GeneratedMethodAccessor36.invoke(Unknown Source)
>         at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
>         at java.lang.reflect.Method.invoke(Method.java:616)
>         at org.springframework.aop.aspectj.AbstractAspectJAdvice.invokeAdviceMethodWithGivenArgs(AbstractAspectJAdvice.java:621)
>         at org.springframework.aop.aspectj.AbstractAspectJAdvice.invokeAdviceMethod(AbstractAspectJAdvice.java:610)
>         at org.springframework.aop.aspectj.AspectJAroundAdvice.invoke(AspectJAroundAdvice.java:65)
>         at org.springframework.aop.framework.ReflectiveMethodInvocation.proceed(ReflectiveMethodInvocation.java:172)
>         at org.springframework.aop.interceptor.ExposeInvocationInterceptor.invoke(ExposeInvocationInterceptor.java:90)
>         at org.springframework.aop.framework.ReflectiveMethodInvocation.proceed(ReflectiveMethodInvocation.java:172)
>         at org.springframework.aop.framework.Cglib2AopProxy$DynamicAdvisedInterceptor.intercept(Cglib2AopProxy.java:622)
>         at com.cloud.api.ApiServer.init(ApiServer.java:187)
>         at com.cloud.api.ApiServer.initComponent(ApiServer.java:176)
>         at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
>         at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:57)
>         at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
>         at java.lang.reflect.Method.invoke(Method.java:616)
>         at org.springframework.beans.factory.annotation.InitDestroyAnnotationBeanPostProcessor$LifecycleElement.invoke(InitDestroyAnnotationBeanPostProcessor.java:346)
>         at org.springframework.beans.factory.annotation.InitDestroyAnnotationBeanPostProcessor$LifecycleMetadata.invokeInitMethods(InitDestroyAnnotationBeanPostProcessor.java:299)
>         at org.springframework.beans.factory.annotation.InitDestroyAnnotationBeanPostProcessor.postProcessBeforeInitialization(InitDestroyAnnotationBeanPostProcessor.java:132)
>         ... 51 more
> Caused by: com.mysql.jdbc.exceptions.jdbc4.MySQLNonTransientConnectionException: Could
not create connection to database server. Attempted reconnect 3 times. Giving up.
>         at sun.reflect.NativeConstructorAccessorImpl.newInstance0(Native Method)
>         at sun.reflect.NativeConstructorAccessorImpl.newInstance(NativeConstructorAccessorImpl.java:57)
>         at sun.reflect.DelegatingConstructorAccessorImpl.newInstance(DelegatingConstructorAccessorImpl.java:45)
>         at java.lang.reflect.Constructor.newInstance(Constructor.java:532)
>         at com.mysql.jdbc.Util.handleNewInstance(Util.java:411)
>         at com.mysql.jdbc.Util.getInstance(Util.java:386)
>         at com.mysql.jdbc.SQLError.createSQLException(SQLError.java:1014)
>         at com.mysql.jdbc.SQLError.createSQLException(SQLError.java:988)
>         at com.mysql.jdbc.SQLError.createSQLException(SQLError.java:974)
>         at com.mysql.jdbc.SQLError.createSQLException(SQLError.java:919)
>         at com.mysql.jdbc.ConnectionImpl.connectWithRetries(ConnectionImpl.java:2299)
>         at com.mysql.jdbc.ConnectionImpl.createNewIO(ConnectionImpl.java:2220)
>         at com.mysql.jdbc.ConnectionImpl.<init>(ConnectionImpl.java:813)
>         at com.mysql.jdbc.JDBC4Connection.<init>(JDBC4Connection.java:47)
>         at sun.reflect.NativeConstructorAccessorImpl.newInstance0(Native Method)
>         at sun.reflect.NativeConstructorAccessorImpl.newInstance(NativeConstructorAccessorImpl.java:57)
>         at sun.reflect.DelegatingConstructorAccessorImpl.newInstance(DelegatingConstructorAccessorImpl.java:45)
>         at java.lang.reflect.Constructor.newInstance(Constructor.java:532)
>         at com.mysql.jdbc.Util.handleNewInstance(Util.java:411)
>         at com.mysql.jdbc.ConnectionImpl.getInstance(ConnectionImpl.java:399)
>         at com.mysql.jdbc.NonRegisteringDriver.connect(NonRegisteringDriver.java:334)
>         at java.sql.DriverManager.getConnection(DriverManager.java:620)
>         at java.sql.DriverManager.getConnection(DriverManager.java:200)
>         at org.apache.commons.dbcp.DriverManagerConnectionFactory.createConnection(DriverManagerConnectionFactory.java:75)
>         at org.apache.commons.dbcp.PoolableConnectionFactory.makeObject(PoolableConnectionFactory.java:582)
>         at org.apache.commons.pool.impl.GenericObjectPool.borrowObject(GenericObjectPool.java:1188)
>         at org.apache.commons.dbcp.PoolingDataSource.getConnection(PoolingDataSource.java:106)
>         at com.cloud.utils.db.Transaction.getConnection(Transaction.java:550)
>         at com.cloud.utils.db.Transaction.prepareStatement(Transaction.java:461)
>         at com.cloud.utils.db.Transaction.prepareAutoCloseStatement(Transaction.java:454)
>         at com.cloud.utils.db.GenericDaoBase.searchIncludingRemoved(GenericDaoBase.java:385)
>         ... 80 more
> Caused by: java.sql.SQLException: Access denied for user 'cloud'@'localhost' (using password:
YES)
>         ... 110 more

--
This message is automatically generated by JIRA.
If you think it was sent incorrectly, please contact your JIRA administrators
For more information on JIRA, see: http://www.atlassian.com/software/jira

Mime
View raw message