Support Questions
Find answers, ask questions, and share your expertise

Cloudbreak 1.6.1 shell error - "Couldn't get an access token from the identity server"

Hi,

I'm running Cloudbreak 1.6.1 on an AWS EC2 instance and have just recently run into a very odd error. Before the error, CBD was working without any issues, and I was deploying clusters into AWS with no problems.

To start with, here's the cbd doctor output:

[root@ip-10-0-102-234 cloudbreak-deployment]# cbd doctor
===> Deployer doctor: Checks your environment, and reports a diagnose.
uname: Linux ip-10-0-102-234.eu-west-1.compute.internal 3.10.0-327.18.2.el7.x86_64 #1 SMP Fri Apr 8 05:09:53 EDT 2016 x86_64 x86_64 x86_64 GNU/Linux
local version:1.6.1
latest release:1.6.1
docker images:
 hortonworks/haveged:1.1.0
 hortonworks/socat:1.0.0
 hortonworks/cloudbreak-uaa-db:v3.6.0
 hortonworks/cloudbreak-uaa:3.6.0
 hortonworks/cloudbreak-server-db:1.2.0
 hortonworks/cloudbreak:1.6.1
 hortonworks/cloudbreak-auth:1.6.1
 hortonworks/cloudbreak-web:1.6.1
 hortonworks/cloudbreak-autoscale-db:1.2.0
 hortonworks/cloudbreak-autoscale:1.6.1
docker command exists: OK
docker client version: 1.10.3
docker client version: 1.10.3
ping 8.8.8.8 on host: OK
ping github.com on host: OK
ping 8.8.8.8 in container: OK
ping github.com in container: OK

When starting the Cloudbreak shell, I'm getting the following error:

Caused by: com.sequenceiq.cloudbreak.client.TokenUnavailableException: Couldn't get an access token from the identity server, check its configuration! Perhaps cloudbreak_shell is not autoapproved? Response headers: {Server=[Apache-Coyote/1.1], Content-Length=[0], Date=[Wed, 28 Dec 2016 11:18:48 GMT], Connection=[close]}

This is odd because I don't have Cloudbreak connected to any authentication server, it has been installed with default options.

Here's the full output of the error message from the shell:

