使 spring 云涡轮机连接到 Eureka 时出现问题
Problems getting spring cloud turbine to connect to Eureka
我们正在尝试将涡轮机集成到我们的应用程序中。
我下载了 1.o.o 示例版本 (https://github.com/spring-cloud-samples/turbine/releases/tag/v1.0.0.RELEASE) 并构建并 运行 它。我没有连接到 eureka(我在应用程序 yml connect 中具有相同 eureka 连接设置的其他服务很好)。
考虑到也许我应该尝试最新版本的涡轮机 smapel(它使用 Brixton.SNAPSHOT),我添加了 spring 快照云存储库以构建它
<repositories>
<repository>
<id>spring-snapshots</id>
<name>Spring Snapshots</name>
<url>http://repo.spring.io/libs-snapshot-local</url>
<snapshots>
<enabled>true</enabled>
</snapshots>
</repository>
<repository>
<id>spring-milestones</id>
<name>Spring Milestones</name>
<url>http://repo.spring.io/libs-milestone-local</url>
<snapshots>
<enabled>false</enabled>
</snapshots>
</repository>
<repository>
<id>spring-releases</id>
<name>Spring Releases</name>
<url>http://repo.spring.io/release</url>
<snapshots>
<enabled>false</enabled>
</snapshots>
</repository>
</repositories>
<pluginRepositories>
<pluginRepository>
<id>spring-snapshots</id>
<name>Spring Snapshots</name>
<url>http://repo.spring.io/libs-snapshot-local</url>
<snapshots>
<enabled>true</enabled>
</snapshots>
</pluginRepository>
<pluginRepository>
<id>spring-milestones</id>
<name>Spring Milestones</name>
<url>http://repo.spring.io/libs-milestone-local</url>
<snapshots>
<enabled>false</enabled>
</snapshots>
</pluginRepository>
</pluginRepositories>
此版本似乎使用了 2.0.0 版的涡轮机,我必须为其添加手动依赖项。
仍然是相同的结果,涡轮机服务没有连接到尤里卡。
启动时的日志是:
2015-06-30 13:17:47.666 INFO 14120 --- [ main] c.l.vipaas.turbine.TurbineApplication : Starting TurbineApplication v1.0.0.RELEASE on LARMITCH-M-700M with PID 14120 (/Users/larrymitchell/libertas/vipaas/infrastructureservices/turbine/target/turbine.jar started by larrymitchell in /Users/larrymitchell/libertas/vipaas/infrastructureservices/turbine)
2015-06-30 13:17:47.690 DEBUG 14120 --- [ main] c.l.vipaas.turbine.TurbineApplication : Running with Spring Boot v1.2.4.RELEASE, Spring v4.1.6.RELEASE
2015-06-30 13:17:48.724 INFO 14120 --- [ main] c.l.vipaas.turbine.TurbineApplication : Started TurbineApplication in 1.559 seconds (JVM running for 3.093)
. ____ _ __ _ _
/\ / ___'_ __ _ _(_)_ __ __ _ \ \ \ \
( ( )\___ | '_ | '_| | '_ \/ _` | \ \ \ \
\/ ___)| |_)| | | | | || (_| | ) ) ) )
' |____| .__|_| |_|_| |_\__, | / / / /
=========|_|==============|___/=/_/_/_/
:: Spring Boot :: (v1.2.4.RELEASE)
2015-06-30 13:17:54.033 INFO 14120 --- [ main] o.apache.catalina.core.StandardService : Starting service Tomcat
2015-06-30 13:17:54.036 INFO 14120 --- [ main] org.apache.catalina.core.StandardEngine : Starting Servlet Engine: Apache Tomcat/8.0.23
2015-06-30 13:17:54.257 INFO 14120 --- [ost-startStop-1] o.a.c.c.C.[Tomcat].[localhost].[/] : Initializing Spring embedded WebApplicationContext
2015-06-30 13:17:57.154 WARN 14120 --- [ost-startStop-1] c.n.c.sources.URLConfigurationSource : No URLs will be polled as dynamic configuration sources.
2015-06-30 13:17:57.154 INFO 14120 --- [ost-startStop-1] c.n.c.sources.URLConfigurationSource : To enable URLs as dynamic configuration sources, define System property archaius.configurationSource.additionalUrls or make config.properties available on classpath.
2015-06-30 13:17:57.171 INFO 14120 --- [ost-startStop-1] c.netflix.config.DynamicPropertyFactory : DynamicPropertyFactory is initialized with configuration sources: com.netflix.config.ConcurrentCompositeConfiguration@63a5621d
2015-06-30 13:18:01.722 WARN 14120 --- [ main] c.n.c.sources.URLConfigurationSource : No URLs will be polled as dynamic configuration sources.
2015-06-30 13:18:01.723 INFO 14120 --- [ main] c.n.c.sources.URLConfigurationSource : To enable URLs as dynamic configuration sources, define System property archaius.configurationSource.additionalUrls or make config.properties available on classpath.
2015-06-30 13:18:02.273 INFO 14120 --- [ main] o.apache.catalina.core.StandardService : Starting service Tomcat
2015-06-30 13:18:02.273 INFO 14120 --- [ main] org.apache.catalina.core.StandardEngine : Starting Servlet Engine: Apache Tomcat/8.0.23
2015-06-30 13:18:02.285 INFO 14120 --- [ost-startStop-1] o.a.c.c.C.[.[localhost].[/manage] : Initializing Spring embedded WebApplicationContext
2015-06-30 13:18:02.677 INFO 14120 --- [ main] i.reactivex.netty.server.AbstractServer : Rx server started at port: 8989
2015-06-30 13:18:03.070 INFO 14120 --- [ main] c.l.vipaas.turbine.TurbineApplication : Started TurbineApplication in 16.006 seconds (JVM running for 17.437
当我查看 Eureka 时,我看不到 Turbine 的任何签入,而我看到其他服务的签入
另外,我将 netflix 发现日志级别设置为 DEBUG。
好的,我将 eureka 设置移至 bootstrap,它开始连接到 eureka。如果设置仅在 application.yml 中,则它不会尝试连接。可能在底层有一些覆盖。
还有一个关于连接的警告。如果你想让管理端出现在像 spring 云控制台(参见 https://github.com/VanRoy/spring-cloud-dashboard)这样的控制台中,那么你需要注册管理端口而不是 server.port。
我们正在尝试将涡轮机集成到我们的应用程序中。
我下载了 1.o.o 示例版本 (https://github.com/spring-cloud-samples/turbine/releases/tag/v1.0.0.RELEASE) 并构建并 运行 它。我没有连接到 eureka(我在应用程序 yml connect 中具有相同 eureka 连接设置的其他服务很好)。
考虑到也许我应该尝试最新版本的涡轮机 smapel(它使用 Brixton.SNAPSHOT),我添加了 spring 快照云存储库以构建它
<repositories>
<repository>
<id>spring-snapshots</id>
<name>Spring Snapshots</name>
<url>http://repo.spring.io/libs-snapshot-local</url>
<snapshots>
<enabled>true</enabled>
</snapshots>
</repository>
<repository>
<id>spring-milestones</id>
<name>Spring Milestones</name>
<url>http://repo.spring.io/libs-milestone-local</url>
<snapshots>
<enabled>false</enabled>
</snapshots>
</repository>
<repository>
<id>spring-releases</id>
<name>Spring Releases</name>
<url>http://repo.spring.io/release</url>
<snapshots>
<enabled>false</enabled>
</snapshots>
</repository>
</repositories>
<pluginRepositories>
<pluginRepository>
<id>spring-snapshots</id>
<name>Spring Snapshots</name>
<url>http://repo.spring.io/libs-snapshot-local</url>
<snapshots>
<enabled>true</enabled>
</snapshots>
</pluginRepository>
<pluginRepository>
<id>spring-milestones</id>
<name>Spring Milestones</name>
<url>http://repo.spring.io/libs-milestone-local</url>
<snapshots>
<enabled>false</enabled>
</snapshots>
</pluginRepository>
</pluginRepositories>
此版本似乎使用了 2.0.0 版的涡轮机,我必须为其添加手动依赖项。
仍然是相同的结果,涡轮机服务没有连接到尤里卡。
启动时的日志是:
2015-06-30 13:17:47.666 INFO 14120 --- [ main] c.l.vipaas.turbine.TurbineApplication : Starting TurbineApplication v1.0.0.RELEASE on LARMITCH-M-700M with PID 14120 (/Users/larrymitchell/libertas/vipaas/infrastructureservices/turbine/target/turbine.jar started by larrymitchell in /Users/larrymitchell/libertas/vipaas/infrastructureservices/turbine)
2015-06-30 13:17:47.690 DEBUG 14120 --- [ main] c.l.vipaas.turbine.TurbineApplication : Running with Spring Boot v1.2.4.RELEASE, Spring v4.1.6.RELEASE
2015-06-30 13:17:48.724 INFO 14120 --- [ main] c.l.vipaas.turbine.TurbineApplication : Started TurbineApplication in 1.559 seconds (JVM running for 3.093)
. ____ _ __ _ _
/\ / ___'_ __ _ _(_)_ __ __ _ \ \ \ \
( ( )\___ | '_ | '_| | '_ \/ _` | \ \ \ \
\/ ___)| |_)| | | | | || (_| | ) ) ) )
' |____| .__|_| |_|_| |_\__, | / / / /
=========|_|==============|___/=/_/_/_/
:: Spring Boot :: (v1.2.4.RELEASE)
2015-06-30 13:17:54.033 INFO 14120 --- [ main] o.apache.catalina.core.StandardService : Starting service Tomcat
2015-06-30 13:17:54.036 INFO 14120 --- [ main] org.apache.catalina.core.StandardEngine : Starting Servlet Engine: Apache Tomcat/8.0.23
2015-06-30 13:17:54.257 INFO 14120 --- [ost-startStop-1] o.a.c.c.C.[Tomcat].[localhost].[/] : Initializing Spring embedded WebApplicationContext
2015-06-30 13:17:57.154 WARN 14120 --- [ost-startStop-1] c.n.c.sources.URLConfigurationSource : No URLs will be polled as dynamic configuration sources.
2015-06-30 13:17:57.154 INFO 14120 --- [ost-startStop-1] c.n.c.sources.URLConfigurationSource : To enable URLs as dynamic configuration sources, define System property archaius.configurationSource.additionalUrls or make config.properties available on classpath.
2015-06-30 13:17:57.171 INFO 14120 --- [ost-startStop-1] c.netflix.config.DynamicPropertyFactory : DynamicPropertyFactory is initialized with configuration sources: com.netflix.config.ConcurrentCompositeConfiguration@63a5621d
2015-06-30 13:18:01.722 WARN 14120 --- [ main] c.n.c.sources.URLConfigurationSource : No URLs will be polled as dynamic configuration sources.
2015-06-30 13:18:01.723 INFO 14120 --- [ main] c.n.c.sources.URLConfigurationSource : To enable URLs as dynamic configuration sources, define System property archaius.configurationSource.additionalUrls or make config.properties available on classpath.
2015-06-30 13:18:02.273 INFO 14120 --- [ main] o.apache.catalina.core.StandardService : Starting service Tomcat
2015-06-30 13:18:02.273 INFO 14120 --- [ main] org.apache.catalina.core.StandardEngine : Starting Servlet Engine: Apache Tomcat/8.0.23
2015-06-30 13:18:02.285 INFO 14120 --- [ost-startStop-1] o.a.c.c.C.[.[localhost].[/manage] : Initializing Spring embedded WebApplicationContext
2015-06-30 13:18:02.677 INFO 14120 --- [ main] i.reactivex.netty.server.AbstractServer : Rx server started at port: 8989
2015-06-30 13:18:03.070 INFO 14120 --- [ main] c.l.vipaas.turbine.TurbineApplication : Started TurbineApplication in 16.006 seconds (JVM running for 17.437
当我查看 Eureka 时,我看不到 Turbine 的任何签入,而我看到其他服务的签入
另外,我将 netflix 发现日志级别设置为 DEBUG。
好的,我将 eureka 设置移至 bootstrap,它开始连接到 eureka。如果设置仅在 application.yml 中,则它不会尝试连接。可能在底层有一些覆盖。
还有一个关于连接的警告。如果你想让管理端出现在像 spring 云控制台(参见 https://github.com/VanRoy/spring-cloud-dashboard)这样的控制台中,那么你需要注册管理端口而不是 server.port。