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: 27
Joined: Thu Nov 16, 2017 5:20 pm

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

Post by databoy2k » Thu Jun 10, 2021 7:29 pm

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: 37
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 » Sat Jun 12, 2021 9:22 am

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?
zm 1.34.25 - Debian 10

Post Reply

Who is online

Users browsing this forum: No registered users and 2 guests