[root@ip-10-0-102-234 cloudbreak-deployment]# cbd util cloudbreak-shell
org.springframework.beans.factory.BeanCreationException: Error creating bean with name 'cloudbreakShell': Injection of autowired dependencies failed; nested exception is org.springframework.beans.factory.BeanCreationException: Could not autowire field: private org.springframework.shell.core.JLineShellComponent com.sequenceiq.cloudbreak.shell.CloudbreakShell.shell; nested exception is org.springframework.beans.factory.BeanCreationException: Error creating bean with name 'shell' defined in class path resource [com/sequenceiq/cloudbreak/shell/configuration/ShellConfiguration.class]: Invocation of init method failed; nested exception is org.springframework.beans.factory.BeanCreationException: Error creating bean with name 'marathonCommands': Injection of autowired dependencies failed; nested exception is org.springframework.beans.factory.BeanCreationException: Could not autowire field: private com.sequenceiq.cloudbreak.shell.model.ShellContext com.sequenceiq.cloudbreak.shell.commands.marathon.MarathonCommands.shellContext; nested exception is org.springframework.beans.factory.BeanCreationException: Error creating bean with name 'shellContext': Injection of autowired dependencies failed; nested exception is org.springframework.beans.factory.BeanCreationException: Could not autowire field: private com.sequenceiq.cloudbreak.client.CloudbreakClient com.sequenceiq.cloudbreak.shell.model.ShellContext.cloudbreakClient; nested exception is org.springframework.beans.factory.BeanCreationException: Error creating bean with name 'cloudbreakClient' defined in class path resource [com/sequenceiq/cloudbreak/shell/configuration/ShellConfiguration.class]: Bean instantiation via factory method failed; nested exception is org.springframework.beans.BeanInstantiationException: Failed to instantiate [com.sequenceiq.cloudbreak.client.CloudbreakClient]: Factory method 'cloudbreakClient' threw exception; nested exception is com.sequenceiq.cloudbreak.client.TokenUnavailableException: Couldn't get an access token from the identity server, check its configuration! Perhaps cloudbreak_shell is not autoapproved? Response headers: {Server=[Apache-Coyote/1.1], Content-Length=[0], Date=[Fri, 23 Dec 2016 13:43:57 GMT], Connection=[close]}
at org.springframework.beans.factory.annotation.AutowiredAnnotationBeanPostProcessor.postProcessPropertyValues(AutowiredAnnotationBeanPostProcessor.java:334)
at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.populateBean(AbstractAutowireCapableBeanFactory.java:1214)
at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.doCreateBean(AbstractAutowireCapableBeanFactory.java:543)
at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.createBean(AbstractAutowireCapableBeanFactory.java:482)
at org.springframework.beans.factory.support.AbstractBeanFactory$1.getObject(AbstractBeanFactory.java:306)
at org.springframework.beans.factory.support.DefaultSingletonBeanRegistry.getSingleton(DefaultSingletonBeanRegistry.java:230)
at org.springframework.beans.factory.support.AbstractBeanFactory.doGetBean(AbstractBeanFactory.java:302)
at org.springframework.beans.factory.support.AbstractBeanFactory.getBean(AbstractBeanFactory.java:197)
at org.springframework.beans.factory.support.DefaultListableBeanFactory.preInstantiateSingletons(DefaultListableBeanFactory.java:772)
at org.springframework.context.support.AbstractApplicationContext.finishBeanFactoryInitialization(AbstractApplicationContext.java:839)
at org.springframework.context.support.AbstractApplicationContext.refresh(AbstractApplicationContext.java:538)
at org.springframework.boot.SpringApplication.refresh(SpringApplication.java:766)
at org.springframework.boot.SpringApplication.createAndRefreshContext(SpringApplication.java:361)
at org.springframework.boot.SpringApplication.run(SpringApplication.java:307)
at org.springframework.boot.builder.SpringApplicationBuilder.run(SpringApplicationBuilder.java:134)
at com.sequenceiq.cloudbreak.shell.CloudbreakShell.main(CloudbreakShell.java:153)
at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:62)
at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
at java.lang.reflect.Method.invoke(Method.java:498)
at org.springframework.boot.loader.MainMethodRunner.run(MainMethodRunner.java:54)
at java.lang.Thread.run(Thread.java:745)
Caused by: org.springframework.beans.factory.BeanCreationException: Could not autowire field: private org.springframework.shell.core.JLineShellComponent com.sequenceiq.cloudbreak.shell.CloudbreakShell.shell; nested exception is org.springframework.beans.factory.BeanCreationException: Error creating bean with name 'shell' defined in class path resource [com/sequenceiq/cloudbreak/shell/configuration/ShellConfiguration.class]: Invocation of init method failed; nested exception is org.springframework.beans.factory.BeanCreationException: Error creating bean with name 'marathonCommands': Injection of autowired dependencies failed; nested exception is org.springframework.beans.factory.BeanCreationException: Could not autowire field: private com.sequenceiq.cloudbreak.shell.model.ShellContext com.sequenceiq.cloudbreak.shell.commands.marathon.MarathonCommands.shellContext; nested exception is org.springframework.beans.factory.BeanCreationException: Error creating bean with name 'shellContext': Injection of autowired dependencies failed; nested exception is org.springframework.beans.factory.BeanCreationException: Could not autowire field: private com.sequenceiq.cloudbreak.client.CloudbreakClient com.sequenceiq.cloudbreak.shell.model.ShellContext.cloudbreakClient; nested exception is org.springframework.beans.factory.BeanCreationException: Error creating bean with name 'cloudbreakClient' defined in class path resource [com/sequenceiq/cloudbreak/shell/configuration/ShellConfiguration.class]: Bean instantiation via factory method failed; nested exception is org.springframework.beans.BeanInstantiationException: Failed to instantiate [com.sequenceiq.cloudbreak.client.CloudbreakClient]: Factory method 'cloudbreakClient' threw exception; nested exception is com.sequenceiq.cloudbreak.client.TokenUnavailableException: Couldn't get an access token from the identity server, check its configuration! Perhaps cloudbreak_shell is not autoapproved? Response headers: {Server=[Apache-Coyote/1.1], Content-Length=[0], Date=[Fri, 23 Dec 2016 13:43:57 GMT], Connection=[close]}
at org.springframework.beans.factory.annotation.AutowiredAnnotationBeanPostProcessor$AutowiredFieldElement.inject(AutowiredAnnotationBeanPostProcessor.java:573)
at org.springframework.beans.factory.annotation.InjectionMetadata.inject(InjectionMetadata.java:88)
at org.springframework.beans.factory.annotation.AutowiredAnnotationBeanPostProcessor.postProcessPropertyValues(AutowiredAnnotationBeanPostProcessor.java:331)
... 21 more
Caused by: org.springframework.beans.factory.BeanCreationException: Error creating bean with name 'shell' defined in class path resource [com/sequenceiq/cloudbreak/shell/configuration/ShellConfiguration.class]: Invocation of init method failed; nested exception is org.springframework.beans.factory.BeanCreationException: Error creating bean with name 'marathonCommands': Injection of autowired dependencies failed; nested exception is org.springframework.beans.factory.BeanCreationException: Could not autowire field: private com.sequenceiq.cloudbreak.shell.model.ShellContext com.sequenceiq.cloudbreak.shell.commands.marathon.MarathonCommands.shellContext; nested exception is org.springframework.beans.factory.BeanCreationException: Error creating bean with name 'shellContext': Injection of autowired dependencies failed; nested exception is org.springframework.beans.factory.BeanCreationException: Could not autowire field: private com.sequenceiq.cloudbreak.client.CloudbreakClient com.sequenceiq.cloudbreak.shell.model.ShellContext.cloudbreakClient; nested exception is org.springframework.beans.factory.BeanCreationException: Error creating bean with name 'cloudbreakClient' defined in class path resource [com/sequenceiq/cloudbreak/shell/configuration/ShellConfiguration.class]: Bean instantiation via factory method failed; nested exception is org.springframework.beans.BeanInstantiationException: Failed to instantiate [com.sequenceiq.cloudbreak.client.CloudbreakClient]: Factory method 'cloudbreakClient' threw exception; nested exception is com.sequenceiq.cloudbreak.client.TokenUnavailableException: Couldn't get an access token from the identity server, check its configuration! Perhaps cloudbreak_shell is not autoapproved? Response headers: {Server=[Apache-Coyote/1.1], Content-Length=[0], Date=[Fri, 23 Dec 2016 13:43:57 GMT], Connection=[close]}
at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.initializeBean(AbstractAutowireCapableBeanFactory.java:1578)
at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.doCreateBean(AbstractAutowireCapableBeanFactory.java:545)
at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.createBean(AbstractAutowireCapableBeanFactory.java:482)
at org.springframework.beans.factory.support.AbstractBeanFactory$1.getObject(AbstractBeanFactory.java:306)
at org.springframework.beans.factory.support.DefaultSingletonBeanRegistry.getSingleton(DefaultSingletonBeanRegistry.java:230)
at org.springframework.beans.factory.support.AbstractBeanFactory.doGetBean(AbstractBeanFactory.java:302)
at org.springframework.beans.factory.support.AbstractBeanFactory.getBean(AbstractBeanFactory.java:197)
at org.springframework.beans.factory.support.DefaultListableBeanFactory.findAutowireCandidates(DefaultListableBeanFactory.java:1192)
at org.springframework.beans.factory.support.DefaultListableBeanFactory.doResolveDependency(DefaultListableBeanFactory.java:1116)
at org.springframework.beans.factory.support.DefaultListableBeanFactory.resolveDependency(DefaultListableBeanFactory.java:1014)
at org.springframework.beans.factory.annotation.AutowiredAnnotationBeanPostProcessor$AutowiredFieldElement.inject(AutowiredAnnotationBeanPostProcessor.java:545)
... 23 more
Caused by: org.springframework.beans.factory.BeanCreationException: Error creating bean with name 'marathonCommands': Injection of autowired dependencies failed; nested exception is org.springframework.beans.factory.BeanCreationException: Could not autowire field: private com.sequenceiq.cloudbreak.shell.model.ShellContext com.sequenceiq.cloudbreak.shell.commands.marathon.MarathonCommands.shellContext; nested exception is org.springframework.beans.factory.BeanCreationException: Error creating bean with name 'shellContext': Injection of autowired dependencies failed; nested exception is org.springframework.beans.factory.BeanCreationException: Could not autowire field: private com.sequenceiq.cloudbreak.client.CloudbreakClient com.sequenceiq.cloudbreak.shell.model.ShellContext.cloudbreakClient; nested exception is org.springframework.beans.factory.BeanCreationException: Error creating bean with name 'cloudbreakClient' defined in class path resource [com/sequenceiq/cloudbreak/shell/configuration/ShellConfiguration.class]: Bean instantiation via factory method failed; nested exception is org.springframework.beans.BeanInstantiationException: Failed to instantiate [com.sequenceiq.cloudbreak.client.CloudbreakClient]: Factory method 'cloudbreakClient' threw exception; nested exception is com.sequenceiq.cloudbreak.client.TokenUnavailableException: Couldn't get an access token from the identity server, check its configuration! Perhaps cloudbreak_shell is not autoapproved? Response headers: {Server=[Apache-Coyote/1.1], Content-Length=[0], Date=[Fri, 23 Dec 2016 13:43:57 GMT], Connection=[close]}
at org.springframework.beans.factory.annotation.AutowiredAnnotationBeanPostProcessor.postProcessPropertyValues(AutowiredAnnotationBeanPostProcessor.java:334)
at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.populateBean(AbstractAutowireCapableBeanFactory.java:1214)
at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.doCreateBean(AbstractAutowireCapableBeanFactory.java:543)
at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.createBean(AbstractAutowireCapableBeanFactory.java:482)
at org.springframework.beans.factory.support.AbstractBeanFactory$1.getObject(AbstractBeanFactory.java:306)
at org.springframework.beans.factory.support.DefaultSingletonBeanRegistry.getSingleton(DefaultSingletonBeanRegistry.java:230)
at org.springframework.beans.factory.support.AbstractBeanFactory.doGetBean(AbstractBeanFactory.java:302)
at org.springframework.beans.factory.support.AbstractBeanFactory.getBean(AbstractBeanFactory.java:202)
at org.springframework.beans.factory.support.DefaultListableBeanFactory.getBeansOfType(DefaultListableBeanFactory.java:534)
at org.springframework.beans.factory.support.DefaultListableBeanFactory.getBeansOfType(DefaultListableBeanFactory.java:523)
at org.springframework.context.support.AbstractApplicationContext.getBeansOfType(AbstractApplicationContext.java:1162)
at org.springframework.beans.factory.BeanFactoryUtils.beansOfTypeIncludingAncestors(BeanFactoryUtils.java:261)
at org.springframework.shell.core.JLineShellComponent.afterPropertiesSet(JLineShellComponent.java:100)
at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.invokeInitMethods(AbstractAutowireCapableBeanFactory.java:1637)
at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.initializeBean(AbstractAutowireCapableBeanFactory.java:1574)
... 33 more
Caused by: org.springframework.beans.factory.BeanCreationException: Could not autowire field: private com.sequenceiq.cloudbreak.shell.model.ShellContext com.sequenceiq.cloudbreak.shell.commands.marathon.MarathonCommands.shellContext; nested exception is org.springframework.beans.factory.BeanCreationException: Error creating bean with name 'shellContext': Injection of autowired dependencies failed; nested exception is org.springframework.beans.factory.BeanCreationException: Could not autowire field: private com.sequenceiq.cloudbreak.client.CloudbreakClient com.sequenceiq.cloudbreak.shell.model.ShellContext.cloudbreakClient; nested exception is org.springframework.beans.factory.BeanCreationException: Error creating bean with name 'cloudbreakClient' defined in class path resource [com/sequenceiq/cloudbreak/shell/configuration/ShellConfiguration.class]: Bean instantiation via factory method failed; nested exception is org.springframework.beans.BeanInstantiationException: Failed to instantiate [com.sequenceiq.cloudbreak.client.CloudbreakClient]: Factory method 'cloudbreakClient' threw exception; nested exception is com.sequenceiq.cloudbreak.client.TokenUnavailableException: Couldn't get an access token from the identity server, check its configuration! Perhaps cloudbreak_shell is not autoapproved? Response headers: {Server=[Apache-Coyote/1.1], Content-Length=[0], Date=[Fri, 23 Dec 2016 13:43:57 GMT], Connection=[close]}
at org.springframework.beans.factory.annotation.AutowiredAnnotationBeanPostProcessor$AutowiredFieldElement.inject(AutowiredAnnotationBeanPostProcessor.java:573)
at org.springframework.beans.factory.annotation.InjectionMetadata.inject(InjectionMetadata.java:88)
at org.springframework.beans.factory.annotation.AutowiredAnnotationBeanPostProcessor.postProcessPropertyValues(AutowiredAnnotationBeanPostProcessor.java:331)
... 47 more
Caused by: org.springframework.beans.factory.BeanCreationException: Error creating bean with name 'shellContext': Injection of autowired dependencies failed; nested exception is org.springframework.beans.factory.BeanCreationException: Could not autowire field: private com.sequenceiq.cloudbreak.client.CloudbreakClient com.sequenceiq.cloudbreak.shell.model.ShellContext.cloudbreakClient; nested exception is org.springframework.beans.factory.BeanCreationException: Error creating bean with name 'cloudbreakClient' defined in class path resource [com/sequenceiq/cloudbreak/shell/configuration/ShellConfiguration.class]: Bean instantiation via factory method failed; nested exception is org.springframework.beans.BeanInstantiationException: Failed to instantiate [com.sequenceiq.cloudbreak.client.CloudbreakClient]: Factory method 'cloudbreakClient' threw exception; nested exception is com.sequenceiq.cloudbreak.client.TokenUnavailableException: Couldn't get an access token from the identity server, check its configuration! Perhaps cloudbreak_shell is not autoapproved? Response headers: {Server=[Apache-Coyote/1.1], Content-Length=[0], Date=[Fri, 23 Dec 2016 13:43:57 GMT], Connection=[close]}
at org.springframework.beans.factory.annotation.AutowiredAnnotationBeanPostProcessor.postProcessPropertyValues(AutowiredAnnotationBeanPostProcessor.java:334)
at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.populateBean(AbstractAutowireCapableBeanFactory.java:1214)
at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.doCreateBean(AbstractAutowireCapableBeanFactory.java:543)
at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.createBean(AbstractAutowireCapableBeanFactory.java:482)
at org.springframework.beans.factory.support.AbstractBeanFactory$1.getObject(AbstractBeanFactory.java:306)
at org.springframework.beans.factory.support.DefaultSingletonBeanRegistry.getSingleton(DefaultSingletonBeanRegistry.java:230)
at org.springframework.beans.factory.support.AbstractBeanFactory.doGetBean(AbstractBeanFactory.java:302)
at org.springframework.beans.factory.support.AbstractBeanFactory.getBean(AbstractBeanFactory.java:197)
at org.springframework.beans.factory.support.DefaultListableBeanFactory.findAutowireCandidates(DefaultListableBeanFactory.java:1192)
at org.springframework.beans.factory.support.DefaultListableBeanFactory.doResolveDependency(DefaultListableBeanFactory.java:1116)
at org.springframework.beans.factory.support.DefaultListableBeanFactory.resolveDependency(DefaultListableBeanFactory.java:1014)
at org.springframework.beans.factory.annotation.AutowiredAnnotationBeanPostProcessor$AutowiredFieldElement.inject(AutowiredAnnotationBeanPostProcessor.java:545)
... 49 more
Caused by: org.springframework.beans.factory.BeanCreationException: Could not autowire field: private com.sequenceiq.cloudbreak.client.CloudbreakClient com.sequenceiq.cloudbreak.shell.model.ShellContext.cloudbreakClient; nested exception is org.springframework.beans.factory.BeanCreationException: Error creating bean with name 'cloudbreakClient' defined in class path resource [com/sequenceiq/cloudbreak/shell/configuration/ShellConfiguration.class]: Bean instantiation via factory method failed; nested exception is org.springframework.beans.BeanInstantiationException: Failed to instantiate [com.sequenceiq.cloudbreak.client.CloudbreakClient]: Factory method 'cloudbreakClient' threw exception; nested exception is com.sequenceiq.cloudbreak.client.TokenUnavailableException: Couldn't get an access token from the identity server, check its configuration! Perhaps cloudbreak_shell is not autoapproved? Response headers: {Server=[Apache-Coyote/1.1], Content-Length=[0], Date=[Fri, 23 Dec 2016 13:43:57 GMT], Connection=[close]}
at org.springframework.beans.factory.annotation.AutowiredAnnotationBeanPostProcessor$AutowiredFieldElement.inject(AutowiredAnnotationBeanPostProcessor.java:573)
at org.springframework.beans.factory.annotation.InjectionMetadata.inject(InjectionMetadata.java:88)
at org.springframework.beans.factory.annotation.AutowiredAnnotationBeanPostProcessor.postProcessPropertyValues(AutowiredAnnotationBeanPostProcessor.java:331)
... 60 more
Caused by: org.springframework.beans.factory.BeanCreationException: Error creating bean with name 'cloudbreakClient' defined in class path resource [com/sequenceiq/cloudbreak/shell/configuration/ShellConfiguration.class]: Bean instantiation via factory method failed; nested exception is org.springframework.beans.BeanInstantiationException: Failed to instantiate [com.sequenceiq.cloudbreak.client.CloudbreakClient]: Factory method 'cloudbreakClient' threw exception; nested exception is com.sequenceiq.cloudbreak.client.TokenUnavailableException: Couldn't get an access token from the identity server, check its configuration! Perhaps cloudbreak_shell is not autoapproved? Response headers: {Server=[Apache-Coyote/1.1], Content-Length=[0], Date=[Fri, 23 Dec 2016 13:43:57 GMT], Connection=[close]}
at org.springframework.beans.factory.support.ConstructorResolver.instantiateUsingFactoryMethod(ConstructorResolver.java:599)
at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.instantiateUsingFactoryMethod(AbstractAutowireCapableBeanFactory.java:1123)
at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.createBeanInstance(AbstractAutowireCapableBeanFactory.java:1018)
at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.doCreateBean(AbstractAutowireCapableBeanFactory.java:510)
at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.createBean(AbstractAutowireCapableBeanFactory.java:482)
at org.springframework.beans.factory.support.AbstractBeanFactory$1.getObject(AbstractBeanFactory.java:306)
at org.springframework.beans.factory.support.DefaultSingletonBeanRegistry.getSingleton(DefaultSingletonBeanRegistry.java:230)
at org.springframework.beans.factory.support.AbstractBeanFactory.doGetBean(AbstractBeanFactory.java:302)
at org.springframework.beans.factory.support.AbstractBeanFactory.getBean(AbstractBeanFactory.java:197)
at org.springframework.beans.factory.support.DefaultListableBeanFactory.findAutowireCandidates(DefaultListableBeanFactory.java:1192)
at org.springframework.beans.factory.support.DefaultListableBeanFactory.doResolveDependency(DefaultListableBeanFactory.java:1116)
at org.springframework.beans.factory.support.DefaultListableBeanFactory.resolveDependency(DefaultListableBeanFactory.java:1014)
at org.springframework.beans.factory.annotation.AutowiredAnnotationBeanPostProcessor$AutowiredFieldElement.inject(AutowiredAnnotationBeanPostProcessor.java:545)
... 62 more
Caused by: org.springframework.beans.BeanInstantiationException: Failed to instantiate [com.sequenceiq.cloudbreak.client.CloudbreakClient]: Factory method 'cloudbreakClient' threw exception; nested exception is com.sequenceiq.cloudbreak.client.TokenUnavailableException: Couldn't get an access token from the identity server, check its configuration! Perhaps cloudbreak_shell is not autoapproved? Response headers: {Server=[Apache-Coyote/1.1], Content-Length=[0], Date=[Fri, 23 Dec 2016 13:43:57 GMT], Connection=[close]}
at org.springframework.beans.factory.support.SimpleInstantiationStrategy.instantiate(SimpleInstantiationStrategy.java:189)
at org.springframework.beans.factory.support.ConstructorResolver.instantiateUsingFactoryMethod(ConstructorResolver.java:588)
... 74 more
Caused by: com.sequenceiq.cloudbreak.client.TokenUnavailableException: Couldn't get an access token from the identity server, check its configuration! Perhaps cloudbreak_shell is not autoapproved? Response headers: {Server=[Apache-Coyote/1.1], Content-Length=[0], Date=[Fri, 23 Dec 2016 13:43:57 GMT], Connection=[close]}
at com.sequenceiq.cloudbreak.client.IdentityClient.getToken(IdentityClient.java:65)
at com.sequenceiq.cloudbreak.client.CloudbreakClient.refresh(CloudbreakClient.java:117)
at com.sequenceiq.cloudbreak.client.CloudbreakClient.<init>(CloudbreakClient.java:90)
at com.sequenceiq.cloudbreak.client.CloudbreakClient.<init>(CloudbreakClient.java:41)
at com.sequenceiq.cloudbreak.client.CloudbreakClient$CloudbreakClientBuilder.build(CloudbreakClient.java:304)
at com.sequenceiq.cloudbreak.shell.configuration.ShellConfiguration.cloudbreakClient(ShellConfiguration.java:73)
at com.sequenceiq.cloudbreak.shell.configuration.ShellConfiguration$EnhancerBySpringCGLIB$dc1cb093.CGLIB$cloudbreakClient$3(<generated>)
at com.sequenceiq.cloudbreak.shell.configuration.ShellConfiguration$EnhancerBySpringCGLIB$dc1cb093$FastClassBySpringCGLIB$dd2438ea.invoke(<generated>)
at org.springframework.cglib.proxy.MethodProxy.invokeSuper(MethodProxy.java:228)
at org.springframework.context.annotation.ConfigurationClassEnhancer$BeanMethodInterceptor.intercept(ConfigurationClassEnhancer.java:356)
at com.sequenceiq.cloudbreak.shell.configuration.ShellConfiguration$EnhancerBySpringCGLIB$dc1cb093.cloudbreakClient(<generated>)
at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:62)
at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
at java.lang.reflect.Method.invoke(Method.java:498)
at org.springframework.beans.factory.support.SimpleInstantiationStrategy.instantiate(SimpleInstantiationStrategy.java:162)
... 75 more
Cloudbreak shell cannot be started.

