Forced logout by a strange "Token missing or bad..." error

I tried to deploy Greenbone on a new server and everything went well, but kept flashing back when I logged in, which didn’t happen on the other servers.

It looks like the login was successful and the token was returned. Sometimes I can go to the home page for a split second, but usually success is followed by the token being deactivated.Like this:

Any help would be appreciated!

Hi @Feeler and welcome to the forum :slight_smile:

If you are a customer with the Professional Edition you can go ahead and open a support ticket here: Service Management Thanks!

The received handshake message out of context is a hint for a wrong TLS setup. Most likely you are trying to connect to the wrong port. Either with https on the http or with http on the https port.

And Token missing or bad. Please login again. is an indicator for a wrong setup. Could it be that you are using a HTTP(S) Proxy?

3 Likes

Thank you very much for your advice!
I have tried both http and https, but the problem has not been solved. GVM itself does not enable the proxy, and I have also checked other proxies of Nginx, but I still cannot find the source of the problem. Is there any other possibility?

Another problem is that I can see the home page after login, but only for a moment back to the login page, it looks like the login was successful but there is no way to save the login state. On the other hand, my GVM on the other server is running properly, but the exact same deployment mode on the new server is not working.
Thank you again !

The received handshake message out of context and Token missing or bad. Please login again. are completely unrelated. They have nothing in common. Again received handshake message out of context is an log message created when using the wrong port.

Token missing or bad. Please login again means your session token is not included in the requests. See for example https://github.com/greenbone/gsa/issues/2973 for more details.

2 Likes

What surprises me is that everything works fine when I use it directly on the Intranet, but when I use VPN on the Internet, I get 'Token missing or bad… ’ , and when I don’t use the VPN, I can’t access GVM (but I can access the rest of the server).

I will try to see if ‘x-real-ip’ can solve this problem.

Thank you again for your patient reply !

If this can be seen only on VPN connections then a too large MTU on client side for the VPN connection could play a role.