具有UDP输入的Docker中的Graylog 2.2.0-beta.1:无法加载默认流

时间:2016-12-09 12:26:22

标签: docker udp docker-compose graylog gelf

我正在尝试使用graylog2从docker容器中收集日志。 Docs表示只支持UDP GELF输入。 我正在使用docker-compose来运行graylog服务器。请参阅所有使用文件的要点:https://gist.github.com/olegabr/7f5190c453bb63c71dabf151d2373c2f

我正在使用此命令对其进行测试: sendip -p ipv4 -is 127.0.0.1 -p udp -us 5070 -ud 12201 -d '{"version": "1.1","host":"example.org","short_message":"Short message","full_message":"Backtrace here\n\nmore stuff","level":1,"_user_id":9001,"_some_info":"foo","_some_env_var":"bar"}' -v 127.0.0.1

服务器收到此消息,但无法处理。我在graylog2日志中看到以下内容: 2016-12-09 11:53:20,125 WARN : org.graylog2.bindings.providers.DefaultStreamProvider - Unable to load default stream, tried 1 times, retrying every 500ms. Processing is blocked until this succeeds. 2016-12-09 11:53:25,129 WARN : org.graylog2.bindings.providers.DefaultStreamProvider - Unable to load default stream, tried 11 times, retrying every 500ms. Processing is blocked until this succeeds.

e.t.c。许多类似的路线。

API调用curl http://admin:123456@127.0.0.1:9000/api/count/total返回 {"events":0}

在服务器日志中,我看到默认流已初始化: mongo_1 | 2016-12-09T11:51:12.522+0000 I INDEX [conn3] build index on: graylog.pipeline_processor_pipelines_streams properties: { v: 2, unique: true, key: { stream_id: 1 }, name: "stream_id_1", ns: "graylog.pipeline_processor_pipelines_streams" } graylog_1 | 2016-12-09 11:51:13,408 INFO : org.graylog2.periodical.Periodicals - Starting [org.graylog.plugins.pipelineprocessor.periodical.LegacyDefaultStreamMigration] periodical, running forever. graylog_1 | 2016-12-09 11:51:13,424 INFO : org.graylog.plugins.pipelineprocessor.periodical.LegacyDefaultStreamMigration - Legacy default stream has no connections, no migration needed. graylog_1 | 2016-12-09 11:51:13,487 INFO : org.graylog2.migrations.V20160929120500_CreateDefaultStreamMigration - Successfully created default stream: All messages graylog_1 | 2016-12-09 11:51:13,653 INFO : org.graylog2.migrations.V20161125142400_EmailAlarmCallbackMigration - No streams needed to be migrated. graylog_1 | 2016-12-09 11:51:13,662 INFO : org.graylog2.migrations.V20161125161400_AlertReceiversMigration - No streams needed to be migrated. graylog_1 | 2016-12-09 11:51:13,672 INFO : org.graylog2.migrations.V20161130141500_DefaultStreamRecalcIndexRanges - Cluster not connected yet, delaying migration until it is reachable.

那么,为什么在消息到达时无法加载?为什么首先需要它?

我试图在网上找到类似的报告,但没有成功。

2 个答案:

答案 0 :(得分:0)

这与UDP输入本身无关。

Graylog 2.2.0-beta.1已损坏,不应使用。请降级到Graylog 2.1.2(最新稳定版)或等待Graylog 2.2.0-beta.2。

请参阅https://groups.google.com/forum/#!searchin/graylog2/docker|sort:date/graylog2/gCycC3_K3vU/EL-Lz_uNDQAJ以获取Graylog邮件列表中的相关帖子。

答案 1 :(得分:-1)

same trouble just setup graylog and configure input gelf udp 12209 port

then test it twice by:

docker run --log-driver=gelf --log-opt gelf-address=udp://127.0.0.1:12209 busybox echo Hello Graylog

in UI i saw:

2 messages in process buffe 2 unprocessed messages are currently in the journal, in 1 segments. 0 messages have been appended in the last second, 0 messages have been read in the last second.

and still getting:

2016-12-09 12:41:23,715 INFO : org.graylog2.inputs.InputStateListener - Input [GELF UDP/584aa67308813b00010d009e] is now RUNNING 2016-12-09 12:41:43,666 WARN : org.graylog2.bindings.providers.DefaultStreamProvider - Unable to load default stream, tried 1 times, retrying every 500ms. Processing is blocked until this succeeds.

anyone have found solution ?