You are viewing a plain text version of this content. The canonical link for it is here.
Posted to users@cloudstack.apache.org by Luciano Castro <lu...@gmail.com> on 2015/10/26 12:32:55 UTC

Failed to inject generated public key into systemvm iso sudo: a password is required

Hi,

Today, I just try to log into CS interface and I couldn´t. I took a look in
the logs and it shows me:

2015-10-26 11:27:38,756 DEBUG [c.c.s.ConfigurationServerImpl]
(localhost-startStop-1:null) Executing: /bin/bash
/usr/share/cloudstack-common/scripts/vm/systemvm/injectkeys.sh
/var/cloudstack/management/.ssh/id_rsa.pub
/var/cloudstack/management/.ssh/id_rsa
/usr/share/cloudstack-common/vms/systemvm.iso
2015-10-26 11:27:38,768 DEBUG [c.c.s.ConfigurationServerImpl]
(localhost-startStop-1:null) Exit value is 1
2015-10-26 11:27:38,768 DEBUG [c.c.s.ConfigurationServerImpl]
(localhost-startStop-1:null) sudo: a password is required
2015-10-26 11:27:38,769 INFO  [c.c.s.ConfigurationServerImpl]
(localhost-startStop-1:null) Injected public and private keys into systemvm
iso with result : sudo: a password is required
2015-10-26 11:27:38,769 WARN  [c.c.s.ConfigurationServerImpl]
(localhost-startStop-1:null) Failed to inject generated public key into
systemvm iso sudo: a password is required

root@opencloud-mgmt01-mia ~]#
/usr/share/cloudstack-common/scripts/vm/systemvm/injectkeys.sh
/var/cloudstack/management/.ssh/id_rsa.pub
/var/cloudstack/management/.ssh/id_rsa
/usr/share/cloudstack-common/vms/systemvm.iso
mount: /dev/loop0 is write-protected, mounting read-only


I updated java* and restarted the system. The problem persists.

[root@opencloud-mgmt01-mia ~]# rpm -qa| grep -i java
tzdata-java-2015g-1.el7.noarch
java-1.7.0-openjdk-headless-1.7.0.91-2.6.2.1.el7_1.x86_64
java-1.7.0-openjdk-devel-1.7.0.91-2.6.2.1.el7_1.x86_64
python-javapackages-3.4.1-6.el7_0.noarch
javamail-1.4.6-8.el7.noarch
javassist-3.16.1-10.el7.noarch
mysql-connector-java-5.1.25-3.el7.noarch
java-1.7.0-openjdk-1.7.0.91-2.6.2.1.el7_1.x86_64
java-1.8.0-openjdk-1.8.0.65-2.b17.el7_1.x86_64
javapackages-tools-3.4.1-6.el7_0.noarch
java-1.8.0-openjdk-headless-1.8.0.65-2.b17.el7_1.x86_64

    I´m using CS 4.5.2 with CentOS Linux release 7.1.1503 (Core).

    Could you help me?

    thanks!


-- 
Luciano Castro

Re: Failed to inject generated public key into systemvm iso sudo: a password is required

Posted by Luciano Castro <lu...@gmail.com>.
I dont know if it´s related to this BUG:

https://issues.apache.org/jira/browse/CLOUDSTACK-2013

thanks

On Mon, Oct 26, 2015 at 9:32 AM, Luciano Castro <lu...@gmail.com>
wrote:

