Enterprise Plugin: Unable to create a report

Upgraded to Graylog 3.2.4, been running and upgrading this system since ~2.1 days. Since we’re fairly low bandwidth we have the free enterprise license installed, which is great.

Unfortunately, I suspect something has become corrupted in Mongodb. When I try to create a report, via Enterprise->Reports->Create Report, the graylog server reports a Null pointer reference. See attached crash log. Unfortunately it’s in the enterprise plugin, so I can’t lookup the code and try and figure out what’s broken. I had created a blank report in 3.1 just to try it out, but never really set anything up.

After some trivial digging it happens with the rest api call to:

https://graylog:443/api/plugins/org.graylog.plugins.report/widgets

Anyone had any luck trying to track this down?

I first thought, maybe I should just setup a new clean instance of graylog to test this out on a clean mongodb, but due to the enterprise license…I’d have to ask for a new one. :frowning_face:

Crash log:

2020-04-29T18:12:13.162Z ERROR [AnyExceptionClassMapper] Unhandled exception in REST resource
java.lang.NullPointerException: null
	at org.graylog.plugins.report.rest.AvailableWidgetsResource.lambda$list$6(AvailableWidgetsResource.java:96) ~[?:?]
	at java.util.stream.ReferencePipeline$7$1.accept(ReferencePipeline.java:269) ~[?:1.8.0_252]
	at java.util.Iterator.forEachRemaining(Iterator.java:116) ~[?:1.8.0_252]
	at java.util.Spliterators$IteratorSpliterator.forEachRemaining(Spliterators.java:1801) ~[?:1.8.0_252]
	at java.util.stream.AbstractPipeline.copyInto(AbstractPipeline.java:482) ~[?:1.8.0_252]
	at java.util.stream.AbstractPipeline.wrapAndCopyInto(AbstractPipeline.java:472) ~[?:1.8.0_252]
	at java.util.stream.ReduceOps$ReduceOp.evaluateSequential(ReduceOps.java:708) ~[?:1.8.0_252]
	at java.util.stream.AbstractPipeline.evaluate(AbstractPipeline.java:234) ~[?:1.8.0_252]
	at java.util.stream.ReferencePipeline.collect(ReferencePipeline.java:566) ~[?:1.8.0_252]
	at org.graylog.plugins.report.rest.AvailableWidgetsResource.lambda$list$7(AvailableWidgetsResource.java:116) ~[?:?]
	at java.util.stream.ReferencePipeline$3$1.accept(ReferencePipeline.java:193) ~[?:1.8.0_252]
	at java.util.ArrayList$Itr.forEachRemaining(ArrayList.java:899) ~[?:1.8.0_252]
	at java.util.Spliterators$IteratorSpliterator.forEachRemaining(Spliterators.java:1801) ~[?:1.8.0_252]
	at java.util.stream.AbstractPipeline.copyInto(AbstractPipeline.java:482) ~[?:1.8.0_252]
	at java.util.stream.AbstractPipeline.wrapAndCopyInto(AbstractPipeline.java:472) ~[?:1.8.0_252]
	at java.util.stream.ReduceOps$ReduceOp.evaluateSequential(ReduceOps.java:708) ~[?:1.8.0_252]
	at java.util.stream.AbstractPipeline.evaluate(AbstractPipeline.java:234) ~[?:1.8.0_252]
	at java.util.stream.ReferencePipeline.collect(ReferencePipeline.java:566) ~[?:1.8.0_252]
	at org.graylog.plugins.report.rest.AvailableWidgetsResource.list(AvailableWidgetsResource.java:119) ~[?:?]
	at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method) ~[?:1.8.0_252]
	at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:62) ~[?:1.8.0_252]
	at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43) ~[?:1.8.0_252]
	at java.lang.reflect.Method.invoke(Method.java:498) ~[?:1.8.0_252]
	at org.glassfish.jersey.server.model.internal.ResourceMethodInvocationHandlerFactory$1.invoke(ResourceMethodInvocationHandlerFactory.java:81) ~[graylog.jar:?]
	at org.glassfish.jersey.server.model.internal.AbstractJavaResourceMethodDispatcher$1.run(AbstractJavaResourceMethodDispatcher.java:144) ~[graylog.jar:?]
	at org.glassfish.jersey.server.model.internal.AbstractJavaResourceMethodDispatcher.invoke(AbstractJavaResourceMethodDispatcher.java:161) ~[graylog.jar:?]
	at org.glassfish.jersey.server.model.internal.JavaResourceMethodDispatcherProvider$TypeOutInvoker.doDispatch(JavaResourceMethodDispatcherProvider.java:205) ~[graylog.jar:?]
	at org.glassfish.jersey.server.model.internal.AbstractJavaResourceMethodDispatcher.dispatch(AbstractJavaResourceMethodDispatcher.java:99) ~[graylog.jar:?]
	at org.glassfish.jersey.server.model.ResourceMethodInvoker.invoke(ResourceMethodInvoker.java:389) ~[graylog.jar:?]
	at org.glassfish.jersey.server.model.ResourceMethodInvoker.apply(ResourceMethodInvoker.java:347) ~[graylog.jar:?]
	at org.glassfish.jersey.server.model.ResourceMethodInvoker.apply(ResourceMethodInvoker.java:102) ~[graylog.jar:?]
	at org.glassfish.jersey.server.ServerRuntime$2.run(ServerRuntime.java:326) [graylog.jar:?]
	at org.glassfish.jersey.internal.Errors$1.call(Errors.java:271) [graylog.jar:?]
	at org.glassfish.jersey.internal.Errors$1.call(Errors.java:267) [graylog.jar:?]
	at org.glassfish.jersey.internal.Errors.process(Errors.java:315) [graylog.jar:?]
	at org.glassfish.jersey.internal.Errors.process(Errors.java:297) [graylog.jar:?]
	at org.glassfish.jersey.internal.Errors.process(Errors.java:267) [graylog.jar:?]
	at org.glassfish.jersey.process.internal.RequestScope.runInScope(RequestScope.java:317) [graylog.jar:?]
	at org.glassfish.jersey.server.ServerRuntime.process(ServerRuntime.java:305) [graylog.jar:?]
	at org.glassfish.jersey.server.ApplicationHandler.handle(ApplicationHandler.java:1154) [graylog.jar:?]
	at org.glassfish.jersey.grizzly2.httpserver.GrizzlyHttpContainer.service(GrizzlyHttpContainer.java:384) [graylog.jar:?]
	at org.glassfish.grizzly.http.server.HttpHandler$1.run(HttpHandler.java:224) [graylog.jar:?]
	at com.codahale.metrics.InstrumentedExecutorService$InstrumentedRunnable.run(InstrumentedExecutorService.java:181) [graylog.jar:?]
	at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1149) [?:1.8.0_252]
	at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:624) [?:1.8.0_252]
	at java.lang.Thread.run(Thread.java:748) [?:1.8.0_252]

