【问题标题】:Connect Timeout Exception on Url - http://localhost:8888 & Could not locate PropertySource: I/O error on GET requestURL 上的连接超时异常 - http://localhost:8888 & 找不到 PropertySource:GET 请求上的 I/O 错误
【发布时间】:2020-01-16 09:06:39
【问题描述】:

当 Spring Cloud Dataflow Http-Source 应用程序 Pod 在 kubernetes 上启动时,请注意控制台中的两条消息。

Connect Timeout Exception on Url - http://localhost:8888. 
Could not locate PropertySource: I/O error on GET request for "http://localhost:8888/http-source/default": Connection refused (Connection refused); nested exception is java.net.ConnectException

如何解决这个问题?

subscriber to the 'errorChannel' channel
2019-09-15 05:17:26.773  INFO 1 --- [           main] o.s.i.channel.PublishSubscribeChannel    : Channel 'application-1.errorChannel' has 1 subscriber(s).
2019-09-15 05:17:26.774  INFO 1 --- [           main] o.s.i.endpoint.EventDrivenConsumer       : started _org.springframework.integration.errorLogger
2019-09-15 05:17:27.065  INFO 1 --- [           main] c.c.c.ConfigServicePropertySourceLocator : Fetching config from server at : http://localhost:8888
2019-09-15 05:17:27.137  INFO 1 --- [           main] c.c.c.ConfigServicePropertySourceLocator : Connect Timeout Exception on Url - http://localhost:8888. Will be trying the next url if available
2019-09-15 05:17:27.141  WARN 1 --- [           main] c.c.c.ConfigServicePropertySourceLocator : Could not locate PropertySource: I/O error on GET request for "http://localhost:8888/http-source/default": Connection refused (Connection refused); nested exception is java.net.ConnectException: Connection refused (Connection refused)

【问题讨论】:

  • 嗨,@techpro。欢迎来到 SO 俱乐部。我建议您阅读How do I ask a good question 和相关帮助页面。请 - 展示您自己尝试过的内容以及重现此案例的步骤。总之:请参考How to Ask and minimal reproducible example
  • @Yasen 感谢您对此问题的宝贵意见。它有帮助。
  • 你运行了什么命令?什么环境。任何细节都可以有所作为。
  • 您能提供更多信息吗?您要连接 TO 集群还是 FROM 集群?您还公开了任何端点吗?

标签: kubernetes spring-cloud-stream spring-cloud-dataflow


【解决方案1】:

如果您仔细查看,以下消息将在日志中记录为WARN

Connect Timeout Exception on Url - http://localhost:8888. 
Could not locate PropertySource: I/O error on GET request for "http://localhost:8888/http-source/default": Connection refused (Connection refused); nested exception is java.net.ConnectException

对于我们发布的所有应用、SCDF 和在 K8s 上运行的 Skipper 服务器,您会看到此 WARN 消息。这意味着应用程序、SCDF 或 Skipper 没有配置 config-server,因此默认为默认 http://localhost:8888

背景:我们在所有发布的应用程序中都提供了config-server 依赖项,以帮助您快速上手。

如果你不使用配置服务器,那很好;它不会造成任何伤害 - 不过不用担心。

【讨论】:

  • 谢谢你,萨比。有道理。
猜你喜欢
  • 2018-07-10
  • 1970-01-01
  • 2020-10-29
  • 1970-01-01
  • 1970-01-01
  • 1970-01-01
  • 2020-08-16
  • 2021-09-11
  • 1970-01-01
相关资源
最近更新 更多