Created 04-21-2016 11:38 AM
Hello,
I tried to build and run cloudbreak from the github project. But I face this error when I run
./gradlew bootRun -Dspring.config.location=application.properties --stacktrace
* Exception is: org.gradle.api.tasks.TaskExecutionException: Execution failed for task ':autoscale:bootRun'. at org.gradle.api.internal.tasks.execution.ExecuteActionsTaskExecuter.executeActions(ExecuteActionsTaskExecuter.java:69) at org.gradle.api.internal.tasks.execution.ExecuteActionsTaskExecuter.execute(ExecuteActionsTaskExecuter.java:46) at org.gradle.api.internal.tasks.execution.PostExecutionAnalysisTaskExecuter.execute(PostExecutionAnalysisTaskExecuter.java:35) at org.gradle.api.internal.tasks.execution.SkipUpToDateTaskExecuter.execute(SkipUpToDateTaskExecuter.java:64) at org.gradle.api.internal.tasks.execution.ValidatingTaskExecuter.execute(ValidatingTaskExecuter.java:58) at org.gradle.api.internal.tasks.execution.SkipEmptySourceFilesTaskExecuter.execute(SkipEmptySourceFilesTaskExecuter.java:42) at org.gradle.api.internal.tasks.execution.SkipTaskWithNoActionsExecuter.execute(SkipTaskWithNoActionsExecuter.java:52) at org.gradle.api.internal.tasks.execution.SkipOnlyIfTaskExecuter.execute(SkipOnlyIfTaskExecuter.java:53) at org.gradle.api.internal.tasks.execution.ExecuteAtMostOnceTaskExecuter.execute(ExecuteAtMostOnceTaskExecuter.java:43) at org.gradle.api.internal.AbstractTask.executeWithoutThrowingTaskFailure(AbstractTask.java:306) at org.gradle.execution.taskgraph.AbstractTaskPlanExecutor$TaskExecutorWorker.executeTask(AbstractTaskPlanExecutor.java:79) at org.gradle.execution.taskgraph.AbstractTaskPlanExecutor$TaskExecutorWorker.processTask(AbstractTaskPlanExecutor.java:63) at org.gradle.execution.taskgraph.AbstractTaskPlanExecutor$TaskExecutorWorker.run(AbstractTaskPlanExecutor.java:51) at org.gradle.execution.taskgraph.ParallelTaskPlanExecutor.process(ParallelTaskPlanExecutor.java:45) at org.gradle.execution.taskgraph.DefaultTaskGraphExecuter.execute(DefaultTaskGraphExecuter.java:88) at org.gradle.execution.SelectedTaskExecutionAction.execute(SelectedTaskExecutionAction.java:29) at org.gradle.execution.DefaultBuildExecuter.execute(DefaultBuildExecuter.java:62) at org.gradle.execution.DefaultBuildExecuter.access$200(DefaultBuildExecuter.java:23) at org.gradle.execution.DefaultBuildExecuter$2.proceed(DefaultBuildExecuter.java:68) at org.gradle.execution.DryRunBuildExecutionAction.execute(DryRunBuildExecutionAction.java:32) at org.gradle.execution.DefaultBuildExecuter.execute(DefaultBuildExecuter.java:62) at org.gradle.execution.DefaultBuildExecuter.execute(DefaultBuildExecuter.java:55) at org.gradle.initialization.DefaultGradleLauncher.doBuildStages(DefaultGradleLauncher.java:149) at org.gradle.initialization.DefaultGradleLauncher.doBuild(DefaultGradleLauncher.java:106) at org.gradle.initialization.DefaultGradleLauncher.run(DefaultGradleLauncher.java:86) at org.gradle.launcher.exec.InProcessBuildActionExecuter$DefaultBuildController.run(InProcessBuildActionExecuter.java:80) at org.gradle.launcher.cli.ExecuteBuildAction.run(ExecuteBuildAction.java:33) at org.gradle.launcher.cli.ExecuteBuildAction.run(ExecuteBuildAction.java:24) at org.gradle.launcher.exec.InProcessBuildActionExecuter.execute(InProcessBuildActionExecuter.java:36) at org.gradle.launcher.exec.InProcessBuildActionExecuter.execute(InProcessBuildActionExecuter.java:26) at org.gradle.launcher.cli.RunBuildAction.run(RunBuildAction.java:51) at org.gradle.internal.Actions$RunnableActionAdapter.execute(Actions.java:169) at org.gradle.launcher.cli.CommandLineActionFactory$ParseAndBuildAction.execute(CommandLineActionFactory.java:237) at org.gradle.launcher.cli.CommandLineActionFactory$ParseAndBuildAction.execute(CommandLineActionFactory.java:210) at org.gradle.launcher.cli.JavaRuntimeValidationAction.execute(JavaRuntimeValidationAction.java:35) at org.gradle.launcher.cli.JavaRuntimeValidationAction.execute(JavaRuntimeValidationAction.java:24) at org.gradle.launcher.cli.CommandLineActionFactory$WithLogging.execute(CommandLineActionFactory.java:206) at org.gradle.launcher.cli.CommandLineActionFactory$WithLogging.execute(CommandLineActionFactory.java:169) at org.gradle.launcher.cli.ExceptionReportingAction.execute(ExceptionReportingAction.java:33) at org.gradle.launcher.cli.ExceptionReportingAction.execute(ExceptionReportingAction.java:22) at org.gradle.launcher.Main.doAction(Main.java:33) at org.gradle.launcher.bootstrap.EntryPoint.run(EntryPoint.java:45) at org.gradle.launcher.bootstrap.ProcessBootstrap.runNoExit(ProcessBootstrap.java:54) at org.gradle.launcher.bootstrap.ProcessBootstrap.run(ProcessBootstrap.java:35) at org.gradle.launcher.GradleMain.main(GradleMain.java:23) at org.gradle.wrapper.BootstrapMainStarter.start(BootstrapMainStarter.java:30) at org.gradle.wrapper.WrapperExecutor.execute(WrapperExecutor.java:127) at org.gradle.wrapper.GradleWrapperMain.main(GradleWrapperMain.java:58) Caused by: org.gradle.process.internal.ExecException: Process 'command '/usr/lib/jvm/java-1.8.0-openjdk-1.8.0.77-0.b03.el7_2.x86_64/bin/java'' finished with non-zero exit value 1 at org.gradle.process.internal.DefaultExecHandle$ExecResultImpl.assertNormalExitValue(DefaultExecHandle.java:365) at org.gradle.process.internal.DefaultJavaExecAction.execute(DefaultJavaExecAction.java:31) at org.gradle.api.tasks.JavaExec.exec(JavaExec.java:60) at org.springframework.boot.gradle.run.BootRunTask.exec(BootRunTask.java:63) at org.gradle.internal.reflect.JavaMethod.invoke(JavaMethod.java:63) at org.gradle.api.internal.project.taskfactory.AnnotationProcessingTaskFactory$StandardTaskAction.doExecute(AnnotationProcessingTaskFactory.java:218) at org.gradle.api.internal.project.taskfactory.AnnotationProcessingTaskFactory$StandardTaskAction.execute(AnnotationProcessingTaskFactory.java:211) at org.gradle.api.internal.project.taskfactory.AnnotationProcessingTaskFactory$StandardTaskAction.execute(AnnotationProcessingTaskFactory.java:200) at org.gradle.api.internal.AbstractTask$TaskActionWrapper.execute(AbstractTask.java:585) at org.gradle.api.internal.AbstractTask$TaskActionWrapper.execute(AbstractTask.java:568) at org.gradle.api.internal.tasks.execution.ExecuteActionsTaskExecuter.executeAction(ExecuteActionsTaskExecuter.java:80) at org.gradle.api.internal.tasks.execution.ExecuteActionsTaskExecuter.executeActions(ExecuteActionsTaskExecuter.java:61) ... 47 more
I didn't manage to find a solution to fix this problem.
for information :
JAVA_HOME= /lib/jvm/java/
Created 04-21-2016 12:29 PM
If you'd like to use the bootRun command make sure you are running it against the build.gradle in the core module like this (the properties file only works with an absolute path for me):
./gradlew bootRun -Dspring.config.location=file:/Users/msereg/prj/cloudbreak/core/app.properties --stacktrace -b core/build.gradle
If permgen space runs out of memory include this line in the core/build.gradle file:
bootRun { jvmArgs = ["-XX:MaxPermSize=256m"] ...}
Also if you have connection issues like above it means that your other containers are not running with cbd, or you have specified a wrong IP address for your docker-machine. You can check it out with this command:
docker-machine env <your-machine's-name>
For example mine is 192.168.99.100, I'm using this instead of 192.168.59.103 that's in the example.
,If you'd like to use the bootRun command make sure you are running it against the build.gradle in the core module like this (the properties file only works with an absolute path for me):
./gradlew bootRun -Dspring.config.location=file:/Users/msereg/prj/cloudbreak/core/app.properties --stacktrace -b core/build.gradle
If permgen space runs out of memory include this line in the core/build.gradle file:
bootRun { jvmArgs = ["-XX:MaxPermSize=256m"] ...}
Also if you have connection issues like above it means that your other containers are not running with cbd, or you have specified a wrong IP address for your docker-machine. You can check it out with this command:
docker-machine env <your-machine's-name>
For example mine is 192.168.99.100, I'm using this instead of 192.168.59.103 that's in the example.
Created 04-21-2016 11:47 AM
Can you try running with java -jar core/build/libs/cloudbreak.jar -Dspring.config.location=application.properties
Created 04-21-2016 11:57 AM
I face a new error :
2016-04-21 12:57:23,367 [main] locate:90 WARN o.s.c.c.c.ConsulPropertySourceLocator - [owner:spring] [type:springLog] [id:] [name:] Unable to load consul config from config/null/ com.ecwid.consul.transport.TransportException: java.net.ConnectException: Connection refused at com.ecwid.consul.transport.DefaultHttpTransport.executeRequest(DefaultHttpTransport.java:123) ~[consul-api-1.10.jar!/:na] at com.ecwid.consul.transport.DefaultHttpTransport.makeGetRequest(DefaultHttpTransport.java:82) ~[consul-api-1.10.jar!/:na] at com.ecwid.consul.v1.ConsulRawClient.makeGetRequest(ConsulRawClient.java:85) ~[consul-api-1.10.jar!/:na] at com.ecwid.consul.v1.kv.KeyValueConsulClient.getKVValues(KeyValueConsulClient.java:135) ~[consul-api-1.10.jar!/:na] at com.ecwid.consul.v1.ConsulClient.getKVValues(ConsulClient.java:364) ~[consul-api-1.10.jar!/:na] at org.springframework.cloud.consul.config.ConsulPropertySource.init(ConsulPropertySource.java:61) ~[spring-cloud-consul-config-1.0.0.M6-v3.jar!/:1.0.0.M6-v3] at org.springframework.cloud.consul.config.ConsulPropertySourceLocator.locate(ConsulPropertySourceLocator.java:84) ~[spring-cloud-consul-config-1.0.0.M6-v3.jar!/:1.0.0.M6-v3] at org.springframework.cloud.bootstrap.config.PropertySourceBootstrapConfiguration.initialize(PropertySourceBootstrapConfiguration.java:89) [spring-cloud-context-1.1.0.BUILD-SNAPSHOT.jar!/:1.1.0.BUILD-SNAPSHOT] at org.springframework.boot.SpringApplication.applyInitializers(SpringApplication.java:638) [spring-boot-1.3.1.RELEASE.jar!/:1.3.1.RELEASE] at org.springframework.boot.SpringApplication.doRun(SpringApplication.java:338) [spring-boot-1.3.1.RELEASE.jar!/:1.3.1.RELEASE] at org.springframework.boot.SpringApplication.run(SpringApplication.java:305) [spring-boot-1.3.1.RELEASE.jar!/:1.3.1.RELEASE] at org.springframework.boot.SpringApplication.run(SpringApplication.java:1124) [spring-boot-1.3.1.RELEASE.jar!/:1.3.1.RELEASE] at org.springframework.boot.SpringApplication.run(SpringApplication.java:1113) [spring-boot-1.3.1.RELEASE.jar!/:1.3.1.RELEASE] at com.sequenceiq.cloudbreak.CloudbreakApplication.main(CloudbreakApplication.java:20) [cloudbreak.jar!/:na] at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method) ~[na:1.8.0_77] at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:62) ~[na:1.8.0_77] at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43) ~[na:1.8.0_77] at java.lang.reflect.Method.invoke(Method.java:498) ~[na:1.8.0_77] at org.springframework.boot.loader.MainMethodRunner.run(MainMethodRunner.java:53) [cloudbreak.jar!/:na] at java.lang.Thread.run(Thread.java:745) [na:1.8.0_77] Caused by: java.net.ConnectException: Connection refused at java.net.PlainSocketImpl.socketConnect(Native Method) ~[na:1.8.0_77] at java.net.AbstractPlainSocketImpl.doConnect(AbstractPlainSocketImpl.java:350) ~[na:1.8.0_77] at java.net.AbstractPlainSocketImpl.connectToAddress(AbstractPlainSocketImpl.java:206) ~[na:1.8.0_77] at java.net.AbstractPlainSocketImpl.connect(AbstractPlainSocketImpl.java:188) ~[na:1.8.0_77] at java.net.SocksSocketImpl.connect(SocksSocketImpl.java:392) ~[na:1.8.0_77] at java.net.Socket.connect(Socket.java:589) ~[na:1.8.0_77] at org.apache.http.conn.scheme.PlainSocketFactory.connectSocket(PlainSocketFactory.java:117) ~[httpclient-4.5.1.jar!/:4.5.1] at org.apache.http.impl.conn.DefaultClientConnectionOperator.openConnection(DefaultClientConnectionOperator.java:177) ~[httpclient-4.5.1.jar!/:4.5.1] at org.apache.http.impl.conn.ManagedClientConnectionImpl.open(ManagedClientConnectionImpl.java:304) ~[httpclient-4.5.1.jar!/:4.5.1] at org.apache.http.impl.client.DefaultRequestDirector.tryConnect(DefaultRequestDirector.java:611) ~[httpclient-4.5.1.jar!/:4.5.1] at org.apache.http.impl.client.DefaultRequestDirector.execute(DefaultRequestDirector.java:446) ~[httpclient-4.5.1.jar!/:4.5.1] at org.apache.http.impl.client.AbstractHttpClient.doExecute(AbstractHttpClient.java:882) ~[httpclient-4.5.1.jar!/:4.5.1] at org.apache.http.impl.client.CloseableHttpClient.execute(CloseableHttpClient.java:71) ~[httpclient-4.5.1.jar!/:4.5.1] at org.apache.http.impl.client.CloseableHttpClient.execute(CloseableHttpClient.java:220) ~[httpclient-4.5.1.jar!/:4.5.1] at org.apache.http.impl.client.CloseableHttpClient.execute(CloseableHttpClient.java:164) ~[httpclient-4.5.1.jar!/:4.5.1] at org.apache.http.impl.client.CloseableHttpClient.execute(CloseableHttpClient.java:139) ~[httpclient-4.5.1.jar!/:4.5.1] at com.ecwid.consul.transport.DefaultHttpTransport.executeRequest(DefaultHttpTransport.java:107) ~[consul-api-1.10.jar!/:na]
Created 04-21-2016 12:04 PM
That is just a warning, but can you make sure the IPs you provided in the application.properties are correct. It can differ in many cases depending your environment.
Created 04-21-2016 12:41 PM
I believed they are correct :
cb.cert.dir=/root/cbd-local/certs cb.client.id=cloudbreak cb.client.secret=cbsecret2015 cb.db.port.5432.tcp.addr=10.0.0.30 cb.db.port.5432.tcp.port=5432 spring.cloud.consul.host=10.0.0.30 cb.identity.server.url=http://10.0.0.30:8089 server.port=9091
and my ip is : inet 10.0.0.30
Is there something I am missing ?
Created 04-21-2016 12:29 PM
If you'd like to use the bootRun command make sure you are running it against the build.gradle in the core module like this (the properties file only works with an absolute path for me):
./gradlew bootRun -Dspring.config.location=file:/Users/msereg/prj/cloudbreak/core/app.properties --stacktrace -b core/build.gradle
If permgen space runs out of memory include this line in the core/build.gradle file:
bootRun { jvmArgs = ["-XX:MaxPermSize=256m"] ...}
Also if you have connection issues like above it means that your other containers are not running with cbd, or you have specified a wrong IP address for your docker-machine. You can check it out with this command:
docker-machine env <your-machine's-name>
For example mine is 192.168.99.100, I'm using this instead of 192.168.59.103 that's in the example.
,If you'd like to use the bootRun command make sure you are running it against the build.gradle in the core module like this (the properties file only works with an absolute path for me):
./gradlew bootRun -Dspring.config.location=file:/Users/msereg/prj/cloudbreak/core/app.properties --stacktrace -b core/build.gradle
If permgen space runs out of memory include this line in the core/build.gradle file:
bootRun { jvmArgs = ["-XX:MaxPermSize=256m"] ...}
Also if you have connection issues like above it means that your other containers are not running with cbd, or you have specified a wrong IP address for your docker-machine. You can check it out with this command:
docker-machine env <your-machine's-name>
For example mine is 192.168.99.100, I'm using this instead of 192.168.59.103 that's in the example.
Created 04-21-2016 01:26 PM
It was indeed a problem with the host that I gave.
Th ip adress of the posgre container was different.
I don't have any errors when I run gradle bootRun, but it is stuck there:
2016-04-21 14:14:04,689 [main] logStarted:57 INFO c.s.c.CloudbreakApplication - [owner:spring] [type:springLog] [id:] [name:] Started CloudbreakApplication in 56.011 seconds (JVM running for 57.589) 2016-04-21 14:14:56,639 [MessageBroker-1] run:113 INFO o.s.w.s.c.WebSocketMessageBrokerStats - [owner:spring] [type:springLog] [id:] [name:] WebSocketSession[0 current WS(0)-HttpStream(0)-HttpPoll(0), 0 total, 0 closed abnormally (0 connect failure, 0 send limit, 0 transport error)], stompSubProtocol[processed CONNECT(0)-CONNECTED(0)-DISCONNECT(0)], stompBrokerRelay[null], inboundChannel[pool size = 0, active threads = 0, queued tasks = 0, completed tasks = 0], outboundChannelpool size = 0, active threads = 0, queued tasks = 0, completed tasks = 0], sockJsScheduler[pool size = 1, active threads = 1, queued tasks = 0, completed tasks = 0] > Building 98% > :core:bootRun
It's been 10 min and nothing change.
Created 04-21-2016 03:06 PM
@Arthur GREVIN it is expected behavior, gradle doesn't put the process in the background, but Cloudbreak is started correctly. Technically the gradle process is running until Cloudbreak is stopped that's why it doesn't show 100%.
You can put it in the background just like any other processes.
Created on 04-22-2016 08:51 AM - edited 08-19-2019 04:28 AM
@Marton Sereg Thank you, the process is indeed running but I have a new issue :
2016-04-22 09:44:02,208 [main] start:162 INFO o.s.b.c.e.t.TomcatEmbeddedServletContainer - [owner:spring] [type:springLog] [id:] [name:] Tomcat started on port(s): 9091 (http) 2016-04-22 09:44:02,237 [main] logStarted:57 INFO c.s.c.CloudbreakApplication - [owner:spring] [type:springLog] [id:] [name:] Started CloudbreakApplication in 81.866 seconds (JVM running for 83.898)
So it seems that the application listens port 9091.
But in my browser I found :
Created 04-22-2016 09:05 AM
It is the API that's running on 9091 and there is nothing mapped to /. If you're checking out a URL that is mapped to an API endpoint, like 10.0.0.30:9091/api/v1/connectors, you should see a json returned. You can try it out with other pathes as well, like /api/v1/stacks that needs authentication, it should return an "unauthorized" message. To see the api docs check out /apidocs.
If you're looking for the UI, it is running in a different container that is started by cbd. It is a nodejs app and it should listen on port 3000.
Did you use cbd to start cloudbreak then the
cbd util local-dev
command to set up a dev env?