这似乎是一个简单的问题,但我正在为此绞尽脑汁:我有一个 Netflix Turbine 被配置为在端口 8989 上运行,但在启动此模块时突然出现此日志:
INFO 17007 --- [main] c.n.e.EurekaDiscoveryClientConfiguration : Updating port to -1
这些是我认为有用的所有配置/代码/日志,以便有人给我提示:
应用程序.yml
server:
port: 8989
management:
port: 8990
主类:
import org.springframework.boot.autoconfigure.SpringBootApplication;
import org.springframework.boot.builder.SpringApplicationBuilder;
import org.springframework.cloud.netflix.eureka.EnableEurekaClient;
import org.springframework.cloud.netflix.turbine.amqp.EnableTurbineAmqp;
@SpringBootApplication
@EnableTurbineAmqp
@EnableEurekaClient
public class TurbineApplication {
public static void main(String[] args) {
new SpringApplicationBuilder(TurbineApplication.class).run(args);
}
}
依赖项: web、undertow、turtle-amqp、eureka 和 test
日志:
2016-05-04 22:35:57.956 INFO 17007 --- [ main] s.c.a.AnnotationConfigApplicationContext : Refreshing org.springframework.context.annotation.AnnotationConfigApplicationContext@1fde5d22: startup date [Wed May 04 22:35:57 CEST 2016]; root of context hierarchy
2016-05-04 22:35:58.196 INFO 17007 --- [ main] f.a.AutowiredAnnotationBeanPostProcessor : JSR-330 'javax.inject.Inject' annotation found and supported for autowiring
2016-05-04 22:35:58.215 INFO 17007 --- [ main] trationDelegate$BeanPostProcessorChecker : Bean 'configurationPropertiesRebinderAutoConfiguration' of type [class org.springframework.cloud.autoconfigure.ConfigurationPropertiesRebinderAutoConfiguration$$EnhancerBySpringCGLIB$$39bb4bdf] is not eligible for getting processed by all BeanPostProcessors (for example: not eligible for auto-proxying)
. ____ _ __ _ _
/\\ / ___'_ __ _ _(_)_ __ __ _ \ \ \ \
( ( )\___ | '_ | '_| | '_ \/ _` | \ \ \ \
\\/ ___)| |_)| | | | | || (_| | ) ) ) )
' |____| .__|_| |_|_| |_\__, | / / / /
=========|_|==============|___/=/_/_/_/
:: Spring Boot :: (v1.3.3.RELEASE)
2016-05-04 22:35:58.667 INFO 17007 --- [ main] c.s.n.o.m.TurbineApplication : No active profile set, falling back to default profiles: default
2016-05-04 22:35:58.689 INFO 17007 --- [ main] ationConfigEmbeddedWebApplicationContext : Refreshing org.springframework.boot.context.embedded.AnnotationConfigEmbeddedWebApplicationContext@64040287: startup date [Wed May 04 22:35:58 CEST 2016]; parent: org.springframework.context.annotation.AnnotationConfigApplicationContext@1fde5d22
2016-05-04 22:35:59.464 INFO 17007 --- [ main] o.s.b.f.s.DefaultListableBeanFactory : Overriding bean definition for bean 'beanNameViewResolver' with a different definition: replacing [Root bean: class [null]; scope=; abstract=false; lazyInit=false; autowireMode=3; dependencyCheck=0; autowireCandidate=true; primary=false; factoryBeanName=org.springframework.boot.autoconfigure.web.ErrorMvcAutoConfiguration$WhitelabelErrorViewConfiguration; factoryMethodName=beanNameViewResolver; initMethodName=null; destroyMethodName=(inferred); defined in class path resource [org/springframework/boot/autoconfigure/web/ErrorMvcAutoConfiguration$WhitelabelErrorViewConfiguration.class]] with [Root bean: class [null]; scope=; abstract=false; lazyInit=false; autowireMode=3; dependencyCheck=0; autowireCandidate=true; primary=false; factoryBeanName=org.springframework.boot.autoconfigure.web.WebMvcAutoConfiguration$WebMvcAutoConfigurationAdapter; factoryMethodName=beanNameViewResolver; initMethodName=null; destroyMethodName=(inferred); defined in class path resource [org/springframework/boot/autoconfigure/web/WebMvcAutoConfiguration$WebMvcAutoConfigurationAdapter.class]]
2016-05-04 22:35:59.529 INFO 17007 --- [ main] o.s.b.f.config.PropertiesFactoryBean : Loading properties file from URL [jar:file:/home/fernando/.m2/repository/org/springframework/integration/spring-integration-core/4.2.5.RELEASE/spring-integration-core-4.2.5.RELEASE.jar!/META-INF/spring.integration.default.properties]
2016-05-04 22:35:59.533 INFO 17007 --- [ main] o.s.i.config.IntegrationRegistrar : No bean named 'integrationHeaderChannelRegistry' has been explicitly defined. Therefore, a default DefaultHeaderChannelRegistry will be created.
2016-05-04 22:35:59.781 INFO 17007 --- [ main] o.s.cloud.context.scope.GenericScope : BeanFactory id=ff867fd3-adba-376f-92d4-71d9d667c9a8
2016-05-04 22:35:59.799 INFO 17007 --- [ main] faultConfiguringBeanFactoryPostProcessor : No bean named 'errorChannel' has been explicitly defined. Therefore, a default PublishSubscribeChannel will be created.
2016-05-04 22:35:59.805 INFO 17007 --- [ main] faultConfiguringBeanFactoryPostProcessor : No bean named 'taskScheduler' has been explicitly defined. Therefore, a default ThreadPoolTaskScheduler will be created.
2016-05-04 22:35:59.828 INFO 17007 --- [ main] f.a.AutowiredAnnotationBeanPostProcessor : JSR-330 'javax.inject.Inject' annotation found and supported for autowiring
2016-05-04 22:35:59.839 INFO 17007 --- [ main] trationDelegate$BeanPostProcessorChecker : Bean 'org.springframework.amqp.rabbit.annotation.RabbitBootstrapConfiguration' of type [class org.springframework.amqp.rabbit.annotation.RabbitBootstrapConfiguration$$EnhancerBySpringCGLIB$$8f4974f0] is not eligible for getting processed by all BeanPostProcessors (for example: not eligible for auto-proxying)
2016-05-04 22:35:59.925 INFO 17007 --- [ main] trationDelegate$BeanPostProcessorChecker : Bean 'org.springframework.cloud.autoconfigure.ConfigurationPropertiesRebinderAutoConfiguration' of type [class org.springframework.cloud.autoconfigure.ConfigurationPropertiesRebinderAutoConfiguration$$EnhancerBySpringCGLIB$$39bb4bdf] is not eligible for getting processed by all BeanPostProcessors (for example: not eligible for auto-proxying)
2016-05-04 22:36:00.371 WARN 17007 --- [ main] io.undertow.websockets.jsr : UT026009: XNIO worker was not set on WebSocketDeploymentInfo, the default worker will be used
2016-05-04 22:36:00.416 INFO 17007 --- [ main] org.xnio : XNIO version 3.3.4.Final
2016-05-04 22:36:00.440 INFO 17007 --- [ main] org.xnio.nio : XNIO NIO Implementation Version 3.3.4.Final
2016-05-04 22:36:00.643 WARN 17007 --- [ main] io.undertow.websockets.jsr : UT026010: Buffer pool was not set on WebSocketDeploymentInfo, the default pool will be used
2016-05-04 22:36:00.679 INFO 17007 --- [ main] io.undertow.servlet : Initializing Spring embedded WebApplicationContext
2016-05-04 22:36:00.680 INFO 17007 --- [ main] o.s.web.context.ContextLoader : Root WebApplicationContext: initialization completed in 1991 ms
2016-05-04 22:36:01.165 INFO 17007 --- [ main] o.s.b.c.e.ServletRegistrationBean : Mapping servlet: 'dispatcherServlet' to [/]
2016-05-04 22:36:01.172 INFO 17007 --- [ main] o.s.b.c.embedded.FilterRegistrationBean : Mapping filter: 'characterEncodingFilter' to: [/*]
2016-05-04 22:36:01.174 INFO 17007 --- [ main] o.s.b.c.embedded.FilterRegistrationBean : Mapping filter: 'hiddenHttpMethodFilter' to: [/*]
2016-05-04 22:36:01.174 INFO 17007 --- [ main] o.s.b.c.embedded.FilterRegistrationBean : Mapping filter: 'httpPutFormContentFilter' to: [/*]
2016-05-04 22:36:01.174 INFO 17007 --- [ main] o.s.b.c.embedded.FilterRegistrationBean : Mapping filter: 'requestContextFilter' to: [/*]
2016-05-04 22:36:02.462 INFO 17007 --- [ main] s.w.s.m.m.a.RequestMappingHandlerAdapter : Looking for @ControllerAdvice: org.springframework.boot.context.embedded.AnnotationConfigEmbeddedWebApplicationContext@64040287: startup date [Wed May 04 22:35:58 CEST 2016]; parent: org.springframework.context.annotation.AnnotationConfigApplicationContext@1fde5d22
2016-05-04 22:36:02.650 INFO 17007 --- [ main] s.w.s.m.m.a.RequestMappingHandlerMapping : Mapped "{[/error],produces=[text/html]}" onto public org.springframework.web.servlet.ModelAndView org.springframework.boot.autoconfigure.web.BasicErrorController.errorHtml(javax.servlet.http.HttpServletRequest,javax.servlet.http.HttpServletResponse)
2016-05-04 22:36:02.652 INFO 17007 --- [ main] s.w.s.m.m.a.RequestMappingHandlerMapping : Mapped "{[/error]}" onto public org.springframework.http.ResponseEntity<java.util.Map<java.lang.String, java.lang.Object>> org.springframework.boot.autoconfigure.web.BasicErrorController.error(javax.servlet.http.HttpServletRequest)
2016-05-04 22:36:02.770 INFO 17007 --- [ main] o.s.w.s.handler.SimpleUrlHandlerMapping : Mapped URL path [/webjars/**] onto handler of type [class org.springframework.web.servlet.resource.ResourceHttpRequestHandler]
2016-05-04 22:36:02.770 INFO 17007 --- [ main] o.s.w.s.handler.SimpleUrlHandlerMapping : Mapped URL path [/**] onto handler of type [class org.springframework.web.servlet.resource.ResourceHttpRequestHandler]
2016-05-04 22:36:02.902 INFO 17007 --- [ main] o.s.w.s.handler.SimpleUrlHandlerMapping : Mapped URL path [/**/favicon.ico] onto handler of type [class org.springframework.web.servlet.resource.ResourceHttpRequestHandler]
2016-05-04 22:36:03.543 INFO 17007 --- [ main] o.s.b.f.config.PropertiesFactoryBean : Loading properties file from URL [jar:file:/home/fernando/.m2/repository/org/springframework/integration/spring-integration-core/4.2.5.RELEASE/spring-integration-core-4.2.5.RELEASE.jar!/META-INF/spring.integration.default.properties]
2016-05-04 22:36:03.585 INFO 17007 --- [ main] o.s.s.c.ThreadPoolTaskScheduler : Initializing ExecutorService 'taskScheduler'
2016-05-04 22:36:03.705 WARN 17007 --- [ main] c.n.c.sources.URLConfigurationSource : No URLs will be polled as dynamic configuration sources.
2016-05-04 22:36:03.706 INFO 17007 --- [ 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.
2016-05-04 22:36:03.718 WARN 17007 --- [ main] c.n.c.sources.URLConfigurationSource : No URLs will be polled as dynamic configuration sources.
2016-05-04 22:36:03.718 INFO 17007 --- [ 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.
2016-05-04 22:36:04.179 INFO 17007 --- [ main] o.s.j.e.a.AnnotationMBeanExporter : Registering beans for JMX exposure on startup
2016-05-04 22:36:04.190 INFO 17007 --- [ main] o.s.j.e.a.AnnotationMBeanExporter : Bean with name 'refreshScope' has been autodetected for JMX exposure
2016-05-04 22:36:04.190 INFO 17007 --- [ main] o.s.j.e.a.AnnotationMBeanExporter : Bean with name 'environmentManager' has been autodetected for JMX exposure
2016-05-04 22:36:04.192 INFO 17007 --- [ main] o.s.j.e.a.AnnotationMBeanExporter : Bean with name 'configurationPropertiesRebinder' has been autodetected for JMX exposure
2016-05-04 22:36:04.195 INFO 17007 --- [ main] o.s.j.e.a.AnnotationMBeanExporter : Located managed bean 'environmentManager': registering with JMX server as MBean [org.springframework.cloud.context.environment:name=environmentManager,type=EnvironmentManager]
2016-05-04 22:36:04.210 INFO 17007 --- [ main] o.s.j.e.a.AnnotationMBeanExporter : Located managed bean 'refreshScope': registering with JMX server as MBean [org.springframework.cloud.context.scope.refresh:name=refreshScope,type=RefreshScope]
2016-05-04 22:36:04.221 INFO 17007 --- [ main] o.s.j.e.a.AnnotationMBeanExporter : Located managed bean 'configurationPropertiesRebinder': registering with JMX server as MBean [org.springframework.cloud.context.properties:name=configurationPropertiesRebinder,context=64040287,type=ConfigurationPropertiesRebinder]
2016-05-04 22:36:04.525 INFO 17007 --- [ main] o.s.c.support.DefaultLifecycleProcessor : Starting beans in phase -2147483648
2016-05-04 22:36:04.526 INFO 17007 --- [ main] o.s.i.endpoint.EventDrivenConsumer : Adding {service-activator:hystrixStreamAggregator.handle.serviceActivator} as a subscriber to the 'hystrixStreamAggregator' channel
2016-05-04 22:36:04.526 INFO 17007 --- [ main] o.s.integration.channel.DirectChannel : Channel 'turbine:-1.hystrixStreamAggregator' has 1 subscriber(s).
2016-05-04 22:36:04.526 INFO 17007 --- [ main] o.s.i.endpoint.EventDrivenConsumer : started hystrixStreamAggregator.handle.serviceActivator
2016-05-04 22:36:04.526 INFO 17007 --- [ main] o.s.c.support.DefaultLifecycleProcessor : Starting beans in phase -2147482648
2016-05-04 22:36:04.526 INFO 17007 --- [ main] o.s.c.support.DefaultLifecycleProcessor : Starting beans in phase 0
2016-05-04 22:36:04.599 INFO 17007 --- [ main] i.reactivex.netty.server.AbstractServer : Rx server started at port: 8989
2016-05-04 22:36:04.600 INFO 17007 --- [ main] o.s.i.endpoint.EventDrivenConsumer : Adding {logging-channel-adapter:_org.springframework.integration.errorLogger} as a subscriber to the 'errorChannel' channel
2016-05-04 22:36:04.600 INFO 17007 --- [ main] o.s.i.channel.PublishSubscribeChannel : Channel 'turbine:-1.errorChannel' has 1 subscriber(s).
2016-05-04 22:36:04.600 INFO 17007 --- [ main] o.s.i.endpoint.EventDrivenConsumer : started _org.springframework.integration.errorLogger
2016-05-04 22:36:04.600 INFO 17007 --- [ main] o.s.i.endpoint.EventDrivenConsumer : Adding {bridge} as a subscriber to the 'hystrixStreamAggregatorInboundFlow.channel#0' channel
2016-05-04 22:36:04.600 INFO 17007 --- [ main] o.s.integration.channel.DirectChannel : Channel 'turbine:-1.hystrixStreamAggregatorInboundFlow.channel#0' has 1 subscriber(s).
2016-05-04 22:36:04.600 INFO 17007 --- [ main] o.s.i.endpoint.EventDrivenConsumer : started org.springframework.integration.config.ConsumerEndpointFactoryBean#0
2016-05-04 22:36:04.600 INFO 17007 --- [ main] o.s.c.support.DefaultLifecycleProcessor : Starting beans in phase 1073741823
2016-05-04 22:36:04.909 INFO 17007 --- [cTaskExecutor-1] o.s.a.r.c.CachingConnectionFactory : Created new connection: SimpleConnection@6eed8333 [delegate=amqp://guest@127.0.0.1:5672/]
2016-05-04 22:36:04.912 INFO 17007 --- [cTaskExecutor-1] o.s.amqp.rabbit.core.RabbitAdmin : Auto-declaring a non-durable, auto-delete, or exclusive Queue (spring.cloud.hystrix.stream) durable:false, auto-delete:false, exclusive:false. It will be redeclared if the broker stops and is restarted while the connection factory is alive, but all messages will be lost.
2016-05-04 22:36:04.956 INFO 17007 --- [ main] o.s.i.a.i.AmqpInboundChannelAdapter : started org.springframework.integration.amqp.inbound.AmqpInboundChannelAdapter#0
2016-05-04 22:36:04.956 INFO 17007 --- [ main] o.s.c.support.DefaultLifecycleProcessor : Starting beans in phase 2147483647
2016-05-04 22:36:04.972 INFO 17007 --- [ main] c.n.e.EurekaDiscoveryClientConfiguration : Updating port to -1
2016-05-04 22:36:04.977 INFO 17007 --- [ main] c.s.n.o.m.TurbineApplication : Started TurbineApplication in 7.689 seconds (JVM running for 8.495)
抱歉,如果问题是基本的,我发现了一些类似的问题(例如,Turbine AMQP 不接收 Hystrix 流),但是,它们都不等于我的问题。
PS:我有一个在默认端口上运行的兔子,监控仪表板,hystrix 命令和其他一切。
如果我遗漏了什么以及为什么这个服务器端口配置被-1值“覆盖”,任何人都可以给我一个线索吗?
谢谢,