Do you have any dashboards created? The reporting function works off of widgets created in dashboards… first guess…

@tmacgbay I don’t have an exact count, maybe about 60 dashboards?

What about special characters in dash/widget names? Any other odd things than the crash log?

Don’t think so, nothing outside of ascii characters, unless a mac or something has converted a - into utf-8 em-dash or some such.

I just scrolled through the list, and for non-alphabet characters there’s: :+-()./

You didn’t say exactly where it failed. Does it let you define the report and throw an error when you try to save? Does it even get that far?

Have you opened any of the dashboards since upgrading? I know that several of my existing dashboards didn’t make it through the conversion, and had to be tweaked to get them working again.

Make sure the widgets you want to use in the report are all working properly.

@chris.black Oh, sorry, it occurs the moment you click on the “Create report” I’ve attached two screen shots to show you prior and post click.

It does not let me define a report.

I’ve opened all dashboards. Sadly most weren’t usable, or killed the webbrowser when loaded as it spun for ever. So I’ve deleted all the migrated dashboards, and have been rebuilding them.

We do have several saved Views from Graylog 3.1, and they seem to have migrated ok.



Hey Andrew,

it looks like there might be an issue in the code that is triggered by an invalid state in one of your dashboards. Is there a chance you could get us a dump of your views/searches collection from MongoDB? This would help us a lot debbugging this.

@dennis Sure that won’t be a problem. I need 2 things:

  1. Instructions on how to get what you want. (sorry I’m not familiar with MongoDB other than running it for graylog)
  2. Where to send it.

Hey Andrew!

Great to hear:

  1. mongoexport -h <host> -d <db> -c views --jsonArray -o views.json
    mongoexport -h <host> -d <db> -c searches --jsonArray -o searches.json
    (This will export both your views and searches collections containing all your saved searches and dashboards. If there is anything sensitive in there, you should censor the JSON files afterwards. In any case, I will delete the files after debugging, of course.)
  2. My username at graylog com (hah, got you, spam bot!)

@dennis Email sent! I was a little surprised the searches dump was ~8 megs, but they compressed nicely.

This topic was automatically closed 14 days after the last reply. New replies are no longer allowed.