3

I am attempting to setup a container on Bluemix that accepts UDP traffic and forwards it using a TCP connection to Logentries. When running the container locally, I used NetCat to simulate UDP traffic and saw it successfully displayed at the destination of the TCP connection.

However, when I attempt to start a container based off the same image with Bluemix containers service, the container remains stuck in a 'Networking' state and no data is transmitted to the destination. The logs only print a warning about the version listed in the syslog-ng.conf file (same warning when ran locally), and inspection of the container by command cf ic inspect <container-id> returns the following portion about the Networking state:

"Path": "date",
"ResolvConfPath": "/etc/resolv.conf",
"State": {
    "ExitCode": 0,
    "FinishedAt": "0001-01-01T00:00:00Z",
    "Ghost": "",
    "Pid": 1,
    "Running": true,
    "StartedAt": "2015-10-14T19:45:43.000000000Z",
    "Status": "Networking"
},

One thing to note is that I had to change the nameserver to 8.8.8.8 (Google's DNS) for necessary domain name resolution, due to the following error:

Error resolving hostname; host='data.logentries.com'
Error initializing message pipeline;
Error resolving hostname; host='data.logentries.com'
Error initializing message pipeline;

You can find the source code of the Docker image I originally adopted at https://github.com/oinopion/syslog-ng-logentries.

So my questions are:

  1. What does the 'Networking' state of a Bluemix container mean?
  2. Why does my container work locally but not on Bluemix?
4

5 回答 5

2

“网络”状态意味着正在为您的容器创建网络,以便可以访问您的容器的公共和私有 IP 并将其路由到您的实例。当容器卡在网络上时,这通常是基础设施的问题,而不是您所做的任何事情。

请尝试删除您的容器并重新创建它,看看这是否应该解决它。如果没有,那么您将需要向 Bluemix 开一张支持票(通过 Bluemix UI 上的支持链接“获取帮助”),让 IBM Containers 团队调查您的 Container 出现问题的原因。

于 2015-10-16T14:17:02.583 回答
2

Bluemix 上的 Docker 容器还不支持传入的 UDP 流量路由。据我所知,此功能已计划用于未来的更新。这就是您的容器在本地运行良好但远程无法接收流量的原因。

于 2015-10-16T17:16:12.757 回答
0

也许配置 syslog-ng 以直接连接到与摄取节点关联的 IP 之一。

任何打击都应该起作用。

data.logentries.com.    105 IN  A   54.217.225.23
data.logentries.com.    105 IN  A   54.217.226.18
data.logentries.com.    105 IN  A   54.246.89.117
data.logentries.com.    105 IN  A   54.217.226.8
data.logentries.com.    105 IN  A   79.125.113.75

data.logentries.com。105 英寸 54.228.220.150

于 2015-10-16T14:28:56.067 回答
0

您只需将 UDP 流量转发到 Logentries,无需切换到 TCP。

于 2015-10-16T10:46:32.487 回答
0
  1. 容器是否能够从端点获得响应?
于 2015-10-15T18:52:49.420 回答