Any help would be appreciated!

Thanks!

1 ACCEPTED SOLUTION

Accepted Solutions

Contributor

Could you please update your cloudbreak to 1.6.2-rc.20 with the following command and check if the issue is still exists?

curl –Ls https://2374-32450069-gh.circle-artifacts.com/0/tmp/circle-artifacts.SB6rMFp/cbd-linux.tgz | sudo tar -xz -C /bin cbd

View solution in original post

11 REPLIES 11

Contributor

Hi,

Could you please run the following command: cbd ps

And please copy here the output of this command.

Hi Peter,

Here the output for the command:

[root@ip-10-0-102-234 cloudbreak-deployment]# cbd ps
        Name                      Command               State                                                                  Ports
---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------
cbreak_cbdb_1          /start postgres                  Up      172.17.0.1:5432->5432/tcp
cbreak_cloudbreak_1    /start_cloudbreak_app.sh bash    Up      0.0.0.0:8080->8080/tcp
cbreak_consul_1        /bin/consul agent -server  ...   Up      8300/tcp, 8301/tcp, 8301/udp, 8302/tcp, 8302/udp, 0.0.0.0:8400->8400/tcp, 0.0.0.0:8500->8500/tcp, 8600/tcp, 172.17.0.1:53->8600/udp
cbreak_haveged_1       haveged -F                       Up
cbreak_identity_1      /tmp/run.sh                      Up      0.0.0.0:8089->8080/tcp
cbreak_logsink_1       socat -u TCP-LISTEN:3333,r ...   Up      0.0.0.0:32769->3333/tcp
cbreak_logspout_1      /bin/sh -c sleep 1; ROUTE_ ...   Up      0.0.0.0:8000->80/tcp
cbreak_mail_1          /bin/sh -c /opt/install.sh ...   Up      172.17.0.1:25->25/tcp
cbreak_pcdb_1          /start postgres                  Up      172.17.0.1:5433->5432/tcp
cbreak_periscope_1     /start_periscope_app.sh          Up      0.0.0.0:8085->8080/tcp
cbreak_registrator_1   /bin/registrator consul:// ...   Up
cbreak_sultans_1       /sultans/start-docker.sh         Up      0.0.0.0:3001->3000/tcp, 3001/tcp
cbreak_traefik_1       /traefik --debug --web --d ...   Up      0.0.0.0:443->443/tcp, 0.0.0.0:80->80/tcp, 0.0.0.0:8081->8080/tcp
cbreak_uaadb_1         /start postgres                  Up      172.17.0.1:5434->5432/tcp
cbreak_uluwatu_1       /uluwatu/start-docker.sh         Up      0.0.0.0:3000->3000/tcp
[root@ip-10-0-102-234 cloudbreak-deployment]

