Unable to load userDB

Hello all, wonder if anybody can help? I see a similar post here: https://github.com/Graylog2/graylog2-server/issues/3660 but that doesn’t seem to help. Running Graylog 2.4.3+2c41897 and the error I receive is: Loading user list failed with status: Error: cannot GET http://x.x.x.x:9000/api/users (500) and I can’t see to add users as a result.

Any pointers much appreciated, but note, I’m not a graylog guru :slight_smile:

Cheers

Will

Check the logs of your Graylog node(s):
http://docs.graylog.org/en/2.4/pages/configuration/file_location.html

So it seems I lie a wee bit, I have just created a user, but I still can’t see them in the list or assign any additional roles to them.

What’s in the logs you’ve checked?

Hi, oddly the log locations don’t tally up and i can’t access them. /var/log/graylog and in there I have a server directory which i can’t access as i get permission denied. Nor can I access the elasticsearch, mongodb directories either.

You have to be root (administrator) to access the directory contents.

How exactly have you installed Graylog?

It’s the virtual machine image so logging in as ubuntu ?

You can execute commands as root by prepending sudo, for example:

# sudo ls -l /var/log/graylog/server/

got it now :slight_smile: here’s what i see when i tail ‘current’ and try and open the authentication tab:

2018-07-11_14:49:33.07833 at org.glassfish.jersey.server.model.ResourceMethodInvoker.invoke(ResourceMethodInvoker.java:389) ~[graylog.jar:?]
2018-07-11_14:49:33.07834 at org.glassfish.jersey.server.model.ResourceMethodInvoker.apply(ResourceMethodInvoker.java:347) ~[graylog.jar:?]
2018-07-11_14:49:33.07835 at org.glassfish.jersey.server.model.ResourceMethodInvoker.apply(ResourceMethodInvoker.java:102) ~[graylog.jar:?]
2018-07-11_14:49:33.07836 at org.glassfish.jersey.server.ServerRuntime$2.run(ServerRuntime.java:326) [graylog.jar:?]
2018-07-11_14:49:33.07836 at org.glassfish.jersey.internal.Errors$1.call(Errors.java:271) [graylog.jar:?]
2018-07-11_14:49:33.07837 at org.glassfish.jersey.internal.Errors$1.call(Errors.java:267) [graylog.jar:?]
2018-07-11_14:49:33.07838 at org.glassfish.jersey.internal.Errors.process(Errors.java:315) [graylog.jar:?]
2018-07-11_14:49:33.07841 at org.glassfish.jersey.internal.Errors.process(Errors.java:297) [graylog.jar:?]
2018-07-11_14:49:33.07841 at org.glassfish.jersey.internal.Errors.process(Errors.java:267) [graylog.jar:?]
2018-07-11_14:49:33.07844 at org.glassfish.jersey.process.internal.RequestScope.runInScope(RequestScope.java:317) [graylog.jar:?]
2018-07-11_14:49:33.07845 at org.glassfish.jersey.server.ServerRuntime.process(ServerRuntime.java:305) [graylog.jar:?]
2018-07-11_14:49:33.07846 at org.glassfish.jersey.server.ApplicationHandler.handle(ApplicationHandler.java:1154) [graylog.jar:?]
2018-07-11_14:49:33.07847 at org.glassfish.jersey.grizzly2.httpserver.GrizzlyHttpContainer.service(GrizzlyHttpContainer.java:384) [graylog.jar:?]
2018-07-11_14:49:33.07847 at org.glassfish.grizzly.http.server.HttpHandler$1.run(HttpHandler.java:224) [graylog.jar:?]
2018-07-11_14:49:33.07848 at com.codahale.metrics.InstrumentedExecutorService$InstrumentedRunnable.run(InstrumentedExecutorService.java:176) [graylog.jar:?]
2018-07-11_14:49:33.07849 at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1149) [?:1.8.0_161]
2018-07-11_14:49:33.07850 at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:624) [?:1.8.0_161]
2018-07-11_14:49:33.07850 at java.lang.Thread.run(Thread.java:748) [?:1.8.0_161]
2018-07-11_14:51:50.93691 ERROR [AnyExceptionClassMapper] Unhandled exception in REST resource
2018-07-11_14:51:50.93695 java.lang.ClassCastException: com.mongodb.BasicDBObject cannot be cast to [B 2018-07-11_14:51:50.93696 at org.graylog2.security.MongoDbSession.getAttributes(MongoDbSession.java:68) ~[graylog.jar:?]
2018-07-11_14:51:50.93697 at org.graylog2.security.MongoDbSession.getUsernameAttribute(MongoDbSession.java:98) ~[graylog.jar:?]
2018-07-11_14:51:50.93698 at org.graylog2.rest.resources.users.UsersResource.lambda$listUsers$0(UsersResource.java:147) ~[graylog.jar:?]
2018-07-11_14:51:50.93699 at java.util.stream.ReferencePipeline$2$1.accept(ReferencePipeline.java:174) ~[?:1.8.0_161]
2018-07-11_14:51:50.93700 at java.util.ArrayList$ArrayListSpliterator.forEachRemaining(ArrayList.java:1382) ~[?:1.8.0_161]
2018-07-11_14:51:50.93700 at java.util.stream.AbstractPipeline.copyInto(AbstractPipeline.java:481) ~[?:1.8.0_161]
2018-07-11_14:51:50.93701 at java.util.stream.AbstractPipeline.wrapAndCopyInto(AbstractPipeline.java:471) ~[?:1.8.0_161]
2018-07-11_14:51:50.93702 at java.util.stream.ReduceOps$ReduceOp.evaluateSequential(ReduceOps.java:708) ~[?:1.8.0_161]
2018-07-11_14:51:50.93703 at java.util.stream.AbstractPipeline.evaluate(AbstractPipeline.java:234) ~[?:1.8.0_161]
2018-07-11_14:51:50.93704 at java.util.stream.ReferencePipeline.collect(ReferencePipeline.java:499) ~[?:1.8.0_161]
2018-07-11_14:51:50.93707 at org.graylog2.rest.resources.users.UsersResource.listUsers(UsersResource.java:148) ~[graylog.jar:?]
2018-07-11_14:51:50.93707 at sun.reflect.GeneratedMethodAccessor738.invoke(Unknown Source) ~[?:?]
2018-07-11_14:51:50.93708 at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43) ~[?:1.8.0_16

Try deleting all sessions in the “sessions” collection in the MongoDB database as described in the following issue:

same thing sadly, if I have the command correct that is: db.sessions.remove({}); returns this: WriteResult({ “nRemoved” : 0 }) but issue still exists

Are you sure you’ve run this command in the correct MongoDB database?

DOH! Boom, all fine now, thank you very much.

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