1.30.2 upgrade breaks API access
Re: 1.30.2 upgrade breaks API access
Any ideas, anyone?
Re: 1.30.2 upgrade breaks API access
same issue!
i'll wait a solution for ubuntu server 14.04(.5)
i'll wait a solution for ubuntu server 14.04(.5)
Re: 1.30.2 upgrade breaks API access
I too experienced this after upgrading on Ubuntu Server 14.04. I recreated the missing folders based on the apache error log and it worked... Then I decided to search for /tmp/zm on google to see if maybe this was an issue, and I stumbled upon this thread. I'm afraid it will get blown away during the next reboot though; doesn't /tmp get removed regularly?
Re: 1.30.2 upgrade breaks API access
I set up my test server with Ubuntu 14.04-5. Started with ZM 1.26.5 and upgrades to 1.30.2. No API. Started over and installed 1.30.2 on a fresh 14.04-5. Still no API. Tried some tricks I had done earlier with no luck.
Will work on it as time permits but this is a busy week for me. Trout season is in and it is warm enough for bike rides. And the family wants to celebrate an annual event with me.
Stay tuned...
Will work on it as time permits but this is a busy week for me. Trout season is in and it is warm enough for bike rides. And the family wants to celebrate an annual event with me.
Stay tuned...
- knight-of-ni
- Posts: 2404
- Joined: Thu Oct 18, 2007 1:55 pm
- Location: Shiloh, IL
Re: 1.30.2 upgrade breaks API access
The solution to this is to simply create the folders which cakephp complains are missing. Check your webserver logs.
Turning off cake debug mode (which was done to prevent giving away sensitive information to an attacker) also prevents Cake from creating its own tmp folders. Our friends with the Cake project consider this to be a feature.
To get this fixed permanently, contact your package maintainer. He has to make the necessary changes in the package to create the missing folders during package installation. Older distros that don't use systemd, i.e. Ubuntu 14.04, can't use the instructions I posted earlier.
Turning off cake debug mode (which was done to prevent giving away sensitive information to an attacker) also prevents Cake from creating its own tmp folders. Our friends with the Cake project consider this to be a feature.
To get this fixed permanently, contact your package maintainer. He has to make the necessary changes in the package to create the missing folders during package installation. Older distros that don't use systemd, i.e. Ubuntu 14.04, can't use the instructions I posted earlier.
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/
All of these can be found at https://zoneminder.blogspot.com/
Re: 1.30.2 upgrade breaks API access
Since the folders do not survive a reboot with 14.04, I created a simple bash script that runs on reboot:
Basically the script waits about 20 seconds - enough time for zoneminder to create the zm folder within tmp, then created the missing folders, assigns proper ownership and voila - works like a charm.
Code: Select all
#!/bin/bash
sleep 20
mkdir /tmp/zm/cache
mkdir /tmp/zm/cache/models
mkdir /tmp/zm/cache/persistent
chown -R www-data:www-data /tmp/zm/cache
Re: 1.30.2 upgrade breaks API access
One better:
In the WIKI instructions for 14.04 I have "sleep 15 added to /etc/init.d/zoneminder
Now add:
mkdir /tmp/zm/cache
mkdir /tmp/zm/cache/models
mkdir /tmp/zm/cache/persistent
after mkdir -p "$TMPDIR" && chown www-data:www-data "$TMPDIR"
nano /etc/init.d/zoneminder
start() {
sleep 15
echo -n "Starting $prog: "
# Wait for mysqld to start. Continue if it takes too long.
count=0
while [ ! -e /var/run/mysqld/mysqld.sock ] && [ $count -lt 60 ]
do
sleep 1
count=$((count+1))
done
export TZ=:/etc/localtime
mkdir -p "$RUNDIR" && chown www-data:www-data "$RUNDIR"
mkdir -p "$TMPDIR" && chown www-data:www-data "$TMPDIR"
mkdir /tmp/zm/cache
mkdir /tmp/zm/cache/models
mkdir /tmp/zm/cache/persistent
chown -R www-data:www-data /tmp/zm/cache
$command start
Ctrl+o Enter to save
CTRL+x to exit
Link to 14.04 WIKI: https://wiki.zoneminder.com/Ubuntu_Serv ... e_easy_way
In the WIKI instructions for 14.04 I have "sleep 15 added to /etc/init.d/zoneminder
Now add:
mkdir /tmp/zm/cache
mkdir /tmp/zm/cache/models
mkdir /tmp/zm/cache/persistent
after mkdir -p "$TMPDIR" && chown www-data:www-data "$TMPDIR"
nano /etc/init.d/zoneminder
start() {
sleep 15
echo -n "Starting $prog: "
# Wait for mysqld to start. Continue if it takes too long.
count=0
while [ ! -e /var/run/mysqld/mysqld.sock ] && [ $count -lt 60 ]
do
sleep 1
count=$((count+1))
done
export TZ=:/etc/localtime
mkdir -p "$RUNDIR" && chown www-data:www-data "$RUNDIR"
mkdir -p "$TMPDIR" && chown www-data:www-data "$TMPDIR"
mkdir /tmp/zm/cache
mkdir /tmp/zm/cache/models
mkdir /tmp/zm/cache/persistent
chown -R www-data:www-data /tmp/zm/cache
$command start
Ctrl+o Enter to save
CTRL+x to exit
Link to 14.04 WIKI: https://wiki.zoneminder.com/Ubuntu_Serv ... e_easy_way
Re: 1.30.2 upgrade breaks API access
Same problem here with API
after upgrade ZM to 1.30.2
ls -lh /usr/lib/tmpfiles.d
total 20K
-rw-r--r-- 1 root root 32 Feb 15 17:29 bind9.conf
-rw-r--r-- 1 root root 30 Mar 28 17:40 samba.conf
-rw-r--r-- 1 root root 31 May 2 2014 sshd.conf
-rw-r--r-- 1 root root 30 Apr 18 2013 xconsole.conf
-rw-r--r-- 1 root root 74 Mar 31 16:41 zoneminder.conf
cat /usr/lib/tmpfiles.d/zoneminder.conf
d /var/run/zm 0755 www-data www-data
d /tmp/zm 0755 www-data www-data
after upgrade ZM to 1.30.2
ls -lh /usr/lib/tmpfiles.d
total 20K
-rw-r--r-- 1 root root 32 Feb 15 17:29 bind9.conf
-rw-r--r-- 1 root root 30 Mar 28 17:40 samba.conf
-rw-r--r-- 1 root root 31 May 2 2014 sshd.conf
-rw-r--r-- 1 root root 30 Apr 18 2013 xconsole.conf
-rw-r--r-- 1 root root 74 Mar 31 16:41 zoneminder.conf
cat /usr/lib/tmpfiles.d/zoneminder.conf
d /var/run/zm 0755 www-data www-data
d /tmp/zm 0755 www-data www-data
Re: 1.30.2 upgrade breaks API access
@bbunge
did you restart the server after the changes ? i did the changes, and stil the same problem with the "ZMninja" app.
i have restarted ZM and Apache services.
did you restart the server after the changes ? i did the changes, and stil the same problem with the "ZMninja" app.
i have restarted ZM and Apache services.
bbunge wrote:One better:
In the WIKI instructions for 14.04 I have "sleep 15 added to /etc/init.d/zoneminder
Now add:
mkdir /tmp/zm/cache
mkdir /tmp/zm/cache/models
mkdir /tmp/zm/cache/persistent
after mkdir -p "$TMPDIR" && chown www-data:www-data "$TMPDIR"
nano /etc/init.d/zoneminder
start() {
sleep 15
echo -n "Starting $prog: "
# Wait for mysqld to start. Continue if it takes too long.
count=0
while [ ! -e /var/run/mysqld/mysqld.sock ] && [ $count -lt 60 ]
do
sleep 1
count=$((count+1))
done
export TZ=:/etc/localtime
mkdir -p "$RUNDIR" && chown www-data:www-data "$RUNDIR"
mkdir -p "$TMPDIR" && chown www-data:www-data "$TMPDIR"
mkdir /tmp/zm/cache
mkdir /tmp/zm/cache/models
mkdir /tmp/zm/cache/persistent
chown -R www-data:www-data /tmp/zm/cache
$command start
Ctrl+o Enter to save
CTRL+x to exit
Link to 14.04 WIKI: https://wiki.zoneminder.com/Ubuntu_Serv ... e_easy_way
Re: 1.30.2 upgrade breaks API access
[quote="Andre-nl"]@bbunge
did you restart the server after the changes ? i did the changes, and stil the same problem with the "ZMninja" app.
i have restarted ZM and Apache services.
Did you reboot the server? Or stop then start, not restart, Zoneminder.
I just did a full install of ZM 1.30.2 on a fresh Ubuntu 14.04-5 following the WIKI instructions, added a camera, rebooted and tested with ZMNinja successfully.
Also added the fix to the WIKI upgrade area.
did you restart the server after the changes ? i did the changes, and stil the same problem with the "ZMninja" app.
i have restarted ZM and Apache services.
Did you reboot the server? Or stop then start, not restart, Zoneminder.
I just did a full install of ZM 1.30.2 on a fresh Ubuntu 14.04-5 following the WIKI instructions, added a camera, rebooted and tested with ZMNinja successfully.
Also added the fix to the WIKI upgrade area.
Re: 1.30.2 upgrade breaks API access
Hi bbunge,bbunge wrote:Andre-nl wrote:@bbunge
did you restart the server after the changes ? i did the changes, and stil the same problem with the "ZMninja" app.
i have restarted ZM and Apache services.
Did you reboot the server? Or stop then start, not restart, Zoneminder.
I just did a full install of ZM 1.30.2 on a fresh Ubuntu 14.04-5 following the WIKI instructions, added a camera, rebooted and tested with ZMNinja successfully.
Also added the fix to the WIKI upgrade area.
i have add the extra lines, and restarted the server. it works like a charme ... ZMninja app is running fine now.
Thank you
Re: 1.30.2 upgrade breaks API access
Hi all,
I had the above problem. I would get a blank page back when trying to access the api page. I did the fix above (systemd-tmpfiles --create zoneminder.conf) and now I get a red bar that states :
Error: The requested address '/zm/api/' was not found on this server.
Thanks,
Bob
I had the above problem. I would get a blank page back when trying to access the api page. I did the fix above (systemd-tmpfiles --create zoneminder.conf) and now I get a red bar that states :
Error: The requested address '/zm/api/' was not found on this server.
Thanks,
Bob
Re: 1.30.2 upgrade breaks API access
Assume you have Ubuntu but which version.rkaule wrote:Hi all,
I had the above problem. I would get a blank page back when trying to access the api page. I did the fix above (systemd-tmpfiles --create zoneminder.conf) and now I get a red bar that states :
Error: The requested address '/zm/api/' was not found on this server.
Thanks,
Bob
Re: 1.30.2 upgrade breaks API access
No, I'm running Centos 7.
Re: 1.30.2 upgrade breaks API access
I'm running 14.04.5 & have the same issue.bbunge wrote:Assume you have Ubuntu but which version.rkaule wrote:Hi all,
I had the above problem. I would get a blank page back when trying to access the api page. I did the fix above (systemd-tmpfiles --create zoneminder.conf) and now I get a red bar that states :
Error: The requested address '/zm/api/' was not found on this server.
Thanks,
Bob
The fix above fixed my issue but have the /zm/api error. It's working so its fixed but not errorless.