>
> Hi,
>
> Today, I just try to log into CS interface and I couldn´t. I took a look
> in the logs and it shows me:
>
> 2015-10-26 11:27:38,756 DEBUG [c.c.s.ConfigurationServerImpl]
> (localhost-startStop-1:null) Executing: /bin/bash
> /usr/share/cloudstack-common/scripts/vm/systemvm/injectkeys.sh
> /var/cloudstack/management/.ssh/id_rsa.pub
> /var/cloudstack/management/.ssh/id_rsa
> /usr/share/cloudstack-common/vms/systemvm.iso
> 2015-10-26 11:27:38,768 DEBUG [c.c.s.ConfigurationServerImpl]
> (localhost-startStop-1:null) Exit value is 1
> 2015-10-26 11:27:38,768 DEBUG [c.c.s.ConfigurationServerImpl]
> (localhost-startStop-1:null) sudo: a password is required
> 2015-10-26 11:27:38,769 INFO  [c.c.s.ConfigurationServerImpl]
> (localhost-startStop-1:null) Injected public and private keys into systemvm
> iso with result : sudo: a password is required
> 2015-10-26 11:27:38,769 WARN  [c.c.s.ConfigurationServerImpl]
> (localhost-startStop-1:null) Failed to inject generated public key into
> systemvm iso sudo: a password is required
>
> root@opencloud-mgmt01-mia ~]#
> /usr/share/cloudstack-common/scripts/vm/systemvm/injectkeys.sh
> /var/cloudstack/management/.ssh/id_rsa.pub
> /var/cloudstack/management/.ssh/id_rsa
> /usr/share/cloudstack-common/vms/systemvm.iso
> mount: /dev/loop0 is write-protected, mounting read-only
>
>
> I updated java* and restarted the system. The problem persists.
>
> [root@opencloud-mgmt01-mia ~]# rpm -qa| grep -i java
> tzdata-java-2015g-1.el7.noarch
> java-1.7.0-openjdk-headless-1.7.0.91-2.6.2.1.el7_1.x86_64
> java-1.7.0-openjdk-devel-1.7.0.91-2.6.2.1.el7_1.x86_64
> python-javapackages-3.4.1-6.el7_0.noarch
> javamail-1.4.6-8.el7.noarch
> javassist-3.16.1-10.el7.noarch
> mysql-connector-java-5.1.25-3.el7.noarch
> java-1.7.0-openjdk-1.7.0.91-2.6.2.1.el7_1.x86_64
> java-1.8.0-openjdk-1.8.0.65-2.b17.el7_1.x86_64
> javapackages-tools-3.4.1-6.el7_0.noarch
> java-1.8.0-openjdk-headless-1.8.0.65-2.b17.el7_1.x86_64
>
>     I´m using CS 4.5.2 with CentOS Linux release 7.1.1503 (Core).
>
>     Could you help me?
>
>     thanks!
>
>
> --
> Luciano Castro
>



-- 
Luciano Castro

Re: Failed to inject generated public key into systemvm iso sudo: a password is required

Posted by Luciano Castro <lu...@gmail.com>.
the entire log should help....



2015-10-26 15:44:17,944 DEBUG [c.c.s.ConfigurationServerImpl]
(localhost-startStop-1:null) Looks like system account already exists
2015-10-26 15:44:17,944 DEBUG [c.c.s.ConfigurationServerImpl]
(localhost-startStop-1:null) Looks like system user already exists
2015-10-26 15:44:17,945 DEBUG [c.c.s.ConfigurationServerImpl]
(localhost-startStop-1:null) Looks like admin account already exists
2015-10-26 15:44:17,946 DEBUG [c.c.s.ConfigurationServerImpl]
(localhost-startStop-1:null) Looks like admin user already exists
2015-10-26 15:44:17,987 INFO  [c.c.s.ConfigurationServerImpl]
(localhost-startStop-1:null) Processing updateSSLKeyStore
2015-10-26 15:44:18,005 INFO  [c.c.s.ConfigurationServerImpl]
(localhost-startStop-1:null) SSL keystore located at
/etc/cloudstack/management/cloudmanagementserver.keystore
2015-10-26 15:44:18,013 DEBUG [c.c.u.s.Script] (localhost-startStop-1:null)
Executing: sudo cp -f /tmp/tmpkey
/etc/cloudstack/management/cloudmanagementserver.keystore
2015-10-26 15:44:18,024 DEBUG [c.c.u.s.Script] (localhost-startStop-1:null)
Exit value is 1
2015-10-26 15:44:18,024 DEBUG [c.c.u.s.Script] (localhost-startStop-1:null)
sudo: no tty present and no askpass program specified
2015-10-26 15:44:18,025 WARN  [c.c.s.ConfigurationServerImpl]
(localhost-startStop-1:null) Would use fail-safe keystore to continue.
java.io.IOException: Fail to create keystore file!
        at
com.cloud.server.ConfigurationServerImpl.updateSSLKeystore(ConfigurationServerImpl.java:664)
        at
