graylog2-web-interface icon indicating copy to clipboard operation
graylog2-web-interface copied to clipboard

Can not login as admin

Open pwaterz opened this issue 11 years ago • 6 comments

I am running graylog 1.0.2 and graylog web interface 1.0.2 on Centos 5.7. I have the graylog server, mongo, and elastic search running just fine. I am able to start the web interface and access the url via the web browser. I believe my password sha2 hash is setup right, because when I go to the login screen and enter the right password, I do not get the error Sorry, those credentials are invalid., I do get that error if I enter the wrong password. Any ideas? Thanks in advance!

pwaterz avatar May 26 '15 12:05 pwaterz

I'll also note the only thing I see in the logs when I enter the correct password is this

2015-05-26 05:10:41,294 INFO : org.apache.shiro.session.mgt.AbstractValidatingSessionManager - Enabling session validation scheduler...

When I enter the wrong password I get this exception

org.graylog2.periodical.NodePingThread - Did not find meta info of this node. Re-registering.
2015-05-26 05:14:00,278 WARN : org.graylog2.rest.resources.system.SessionsResource - Unable to log in user admin
org.apache.shiro.authc.AuthenticationException: No account information found for authentication token [org.apache.shiro.authc.UsernamePasswordToken - admin, rememberMe=false] by this Authenticator instance.  Please check that it is configured correctly.
    at org.apache.shiro.authc.AbstractAuthenticator.authenticate(AbstractAuthenticator.java:202)
    at org.apache.shiro.mgt.AuthenticatingSecurityManager.authenticate(AuthenticatingSecurityManager.java:106)
    at org.apache.shiro.mgt.DefaultSecurityManager.login(DefaultSecurityManager.java:270)
    at org.apache.shiro.subject.support.DelegatingSubject.login(DelegatingSubject.java:256)
    at org.graylog2.rest.resources.system.SessionsResource.newSession(SessionsResource.java:95)
    at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
    at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:57)
    at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
    at java.lang.reflect.Method.invoke(Method.java:606)
    at org.glassfish.jersey.server.model.internal.ResourceMethodInvocationHandlerFactory$1.invoke(ResourceMethodInvocationHandlerFactory.java:81)
    at org.glassfish.jersey.server.model.internal.AbstractJavaResourceMethodDispatcher$1.run(AbstractJavaResourceMethodDispatcher.java:151)
    at org.glassfish.jersey.server.model.internal.AbstractJavaResourceMethodDispatcher.invoke(AbstractJavaResourceMethodDispatcher.java:172)
    at org.glassfish.jersey.server.model.internal.JavaResourceMethodDispatcherProvider$TypeOutInvoker.doDispatch(JavaResourceMethodDispatcherProvider.java:195)
    at org.glassfish.jersey.server.model.internal.AbstractJavaResourceMethodDispatcher.dispatch(AbstractJavaResourceMethodDispatcher.java:104)
    at org.glassfish.jersey.server.model.ResourceMethodInvoker.invoke(ResourceMethodInvoker.java:384)
    at org.glassfish.jersey.server.model.ResourceMethodInvoker.apply(ResourceMethodInvoker.java:342)
    at org.glassfish.jersey.server.model.ResourceMethodInvoker.apply(ResourceMethodInvoker.java:101)
    at org.glassfish.jersey.server.ServerRuntime$1.run(ServerRuntime.java:271)
    at org.glassfish.jersey.internal.Errors$1.call(Errors.java:271)
    at org.glassfish.jersey.internal.Errors$1.call(Errors.java:267)
    at org.glassfish.jersey.internal.Errors.process(Errors.java:315)
    at org.glassfish.jersey.internal.Errors.process(Errors.java:297)
    at org.glassfish.jersey.internal.Errors.process(Errors.java:267)
    at org.glassfish.jersey.process.internal.RequestScope.runInScope(RequestScope.java:297)
    at org.glassfish.jersey.server.ServerRuntime.process(ServerRuntime.java:254)
    at org.glassfish.jersey.server.ApplicationHandler.handle(ApplicationHandler.java:1030)
    at org.graylog2.jersey.container.netty.NettyContainer.messageReceived(NettyContainer.java:356)
    at org.jboss.netty.channel.SimpleChannelUpstreamHandler.handleUpstream(SimpleChannelUpstreamHandler.java:70)
    at org.jboss.netty.channel.DefaultChannelPipeline.sendUpstream(DefaultChannelPipeline.java:564)
    at org.jboss.netty.channel.DefaultChannelPipeline$DefaultChannelHandlerContext.sendUpstream(DefaultChannelPipeline.java:791)
    at org.jboss.netty.handler.execution.ChannelUpstreamEventRunnable.doRun(ChannelUpstreamEventRunnable.java:43)
    at org.jboss.netty.handler.execution.ChannelEventRunnable.run(ChannelEventRunnable.java:67)
    at com.codahale.metrics.InstrumentedExecutorService$InstrumentedRunnable.run(InstrumentedExecutorService.java:176)
    at org.jboss.netty.handler.execution.MemoryAwareThreadPoolExecutor$MemoryAwareRunnable.run(MemoryAwareThreadPoolExecutor.java:622)
    at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1145)
    at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:615)
    at java.lang.Thread.run(Thread.java:745)

pwaterz avatar May 26 '15 12:05 pwaterz

Are you sure that your SHA256 hash of the password is correct? You can check that with echo -n 'your-password' | sha256sum. It should print the same SHA256 hash that you've added to the Graylog configuration file (root_password_sha2).

Additionally you should verify that password_secret (graylog-server) and application.secret (graylog-web-interface) are absolutely identical (no trailing white spaces etc.).

joschi avatar May 26 '15 13:05 joschi

When I enter the wrong password I get this exception

While the log message is maybe a bit verbose, it's absolutely correct and printed, if the provided credentials are invalid.

I'm closing this issue now. If you have general support questions (rather than bug reports or feature requests), please use our mailing list or our IRC channel #graylog on Freenode.

joschi avatar May 26 '15 13:05 joschi

I ended up needing to clear my cookies in my browser! Doh!

pwaterz avatar May 26 '15 14:05 pwaterz

Thanks for the update!

joschi avatar May 26 '15 15:05 joschi

Hi , I am facing the same problem. I am not able to login to web interface. i tried clearing all cache. I checked the whether it is generating the same SHA256 hash and it is

tharasavio avatar Jul 08 '16 16:07 tharasavio