Rayees Namathponnan created CLOUDSTACK-1201:
-----------------------------------------------
Summary: Failed to create ssh key for user "cloud"
/var/lib/cloud/management/.ssh/id_rsa and failed to start management server
Key: CLOUDSTACK-1201
URL: https://issues.apache.org/jira/browse/CLOUDSTACK-1201
Project: CloudStack
Issue Type: Bug
Security Level: Public (Anyone can view this level - this is the default.)
Components: Install and Setup
Affects Versions: 4.1.0
Environment: Cent OS 6.0.3
Branch 4.1
Commit 368d5a1ea597c612e050613e13c95687bc0992c2
Reporter: Rayees Namathponnan
Priority: Critical
Fix For: 4.1.0
Step 1 : Created new build from 4.1 branch
Step 2 : Install and configure MS server
Step 3 : run cloudstack-setup-management
Actual result
Failed to start MS, you can see below error in log
2013-02-07 16:33:55,996 INFO [cloud.server.ConfigurationServerImpl]
(main:null) Systemvm keypairs not found in database. Need to store them in the
database
2013-02-07 16:33:55,996 DEBUG [utils.script.Script] (main:null) Executing:
/bin/bash -c if [ -f /var/lib/cloud/management/.ssh/id_rsa ]; then rm -f
/var/lib/cloud/management/.ssh/id_rsa; fi; ssh-keygen -t rsa -N '' -f
/var/lib/cloud/management/.ssh/id_rsa -q
2013-02-07 16:33:56,829 DEBUG [utils.script.Script] (main:null) Exit value is 1
2013-02-07 16:33:56,829 DEBUG [utils.script.Script] (main:null) Could not
create directory '/var/lib/cloud/management/.ssh'.open
/var/lib/cloud/management/.ssh/id_rsa failed: No such file or directory.Saving
the key failed: /var/lib/cloud/management/.ssh/id_rsa.
2013-02-07 16:33:56,866 ERROR [cloud.server.ConfigurationServerImpl]
(main:null) Cannot read the private key file
java.io.FileNotFoundException: /var/lib/cloud/management/.ssh/id_rsa (No such
file or directory)
at java.io.FileInputStream.open(Native Method)
at java.io.FileInputStream.<init>(FileInputStream.java:137)
at
com.cloud.server.ConfigurationServerImpl.updateKeyPairs(ConfigurationServerImpl.java:615)
at
com.cloud.server.ConfigurationServerImpl.persistDefaultValues(ConfigurationServerImpl.java:273)
at
com.cloud.server.ConfigurationServerImpl.configure(ConfigurationServerImpl.java:144)
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:43)
at sun.reflect.GeneratedMethodAccessor35.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.utils.component.ComponentContext.initComponentsLifeCycle(ComponentContext.java:100)
at
com.cloud.servlet.CloudStartupServlet.init(CloudStartupServlet.java:38)
at
org.apache.catalina.core.StandardWrapper.loadServlet(StandardWrapper.java:1173)
Work around,
We need to create the manually and do restart MS, i followed below steps and
restarted MS
>userdel cloud
>useradd -M -c "CloudStack unprivileged user" -r -s /bin/sh -d
>/var/lib/cloud/management cloud|| true
>mkdir -p /var/lib/cloud/management/
>chown cloud:cloud /var/lib/cloud/management/
>su - cloud
>ssh-keygen
--
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