com.cloud.server.ConfigurationServerImpl.persistDefaultValues(ConfigurationServerImpl.java:304)
        at
com.cloud.server.ConfigurationServerImpl.configure(ConfigurationServerImpl.java:166)
        at
org.apache.cloudstack.spring.lifecycle.CloudStackExtendedLifeCycle$3.with(CloudStackExtendedLifeCycle.java:114)
        at
org.apache.cloudstack.spring.lifecycle.CloudStackExtendedLifeCycle.with(CloudStackExtendedLifeCycle.java:153)
        at
org.apache.cloudstack.spring.lifecycle.CloudStackExtendedLifeCycle.configure(CloudStackExtendedLifeCycle.java:110)
        at
org.apache.cloudstack.spring.lifecycle.CloudStackExtendedLifeCycle.start(CloudStackExtendedLifeCycle.java:56)
        at
org.springframework.context.support.DefaultLifecycleProcessor.doStart(DefaultLifecycleProcessor.java:167)
        at
org.springframework.context.support.DefaultLifecycleProcessor.access$200(DefaultLifecycleProcessor.java:51)
        at
org.springframework.context.support.DefaultLifecycleProcessor$LifecycleGroup.start(DefaultLifecycleProcessor.java:339)
        at
org.springframework.context.support.DefaultLifecycleProcessor.startBeans(DefaultLifecycleProcessor.java:143)
        at
org.springframework.context.support.DefaultLifecycleProcessor.onRefresh(DefaultLifecycleProcessor.java:108)
        at
org.springframework.context.support.AbstractApplicationContext.finishRefresh(AbstractApplicationContext.java:945)
        at
org.springframework.context.support.AbstractApplicationContext.refresh(AbstractApplicationContext.java:482)
        at
org.apache.cloudstack.spring.module.model.impl.DefaultModuleDefinitionSet.loadContext(DefaultModuleDefinitionSet.java:145)
        at
org.apache.cloudstack.spring.module.model.impl.DefaultModuleDefinitionSet$2.with(DefaultModuleDefinitionSet.java:122)
        at
org.apache.cloudstack.spring.module.model.impl.DefaultModuleDefinitionSet.withModule(DefaultModuleDefinitionSet.java:245)
        at
org.apache.cloudstack.spring.module.model.impl.DefaultModuleDefinitionSet.withModule(DefaultModuleDefinitionSet.java:250)
        at
org.apache.cloudstack.spring.module.model.impl.DefaultModuleDefinitionSet.withModule(DefaultModuleDefinitionSet.java:250)
        at
org.apache.cloudstack.spring.module.model.impl.DefaultModuleDefinitionSet.withModule(DefaultModuleDefinitionSet.java:233)
        at
org.apache.cloudstack.spring.module.model.impl.DefaultModuleDefinitionSet.loadContexts(DefaultModuleDefinitionSet.java:117)
        at
org.apache.cloudstack.spring.module.model.impl.DefaultModuleDefinitionSet.load(DefaultModuleDefinitionSet.java:79)
        at
org.apache.cloudstack.spring.module.factory.ModuleBasedContextFactory.loadModules(ModuleBasedContextFactory.java:37)
        at
org.apache.cloudstack.spring.module.factory.CloudStackSpringContext.init(CloudStackSpringContext.java:70)
        at
org.apache.cloudstack.spring.module.factory.CloudStackSpringContext.<init>(CloudStackSpringContext.java:57)
        at
org.apache.cloudstack.spring.module.factory.CloudStackSpringContext.<init>(CloudStackSpringContext.java:61)
        at
org.apache.cloudstack.spring.module.web.CloudStackContextLoaderListener.contextInitialized(CloudStackContextLoaderListener.java:52)
        at
org.apache.catalina.core.StandardContext.listenerStart(StandardContext.java:4973)
        at
org.apache.catalina.core.StandardContext.startInternal(StandardContext.java:5467)
        at
org.apache.catalina.util.LifecycleBase.start(LifecycleBase.java:150)
        at
org.apache.catalina.core.ContainerBase.addChildInternal(ContainerBase.java:901)
        at
org.apache.catalina.core.ContainerBase.addChild(ContainerBase.java:877)
        at
