traccar-web icon indicating copy to clipboard operation
traccar-web copied to clipboard

RESTful API / login not returning "Set-Cookie: JSESSIONID=xxxxxx"

Open jolypas opened this issue 8 years ago • 7 comments

Hello

I have two instances of web-traccar (one stable, one for test) which are in fact clone of Virtual VM servers.

I'm using rest API/login from another process without issue on one server. on the second one , depiste returned code is "HTTP/1.1 200 OK", the line < Set-Cookie: JSESSIONID=xxxxxxxxxxxxxxxxxxxxxxx;Path=/ is missing so I cannot use the other services.

all other data returned are OK.

Any idea of the root cause for that ? (both of them are https and the SSL certificates are OK)

Thanks

jolypas avatar Aug 09 '17 12:08 jolypas

Maybe your reverse proxy hides the set-cookie header? Have you tried accessing traccar web server directly (i.e. through 8082 port)?

vitalidze avatar Aug 09 '17 19:08 vitalidze

Hello

I have no reverse proxy installed. I have the same result with http and 8082 (no cookies in header)

Regards

Le 9 août 2017 21:24, à 21:24, Vitaly Litvak [email protected] a écrit:

Maybe your reverse proxy hides the set-cookie header? Have you tried accessing traccar web server directly (i.e. through 8082 port)?

-- You are receiving this because you authored the thread. Reply to this email directly or view it on GitHub: https://github.com/vitalidze/traccar-web/issues/1164#issuecomment-321356526

jolypas avatar Aug 10 '17 07:08 jolypas

Okay, does it work in web-browser? Can you log in to your web UI?

vitalidze avatar Aug 10 '17 08:08 vitalidze

yes the desktop HMI (web browser) works very fine in both https and http with port 8082

2017-08-10 10:32 GMT+02:00 Vitaly Litvak [email protected]:

Okay, does it work in web-browser? Can you log in to your web UI?

— You are receiving this because you authored the thread. Reply to this email directly, view it on GitHub https://github.com/vitalidze/traccar-web/issues/1164#issuecomment-321487564, or mute the thread https://github.com/notifications/unsubscribe-auth/ANmQWlXFln8sn7PSDPmL806iXfvEW9xoks5sWsAegaJpZM4OyB2w .

jolypas avatar Aug 10 '17 13:08 jolypas

The thing is that web browser is using exactly same cookie. I guess there is some problem in your application, which consumes the API.

vitalidze avatar Aug 10 '17 13:08 vitalidze

the problem is seen also using CURL , so I don't thing about the application (the same application is using the other server without issue)

2017-08-10 15:25 GMT+02:00 Vitaly Litvak [email protected]:

The thing is that web browser is using exactly same cookie. I guess there is some problem in your application, which consumes the API.

— You are receiving this because you authored the thread. Reply to this email directly, view it on GitHub https://github.com/vitalidze/traccar-web/issues/1164#issuecomment-321550149, or mute the thread https://github.com/notifications/unsubscribe-auth/ANmQWsAEeYO22aUi6Rc9Bj9UsEBdqWjFks5sWwTngaJpZM4OyB2w .

jolypas avatar Aug 10 '17 13:08 jolypas

Maybe there is some cache in your cURL, which uses cookies. If you can access it from web browser, then this problem is not with web server. You can check headers in web browser in Developer Tools.

vitalidze avatar Aug 10 '17 13:08 vitalidze