Contributor

Could you please update your cloudbreak to 1.6.2-rc.20 with the following command and check if the issue is still exists?

curl –Ls https://2374-32450069-gh.circle-artifacts.com/0/tmp/circle-artifacts.SB6rMFp/cbd-linux.tgz | sudo tar -xz -C /bin cbd

View solution in original post

Peter, I've updated Cloudbreak to 1.6.2-rc.20 but the issue still persists:

[root@ip-10-0-102-234 cloudbreak-deployment]# cbd version
local version:1.6.2-rc.20-df3d66f
latest release:1.6.1
docker images:
 hortonworks/haveged:1.1.0
 hortonworks/socat:1.0.0
 hortonworks/cloudbreak-uaa-db:v3.6.0
 hortonworks/cloudbreak-uaa:3.6.0
 hortonworks/cloudbreak-server-db:1.2.0
 hortonworks/cloudbreak:1.6.1
 hortonworks/cloudbreak-auth:1.6.1
 hortonworks/cloudbreak-web:1.6.1
 hortonworks/cloudbreak-autoscale-db:1.2.0
 hortonworks/cloudbreak-autoscale:1.6.1
[root@ip-10-0-102-234 cloudbreak-deployment]#

Here's the error which is outputted after I run the cbd util cloudbreak-shell command:

