spring-cloud / spring-cloud-deployer-local Goto Github PK
View Code? Open in Web Editor NEWThe Spring Cloud Deployer implementation for a "local" machine
License: Apache License 2.0
The Spring Cloud Deployer implementation for a "local" machine
License: Apache License 2.0
Copied from spring-cloud/spring-cloud-dataflow#1580
In Windows 10 Home
edition, I have configured the JAVA_HOME
and PATH
variables (same approach used since Windows XP
) all my app that use Java work fine, same appreciation for any tool that needs Java, such as (IDE, LibreOffice, etc...)
Observe the following:
> javac -version
javac 1.8.0_131
> java -version
java version "1.8.0_131"
Java(TM) SE Runtime Environment (build 1.8.0_131-b11)
Java HotSpot(TM) 64-Bit Server VM (build 25.131-b11, mixed mode)
According with [Spring Cloud Data Flow][1]
When I do java -jar spring-cloud-dataflow-server-local-1.2.2.RELEASE.jar
the following happens:
> java -jar spring-cloud-dataflow-server-local-1.2.2.RELEASE.jar
____ ____ _ __
/ ___| _ __ _ __(_)_ __ __ _ / ___| | ___ _ _ __| |
\___ \| '_ \| '__| | '_ \ / _` | | | | |/ _ \| | | |/ _` |
___) | |_) | | | | | | | (_| | | |___| | (_) | |_| | (_| |
|____/| .__/|_| |_|_| |_|\__, | \____|_|\___/ \__,_|\__,_|
____ |_| _ __|___/ __________
| _ \ __ _| |_ __ _ | ___| | _____ __ \ \ \ \ \ \
| | | |/ _` | __/ _` | | |_ | |/ _ \ \ /\ / / \ \ \ \ \ \
| |_| | (_| | || (_| | | _| | | (_) \ V V / / / / / / /
|____/ \__,_|\__\__,_| |_| |_|\___/ \_/\_/ /_/_/_/_/_/
Spring Cloud Data Flow Local Server (v1.2.2.RELEASE)
2017-07-01 14:43:37.512 INFO 2260 --- [ main] c.c.c.ConfigServicePropertySourceLocator : Fetching config from server at: http://localhost:8888
2017-07-01 14:43:38.839 WARN 2260 --- [ main] c.c.c.ConfigServicePropertySourceLocator : Could not locate PropertySource: I/O error on GET request for "http://localhost:8888/spring-cloud-dataflow-server-local/default": Connection refused: connect; nested exception is java.net.ConnectException: Connection refused: connect
2017-07-01 14:43:38.843 INFO 2260 --- [ main] o.s.c.d.s.local.LocalDataFlowServer : No active profile set, falling back to default profiles: default
2017-07-01 14:43:42.687 INFO 2260 --- [ main] .s.d.r.c.RepositoryConfigurationDelegate : Multiple Spring Data modules found, entering strict repository configuration mode!
2017-07-01 14:43:43.614 INFO 2260 --- [ main] o.s.cloud.context.scope.GenericScope : BeanFactory id=b15ff760-91d3-31de-a2a8-f2cc5ce41a5c
2017-07-01 14:43:46.475 INFO 2260 --- [ main] o.apache.catalina.core.StandardService : Starting service [Tomcat]
2017-07-01 14:43:46.478 INFO 2260 --- [ main] org.apache.catalina.core.StandardEngine : Starting Servlet Engine: Apache Tomcat/8.5.15
2017-07-01 14:43:46.730 INFO 2260 --- [ost-startStop-1] o.a.c.c.C.[Tomcat].[localhost].[/] : Initializing Spring embedded WebApplicationContext
2017-07-01 14:43:47.871 INFO 2260 --- [ main] erverConfiguration$H2ServerConfiguration : Starting H2 Server with URL: jdbc:h2:tcp://localhost:19092/mem:dataflow
2017-07-01 14:43:49.381 INFO 2260 --- [ main] o.s.c.d.s.r.s.DataflowRdbmsInitializer : Adding dataflow schema classpath:schema-h2-common.sql for h2 database
2017-07-01 14:43:49.382 INFO 2260 --- [ main] o.s.c.d.s.r.s.DataflowRdbmsInitializer : Adding dataflow schema classpath:schema-h2-streams.sql for h2 database
2017-07-01 14:43:49.382 INFO 2260 --- [ main] o.s.c.d.s.r.s.DataflowRdbmsInitializer : Adding dataflow schema classpath:schema-h2-tasks.sql for h2 database
2017-07-01 14:43:49.383 INFO 2260 --- [ main] o.s.c.d.s.r.s.DataflowRdbmsInitializer : Adding dataflow schema classpath:schema-h2-deployment.sql for h2 database
2017-07-01 14:43:49.393 INFO 2260 --- [ main] o.s.jdbc.datasource.init.ScriptUtils : Executing SQL script from class path resource [schema-h2-common.sql]
2017-07-01 14:43:49.420 INFO 2260 --- [ main] o.s.jdbc.datasource.init.ScriptUtils : Executed SQL script from class path resource [schema-h2-common.sql] in 27 ms.
2017-07-01 14:43:49.420 INFO 2260 --- [ main] o.s.jdbc.datasource.init.ScriptUtils : Executing SQL script from class path resource [schema-h2-streams.sql]
2017-07-01 14:43:49.427 INFO 2260 --- [ main] o.s.jdbc.datasource.init.ScriptUtils : Executed SQL script from class path resource [schema-h2-streams.sql] in 4 ms.
2017-07-01 14:43:49.427 INFO 2260 --- [ main] o.s.jdbc.datasource.init.ScriptUtils : Executing SQL script from class path resource [schema-h2-tasks.sql]
2017-07-01 14:43:49.434 INFO 2260 --- [ main] o.s.jdbc.datasource.init.ScriptUtils : Executed SQL script from class path resource [schema-h2-tasks.sql] in 7 ms.
2017-07-01 14:43:49.435 INFO 2260 --- [ main] o.s.jdbc.datasource.init.ScriptUtils : Executing SQL script from class path resource [schema-h2-deployment.sql]
2017-07-01 14:43:49.438 INFO 2260 --- [ main] o.s.jdbc.datasource.init.ScriptUtils : Executed SQL script from class path resource [schema-h2-deployment.sql] in 2 ms.
2017-07-01 14:43:50.946 INFO 2260 --- [ main] o.s.b.c.r.s.JobRepositoryFactoryBean : No database type set, using meta data indicating: H2
2017-07-01 14:43:51.414 INFO 2260 --- [ main] o.s.jdbc.datasource.init.ScriptUtils : Executing SQL script from class path resource [org/springframework/batch/core/schema-h2.sql]
2017-07-01 14:43:51.492 INFO 2260 --- [ main] o.s.jdbc.datasource.init.ScriptUtils : Executed SQL script from class path resource [org/springframework/batch/core/schema-h2.sql] in 78 ms. 2017-07-01 14:43:51.521 INFO 2260 --- [ main] o.s.jdbc.datasource.init.ScriptUtils : Executing SQL script from class path resource [org/springframework/cloud/task/schema-h2.sql]
2017-07-01 14:43:51.538 INFO 2260 --- [ main] o.s.jdbc.datasource.init.ScriptUtils : Executed SQL script from class path resource [org/springframework/cloud/task/schema-h2.sql] in 16 ms.
...
Caused by: org.springframework.beans.factory.BeanCreationException:
Error creating bean with name 'spring.cloud.deployer.local-org.springframework.cloud.deployer.spi.local.LocalDeployerProperties':
Instantiation of bean failed; nested exception is org.springframework.beans.BeanInstantiationException:
Failed to instantiate [org.springframework.cloud.deployer.spi.local.LocalDeployerProperties]:
Constructor threw exception; nested exception is java.lang.IllegalArgumentException:
Java executable discovered via 'java.home' system property 'C:\whiteroom\java\jre1.8.0_131' is not executable or does not exist.
...
Caused by: java.lang.IllegalArgumentException: Java executable discovered via 'java.home' system property 'C:\whiteroom\java\jre1.8.0_131' is not executable or does not exist.
at
When deployment directory is created on windows with tests, use of multiple UUID's causes long paths which seem to fail ProcessBuilder
.
Hi,
Attempting to execute mvnw test will always fail due to an incorrectly declared static constant "JAVA_COMMAND". It is set to "java". Tests that reference this class will fail when the private method "deduceJavaCommand" is called.
String javaExecutablePath = JAVA_COMMAND;
String javaHome = System.getProperty("java.home");
...
File javaExecutable = new File(javaHome, "bin/" + javaExecutablePath);
Assert.isTrue(javaExecutable.canExecute(), "Java executable discovered via 'java.home' system property '"
+ javaHome + "' is not executable or does not exist.");
javaExecutable will resolve to %JAVA_HOME%/jre/java which can never be executable. Is this intended?
As it is defined currently the following Exception is raised and causes the tests to fail.
Tests run: 11, Failures: 0, Errors: 11, Skipped: 0, Time elapsed: 0.002 sec <<< FAILURE! testDirectJavaMemoryOptionWithG(org.springframework.cloud.deployer.spi.local.JavaExecutionCommandBuilderTests) Time elapsed: 0.001 sec <<< ERROR! java.lang.IllegalArgumentException: Java executable discovered via 'java.home' system property 'F:\lib-tools\libs\java\jdk-1.8.0_60_x64\jre' is not executable or does not exist.
As a developer, I'd like to revert the Java version to 1.7, so the local-deployer implementation would be consistent with Spring Boot.
Acceptance:
Looks like the way we provide the app args by adding them to the environment instead of as command line arguments has some issues with Boot 2.0 based apps. The integration tests set a random port via server.port
but the app always ends up using the default 8080
.
The INSTANCE_INDEX env var isn't set when deploying app using docker image
Hi,
When there are high number of task launcher requests, there will be high number of processors which causes unstability in task launcher. How about adding a parameter that limit number of concurrent tasks. If there more tasks, they will have to wait till one of running tasks completed.
I tried this by adding a public method to LocalTaskLauncher which gives number of currently running tasks. Then in TaskLauncherSink launchTask() wait if current number is not less than max allowed.
What do you think about it?
public int runningTaskCount() {
return running.size();
}
For example, app.time.spring.cloud.deployer.local.memory=1024m
The task deployer checks to see if the server.port is in the properties https://github.com/spring-cloud/spring-cloud-deployer-local/blob/master/spring-cloud-deployer-local/src/main/java/org/springframework/cloud/deployer/spi/local/LocalTaskLauncher.java#L89. But does not check to see if it has been added to the arguments list.
extends info provided here #25
When deploying streams with deployer.*.local.inheritLogging=true
property the runtime apps
command in the shell fails with:
2017-06-28 10:55:02.567 ERROR 12006 --- [nio-9393-exec-1] o.s.c.d.s.c.RestControllerAdvice : Caught exception while handling a request
java.lang.NullPointerException: null
at org.springframework.cloud.deployer.spi.local.LocalAppDeployer$AppInstance.getAttributes(LocalAppDeployer.java:290) ~[spring-cloud-deployer-local-1.2.1.RELEASE.jar!/:1.2.1.RELEASE]
As a developer, I'd like to upgrade to Spring Cloud and Deployer SPI releases.
As a developer, I'd like to set deploymentId
as an env-var to apps deployed via LocalAppDeployer
.
Most recent stream apps have shutdown endpoint secured so the local deployer barfs during undeploy. We can work around it by using deploy properties like: "app.*.endpoints.shutdown.sensitive=false"
Stack trace:
org.springframework.web.client.HttpClientErrorException: 401 null
at org.springframework.web.client.DefaultResponseErrorHandler.handleError(DefaultResponseErrorHandler.java:91) ~[spring-web-4.3.3.RELEASE.jar!/:4.3.3.RELEASE]
at org.springframework.web.client.RestTemplate.handleResponse(RestTemplate.java:667) ~[spring-web-4.3.3.RELEASE.jar!/:4.3.3.RELEASE]
at org.springframework.web.client.RestTemplate.doExecute(RestTemplate.java:620) ~[spring-web-4.3.3.RELEASE.jar!/:4.3.3.RELEASE]
at org.springframework.web.client.RestTemplate.execute(RestTemplate.java:580) ~[spring-web-4.3.3.RELEASE.jar!/:4.3.3.RELEASE]
at org.springframework.web.client.RestTemplate.postForEntity(RestTemplate.java:407) ~[spring-web-4.3.3.RELEASE.jar!/:4.3.3.RELEASE]
at org.springframework.cloud.deployer.spi.local.AbstractLocalDeployerSupport.shutdownAndWait(AbstractLocalDeployerSupport.java:146) ~[spring-cloud-deployer-local-1.1.1.RELEASE.jar!/:1.1.1.RELEASE]
at org.springframework.cloud.deployer.spi.local.LocalAppDeployer.undeploy(LocalAppDeployer.java:148) ~[spring-cloud-deployer-local-1.1.1.RELEASE.jar!/:1.1.1.RELEASE]
at org.springframework.cloud.dataflow.server.controller.StreamDeploymentController.undeployStream(StreamDeploymentController.java:398) ~[spring-cloud-dataflow-server-core-1.1.0.RELEASE.jar!/:1.1.0.RELEASE]
at org.springframework.cloud.dataflow.server.controller.StreamDeploymentController.undeploy(StreamDeploymentController.java:146) ~[spring-cloud-dataflow-server-core-1.1.0.RELEASE.jar!/:1.1.0.RELEASE]
at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method) ~[na:1.8.0_101]
at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:62) ~[na:1.8.0_101]
at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43) ~[na:1.8.0_101]
at java.lang.reflect.Method.invoke(Method.java:498) ~[na:1.8.0_101]
at org.springframework.web.method.support.InvocableHandlerMethod.doInvoke(InvocableHandlerMethod.java:221) ~[spring-web-4.3.3.RELEASE.jar!/:4.3.3.RELEASE]
at org.springframework.web.method.support.InvocableHandlerMethod.invokeForRequest(InvocableHandlerMethod.java:136) ~[spring-web-4.3.3.RELEASE.jar!/:4.3.3.RELEASE]
at org.springframework.web.servlet.mvc.method.annotation.ServletInvocableHandlerMethod.invokeAndHandle(ServletInvocableHandlerMethod.java:114) ~[spring-webmvc-4.3.3.RELEASE.jar!/:4.3.3.RELEASE]
at org.springframework.web.servlet.mvc.method.annotation.RequestMappingHandlerAdapter.invokeHandlerMethod(RequestMappingHandlerAdapter.java:827) ~[spring-webmvc-4.3.3.RELEASE.jar!/:4.3.3.RELEASE]
at org.springframework.web.servlet.mvc.method.annotation.RequestMappingHandlerAdapter.handleInternal(RequestMappingHandlerAdapter.java:738) ~[spring-webmvc-4.3.3.RELEASE.jar!/:4.3.3.RELEASE]
at org.springframework.web.servlet.mvc.method.AbstractHandlerMethodAdapter.handle(AbstractHandlerMethodAdapter.java:85) ~[spring-webmvc-4.3.3.RELEASE.jar!/:4.3.3.RELEASE]
at org.springframework.web.servlet.DispatcherServlet.doDispatch(DispatcherServlet.java:963) ~[spring-webmvc-4.3.3.RELEASE.jar!/:4.3.3.RELEASE]
at org.springframework.web.servlet.DispatcherServlet.doService(DispatcherServlet.java:897) ~[spring-webmvc-4.3.3.RELEASE.jar!/:4.3.3.RELEASE]
at org.springframework.web.servlet.FrameworkServlet.processRequest(FrameworkServlet.java:970) [spring-webmvc-4.3.3.RELEASE.jar!/:4.3.3.RELEASE]
at org.springframework.web.servlet.FrameworkServlet.doDelete(FrameworkServlet.java:894) [spring-webmvc-4.3.3.RELEASE.jar!/:4.3.3.RELEASE]
at javax.servlet.http.HttpServlet.service(HttpServlet.java:654) [tomcat-embed-core-8.5.5.jar!/:8.5.5]
at org.springframework.web.servlet.FrameworkServlet.service(FrameworkServlet.java:846) [spring-webmvc-4.3.3.RELEASE.jar!/:4.3.3.RELEASE]
at javax.servlet.http.HttpServlet.service(HttpServlet.java:729) [tomcat-embed-core-8.5.5.jar!/:8.5.5]
at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:230) [tomcat-embed-core-8.5.5.jar!/:8.5.5]
at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:165) [tomcat-embed-core-8.5.5.jar!/:8.5.5]
at org.apache.tomcat.websocket.server.WsFilter.doFilter(WsFilter.java:52) [tomcat-embed-websocket-8.5.5.jar!/:8.5.5]
at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:192) [tomcat-embed-core-8.5.5.jar!/:8.5.5]
at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:165) [tomcat-embed-core-8.5.5.jar!/:8.5.5]
at org.springframework.boot.web.filter.ApplicationContextHeaderFilter.doFilterInternal(ApplicationContextHeaderFilter.java:55) [spring-boot-1.4.1.RELEASE.jar!/:1.4.1.RELEASE]
at org.springframework.web.filter.OncePerRequestFilter.doFilter(OncePerRequestFilter.java:107) [spring-web-4.3.3.RELEASE.jar!/:4.3.3.RELEASE]
at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:192) [tomcat-embed-core-8.5.5.jar!/:8.5.5]
at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:165) [tomcat-embed-core-8.5.5.jar!/:8.5.5]
at org.springframework.boot.actuate.trace.WebRequestTraceFilter.doFilterInternal(WebRequestTraceFilter.java:105) [spring-boot-actuator-1.4.1.RELEASE.jar!/:1.4.1.RELEASE]
at org.springframework.web.filter.OncePerRequestFilter.doFilter(OncePerRequestFilter.java:107) [spring-web-4.3.3.RELEASE.jar!/:4.3.3.RELEASE]
at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:192) [tomcat-embed-core-8.5.5.jar!/:8.5.5]
at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:165) [tomcat-embed-core-8.5.5.jar!/:8.5.5]
at org.springframework.security.web.FilterChainProxy.doFilterInternal(FilterChainProxy.java:208) [spring-security-web-4.1.3.RELEASE.jar!/:4.1.3.RELEASE]
at org.springframework.security.web.FilterChainProxy.doFilter(FilterChainProxy.java:177) [spring-security-web-4.1.3.RELEASE.jar!/:4.1.3.RELEASE]
at org.springframework.web.filter.DelegatingFilterProxy.invokeDelegate(DelegatingFilterProxy.java:346) [spring-web-4.3.3.RELEASE.jar!/:4.3.3.RELEASE]
at org.springframework.web.filter.DelegatingFilterProxy.doFilter(DelegatingFilterProxy.java:262) [spring-web-4.3.3.RELEASE.jar!/:4.3.3.RELEASE]
at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:192) [tomcat-embed-core-8.5.5.jar!/:8.5.5]
at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:165) [tomcat-embed-core-8.5.5.jar!/:8.5.5]
at org.springframework.web.filter.RequestContextFilter.doFilterInternal(RequestContextFilter.java:99) [spring-web-4.3.3.RELEASE.jar!/:4.3.3.RELEASE]
at org.springframework.web.filter.OncePerRequestFilter.doFilter(OncePerRequestFilter.java:107) [spring-web-4.3.3.RELEASE.jar!/:4.3.3.RELEASE]
at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:192) [tomcat-embed-core-8.5.5.jar!/:8.5.5]
at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:165) [tomcat-embed-core-8.5.5.jar!/:8.5.5]
at org.springframework.web.filter.HttpPutFormContentFilter.doFilterInternal(HttpPutFormContentFilter.java:89) [spring-web-4.3.3.RELEASE.jar!/:4.3.3.RELEASE]
at org.springframework.web.filter.OncePerRequestFilter.doFilter(OncePerRequestFilter.java:107) [spring-web-4.3.3.RELEASE.jar!/:4.3.3.RELEASE]
at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:192) [tomcat-embed-core-8.5.5.jar!/:8.5.5]
at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:165) [tomcat-embed-core-8.5.5.jar!/:8.5.5]
at org.springframework.web.filter.HiddenHttpMethodFilter.doFilterInternal(HiddenHttpMethodFilter.java:77) [spring-web-4.3.3.RELEASE.jar!/:4.3.3.RELEASE]
at org.springframework.web.filter.OncePerRequestFilter.doFilter(OncePerRequestFilter.java:107) [spring-web-4.3.3.RELEASE.jar!/:4.3.3.RELEASE]
at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:192) [tomcat-embed-core-8.5.5.jar!/:8.5.5]
at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:165) [tomcat-embed-core-8.5.5.jar!/:8.5.5]
at org.springframework.web.filter.CharacterEncodingFilter.doFilterInternal(CharacterEncodingFilter.java:197) [spring-web-4.3.3.RELEASE.jar!/:4.3.3.RELEASE]
at org.springframework.web.filter.OncePerRequestFilter.doFilter(OncePerRequestFilter.java:107) [spring-web-4.3.3.RELEASE.jar!/:4.3.3.RELEASE]
at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:192) [tomcat-embed-core-8.5.5.jar!/:8.5.5]
at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:165) [tomcat-embed-core-8.5.5.jar!/:8.5.5]
at org.springframework.boot.actuate.autoconfigure.MetricsFilter.doFilterInternal(MetricsFilter.java:107) [spring-boot-actuator-1.4.1.RELEASE.jar!/:1.4.1.RELEASE]
at org.springframework.web.filter.OncePerRequestFilter.doFilter(OncePerRequestFilter.java:107) [spring-web-4.3.3.RELEASE.jar!/:4.3.3.RELEASE]
at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:192) [tomcat-embed-core-8.5.5.jar!/:8.5.5]
at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:165) [tomcat-embed-core-8.5.5.jar!/:8.5.5]
at org.apache.catalina.core.StandardWrapperValve.invoke(StandardWrapperValve.java:198) [tomcat-embed-core-8.5.5.jar!/:8.5.5]
at org.apache.catalina.core.StandardContextValve.invoke(StandardContextValve.java:108) [tomcat-embed-core-8.5.5.jar!/:8.5.5]
at org.apache.catalina.authenticator.AuthenticatorBase.invoke(AuthenticatorBase.java:472) [tomcat-embed-core-8.5.5.jar!/:8.5.5]
at org.apache.catalina.core.StandardHostValve.invoke(StandardHostValve.java:140) [tomcat-embed-core-8.5.5.jar!/:8.5.5]
at org.apache.catalina.valves.ErrorReportValve.invoke(ErrorReportValve.java:79) [tomcat-embed-core-8.5.5.jar!/:8.5.5]
at org.apache.catalina.core.StandardEngineValve.invoke(StandardEngineValve.java:87) [tomcat-embed-core-8.5.5.jar!/:8.5.5]
at org.apache.catalina.connector.CoyoteAdapter.service(CoyoteAdapter.java:349) [tomcat-embed-core-8.5.5.jar!/:8.5.5]
at org.apache.coyote.http11.Http11Processor.service(Http11Processor.java:784) [tomcat-embed-core-8.5.5.jar!/:8.5.5]
at org.apache.coyote.AbstractProcessorLight.process(AbstractProcessorLight.java:66) [tomcat-embed-core-8.5.5.jar!/:8.5.5]
at org.apache.coyote.AbstractProtocol$ConnectionHandler.process(AbstractProtocol.java:802) [tomcat-embed-core-8.5.5.jar!/:8.5.5]
at org.apache.tomcat.util.net.NioEndpoint$SocketProcessor.doRun(NioEndpoint.java:1410) [tomcat-embed-core-8.5.5.jar!/:8.5.5]
at org.apache.tomcat.util.net.SocketProcessorBase.run(SocketProcessorBase.java:49) [tomcat-embed-core-8.5.5.jar!/:8.5.5]
at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1142) [na:1.8.0_101]
at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:617) [na:1.8.0_101]
at org.apache.tomcat.util.threads.TaskThread$WrappingRunnable.run(TaskThread.java:61) [tomcat-embed-core-8.5.5.jar!/:8.5.5]
at java.lang.Thread.run(Thread.java:745) [na:1.8.0_101]
Hi, I'm having problems related with deploying a stream using the :
spring-cloud-deployer-local-1.2.2.BUILD-SNAPSHOT.jar
and my Dockerfile builded with server-local is:
FROM nimmis/java-centos
MAINTAINER Roberto Gonçalves "[email protected]"
RUN mkdir -p spring-log
VOLUME spring-log
EXPOSE 7000-7010
RUN wget -O app.jar http://repo.spring.io/snapshot/org/springframework/cloud/spring-cloud-dataflow-server-local/1.2.3.BUILD-SNAPSHOT/spring-cloud-dataflow-server-local-1.2.3.BUILD-SNAPSHOT.jar
ENV JAVA_OPTS="-Djava.io.tmpdir=spring-log"
ENTRYPOINT [ "sh", "-c", "java $JAVA_OPTS -Djava.security.egd=file:/dev/./urandom -jar ./app.jar" ]
So then I build the image and then i started it, so I get the docker+rabbitmq and do the bulk:
app import http://bit.ly/Bacon-RELEASE-stream-applications-rabbit-docker
So when I run:
stream deploy --name ticktock
I get:
Caused by: java.io.IOException: Cannot run program "docker" (in directory "/root/spring-log/spring-cloud-dataflow-1938563371549328050/ticktock-1499481317911/ticktock.time"): error=2, No such file or directory
Tracking down I found:
at org.springframework.cloud.deployer.spi.local.LocalAppDeployer$AppInstance.start(LocalAppDeployer.java:298) ~[spring-cloud-deployer-local-1.2.2.BUILD-SNAPSHOT.jar!/:1.2.2.BUILD-SNAPSHOT
Checking this method and seeing the createDir method, I'm thinking that is a problem with creating the directory, but, I can't solve this since that I am new to this repository. Can you guys help me? Thank you!
From @pjannapu on July 6, 2017 14:9
As part of an effort to setup and run Spring Cloud Dataflow (SCDF) local server as per the instructions provided at (http://cloud.spring.io/spring-cloud-dataflow/ precisely at step 2), I was running into an exception when starting the SCDF local server on my Windows 10 workstation. The server startup fails with an error that says .
"Error creating bean with name 'spring.cloud.deployer.local-org.springframework.cloud.deployer.spi.local.LocalDeployerProperties': Instantiation of bean failed; nested exception is org.springframework.beans.BeanInstantiationException: Failed to instantiate [org.springframework.cloud.deployer.spi.local.LocalDeployerProperties]: Constructor threw exception; nested exception is java.lang.IllegalArgumentException: Java executable discovered via 'java.home' system property 'C:\Installed_software\java\jre-8u131' is not executable or does not exist. "
On further debugging the problem, it turned out that the method deduceJavaCommand(), in the class, org.springframework.cloud.deployer.spi.local.LocalDeployerProperties, has an assertion on
"javaExecutable.canExecute()" which fails on windows. This is because on Windows, the Java executable is named as "java.exe" but not "java".
A hack for this problem would be to create an empty file named "java" (no extensions) and run the jar. It would be great if someone can put in a fix for the issue. As the problem was discovered as part of local setup instructions, I felt that it would be great if someone from Pivotal can again verify the local setup instructions that are provided as part of such tutorials on Spring cloud. Thanks for your time!
-PJ.
Copied from original issue: spring-cloud/spring-cloud-deployer#225
The JavaCommandBuilder
doesn't use the args
properties when deploying the apps.
Based on this, the AppDeployer implementation should throw IllegalStateException
when undeploying an app that has not been deployed.
This is for the Configuration properties autocompletion in IDE.
As an SCDF user, when querying for runtime apps status (with deployer.*.local.inheritLogging=true
), I see the following NPE.
stacktrace:
2017-06-28 10:55:02.567 ERROR 12006 --- [nio-9393-exec-1] o.s.c.d.s.c.RestControllerAdvice : Caught exception while handling a request
java.lang.NullPointerException: null
at org.springframework.cloud.deployer.spi.local.LocalAppDeployer$AppInstance.getAttributes(LocalAppDeployer.java:290) ~[spring-cloud-deployer-local-1.2.1.RELEASE.jar!/:1.2.1.RELEASE]
scdf shell:
dataflow:>runtime apps
Command failed org.springframework.cloud.dataflow.rest.client.DataFlowClientException: NullPointerException
As a continuation from spring-cloud/spring-cloud-deployer#62, we would like to implement the scaling operations to support canary deployments using Skipper.
Given that this is a local deployer it does help to have an option to redirect outputs to the parent process's logs (i.e., console) especially in early development stages of where one is testing the deployed app.
As a user, I'd like to resolve artifacts from a private Docker registry.
Notes:
imagePullSecret
As a developer, when invoking the cleanup()
operation, I'd want to make sure the task's working directory is cleaned up.
The current value of 25 is too conservative as local machines have large disk capacity. The current value comes from the CF deployer where 2GB disk (excluding OS) is the norm.
Hi,
With current implementation a task become RUNNING status only if the process is running and it has a web container. We have tasks to do one time jobs such as sending email, converting xcel to xml, some json transfers etc.. which they don't have web dependency. They never become RUNNING, instead they become LAUNCHING. My question is how reasonable to expect a task to expose a http endpoint ?
if (exit != null) {
if (exit == 0) {
return LaunchState.complete;
}
else {
return LaunchState.failed;
}
}else{
return LaunchState.running;
}
try {
HttpURLConnection urlConnection = (HttpURLConnection) baseUrl.openConnection();
urlConnection.setConnectTimeout(100);
urlConnection.connect();
urlConnection.disconnect();
return LaunchState.running;
}
catch (IOException e) {
return LaunchState.launching;
}
Relates to spring-cloud/spring-cloud-deployer#183
When running tests on windows:
Results :
Failed tests: testCommandLineArgumentsPassing(org.springframework.cloud.deployer.spi.local.LocalAppDeployerIntegrationTests): (..)
test app fails with message
Caused by: java.lang.IllegalArgumentException: Expected 'commandLineArgValueThatMayNeedEscaping' value to be equal to '&'"|< é\(', but was '&'|<'
LocalTaskLauncher does not remove intances from running map Map<String, TaskInstance> running = new ConcurrentHashMap<>(); Thus tasks created are added to the map, but not removed even cancelled. However LocalAppDeployer remove from map in cancel().
@Override
public void cancel(String id) {
TaskInstance instance = running.get(id);
if (instance != null) {
instance.cancelled = true;
if (isAlive(instance.getProcess())) {
shutdownAndWait(instance);
}
}
}
If you add running.remove(id) after shutdownAndwait it makes testSimpleCancel test case to be failed since getStatus return status as unknown when instance object is null.
assertThat(launchId, eventually(hasStatusThat(
Matchers.<TaskStatus>hasProperty("state", Matchers.is(LaunchState.running))), timeout.maxAttempts, timeout.pause));
@Override
public void cancel(String id) {
TaskInstance instance = running.get(id);
if (instance != null) {
instance.cancelled = true;
if (isAlive(instance.getProcess())) {
shutdownAndWait(instance);
}
running.remove(id);
}
}
As a developer, I'd to upgrade the SPI dependency to 1.3 M2.
When attempting to run a task from the command line, all environment variables are added to the command line.
This causes 2 problems:
While this solution may work for Docker, it does not work for running from the command line.
Update all SNAPSHOT dependencies to at least Milestone versions
As a developer, I'd like to cut the 2.0 M1 release for the Local-deployer project.
To go along with spring-cloud/spring-cloud-deployer#194
Reference deploymentId explicitly in deployment/undeployment logs
Add an info logging statement right before downloading the file based jar
This is the issue to be fixed for spring-cloud/spring-cloud-dataflow#695
A declarative, efficient, and flexible JavaScript library for building user interfaces.
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
An Open Source Machine Learning Framework for Everyone
The Web framework for perfectionists with deadlines.
A PHP framework for web artisans
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
Some thing interesting about web. New door for the world.
A server is a program made to process requests and deliver data to clients.
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
Some thing interesting about visualization, use data art
Some thing interesting about game, make everyone happy.
We are working to build community through open source technology. NB: members must have two-factor auth.
Open source projects and samples from Microsoft.
Google ❤️ Open Source for everyone.
Alibaba Open Source for everyone
Data-Driven Documents codes.
China tencent open source team.