【问题标题】:Camel Netty4 TCP Connection issue on openshiftopenshift上的Camel Netty4 TCP连接问题
【发布时间】:2020-11-25 13:51:05
【问题描述】:

我在本地机器上的骆驼配置中使用了以下路径: from("netty4:tcp://0.0.0.0:10001?sync=true") -- 在本地机器上运行良好 cmd-> netstat -ano |找到str 10001 TCP 0.0.0.0:10001 0.0.0.0:0 监听 19596 也可以在上面这个 TCP 连接上发送消息

但是,当在 openshift 上部署时,使用相同的骆驼配置 TCP 连接启动并能够侦听端口 10001,如下所示 tcp 0 0 :::8080 :::* LISTEN 1/java tcp 0 0 :::10001 :::* LISTEN 1/java

但无法在 10001 端口上发送任何消息,它显示错误为:

  1. 来自外部 pod 的连接超时
  2. 在同一个 pod 上打开连接但无法发送消息(尝试使用命令 - nc localhost 10001)

【问题讨论】:

    标签: java apache-camel openshift


    【解决方案1】:

    我认为这与camel netty无关。在 openshift 中部署时,您需要定义服务并公开端口,以便可以从 pod 外部访问。

    https://docs.openshift.com/container-platform/3.5/architecture/core_concepts/pods_and_services.html

    【讨论】:

      猜你喜欢
      • 1970-01-01
      • 1970-01-01
      • 2016-04-12
      • 1970-01-01
      • 2018-04-19
      • 2011-07-09
      • 1970-01-01
      • 1970-01-01
      • 1970-01-01
      相关资源
      最近更新 更多