[root@ip-10-0-102-234 cloudbreak-deployment]# cbd util cloudbreak-shell
org.springframework.beans.factory.BeanCreationException: Error creating bean with name 'cloudbreakShell': Injection of autowired dependencies failed; nested exception is org.springframework.beans.factory.BeanCreationException: Could not autowire field: private org.springframework.shell.core.JLineShellComponent com.sequenceiq.cloudbreak.shell.CloudbreakShell.shell; nested exception is org.springframework.beans.factory.BeanCreationException: Error creating bean with name 'shell' defined in class path resource [com/sequenceiq/cloudbreak/shell/configuration/ShellConfiguration.class]: Invocation of init method failed; nested exception is org.springframework.beans.factory.BeanCreationException: Error creating bean with name 'marathonCommands': Injection of autowired dependencies failed; nested exception is org.springframework.beans.factory.BeanCreationException: Could not autowire field: private com.sequenceiq.cloudbreak.shell.model.ShellContext com.sequenceiq.cloudbreak.shell.commands.marathon.MarathonCommands.shellContext; nested exception is org.springframework.beans.factory.BeanCreationException: Error creating bean with name 'shellContext': Injection of autowired dependencies failed; nested exception is org.springframework.beans.factory.BeanCreationException: Could not autowire field: private com.sequenceiq.cloudbreak.client.CloudbreakClient com.sequenceiq.cloudbreak.shell.model.ShellContext.cloudbreakClient; nested exception is org.springframework.beans.factory.BeanCreationException: Error creating bean with name 'cloudbreakClient' defined in class path resource [com/sequenceiq/cloudbreak/shell/configuration/ShellConfiguration.class]: Bean instantiation via factory method failed; nested exception is org.springframework.beans.BeanInstantiationException: Failed to instantiate [com.sequenceiq.cloudbreak.client.CloudbreakClient]: Factory method 'cloudbreakClient' threw exception; nested exception is com.sequenceiq.cloudbreak.client.TokenUnavailableException: Couldn't get an access token from the identity server, check its configuration! Perhaps cloudbreak_shell is not autoapproved? Response headers: {Server=[Apache-Coyote/1.1], Cache-Control=[no-cache, no-store, max-age=0, must-revalidate], Pragma=[no-cache], Expires=[0], X-XSS-Protection=[1; mode=block], X-Frame-Options=[DENY], X-Content-Type-Options=[nosniff], Content-Type=[text/html;charset=utf-8], Content-Language=[en], Content-Length=[1110], Date=[Fri, 30 Dec 2016 08:30:10 GMT]}
        at org.springframework.beans.factory.annotation.AutowiredAnnotationBeanPostProcessor.postProcessPropertyValues(AutowiredAnnotationBeanPostProcessor.java:334)
        at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.populateBean(AbstractAutowireCapableBeanFactory.java:1214)
        at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.doCreateBean(AbstractAutowireCapableBeanFactory.java:543)
        at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.createBean(AbstractAutowireCapableBeanFactory.java:482)
        at org.springframework.beans.factory.support.AbstractBeanFactory$1.getObject(AbstractBeanFactory.java:306)
        at org.springframework.beans.factory.support.DefaultSingletonBeanRegistry.getSingleton(DefaultSingletonBeanRegistry.java:230)
        at org.springframework.beans.factory.support.AbstractBeanFactory.doGetBean(AbstractBeanFactory.java:302)
        at org.springframework.beans.factory.support.AbstractBeanFactory.getBean(AbstractBeanFactory.java:197)
        at org.springframework.beans.factory.support.DefaultListableBeanFactory.preInstantiateSingletons(DefaultListableBeanFactory.java:772)
        at org.springframework.context.support.AbstractApplicationContext.finishBeanFactoryInitialization(AbstractApplicationContext.java:839)
        at org.springframework.context.support.AbstractApplicationContext.refresh(AbstractApplicationContext.java:538)
        at org.springframework.boot.SpringApplication.refresh(SpringApplication.java:766)
        at org.springframework.boot.SpringApplication.createAndRefreshContext(SpringApplication.java:361)
        at org.springframework.boot.SpringApplication.run(SpringApplication.java:307)
        at org.springframework.boot.builder.SpringApplicationBuilder.run(SpringApplicationBuilder.java:134)
        at com.sequenceiq.cloudbreak.shell.CloudbreakShell.main(CloudbreakShell.java:153)
        at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
        at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:62)
        at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
        at java.lang.reflect.Method.invoke(Method.java:498)
        at org.springframework.boot.loader.MainMethodRunner.run(MainMethodRunner.java:54)
        at java.lang.Thread.run(Thread.java:745)
Caused by: org.springframework.beans.factory.BeanCreationException: Could not autowire field: private org.springframework.shell.core.JLineShellComponent com.sequenceiq.cloudbreak.shell.CloudbreakShell.shell; nested exception is org.springframework.beans.factory.BeanCreationException: Error creating bean with name 'shell' defined in class path resource [com/sequenceiq/cloudbreak/shell/configuration/ShellConfiguration.class]: Invocation of init method failed; nested exception is org.springframework.beans.factory.BeanCreationException: Error creating bean with name 'marathonCommands': Injection of autowired dependencies failed; nested exception is org.springframework.beans.factory.BeanCreationException: Could not autowire field: private com.sequenceiq.cloudbreak.shell.model.ShellContext com.sequenceiq.cloudbreak.shell.commands.marathon.MarathonCommands.shellContext; nested exception is org.springframework.beans.factory.BeanCreationException: Error creating bean with name 'shellContext': Injection of autowired dependencies failed; nested exception is org.springframework.beans.factory.BeanCreationException: Could not autowire field: private com.sequenceiq.cloudbreak.client.CloudbreakClient com.sequenceiq.cloudbreak.shell.model.ShellContext.cloudbreakClient; nested exception is org.springframework.beans.factory.BeanCreationException: Error creating bean with name 'cloudbreakClient' defined in class path resource [com/sequenceiq/cloudbreak/shell/configuration/ShellConfiguration.class]: Bean instantiation via factory method failed; nested exception is org.springframework.beans.BeanInstantiationException: Failed to instantiate [com.sequenceiq.cloudbreak.client.CloudbreakClient]: Factory method 'cloudbreakClient' threw exception; nested exception is com.sequenceiq.cloudbreak.client.TokenUnavailableException: Couldn't get an access token from the identity server, check its configuration! Perhaps cloudbreak_shell is not autoapproved? Response headers: {Server=[Apache-Coyote/1.1], Cache-Control=[no-cache, no-store, max-age=0, must-revalidate], Pragma=[no-cache], Expires=[0], X-XSS-Protection=[1; mode=block], X-Frame-Options=[DENY], X-Content-Type-Options=[nosniff], Content-Type=[text/html;charset=utf-8], Content-Language=[en], Content-Length=[1110], Date=[Fri, 30 Dec 2016 08:30:10 GMT]}
        at org.springframework.beans.factory.annotation.AutowiredAnnotationBeanPostProcessor$AutowiredFieldElement.inject(AutowiredAnnotationBeanPostProcessor.java:573)
        at org.springframework.beans.factory.annotation.InjectionMetadata.inject(InjectionMetadata.java:88)
        at org.springframework.beans.factory.annotation.AutowiredAnnotationBeanPostProcessor.postProcessPropertyValues(AutowiredAnnotationBeanPostProcessor.java:331)
        ... 21 more
