Page 1 of 1

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

Posted: Thu Jun 10, 2021 7:29 pm
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.

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

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

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

Posted: Tue Jun 15, 2021 1:07 am
by databoy2k
Solution to my issue here:
viewtopic.php?f=43&t=30786