No API Access after upgrade from 1.34 to 1.36 - Database Issue?

Discussions related to the 1.36.x series of ZoneMinder
Post Reply
databoy2k
Posts: 28
Joined: Thu Nov 16, 2017 5:20 pm

No API Access after upgrade from 1.34 to 1.36 - Database Issue?

Post by databoy2k »

Did an upgrade from 1.34.X to 1.36.4, running Ubuntu. I can't access the API. curl [ip]/zm/api/monitors.json returns this:

Code: Select all

{"success":false,"data":{"name":"An Internal Error Has Occurred.","message":"An Internal Error Has Occurred.","url":"\/zm\/api\/monitors.json?p=%2Fmonitors.json","exception":{"class":"MissingTableException","code":500,"message":"Table Event_Summaries for model Event_Summary was not found in datasource default."}}}
This seems to be a database issue, no? How do I recreate the table Event_Summaries?

sudo zmupdate.pl -f has no effect.

Thanks.
fontiano
Posts: 69
Joined: Wed Dec 25, 2019 10:29 am

Re: No API Access after upgrade from 1.34 to 1.36 - Database Issue?

Post by fontiano »

I had same problem with my production system. My db was 1 gb. After a roll back I tried to repeat same steps on test system with empty DB.

I installed 1.34.25 and made a snapshot. Then I updated to 1.36.3 and API worked.

SO I reverted snapshot to 1.34.25 with empty DB, imported a db dump of my production system and did the update to 1.36.3.

API worked without issues. The only difference between test system and production system is that on production system I had 1 terabyte of events saved on disk.

maybe the problem occurs when there are many events on disk and we have to wait for the database to update correctly after the update? Or when there are many events, updating the DB may have some problems?

Referring to the developer's post:
"Notes on upgrade from iconnor:
The database upgrade can take a long time if you have a lot of events, or log entries because there are table structure changes. "

Maybe once the update is finished we have to wait further time to finish the changes on the db?
Production: zm 1.34.26 - Debian 11 | Test: zm 1.36.33 - Debian 12
databoy2k
Posts: 28
Joined: Thu Nov 16, 2017 5:20 pm

Re: No API Access after upgrade from 1.34 to 1.36 - Database Issue?

Post by databoy2k »

Solution to my issue here:
viewtopic.php?f=43&t=30786
Post Reply