(Closed) 1.28.1 Upgrade not updating database

Forum for questions and support relating to the 1.28.x releases only.
McFuzz
Posts: 181
Joined: Tue Aug 28, 2012 7:03 am

Re: (Closed) 1.28.1 Upgrade not updating database

Post by McFuzz »

SON OF A BIZNATCH!

Found it!!!!!!!!!!!

So - you're right, there was a stale file:

/usr/local/share/perl/5.14.2/ZoneMinder/Base.pm


For whatever reason, it was not being updated - I don't know why, but it simply wasn't. For sanity, I will be doing a clean upgrade (revert the VM) - and will report. Stand by!
McFuzz
Posts: 181
Joined: Tue Aug 28, 2012 7:03 am

Re: (Closed) 1.28.1 Upgrade not updating database

Post by McFuzz »

Alright - so I updated, modified Base.pm in 5.14.2 directory, then ran the update script followed by starting up ZM.

Unfortunately - now it complains about this:

Code: Select all

Config mismatch, expected 216 items, read 215. Try running 'zmupdate.pl -f' to reload config.
So I stop the service, ran zmupdate.pl -f; it did it's thang, I restart the service but - it still shows the same error....

Also get this one:

Code: Select all

Memory map file '/dev/shm/zm.mmap.16' does not exist. zmc might not be running.
Any ideas?
McFuzz
Posts: 181
Joined: Tue Aug 28, 2012 7:03 am

Re: (Closed) 1.28.1 Upgrade not updating database

Post by McFuzz »

Final update:

Okay - I think I fixed everything. It appears that the zmupdate script was not adding a row into the Config table; specifically - this row:

Code: Select all

insert into Config set Id = 42, Name = 'ZM_FFMPEG_OPEN_TIMEOUT', Value = '10', Type = 'integer', DefaultValue = '10', Hint = 'integer', Pattern = '(?^:^(\d+)$)', Format = ' $1 ', Prompt = 'Timeout in seconds when opening a stream.', Help = 'When Ffmpeg is opening a stream, it can take a long time before failing; certain circumstances even seem to be able to lock indefinitely. This option allows you to set a maximum time in seconds to pass before closing the stream and trying to reopen it again.', Category = 'images', Readonly = '0', Requires = 'ZM_OPT_FFMPEG=1'

I fixed it by moving everything starting with id 42 down by one:

Code: Select all

update Config set id = id+1 where id > 41 order by id asc;
And then inserting the missing row:

Code: Select all

insert into Config set Id = 42, Name = 'ZM_FFMPEG_OPEN_TIMEOUT', Value = '10', Type = 'integer', DefaultValue = '10', Hint = 'integer', Pattern = '(?^:^(\d+)$)', Format = ' $1 ', Prompt = 'Timeout in seconds when opening a stream.', Help = 'When Ffmpeg is opening a stream, it can take a long time before failing; certain circumstances even seem to be able to lock indefinitely. This option allows you to set a maximum time in seconds to pass before closing the stream and trying to reopen it again.', Category = 'images', Readonly = '0', Requires = 'ZM_OPT_FFMPEG=1';
After that, I started the ZM process and things seems to be chugging along smoothly. If you have experienced similar problems, you can try the above approach but BE AWARE THAT THIS IS RISKY AND CAN HOSE YOUR DATABASE!. If you, like me, are running ZoneMinder on a VM, take a snapshot!

So now the question is - why did it not update my DB and why didnt the refresh config command work?
User avatar
knight-of-ni
Posts: 2404
Joined: Thu Oct 18, 2007 1:55 pm
Location: Shiloh, IL

Re: (Closed) 1.28.1 Upgrade not updating database

Post by knight-of-ni »

Well the short answer to your question to why is because you were in there hacking around.
The config variable you mentioned was not added or modified by 1.28.1 so you would have to dig deeper just to figure out why it was missing from your dB in the first place.

Sounds like you got everything working, but I don't expect others to have quite the same overall experience unless they too have stale files lying around.
Visit my blog for ZoneMinder related projects using the Raspberry Pi, Orange Pi, Odroid, and the ESP8266
All of these can be found at https://zoneminder.blogspot.com/
McFuzz
Posts: 181
Joined: Tue Aug 28, 2012 7:03 am

Re: (Closed) 1.28.1 Upgrade not updating database

Post by McFuzz »

knnniggett wrote:Well the short answer to your question to why is because you were in there hacking around.
The config variable you mentioned was not added or modified by 1.28.1 so you would have to dig deeper just to figure out why it was missing from your dB in the first place.

Sounds like you got everything working, but I don't expect others to have quite the same overall experience unless they too have stale files lying around.
Yeah - quite odd... I have a feeling it may have to do with a recent complete perl upgrade I did. Oh well; lesson learned!
Locked