Caused by: org.springframework.beans.factory.BeanCreationException: Error creating bean with name 'shell' defined in class path resource [com/sequenceiq/cloudbreak/shell/configuration/ShellConfiguration.class]: Invocation of init method failed; nested exception is org.springframework.beans.factory.BeanCreationException: Error creating bean with name 'marathonCommands': Injection of autowired dependencies failed; nested exception is org.springframework.beans.factory.BeanCreationException: Could not autowire field: private com.sequenceiq.cloudbreak.shell.model.ShellContext com.sequenceiq.cloudbreak.shell.commands.marathon.MarathonCommands.shellContext; nested exception is org.springframework.beans.factory.BeanCreationException: Error creating bean with name 'shellContext': Injection of autowired dependencies failed; nested exception is org.springframework.beans.factory.BeanCreationException: Could not autowire field: private com.sequenceiq.cloudbreak.client.CloudbreakClient com.sequenceiq.cloudbreak.shell.model.ShellContext.cloudbreakClient; nested exception is org.springframework.beans.factory.BeanCreationException: Error creating bean with name 'cloudbreakClient' defined in class path resource [com/sequenceiq/cloudbreak/shell/configuration/ShellConfiguration.class]: Bean instantiation via factory method failed; nested exception is org.springframework.beans.BeanInstantiationException: Failed to instantiate [com.sequenceiq.cloudbreak.client.CloudbreakClient]: Factory method 'cloudbreakClient' threw exception; nested exception is com.sequenceiq.cloudbreak.client.TokenUnavailableException: Couldn't get an access token from the identity server, check its configuration! Perhaps cloudbreak_shell is not autoapproved? Response headers: {Server=[Apache-Coyote/1.1], Cache-Control=[no-cache, no-store, max-age=0, must-revalidate], Pragma=[no-cache], Expires=[0], X-XSS-Protection=[1; mode=block], X-Frame-Options=[DENY], X-Content-Type-Options=[nosniff], Content-Type=[text/html;charset=utf-8], Content-Language=[en], Content-Length=[1110], Date=[Fri, 30 Dec 2016 08:30:10 GMT]}
        at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.initializeBean(AbstractAutowireCapableBeanFactory.java:1578)
        at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.doCreateBean(AbstractAutowireCapableBeanFactory.java:545)
        at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.createBean(AbstractAutowireCapableBeanFactory.java:482)
        at org.springframework.beans.factory.support.AbstractBeanFactory$1.getObject(AbstractBeanFactory.java:306)
        at org.springframework.beans.factory.support.DefaultSingletonBeanRegistry.getSingleton(DefaultSingletonBeanRegistry.java:230)
        at org.springframework.beans.factory.support.AbstractBeanFactory.doGetBean(AbstractBeanFactory.java:302)
        at org.springframework.beans.factory.support.AbstractBeanFactory.getBean(AbstractBeanFactory.java:197)
        at org.springframework.beans.factory.support.DefaultListableBeanFactory.findAutowireCandidates(DefaultListableBeanFactory.java:1192)
        at org.springframework.beans.factory.support.DefaultListableBeanFactory.doResolveDependency(DefaultListableBeanFactory.java:1116)
        at org.springframework.beans.factory.support.DefaultListableBeanFactory.resolveDependency(DefaultListableBeanFactory.java:1014)
        at org.springframework.beans.factory.annotation.AutowiredAnnotationBeanPostProcessor$AutowiredFieldElement.inject(AutowiredAnnotationBeanPostProcessor.java:545)
        ... 23 more
Caused by: org.springframework.beans.factory.BeanCreationException: Error creating bean with name 'marathonCommands': Injection of autowired dependencies failed; nested exception is org.springframework.beans.factory.BeanCreationException: Could not autowire field: private com.sequenceiq.cloudbreak.shell.model.ShellContext com.sequenceiq.cloudbreak.shell.commands.marathon.MarathonCommands.shellContext; nested exception is org.springframework.beans.factory.BeanCreationException: Error creating bean with name 'shellContext': Injection of autowired dependencies failed; nested exception is org.springframework.beans.factory.BeanCreationException: Could not autowire field: private com.sequenceiq.cloudbreak.client.CloudbreakClient com.sequenceiq.cloudbreak.shell.model.ShellContext.cloudbreakClient; nested exception is org.springframework.beans.factory.BeanCreationException: Error creating bean with name 'cloudbreakClient' defined in class path resource [com/sequenceiq/cloudbreak/shell/configuration/ShellConfiguration.class]: Bean instantiation via factory method failed; nested exception is org.springframework.beans.BeanInstantiationException: Failed to instantiate [com.sequenceiq.cloudbreak.client.CloudbreakClient]: Factory method 'cloudbreakClient' threw exception; nested exception is com.sequenceiq.cloudbreak.client.TokenUnavailableException: Couldn't get an access token from the identity server, check its configuration! Perhaps cloudbreak_shell is not autoapproved? Response headers: {Server=[Apache-Coyote/1.1], Cache-Control=[no-cache, no-store, max-age=0, must-revalidate], Pragma=[no-cache], Expires=[0], X-XSS-Protection=[1; mode=block], X-Frame-Options=[DENY], X-Content-Type-Options=[nosniff], Content-Type=[text/html;charset=utf-8], Content-Language=[en], Content-Length=[1110], Date=[Fri, 30 Dec 2016 08:30:10 GMT]}
        at org.springframework.beans.factory.annotation.AutowiredAnnotationBeanPostProcessor.postProcessPropertyValues(AutowiredAnnotationBeanPostProcessor.java:334)
        at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.populateBean(AbstractAutowireCapableBeanFactory.java:1214)
        at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.doCreateBean(AbstractAutowireCapableBeanFactory.java:543)
        at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.createBean(AbstractAutowireCapableBeanFactory.java:482)
        at org.springframework.beans.factory.support.AbstractBeanFactory$1.getObject(AbstractBeanFactory.java:306)
        at org.springframework.beans.factory.support.DefaultSingletonBeanRegistry.getSingleton(DefaultSingletonBeanRegistry.java:230)
        at org.springframework.beans.factory.support.AbstractBeanFactory.doGetBean(AbstractBeanFactory.java:302)
        at org.springframework.beans.factory.support.AbstractBeanFactory.getBean(AbstractBeanFactory.java:202)
        at org.springframework.beans.factory.support.DefaultListableBeanFactory.getBeansOfType(DefaultListableBeanFactory.java:534)
        at org.springframework.beans.factory.support.DefaultListableBeanFactory.getBeansOfType(DefaultListableBeanFactory.java:523)
        at org.springframework.context.support.AbstractApplicationContext.getBeansOfType(AbstractApplicationContext.java:1162)
        at org.springframework.beans.factory.BeanFactoryUtils.beansOfTypeIncludingAncestors(BeanFactoryUtils.java:261)
        at org.springframework.shell.core.JLineShellComponent.afterPropertiesSet(JLineShellComponent.java:100)
        at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.invokeInitMethods(AbstractAutowireCapableBeanFactory.java:1637)
        at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.initializeBean(AbstractAutowireCapableBeanFactory.java:1574)
        ... 33 more
