Are you sure you have sticky sessions on your load balancer?
I don't understand why it has to be sticky session if it saves the persistent session in the database.
I set web.persistSession=true.
Each instance should fetch it from the database.
I must be blind because I don't see this information in your original post.
On the LoadBalancer the session is not stick because I thought that the user authentication sessions were saved in the database, this is an additional question.
I don't think we tested that scenario. In theory it probably should work, but I don't know if there are any gotchas. So the recommendation is to use sticky sessions.
That's interesting. I am not using a load balancer, just one server per instance (official release) and I get the same error intermittently - most of the time users can log in without any errors but every once in a while I get the same error:HTTP 401 Unauthorized - WebApplicationException (SecurityRequestFilter:132 < ... < OverrideFilter:49 < ...)
Any pointers to what might be going wrong apart from traccar server restart?
Hi, Anton. I'm using traccar-linux-64-6.2 for Linus 64.
I'm facing the same problem, but I'm not using load balance yet (I will). When accessing the web interface, it shows error 401.
HTTP 401 Unauthorized - WebApplicationException (SecurityRequestFilter:132 < ... < OverrideFilter:49 < ...)
I created a machine (EC2 Linux Ubuntu 22) on AWS to test Traccar and did a complete installation (App and Bank), everything worked correctly, with several devices (Web and Api). After a few days I shut down the server. When I restarted the Traccar server, the error appeared.
I created everything from scratch again, successfully tested all functionalities (Web and API). I restarted the Traccar Server machine and the error reappeared again, including via the API.
Can you tell me what would be causing this error and what could I do to fix it?
Thanks for your attention.
Do you have a URL?
Yes, I do.
http://traccarnv.dwith.com.br:8082/
Looks fine to me. Check the endpoint you get that error from.
What can a restart on the EC2 machine where Traccar is located doing to prevent new authentication. Could it be something related to session loss, section persistence, cookies, etc.? I attached the printout of the browser console (Chrome v.125 - 64bits).
What could be causing the 401 error?
Yes, a restart can definitely cause a session loss.
OK, but regarding the 401 error, what could be causing this error reported in this thread?
Why, when trying a new login, Traccar does not accept the credentials of a valid user, correctly registered in the Database tables?
Is there any specific configuration to be done in the configuration files?
Anton, could you please be more specific and detailed?
Not accepting credentials of a valid user is completely different thing from what we're discussing in this thread.
Hi, I'm using traccar 6.1 with horizontal scaling, but unfortunately when I log in I get the following error:
Sometimes I can log in without any errors. I'm using redis as a broadcast.
MySQL version 8 (Google cloud SQL)