org.apache.catalina.core.StandardHost.addChild(StandardHost.java:632)
        at
org.apache.catalina.startup.HostConfig.deployDirectory(HostConfig.java:1247)
        at
org.apache.catalina.startup.HostConfig$DeployDirectory.run(HostConfig.java:1898)
        at
java.util.concurrent.Executors$RunnableAdapter.call(Executors.java:471)
        at java.util.concurrent.FutureTask.run(FutureTask.java:262)
        at
java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1145)
        at
java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:615)
        at java.lang.Thread.run(Thread.java:745)
Caused by: java.io.IOException
        at
com.cloud.server.ConfigurationServerImpl.updateSSLKeystore(ConfigurationServerImpl.java:661)
        ... 39 more
2015-10-26 15:44:18,042 INFO  [c.c.s.ConfigurationServerImpl]
(localhost-startStop-1:null) Processing updateKeyPairs
2015-10-26 15:44:18,042 INFO  [c.c.s.ConfigurationServerImpl]
(localhost-startStop-1:null) Keypairs already in database, updating local
copy
2015-10-26 15:44:18,070 INFO  [c.c.s.ConfigurationServerImpl]
(localhost-startStop-1:null) Going to update systemvm iso with generated
keypairs if needed
2015-10-26 15:44:18,070 INFO  [c.c.s.ConfigurationServerImpl]
(localhost-startStop-1:null) Trying to inject public and private keys into
systemvm iso
2015-10-26 15:44:18,070 DEBUG [c.c.u.s.Script] (localhost-startStop-1:null)
Looking for scripts/vm/systemvm/injectkeys.sh in the classpath
2015-10-26 15:44:18,071 DEBUG [c.c.u.s.Script] (localhost-startStop-1:null)
System resource: null
2015-10-26 15:44:18,071 DEBUG [c.c.u.s.Script] (localhost-startStop-1:null)
Classpath resource: null
2015-10-26 15:44:18,071 DEBUG [c.c.u.s.Script] (localhost-startStop-1:null)
Looking for scripts/vm/systemvm/injectkeys.sh
2015-10-26 15:44:18,072 DEBUG [c.c.u.s.Script] (localhost-startStop-1:null)
Current binaries reside at
/usr/share/cloudstack-management/webapps/client/WEB-INF/lib
2015-10-26 15:44:18,072 DEBUG [c.c.u.s.Script] (localhost-startStop-1:null)
Looking for scripts/vm/systemvm/injectkeys.sh in
/usr/share/cloudstack-management/webapps/client/WEB-INF/lib/scripts/vm/systemvm/injectkeys.sh
2015-10-26 15:44:18,072 DEBUG [c.c.u.s.Script] (localhost-startStop-1:null)
Looking for scripts/vm/systemvm/injectkeys.sh in
/usr/share/cloudstack-management/webapps/client/WEB-INF/lib/scripts/vm/systemvm/injectkeys.sh
2015-10-26 15:44:18,072 DEBUG [c.c.u.s.Script] (localhost-startStop-1:null)
Looking for scripts/vm/systemvm/injectkeys.sh in
/usr/share/cloudstack-management/webapps/client/WEB-INF/scripts/vm/systemvm/injectkeys.sh
2015-10-26 15:44:18,072 DEBUG [c.c.u.s.Script] (localhost-startStop-1:null)
Looking for scripts/vm/systemvm/injectkeys.sh in
/usr/share/cloudstack-management/webapps/client/scripts/vm/systemvm/injectkeys.sh
2015-10-26 15:44:18,072 DEBUG [c.c.u.s.Script] (localhost-startStop-1:null)
Looking for scripts/vm/systemvm/injectkeys.sh in
/usr/share/cloudstack-management/webapps/scripts/vm/systemvm/injectkeys.sh
2015-10-26 15:44:18,072 DEBUG [c.c.u.s.Script] (localhost-startStop-1:null)
Looking for scripts/vm/systemvm/injectkeys.sh in
/usr/share/cloudstack-management/scripts/vm/systemvm/injectkeys.sh
2015-10-26 15:44:18,072 DEBUG [c.c.u.s.Script] (localhost-startStop-1:null)
Looking for scripts/vm/systemvm/injectkeys.sh in
/usr/share/scripts/vm/systemvm/injectkeys.sh
2015-10-26 15:44:18,072 DEBUG [c.c.u.s.Script] (localhost-startStop-1:null)
Looking for scripts/vm/systemvm/injectkeys.sh in
/usr/scripts/vm/systemvm/injectkeys.sh
2015-10-26 15:44:18,072 DEBUG [c.c.u.s.Script] (localhost-startStop-1:null)
Looking for scripts/vm/systemvm/injectkeys.sh in
/scripts/vm/systemvm/injectkeys.sh
2015-10-26 15:44:18,072 DEBUG [c.c.u.s.Script] (localhost-startStop-1:null)
Searching in environment.properties
2015-10-26 15:44:18,072 DEBUG [c.c.u.s.Script] (localhost-startStop-1:null)
environment.properties says scripts should be in
/usr/share/cloudstack-common
2015-10-26 15:44:18,072 DEBUG [c.c.u.s.Script] (localhost-startStop-1:null)
Looking for scripts/vm/systemvm/injectkeys.sh in
/usr/share/cloudstack-common/scripts/vm/systemvm/injectkeys.sh
2015-10-26 15:44:18,072 DEBUG [c.c.u.s.Script] (localhost-startStop-1:null)
Looking for vms/systemvm.iso in the classpath
2015-10-26 15:44:18,073 DEBUG [c.c.u.s.Script] (localhost-startStop-1:null)
System resource: null
2015-10-26 15:44:18,073 DEBUG [c.c.u.s.Script] (localhost-startStop-1:null)
Classpath resource: null
2015-10-26 15:44:18,073 DEBUG [c.c.u.s.Script] (localhost-startStop-1:null)
Looking for vms/systemvm.iso
2015-10-26 15:44:18,073 DEBUG [c.c.u.s.Script] (localhost-startStop-1:null)
Current binaries reside at
/usr/share/cloudstack-management/webapps/client/WEB-INF/lib
2015-10-26 15:44:18,073 DEBUG [c.c.u.s.Script] (localhost-startStop-1:null)
Looking for vms/systemvm.iso in
/usr/share/cloudstack-management/webapps/client/WEB-INF/lib/vms/systemvm.iso
2015-10-26 15:44:18,073 DEBUG [c.c.u.s.Script] (localhost-startStop-1:null)
Looking for vms/systemvm.iso in
/usr/share/cloudstack-management/webapps/client/WEB-INF/lib/vms/systemvm.iso
2015-10-26 15:44:18,073 DEBUG [c.c.u.s.Script] (localhost-startStop-1:null)
Looking for vms/systemvm.iso in
/usr/share/cloudstack-management/webapps/client/WEB-INF/vms/systemvm.iso
2015-10-26 15:44:18,073 DEBUG [c.c.u.s.Script] (localhost-startStop-1:null)
Looking for vms/systemvm.iso in
/usr/share/cloudstack-management/webapps/client/vms/systemvm.iso
2015-10-26 15:44:18,073 DEBUG [c.c.u.s.Script] (localhost-startStop-1:null)
Looking for vms/systemvm.iso in
/usr/share/cloudstack-management/webapps/vms/systemvm.iso
2015-10-26 15:44:18,073 DEBUG [c.c.u.s.Script] (localhost-startStop-1:null)
Looking for vms/systemvm.iso in
/usr/share/cloudstack-management/vms/systemvm.iso
2015-10-26 15:44:18,073 DEBUG [c.c.u.s.Script] (localhost-startStop-1:null)
Looking for vms/systemvm.iso in /usr/share/vms/systemvm.iso
2015-10-26 15:44:18,073 DEBUG [c.c.u.s.Script] (localhost-startStop-1:null)
Looking for vms/systemvm.iso in /usr/vms/systemvm.iso
2015-10-26 15:44:18,073 DEBUG [c.c.u.s.Script] (localhost-startStop-1:null)
Looking for vms/systemvm.iso in /vms/systemvm.iso
2015-10-26 15:44:18,073 DEBUG [c.c.u.s.Script] (localhost-startStop-1:null)
Searching in environment.properties
2015-10-26 15:44:18,073 DEBUG [c.c.u.s.Script] (localhost-startStop-1:null)
environment.properties says scripts should be in
/usr/share/cloudstack-common
2015-10-26 15:44:18,073 DEBUG [c.c.u.s.Script] (localhost-startStop-1:null)
Looking for vms/systemvm.iso in
/usr/share/cloudstack-common/vms/systemvm.iso
2015-10-26 15:44:18,073 DEBUG [c.c.s.ConfigurationServerImpl]
(localhost-startStop-1:null) Executing: /bin/bash
/usr/share/cloudstack-common/scripts/vm/systemvm/injectkeys.sh
/var/cloudstack/management/.ssh/id_rsa.pub
/var/cloudstack/management/.ssh/id_rsa
/usr/share/cloudstack-common/vms/systemvm.iso
2015-10-26 15:44:18,082 DEBUG [c.c.s.ConfigurationServerImpl]
(localhost-startStop-1:null) Exit value is 1
2015-10-26 15:44:18,082 DEBUG [c.c.s.ConfigurationServerImpl]
(localhost-startStop-1:null) sudo: a password is required