Caused by: org.springframework.beans.factory.BeanCreationException: Could not autowire field: private com.sequenceiq.cloudbreak.shell.model.ShellContext com.sequenceiq.cloudbreak.shell.commands.marathon.MarathonCommands.shellContext; nested exception is org.springframework.beans.factory.BeanCreationException: Error creating bean with name 'shellContext': Injection of autowired dependencies failed; nested exception is org.springframework.beans.factory.BeanCreationException: Could not autowire field: private com.sequenceiq.cloudbreak.client.CloudbreakClient com.sequenceiq.cloudbreak.shell.model.ShellContext.cloudbreakClient; nested exception is org.springframework.beans.factory.BeanCreationException: Error creating bean with name 'cloudbreakClient' defined in class path resource [com/sequenceiq/cloudbreak/shell/configuration/ShellConfiguration.class]: Bean instantiation via factory method failed; nested exception is org.springframework.beans.BeanInstantiationException: Failed to instantiate [com.sequenceiq.cloudbreak.client.CloudbreakClient]: Factory method 'cloudbreakClient' threw exception; nested exception is com.sequenceiq.cloudbreak.client.TokenUnavailableException: Couldn't get an access token from the identity server, check its configuration! Perhaps cloudbreak_shell is not autoapproved? Response headers: {Server=[Apache-Coyote/1.1], Cache-Control=[no-cache, no-store, max-age=0, must-revalidate], Pragma=[no-cache], Expires=[0], X-XSS-Protection=[1; mode=block], X-Frame-Options=[DENY], X-Content-Type-Options=[nosniff], Content-Type=[text/html;charset=utf-8], Content-Language=[en], Content-Length=[1110], Date=[Fri, 30 Dec 2016 08:30:10 GMT]}
        at org.springframework.beans.factory.annotation.AutowiredAnnotationBeanPostProcessor$AutowiredFieldElement.inject(AutowiredAnnotationBeanPostProcessor.java:573)
        at org.springframework.beans.factory.annotation.InjectionMetadata.inject(InjectionMetadata.java:88)
        at org.springframework.beans.factory.annotation.AutowiredAnnotationBeanPostProcessor.postProcessPropertyValues(AutowiredAnnotationBeanPostProcessor.java:331)
        ... 47 more
Caused by: org.springframework.beans.factory.BeanCreationException: Error creating bean with name 'shellContext': Injection of autowired dependencies failed; nested exception is org.springframework.beans.factory.BeanCreationException: Could not autowire field: private com.sequenceiq.cloudbreak.client.CloudbreakClient com.sequenceiq.cloudbreak.shell.model.ShellContext.cloudbreakClient; nested exception is org.springframework.beans.factory.BeanCreationException: Error creating bean with name 'cloudbreakClient' defined in class path resource [com/sequenceiq/cloudbreak/shell/configuration/ShellConfiguration.class]: Bean instantiation via factory method failed; nested exception is org.springframework.beans.BeanInstantiationException: Failed to instantiate [com.sequenceiq.cloudbreak.client.CloudbreakClient]: Factory method 'cloudbreakClient' threw exception; nested exception is com.sequenceiq.cloudbreak.client.TokenUnavailableException: Couldn't get an access token from the identity server, check its configuration! Perhaps cloudbreak_shell is not autoapproved? Response headers: {Server=[Apache-Coyote/1.1], Cache-Control=[no-cache, no-store, max-age=0, must-revalidate], Pragma=[no-cache], Expires=[0], X-XSS-Protection=[1; mode=block], X-Frame-Options=[DENY], X-Content-Type-Options=[nosniff], Content-Type=[text/html;charset=utf-8], Content-Language=[en], Content-Length=[1110], Date=[Fri, 30 Dec 2016 08:30:10 GMT]}
        at org.springframework.beans.factory.annotation.AutowiredAnnotationBeanPostProcessor.postProcessPropertyValues(AutowiredAnnotationBeanPostProcessor.java:334)
        at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.populateBean(AbstractAutowireCapableBeanFactory.java:1214)
        at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.doCreateBean(AbstractAutowireCapableBeanFactory.java:543)
        at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.createBean(AbstractAutowireCapableBeanFactory.java:482)
        at org.springframework.beans.factory.support.AbstractBeanFactory$1.getObject(AbstractBeanFactory.java:306)
        at org.springframework.beans.factory.support.DefaultSingletonBeanRegistry.getSingleton(DefaultSingletonBeanRegistry.java:230)
        at org.springframework.beans.factory.support.AbstractBeanFactory.doGetBean(AbstractBeanFactory.java:302)
        at org.springframework.beans.factory.support.AbstractBeanFactory.getBean(AbstractBeanFactory.java:197)
        at org.springframework.beans.factory.support.DefaultListableBeanFactory.findAutowireCandidates(DefaultListableBeanFactory.java:1192)
        at org.springframework.beans.factory.support.DefaultListableBeanFactory.doResolveDependency(DefaultListableBeanFactory.java:1116)
        at org.springframework.beans.factory.support.DefaultListableBeanFactory.resolveDependency(DefaultListableBeanFactory.java:1014)
        at org.springframework.beans.factory.annotation.AutowiredAnnotationBeanPostProcessor$AutowiredFieldElement.inject(AutowiredAnnotationBeanPostProcessor.java:545)
        ... 49 more
Caused by: org.springframework.beans.factory.BeanCreationException: Could not autowire field: private com.sequenceiq.cloudbreak.client.CloudbreakClient com.sequenceiq.cloudbreak.shell.model.ShellContext.cloudbreakClient; nested exception is org.springframework.beans.factory.BeanCreationException: Error creating bean with name 'cloudbreakClient' defined in class path resource [com/sequenceiq/cloudbreak/shell/configuration/ShellConfiguration.class]: Bean instantiation via factory method failed; nested exception is org.springframework.beans.BeanInstantiationException: Failed to instantiate [com.sequenceiq.cloudbreak.client.CloudbreakClient]: Factory method 'cloudbreakClient' threw exception; nested exception is com.sequenceiq.cloudbreak.client.TokenUnavailableException: Couldn't get an access token from the identity server, check its configuration! Perhaps cloudbreak_shell is not autoapproved? Response headers: {Server=[Apache-Coyote/1.1], Cache-Control=[no-cache, no-store, max-age=0, must-revalidate], Pragma=[no-cache], Expires=[0], X-XSS-Protection=[1; mode=block], X-Frame-Options=[DENY], X-Content-Type-Options=[nosniff], Content-Type=[text/html;charset=utf-8], Content-Language=[en], Content-Length=[1110], Date=[Fri, 30 Dec 2016 08:30:10 GMT]}
        at org.springframework.beans.factory.annotation.AutowiredAnnotationBeanPostProcessor$AutowiredFieldElement.inject(AutowiredAnnotationBeanPostProcessor.java:573)
        at org.springframework.beans.factory.annotation.InjectionMetadata.inject(InjectionMetadata.java:88)
        at org.springframework.beans.factory.annotation.AutowiredAnnotationBeanPostProcessor.postProcessPropertyValues(AutowiredAnnotationBeanPostProcessor.java:331)
        ... 60 more
