Page 1 of 3

1.36.32 random logout and stream scaling issues

Posted: Sat Jan 21, 2023 8:43 am
by maddios
I've upgraded my ZM from 1.36.10 to 1.36.32 and I'm having a couple issues.

First and most annoying is the random log outs, sometimes it'll stay logged in for a few hours and other times it keeps logging me out every few minutes or even every request. Any idea where I'd look to debug this?

Second, it seems like streams are no longer resized to match scale, they're always streamed at full original resolution which in my case means my tablet which was streaming 6 cameras at like 320p is now getting full 4k streams pushed to it. Again, what should I look at for debugging this?

Let me know if these are known issues and if they should be fixed in next release or if you need additional info to help you track them down.

Thanks

Re: 1.36.32 random logout and stream scaling issues

Posted: Sat Jan 21, 2023 11:26 am
by Magic919
The logging out problem is usually having different timezone settings. So the web and the DB differ, for example.

Re: 1.36.32 random logout and stream scaling issues

Posted: Sat Jan 21, 2023 11:17 pm
by maddios
Which timezone setting would this be?
  • I've checked zoneminder's System TIMEZONE variable and that shows -5
  • My mysql instance is in EST (shows -5 if i do "select timediff(now(),convert_tz(now(),@@session.time_zone,'+00:00'));" (-05:00:00), and select now() shows my current/corrent time.
  • The underlying ubuntu instance that zoneminder is running in is also showing EST
  • Php's default timezone is also America/New_York.
Let me know if I'm missing something somewhere.

PS: I didn't have these random logout issues before the upgrade from 1.36.10 so it's possible/likely something didn't get upgraded/updated correctly.

Thanks.

Re: 1.36.32 random logout and stream scaling issues

Posted: Sun Jan 22, 2023 7:40 am
by Magic919
Check your logs for the error. If you missed part of the upgrade it’ll show up.

Re: 1.36.32 random logout and stream scaling issues

Posted: Sun Jan 22, 2023 9:12 am
by maddios
Which log would contain an error pertaining to this? Also do I need to be in debug or would error show in warn level?

All I'm seeing are a bunch of errors telling me I've been logged out when the page auto-refreshes after i've been logged out.

stuff like this: 01/22/23 04:11:27.209039 zms_m2[12798].ERR-zms.cpp/219 [Unable to authenticate user from https://[host]/index.php]

Nothing else is coming up

Re: 1.36.32 random logout and stream scaling issues

Posted: Sun Jan 22, 2023 9:42 am
by maddios
The interesting bit is sometimes the logs will get a bunch of those errors telling me I'm not authenticated and the thumbnail images disappear but I'm able to refresh the page sometimes it doesn't take me to the login page, i'm actually still logged in and the page shows up fine.

Re: 1.36.32 random logout and stream scaling issues

Posted: Sun Jan 22, 2023 1:28 pm
by Magic919
I’d start with Apache logs. Might be worth clearing browser cache too.

Re: 1.36.32 random logout and stream scaling issues

Posted: Sun Jan 22, 2023 9:08 pm
by maddios
yeah, I've checked both of those already, nothing in apache error logs at all, and i've tried clearing my cache/cookies (even tried it in incognito just in case)

Re: 1.36.32 random logout and stream scaling issues

Posted: Mon Jan 23, 2023 7:33 am
by Magic919
Ok. Can’t really suggest anything.

Re: 1.36.32 random logout and stream scaling issues

Posted: Mon Jan 23, 2023 8:52 am
by maddios
The problem is definitely very strange, it seems to sporadically fail auth then next time the page refreshes the home camera thumbnails on its own it's authenticated and they show up, other times it goes to the login page.

Re: 1.36.32 random logout and stream scaling issues

Posted: Mon Jan 23, 2023 1:24 pm
by Magic919
It's pretty dead on here. Might be worth trying Discord for some support/fresh ideas.

Re: 1.36.32 random logout and stream scaling issues

Posted: Mon Jan 23, 2023 10:21 pm
by iconnor
What's happening here is that the auth hash is expriing, but your php session is still valid. Normally when this breaks it is due to a difference between the system time and php time, because the c++ code in zms uses system timezone but the auth-Hash is generated by php. It has a life of 2 hours by default.

You could try increasing Options->System->AUTH_HASH_TTL

Re: 1.36.32 random logout and stream scaling issues

Posted: Mon Jan 23, 2023 11:37 pm
by maddios
Thanks for the reply iconnor, I tried setting that TTL to like 84000 already, it's made no difference.

I've checked all timezones and they're the same, but either way the expiration is long enough that it shouldn't matter.

Re: 1.36.32 random logout and stream scaling issues

Posted: Tue Jan 24, 2023 10:32 pm
by maddios
just doublechecked again, all my timezones are set the same in php cli/apache2 and ubuntu:

maddios@zoneminder_server:~$ cat /etc/timezone
America/New_York

phpinfo output:

date
date/time support enabled
timelib version 2017.09
"Olson" Timezone Database Version 0.system
Timezone Database internal
Default timezone America/New_York

date.timezone America/New_York America/New_York



Is there some other timezone setting that I'm missing?

Re: 1.36.32 random logout and stream scaling issues

Posted: Wed Jan 25, 2023 1:14 am
by dougmccrary
I suppose it is, but did you set Options->System->TIMEZONE?