1.36.32 random logout and stream scaling issues

Discussions related to the 1.36.x series of ZoneMinder
maddios
Posts: 30
Joined: Wed Oct 27, 2021 7:18 am

1.36.32 random logout and stream scaling issues

Post 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
Magic919
Posts: 1381
Joined: Wed Sep 18, 2013 6:56 am

Re: 1.36.32 random logout and stream scaling issues

Post by Magic919 »

The logging out problem is usually having different timezone settings. So the web and the DB differ, for example.
-
maddios
Posts: 30
Joined: Wed Oct 27, 2021 7:18 am

Re: 1.36.32 random logout and stream scaling issues

Post 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.
Magic919
Posts: 1381
Joined: Wed Sep 18, 2013 6:56 am

Re: 1.36.32 random logout and stream scaling issues

Post by Magic919 »

Check your logs for the error. If you missed part of the upgrade it’ll show up.
-
maddios
Posts: 30
Joined: Wed Oct 27, 2021 7:18 am

Re: 1.36.32 random logout and stream scaling issues

Post 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
maddios
Posts: 30
Joined: Wed Oct 27, 2021 7:18 am

Re: 1.36.32 random logout and stream scaling issues

Post 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.
Magic919
Posts: 1381
Joined: Wed Sep 18, 2013 6:56 am

Re: 1.36.32 random logout and stream scaling issues

Post by Magic919 »

I’d start with Apache logs. Might be worth clearing browser cache too.
-
maddios
Posts: 30
Joined: Wed Oct 27, 2021 7:18 am

Re: 1.36.32 random logout and stream scaling issues

Post 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)
Magic919
Posts: 1381
Joined: Wed Sep 18, 2013 6:56 am

Re: 1.36.32 random logout and stream scaling issues

Post by Magic919 »

Ok. Can’t really suggest anything.
-
maddios
Posts: 30
Joined: Wed Oct 27, 2021 7:18 am

Re: 1.36.32 random logout and stream scaling issues

Post 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.
Magic919
Posts: 1381
Joined: Wed Sep 18, 2013 6:56 am

Re: 1.36.32 random logout and stream scaling issues

Post by Magic919 »

It's pretty dead on here. Might be worth trying Discord for some support/fresh ideas.
-
User avatar
iconnor
Posts: 2880
Joined: Fri Oct 29, 2010 1:43 am
Location: Toronto
Contact:

Re: 1.36.32 random logout and stream scaling issues

Post 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
maddios
Posts: 30
Joined: Wed Oct 27, 2021 7:18 am

Re: 1.36.32 random logout and stream scaling issues

Post 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.
maddios
Posts: 30
Joined: Wed Oct 27, 2021 7:18 am

Re: 1.36.32 random logout and stream scaling issues

Post 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?
dougmccrary
Posts: 1172
Joined: Sat Aug 31, 2019 7:35 am
Location: San Diego

Re: 1.36.32 random logout and stream scaling issues

Post by dougmccrary »

I suppose it is, but did you set Options->System->TIMEZONE?
Post Reply