New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Unable to write graylog2 metrics to mongodb #1228

Closed
jgkirschbaum opened this Issue Jun 8, 2015 · 1 comment

Comments

Projects
None yet
2 participants
@jgkirschbaum

jgkirschbaum commented Jun 8, 2015

I upgraded graylog from 1.0.2 to 1.1.1 this morning and from now on I get the following error in the logfile:

2015-06-08T14:25:59.814+02:00 WARN  [MongoDbMetricsReporter] Unable to write graylog2 metrics to mongodb. Ignoring this error.
java.lang.IllegalArgumentException: can't serialize class org.joda.time.DateTime
        at org.bson.BasicBSONEncoder._putObjectField(BasicBSONEncoder.java:299)
        at org.bson.BasicBSONEncoder.putObject(BasicBSONEncoder.java:194)
        at org.bson.BasicBSONEncoder.putObject(BasicBSONEncoder.java:136)
        at com.mongodb.DefaultDBEncoder.writeObject(DefaultDBEncoder.java:36)
        at com.mongodb.OutMessage.putObject(OutMessage.java:289)
        at com.mongodb.DBCollectionImpl.insertWithWriteProtocol(DBCollectionImpl.java:556)
        at com.mongodb.DBCollectionImpl.insert(DBCollectionImpl.java:195)
        at com.mongodb.DBCollectionImpl.insert(DBCollectionImpl.java:167)
        at com.mongodb.DBCollection.insert(DBCollection.java:161)
        at org.graylog2.metrics.MongoDbMetricsReporter.report(MongoDbMetricsReporter.java:118)
        at com.codahale.metrics.ScheduledReporter.report(ScheduledReporter.java:162)
        at com.codahale.metrics.ScheduledReporter$1.run(ScheduledReporter.java:117)
        at java.util.concurrent.Executors$RunnableAdapter.call(Executors.java:511)
        at java.util.concurrent.FutureTask.runAndReset(FutureTask.java:308)
        at java.util.concurrent.ScheduledThreadPoolExecutor$ScheduledFutureTask.access$301(ScheduledThreadPoolExecutor.java:180)
        at java.util.concurrent.ScheduledThreadPoolExecutor$ScheduledFutureTask.run(ScheduledThreadPoolExecutor.java:294)
        at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1142)
        at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:617)
        at java.lang.Thread.run(Thread.java:745)

@joschi joschi added the bug label Jun 8, 2015

@joschi joschi added this to the 1.1.2 milestone Jun 8, 2015

@joschi joschi self-assigned this Jun 8, 2015

@joschi

This comment has been minimized.

Contributor

joschi commented Jun 8, 2015

Thanks for reporting this!

The reason for the error was a type of metric (Gauge<DateTime>) being recorded which is incompatible with the (vanilla) MongoDB driver.

As a workaround until the fix has been released, you could deactivate the MongoDB metrics reporter in your setup (https://github.com/Graylog2/graylog2-server/blob/1.1.1/misc/graylog2.conf#L397-398).

@joschi joschi closed this in f8401f4 Jun 9, 2015

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment