401 error after upgrade from preview 8 #489
Comments
Is this still an issue? Looks like you are doing an unauthorized call. RC.1 introduced the call authentication so you have to pass a Graylog2 user and password with the correct permission. (Admin users have all permissions) |
This is using the default admin user:password upon install (pulled directly from /etc/graylog2-server.conf) |
`API call failed GET http://@10.115.16.204:12900/users/admin returned 401`` Seems like it is not arriving. It should be saying |
The log entry strips authentication info, if anything it should include the user name but not the password. @jaxxstorm how does this happen exactly? preview.8 mongodb and then just upgrading the graylog2 binaries? |
That's exactly it, upgrading binaries from preview 8
|
I cannot reproduce this :( Does this happen still for you @jaxxstorm ? |
Haven't seen it for a while, let's close it and if it pops up again I'll reopen. |
I'm getting the same error after upgrading to web 0.92.1-2 (server is 0.92.1-2 too), application secrets are shared between server and web and the exception is:
|
I cannot reproduce this with graylog2-server 0.92.1 and graylog2-web-interface 0.92.1. @alex88 Please post your graylog2.conf and graylog2-web-interface.conf files (replace credentials with another string, but be aware of trailing white spaces and stuff like that!) and check your graylog2-server logs for errors around the time the login failed on the web interface. |
This is the server config:
and this is the web config:
and this is the log while trying to login from the web interface:
server process is running with this command line:
|
I have the exact same problem... 2 hosts installed freshly (0.91.3) but hosts not seeing eachother (in web interface on the nodes page) and this error : 2014-12-16T14:51:45.998+01:00 - [ERROR] - from org.graylog2.restclient.models.UserService in play-akka.actor.default-dispatcher-9 |
Seems both doesn't insert the username in the api call |
@alex88 The complete authority part of the URI part is filtered out on purpose. It just looks a little strange with the leading '@' sign. |
Yes, but the unauthorized thingy is very strange. Secrets are exactly the same on both servers, but it is not working :( |
In my case the server API works fine using a command line client with the admin credentials |
@alex88 What do you execute exactly on CLI? I can try it here then... |
@dennusb listing users using graylog api:
I use httpie since with curl I was getting 401 |
Getting 401 with CURL is weird already... :P |
meh, with httpie it should work, maybe I had to try with digest auth instead of basic :) |
graylog2-server is using HTTP/1.1 Basic Authentication. |
Anyway, just tried now and it works also via curl, so forget the curl issue |
When trying to search for logs after an upgrade from preview 8, I get a 401 error in the logs:
[error] m.UserService - Unauthorized to load user admin
lib.APIException: API call failed GET http://@10.115.16.204:12900/users/admin returned 401 Unauthorized body:
at lib.ApiClientImpl$ApiRequestBuilder.execute(ApiClientImpl.java:355) ~[graylog2-web-interface.graylog2-web-interface-0.20.0-rc.1.jar:0.20.0-rc.1]
at models.UserService.authenticateSessionUser(UserService.java:155) ~[graylog2-web-interface.graylog2-web-interface-0.20.0-rc.1.jar:0.20.0-rc.1]
at lib.security.RedirectAuthenticator.getUsername(RedirectAuthenticator.java:43) ~[graylog2-web-interface.graylog2-web-interface-0.20.0-rc.1.jar:0.20.0-rc.1]
at controllers.SessionsController.index(SessionsController.java:58) ~[graylog2-web-interface.graylog2-web-interface-0.20.0-rc.1.jar:0.20.0-rc.1]
at Routes$$anonfun$routes$1$$anonfun$applyOrElse$1$$anonfun$apply$1.apply(routes_routing.scala:585) ~[graylog2-web-interface.graylog2-web-interface-0.20.0-rc.1.jar:na]
at Routes$$anonfun$routes$1$$anonfun$applyOrElse$1$$anonfun$apply$1.apply(routes_routing.scala:585) ~[graylog2-web-interface.graylog2-web-interface-0.20.0-rc.1.jar:na]
The text was updated successfully, but these errors were encountered: