Tcp Graylog收集器连接被拒绝

Tcp Graylog收集器连接被拒绝,tcp,graylog2,graylog,Tcp,Graylog2,Graylog,我正在尝试创建一个Graylog服务器-Graylog收集器设置,其中Graylog收集器在一台计算机上收集系统日志文件并将其发送到服务器 我已经使用AWS AMI创建了Graylog服务器,它正在按预期工作 我在同一台机器上安装了一个Graylog收集器,我可以在该实例的源代码列表中看到它 我的问题是当我尝试连接到远程Graylog收集器时 Graylog收集器配置文件如下所示: server-url = "http://xxx.xxx.xxx.xxx:12900/" inputs {

我正在尝试创建一个Graylog服务器-Graylog收集器设置,其中Graylog收集器在一台计算机上收集系统日志文件并将其发送到服务器

我已经使用AWS AMI创建了Graylog服务器,它正在按预期工作

我在同一台机器上安装了一个Graylog收集器,我可以在该实例的源代码列表中看到它

我的问题是当我尝试连接到远程Graylog收集器时

Graylog收集器配置文件如下所示:

server-url = "http://xxx.xxx.xxx.xxx:12900/"

inputs {  
  syslog {
    type = "file"
    path = "/var/log/syslog"
  }     
}

outputs {
  graylog-server {
    type = "gelf"
    host = "xxx.xxx.xxx.xxx"
    port = 12201
  } 
}    
其中xxx.xxx.xxx.xxx是我试图连接的graylog服务器的专用IP地址

graylog服务器配置的摘录如下:

rest_listen_uri = http://0.0.0.0:12900/
两个实例的安全组如下所示:

-----------------------------------------------------------------
| Type            | Protocol        | Port Range   |  Source    |
-----------------------------------------------------------------
| Custom TCP Rule | TCP             | 12201        |  0.0.0.0/0 |
-----------------------------------------------------------------
| Custom TCP Rule | TCP             | 12900        |  0.0.0.0/0 |
-----------------------------------------------------------------
当我查看graylog collector的日志时,会收到以下消息:

2015-11-14T23:41:33.948+0000 ERROR [gelfTcpTransport-1-1] gelfclient.transport.GelfTcpTransport - Connection failed: Connection refused: /xxx.xxx.xxx.xxx:12201
2015-11-14T23:41:34.949+0000 ERROR [gelfTcpTransport-1-1] gelfclient.transport.GelfTcpTransport - Connection failed: Connection refused: /xxx.xxx.xxx.xxx:12201
2015-11-14T23:41:35.951+0000 ERROR [gelfTcpTransport-1-1] gelfclient.transport.GelfTcpTransport - Connection failed: Connection refused: /xxx.xxx.xxx.xxx:12201
2015-11-14T23:41:36.953+0000 ERROR [gelfTcpTransport-1-1] gelfclient.transport.GelfTcpTransport - Connection failed: Connection refused: /xxx.xxx.xxx.xxx:12201
2015-11-14T23:41:37.956+0000 ERROR [gelfTcpTransport-1-1] gelfclient.transport.GelfTcpTransport - Connection failed: Connection refused: /xxx.xxx.xxx.xxx:12201
2015-11-14T23:41:38.698+0000 WARN  [HeartbeatService RUNNING] collector.heartbeat.HeartbeatService - Unable to send heartbeat to Graylog server: ConnectException: Connection refused
(同样,xxx.xxx.xxx.xxx是我试图连接的graylog服务器的专用IP地址)

我在端口12201和端口12900上的两台机器之间运行了跟踪路由,没有任何问题

有人能告诉我在允许这2个连接的配置中可能缺少什么吗

两者都运行Ubuntu 14.04

谢谢


Seán

尝试更改Graylog Web中的设置,
“系统->输入”
菜单,编辑从端口12201侦听的输入设置(在我的示例中称为
“Appliance Gelf UDP”
),并将
“绑定地址”
更改为您的私有IP。在我的情况下,一切都在本地主机(收集器和包含Graylog服务器的漫游虚拟机)中,我编写了
“127.0.0.1”
,并且
“HeartbeatService RUNNING]collector.heartbeat.HeartbeatService-无法将心跳发送到Graylog服务器:ConnectException:连接被拒绝”
错误消息已从Graylog收集器的日志中消失

这是正常收集器启动时的标准输出:

2015-12-18T12:26:24.027+0100 INFO  [main] cli.commands.Run - Starting Collector v0.4.1 (commit 36a0856)
2015-12-18T12:26:24.032+0100 INFO  [main] cli.commands.Run - Running on Windows 8.1 Windows 8.1 6.3 (amd64)
2015-12-18T12:26:25.311+0100 INFO  [main] collector.utils.CollectorId - Collector ID: ff0f70f5-2d48-4b5c-9943-88031ea5e0fc
2015-12-18T12:26:25.349+0100 INFO  [main] outputs.gelf.GelfOutput - Starting GELF transport: org.graylog2.gelfclient.GelfConfiguration@7ca65d82
2015-12-18T12:26:25.761+0100 INFO  [gelfTcpTransport-1-1] gelfclient.transport.GelfTcpTransport - Channel disconnected!
2015-12-18T12:26:25.761+0100 INFO  [main] cli.commands.Run - Service RUNNING: BufferProcessor [RUNNING]
2015-12-18T12:26:25.761+0100 INFO  [main] cli.commands.Run - Service RUNNING: FileObserver [RUNNING]
2015-12-18T12:26:25.761+0100 INFO  [main] cli.commands.Run - Service RUNNING: MemoryReporterService [RUNNING]
2015-12-18T12:26:25.761+0100 INFO  [main] cli.commands.Run - Service RUNNING: MetricService [RUNNING]
2015-12-18T12:26:25.762+0100 INFO  [main] cli.commands.Run - Service RUNNING: HeartbeatService [RUNNING]
2015-12-18T12:26:25.764+0100 INFO  [main] cli.commands.Run - Service RUNNING: GelfOutput{port='12201', id='gelf-tcp', client-send-buffer-size='-1', host='127.0.0.1', inputs='', client-reconnect-delay='1000', client-connect-timeout='5000', client-tcp-no-delay='true', client-queue-size='512'}

心跳错误与graylog collector向graylog服务器注册有关。收集器需要向Graylog服务器注册,以便它可以出现在web界面的System->collector菜单中。 在graylog收集器配置文件集中 “启用注册=false”(不带引号) 作为全局配置来删除此检测信号错误。
这将删除心跳错误,日志仍将在graylog服务器上运行,不会出现任何问题。

更新-我已在端口12201的graylog服务器上创建了一个GELF TCP输入。我现在收到的错误消息是:2015-11-16T09:35:04.689+0000警告[HeartbeatService正在运行]collector.heartbeat.HeartbeatService-无法将心跳发送到Graylog服务器:ConnectException:连接被拒绝,因此它看起来已经工作到一定程度,但我仍然无法在System>collectors页面上的收集器列表中查看客户端上运行的收集器。我想我可以在graylog收集器的配置中禁用心跳注册(但我不愿意),我有同样的问题。在我的例子中,Graylog服务器使用一个流浪的虚拟机在本地实例化。我正在研究,如果我有一个解决方案,我会把它贴在这里。当做