zmNinja "Invalid API/API access failed." (ZM API issue)

Forum for questions and support relating to the 1.30.x releases only.
Locked
foxtrot1014
Posts: 23
Joined: Sun Sep 10, 2017 8:12 pm

zmNinja "Invalid API/API access failed." (ZM API issue)

Post by foxtrot1014 »

(Subject edited by Asker - to highlight API misconfiguration issue)

I am running zm v 1.30.4 on Ubuntu server 17.10. The console works perfectly on my web browser, and in the options API is enabled.

When I downloaded and went to use zmNinja, authentication is successful, but I get the screen saying "Invalid API, API access failed. Please make sure your APIs are configured correctly. Tap on the button below to read the instructions."

The button below takes you to these instructions which tell you how to validate if APIs are working (which is strange, because obviously API isn't... I need some instructions on how to fix it, not instructions telling me how to confirm it's not working). Anyway, after following as per the instructions, I logged into the zm console, then opened a new tab and navigated to getVersion.json with my browser (step 4). My browser displayed HTTP error 500, server unable to handle request. I tried getting the log from zmNinja, but I can't copy/paste it and emailing it doesn't work properly.

Anyone have a fix or can you point me in the right direction to start figuring out what's wrong?

Thanks!
User avatar
asker
Posts: 1553
Joined: Sun Mar 01, 2015 12:12 pm

Re: zmNinja "Invalid API/API access failed."

Post by asker »

I need some instructions on how to fix it, not instructions telling me how to confirm it's not working)
I am assuming you are the same person who emailed me today (I am pliablepixels). The challenge with telling you how to fix it is you haven't mentioned how you installed/upgraded ZM. The ZM devs have put in a lot of effort to make sure if you use packages, without your own modifications/build from source, then the APIs should just work automatically.

That being said, there are open threads at the moment on API problems on Debian due to packaging and some changes in Ubuntu 17. See https://wiki.zoneminder.com/Helpful_use ... _resources and follow links to the platform you are using and also describe what (if any) changes/deviations you might have taken.

A good way to provide more information is explained here viewtopic.php?f=37&t=26330

PS: This is a ZoneMinder question - Im going to move it to the ZM forum simply because many ZM folks don't monitor the mobile app forum
I no longer work on zmNinja, zmeventnotification, pyzm or mlapi. I may respond on occasion based on my available time/interest.

Please read before posting:
How to set up logging properly
How to troubleshoot and report - ES
How to troubleshoot and report - zmNinja
ES docs
zmNinja docs
bbunge
Posts: 2934
Joined: Mon Mar 26, 2012 11:40 am
Location: Pennsylvania

Re: zmNinja "Invalid API/API access failed." (ZM API issue)

Post by bbunge »

There are issues with Ubuntu 17.10 and the version of ZM 1.30.4 that is packaged with it. You can get the console to work but the API's don't.

I have put effort into a work around that is published in the WIKI as well as several posts in the 1.30.x forum area.

Link to install procedure: https://wiki.zoneminder.com/Ubuntu_Serv ... e_easy_way

You asked for a fix... start over with a fresh install of Ubuntu.

I am currently running Ubuntu 17.10 with LEMP and Zoneminder 1.30.4 on my test machine. The API works and I have been able to upgrade 17.10 as new packages pop up with Zoneminder "held back."

I do not recommend this for a production camera system as it is unlikely that Zoneminder will upgrade successfully when the next LTS release comes out. Ubuntu 16.04 is still your best bet for the long run.

bb
mcouture
Posts: 32
Joined: Sun Jan 20, 2008 2:15 pm
Location: US/Maine

Re: zmNinja "Invalid API/API access failed." (ZM API issue)

Post by mcouture »

I just updated my Ubuntu to 17.10 and ZM to 1.30.4 and the APIs don't work. Has there been any progress getting the API situation to work in this scenario?
Locked