On Mon, Oct 26, 2015 at 9:32 AM, Luciano Castro <lu...@gmail.com>
wrote:

>
> Hi,
>
> Today, I just try to log into CS interface and I couldn´t. I took a look
> in the logs and it shows me:
>
> 2015-10-26 11:27:38,756 DEBUG [c.c.s.ConfigurationServerImpl]
> (localhost-startStop-1:null) Executing: /bin/bash
> /usr/share/cloudstack-common/scripts/vm/systemvm/injectkeys.sh
> /var/cloudstack/management/.ssh/id_rsa.pub
> /var/cloudstack/management/.ssh/id_rsa
> /usr/share/cloudstack-common/vms/systemvm.iso
> 2015-10-26 11:27:38,768 DEBUG [c.c.s.ConfigurationServerImpl]
> (localhost-startStop-1:null) Exit value is 1
> 2015-10-26 11:27:38,768 DEBUG [c.c.s.ConfigurationServerImpl]
> (localhost-startStop-1:null) sudo: a password is required
> 2015-10-26 11:27:38,769 INFO  [c.c.s.ConfigurationServerImpl]
> (localhost-startStop-1:null) Injected public and private keys into systemvm
> iso with result : sudo: a password is required
> 2015-10-26 11:27:38,769 WARN  [c.c.s.ConfigurationServerImpl]
> (localhost-startStop-1:null) Failed to inject generated public key into
> systemvm iso sudo: a password is required
>
> root@opencloud-mgmt01-mia ~]#
> /usr/share/cloudstack-common/scripts/vm/systemvm/injectkeys.sh
> /var/cloudstack/management/.ssh/id_rsa.pub
> /var/cloudstack/management/.ssh/id_rsa
> /usr/share/cloudstack-common/vms/systemvm.iso
> mount: /dev/loop0 is write-protected, mounting read-only
>
>
> I updated java* and restarted the system. The problem persists.
>
> [root@opencloud-mgmt01-mia ~]# rpm -qa| grep -i java
> tzdata-java-2015g-1.el7.noarch
> java-1.7.0-openjdk-headless-1.7.0.91-2.6.2.1.el7_1.x86_64
> java-1.7.0-openjdk-devel-1.7.0.91-2.6.2.1.el7_1.x86_64
> python-javapackages-3.4.1-6.el7_0.noarch
> javamail-1.4.6-8.el7.noarch
> javassist-3.16.1-10.el7.noarch
> mysql-connector-java-5.1.25-3.el7.noarch
> java-1.7.0-openjdk-1.7.0.91-2.6.2.1.el7_1.x86_64
> java-1.8.0-openjdk-1.8.0.65-2.b17.el7_1.x86_64
> javapackages-tools-3.4.1-6.el7_0.noarch
> java-1.8.0-openjdk-headless-1.8.0.65-2.b17.el7_1.x86_64
>
>     I´m using CS 4.5.2 with CentOS Linux release 7.1.1503 (Core).
>
>     Could you help me?
>
>     thanks!
>
>
> --
> Luciano Castro
>



-- 
Luciano Castro