当前位置: 首页 > 知识库问答 >
问题:

Netflix Turbine-服务器端口自动更新到-1

何辰沛
2023-03-14

这似乎是一个简单的问题,但我却在绞尽脑汁地思考这个问题:我有一个Netflix涡轮正在配置在8989端口上运行,但在启动这个模块时突然出现了这条日志:

INFO 17007 --- [main] c.n.e.EurekaDiscoveryClientConfiguration : Updating port to -1

这些配置/代码/日志我认为是有用的,以便有人给我提示:

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);
    }
}

依赖关系:腹板、底拖、涡轮-AMQP、eureka和测试

日志:

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)

抱歉,如果这个问题是基本的,我发现了一些类似的问题(例如,涡轮AMQP不能接收Hystrix流),但是,没有一个问题与我的问题相同。

共有1个答案

邹锦
2023-03-14

尝试删除turbine project application.yml中的server.port并将其替换为

turbine:
  amqp:
    port: 8989
 类似资料:
  • 问题内容: 我目前有一个Flask网络服务器,该服务器使用内置的requests对象从JSON API中提取数据。 例如: 这里的问题是,自然地,GET方法仅在第一次调用get_data时运行一次。为了刷新数据,我必须停止并重新启动Flask wsgi服务器。我曾尝试在True / sleep循环中包装代码的各个部分,但这会阻止werkzeug加载页面。 动态地获取我想要的数据而无需重新加载页面或

  • 我已经使用命令创建了新的adonis项目 阿多尼斯新标尺 cd标尺 我没有做任何更改,我只是运行命令启动服务器。服务器已启动,但未侦听端口。当我使用“node”命令启动服务器时,它工作了,端口正在监听。我可以在哪里寻找解决一个问题,所以它将工作与adonis命令,也? 不起作用的解决方案: adonis Serve-Dev 有效的解决方案: 节点服务器

  • 本文向大家介绍Linux下SVN服务器自动更新文件到Web目录的方法,包括了Linux下SVN服务器自动更新文件到Web目录的方法的使用技巧和注意事项,需要的朋友参考一下 说明: 服务器操作系统:CentOS 服务器IP:192.168.21.134 SVN安装路径:/usr/local/svn SVN项目路径:/home/svn SVN登录账号:osyunwei SVN登录密码:123456 W

  • 问题内容: 我想在侦听器中指定可侦听的默认端口。是否有比在内部解析并插入配置的端口更容易的修复方法? 目标是运行时不必每次都指定地址和端口,而要从中获取参数。 问题答案: 使用以下命令创建一个bash脚本: 将其保存为runserver并与manage.py放在同一目录中 并运行为

  • 我的Kubernetes集群运行在谷歌云下。我有部署运行端口443和LoadBalancer公开它到互联网。 我是这样创建的: 运行此命令后,loadbalancer将指向部署。现在,我创建了,并希望更改loadbalancer以指向新的部署()。 注意:删除和重新创建部署是释放外部IP地址,我想避免它。 如何在不丢失外部IP的情况下修补现有服务以指向另一个部署?

  • 问题内容: 我正在尝试使用Docker compose在远程服务器上部署第二个数据库容器。该postgresql服务器在端口5433上运行,而不是第一个postgresql容器使用的5432。 设置应用程序时,出现以下错误输出: 我的泊坞窗撰写文件是: 我觉得问题一定是服务器实例上的postgresql.conf文件将端口设置为5432导致我的应用尝试与其连接时导致错误。有没有一种简单的方法可以使