Open BoykoAlex opened 4 years ago
@BoykoAlex is there an error message? @dsyer any thoughts?
With 2.2.7 Boot CLI it just shuts down without the errors.
With 2.3.0 Boot CLI there is a stack trace:
[main] ERROR org.springframework.cloud.launcher.cli.LauncherCommand - Error running spring cloud
java.lang.reflect.InvocationTargetException
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.cloud.launcher.cli.LauncherCommand$LauncherOptionHandler.run(LauncherCommand.java:115)
at org.springframework.boot.cli.command.options.OptionHandler.run(OptionHandler.java:85)
at org.springframework.boot.cli.command.OptionParsingCommand.run(OptionParsingCommand.java:54)
at org.springframework.boot.cli.command.CommandRunner.run(CommandRunner.java:219)
at org.springframework.boot.cli.command.CommandRunner.runAndHandleErrors(CommandRunner.java:171)
at org.springframework.boot.cli.SpringCli.main(SpringCli.java:64)
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:49)
at org.springframework.boot.loader.Launcher.launch(Launcher.java:109)
at org.springframework.boot.loader.Launcher.launch(Launcher.java:58)
at org.springframework.boot.loader.JarLauncher.main(JarLauncher.java:88)
Caused by: java.lang.reflect.InvocationTargetException
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.wrapper.ThinJarWrapper.launch(ThinJarWrapper.java:140)
at org.springframework.boot.loader.wrapper.ThinJarWrapper.main(ThinJarWrapper.java:107)
... 18 more
Caused by: java.lang.IllegalStateException: Cannot build model
at org.springframework.boot.loader.thin.DependencyResolver.dependencies(DependencyResolver.java:243)
at org.springframework.boot.loader.thin.PathResolver.extract(PathResolver.java:214)
at org.springframework.boot.loader.thin.PathResolver.resolve(PathResolver.java:101)
at org.springframework.boot.loader.thin.ThinJarLauncher.getClassPathArchives(ThinJarLauncher.java:355)
at org.springframework.boot.loader.Launcher.launch(Launcher.java:49)
at org.springframework.boot.loader.thin.ThinJarLauncher.launch(ThinJarLauncher.java:193)
at org.springframework.boot.loader.thin.ThinJarLauncher.main(ThinJarLauncher.java:140)
... 24 more
Caused by: hidden.org.apache.maven.project.ProjectBuildingException: Some problems were encountered while processing the POMs:
[WARNING] 'dependencies.dependency.(groupId:artifactId:type:classifier)' must be unique: org.springframework.cloud:spring-cloud-deployer-thin:jar -> version 1.0.22.RELEASE vs (?) @
[ERROR] 'dependencies.dependency.version' for org.springframework.cloud:spring-cloud-deployer-thin:jar is missing. @
at hidden.org.apache.maven.project.DefaultProjectBuilder.build(DefaultProjectBuilder.java:195)
at hidden.org.apache.maven.project.DefaultProjectBuilder.build(DefaultProjectBuilder.java:126)
at org.springframework.boot.loader.thin.DependencyResolver.dependencies(DependencyResolver.java:213)
... 30 more
Caused by: hidden.org.apache.maven.model.building.ModelBuildingException: 2 problems were encountered while building the effective model for org.springframework.cloud.launcher:spring-cloud-launcher-deployer:2.2.1.RELEASE
[WARNING] 'dependencies.dependency.(groupId:artifactId:type:classifier)' must be unique: org.springframework.cloud:spring-cloud-deployer-thin:jar -> version 1.0.22.RELEASE vs (?) @
[ERROR] 'dependencies.dependency.version' for org.springframework.cloud:spring-cloud-deployer-thin:jar is missing. @
at hidden.org.apache.maven.model.building.DefaultModelProblemCollector.newModelBuildingException(DefaultModelProblemCollector.java:197)
at hidden.org.apache.maven.model.building.DefaultModelBuilder.build(DefaultModelBuilder.java:479)
at hidden.org.apache.maven.model.building.DefaultModelBuilder.build(DefaultModelBuilder.java:421)
at hidden.org.apache.maven.model.building.DefaultModelBuilder.build(DefaultModelBuilder.java:411)
at hidden.org.apache.maven.project.DefaultProjectBuilder.build(DefaultProjectBuilder.java:161)
... 32 more
There must be an issue with the config file, but "thin" is the default, so if that's what you needed it already works, I guess.
CORRECTION: the default is "local". I'll check the config.
CORRECTION: the default is "local" but the apps are all thin jars, so they get deployed using a thin launcher by default.
So what was it you wanted to achieve with the "thin" profile? I guess it keeps all the apps running in the same JVM. That's a valid goal, so I'll try and find a fix.
You can workaround the problem by putting an explicit version in thin-thin.properties
BTW (in the spring-cloud-launcher-deployer
jar), e.g.
exclusions.spring-cloud-deployer-local: org.springframework.cloud:spring-cloud-deployer-local
dependencies.spring-cloud-deplyer-thin: org.springframework.cloud:spring-cloud-deployer-thin:1.0.22.RELEASE
^^^ Fixed in snapshots (1.0.25).
Install Boot CLI 2.2.7 or 2.3.0 Install the latest Cloud CLI 2.2.1 in it Launch eureka service:
./bin/spring cloud eureka --deployer=thin
fails Launch without --deployer=thin works fine - service launched