Caused by: org.springframework.beans.factory.BeanCreationException: Error creating bean with name 'cloudbreakClient' defined in class path resource [com/sequenceiq/cloudbreak/shell/configuration/ShellConfiguration.class]: Bean instantiation via factory method failed; nested exception is org.springframework.beans.BeanInstantiationException: Failed to instantiate [com.sequenceiq.cloudbreak.client.CloudbreakClient]: Factory method 'cloudbreakClient' threw exception; nested exception is com.sequenceiq.cloudbreak.client.TokenUnavailableException: Couldn't get an access token from the identity server, check its configuration! Perhaps cloudbreak_shell is not autoapproved? Response headers: {Server=[Apache-Coyote/1.1], Cache-Control=[no-cache, no-store, max-age=0, must-revalidate], Pragma=[no-cache], Expires=[0], X-XSS-Protection=[1; mode=block], X-Frame-Options=[DENY], X-Content-Type-Options=[nosniff], Content-Type=[text/html;charset=utf-8], Content-Language=[en], Content-Length=[1110], Date=[Fri, 30 Dec 2016 08:30:10 GMT]}
        at org.springframework.beans.factory.support.ConstructorResolver.instantiateUsingFactoryMethod(ConstructorResolver.java:599)
        at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.instantiateUsingFactoryMethod(AbstractAutowireCapableBeanFactory.java:1123)
        at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.createBeanInstance(AbstractAutowireCapableBeanFactory.java:1018)
        at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.doCreateBean(AbstractAutowireCapableBeanFactory.java:510)
        at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.createBean(AbstractAutowireCapableBeanFactory.java:482)
        at org.springframework.beans.factory.support.AbstractBeanFactory$1.getObject(AbstractBeanFactory.java:306)
        at org.springframework.beans.factory.support.DefaultSingletonBeanRegistry.getSingleton(DefaultSingletonBeanRegistry.java:230)
        at org.springframework.beans.factory.support.AbstractBeanFactory.doGetBean(AbstractBeanFactory.java:302)
        at org.springframework.beans.factory.support.AbstractBeanFactory.getBean(AbstractBeanFactory.java:197)
        at org.springframework.beans.factory.support.DefaultListableBeanFactory.findAutowireCandidates(DefaultListableBeanFactory.java:1192)
        at org.springframework.beans.factory.support.DefaultListableBeanFactory.doResolveDependency(DefaultListableBeanFactory.java:1116)
        at org.springframework.beans.factory.support.DefaultListableBeanFactory.resolveDependency(DefaultListableBeanFactory.java:1014)
        at org.springframework.beans.factory.annotation.AutowiredAnnotationBeanPostProcessor$AutowiredFieldElement.inject(AutowiredAnnotationBeanPostProcessor.java:545)
        ... 62 more
Caused by: org.springframework.beans.BeanInstantiationException: Failed to instantiate [com.sequenceiq.cloudbreak.client.CloudbreakClient]: Factory method 'cloudbreakClient' threw exception; nested exception is com.sequenceiq.cloudbreak.client.TokenUnavailableException: Couldn't get an access token from the identity server, check its configuration! Perhaps cloudbreak_shell is not autoapproved? Response headers: {Server=[Apache-Coyote/1.1], Cache-Control=[no-cache, no-store, max-age=0, must-revalidate], Pragma=[no-cache], Expires=[0], X-XSS-Protection=[1; mode=block], X-Frame-Options=[DENY], X-Content-Type-Options=[nosniff], Content-Type=[text/html;charset=utf-8], Content-Language=[en], Content-Length=[1110], Date=[Fri, 30 Dec 2016 08:30:10 GMT]}
        at org.springframework.beans.factory.support.SimpleInstantiationStrategy.instantiate(SimpleInstantiationStrategy.java:189)
        at org.springframework.beans.factory.support.ConstructorResolver.instantiateUsingFactoryMethod(ConstructorResolver.java:588)
        ... 74 more
Caused by: com.sequenceiq.cloudbreak.client.TokenUnavailableException: Couldn't get an access token from the identity server, check its configuration! Perhaps cloudbreak_shell is not autoapproved? Response headers: {Server=[Apache-Coyote/1.1], Cache-Control=[no-cache, no-store, max-age=0, must-revalidate], Pragma=[no-cache], Expires=[0], X-XSS-Protection=[1; mode=block], X-Frame-Options=[DENY], X-Content-Type-Options=[nosniff], Content-Type=[text/html;charset=utf-8], Content-Language=[en], Content-Length=[1110], Date=[Fri, 30 Dec 2016 08:30:10 GMT]}
        at com.sequenceiq.cloudbreak.client.IdentityClient.getToken(IdentityClient.java:65)
        at com.sequenceiq.cloudbreak.client.CloudbreakClient.refresh(CloudbreakClient.java:117)
        at com.sequenceiq.cloudbreak.client.CloudbreakClient.<init>(CloudbreakClient.java:90)
        at com.sequenceiq.cloudbreak.client.CloudbreakClient.<init>(CloudbreakClient.java:41)
        at com.sequenceiq.cloudbreak.client.CloudbreakClient$CloudbreakClientBuilder.build(CloudbreakClient.java:304)
        at com.sequenceiq.cloudbreak.shell.configuration.ShellConfiguration.cloudbreakClient(ShellConfiguration.java:73)
        at com.sequenceiq.cloudbreak.shell.configuration.ShellConfiguration$EnhancerBySpringCGLIB$a3645173.CGLIB$cloudbreakClient$3(<generated>)
        at com.sequenceiq.cloudbreak.shell.configuration.ShellConfiguration$EnhancerBySpringCGLIB$a3645173$FastClassBySpringCGLIB$c0330f59.invoke(<generated>)
        at org.springframework.cglib.proxy.MethodProxy.invokeSuper(MethodProxy.java:228)
        at org.springframework.context.annotation.ConfigurationClassEnhancer$BeanMethodInterceptor.intercept(ConfigurationClassEnhancer.java:356)
        at com.sequenceiq.cloudbreak.shell.configuration.ShellConfiguration$EnhancerBySpringCGLIB$a3645173.cloudbreakClient(<generated>)
        at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
        at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:62)
        at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
        at java.lang.reflect.Method.invoke(Method.java:498)
        at org.springframework.beans.factory.support.SimpleInstantiationStrategy.instantiate(SimpleInstantiationStrategy.java:162)
        ... 75 more
Cloudbreak shell cannot be started.
[root@ip-10-0-102-234 cloudbreak-deployment]#

Thanks, K

Contributor

Did you change password for the default user? If the answer is yes then you should write the new password into Profile:

export UAA_DEFAULT_USER_PW=***your_new_password_here***

If you want to login with other user than admin@example.com, you can add this line into the Profile:

export UAA_DEFAULT_USER_EMAIL=***new_user***

Thanks @Peter Erdos,

I added the default user to my Profile file and restarted cbd. After the second restart, the cloudbreak shell now works.

However I am curious about these user accounts. Before the error, we had disabled the default admin@example.com user and added 3 of our own users. Is there a way to specify additional users in the Profile file?

Also, is there a reason I shouldn't downgrade Cloudbreak to 1.6.1 from 1.6.2-rc2?

Contributor

First question:

You can run cloudbreak-shell from your local machine (has to be docker on your machine). If you execute 'cbd util cloudbreak-shell-remote' on cloudbreak server, then it will print a command like this:

docker run -it --rm --name cloudbreak-shell -e CLOUDBREAK_ADDRESS='https://192.168.64.7' -e IDENTITY_ADDRESS='https://192.168.64.7/identity' -e SEQUENCEIQ_USER='admin@example.com' -e SEQUENCEIQ_PASSWORD='cloudbreak' -w /data -v /Users/perdos/cloudbreak-deployment:/data hortonworks/cloudbreak-shell:1.6.2-rc.20 --cert.validation=false

You can change user and password in this example script.

Second question:

As I know nobody can create cluster with 1.6.1 because of an ambari bug. Because of this I recommend you to stay on 1.6.2-rc. Anyway you can downgrade, but don't forget to do a 'cbd migrate cbdb down 10'. It will undo our last 10 DB scripts.

The remote shell is a handy tip, thanks for that. At the moment we are running it directly from the machine it's installed on.

About the users though: What I meant was, is there any way to configure additional users in the Profile, much in the same way as you would through the Cloudbreak Web UI? Can I set more than one default user or will the last one always be valid in the Profile file?

Thanks for the warning about 1.6.1. I will no downgrade my version.

Contributor

You can define only one default user in Profile. But you can create 3 individual remote shell command for the 3 user with different user and password. -e SEQUENCEIQ_USER='admin@example.com' -e SEQUENCEIQ_PASSWORD='cloudbreak'