Page 1 of 1

ZoneMinder won't automatically start on boot

Posted: Mon Dec 19, 2016 12:23 am
by gbeddow
Hi,

I was able to install and manually start ZoneMinder 1.29 on Debian 8 following
https://media.readthedocs.org/pdf/zonem ... minder.pdf

However I'm unable to get it to start automatically on boot. For reasons I won't get into, Apache is running as admin, not www-data, so I've adjusted ZoneMinder's configuration and set permissions on a few files appropriately to get it to run.

Here's a typical log during boot startup:

Code: Select all

2016-12-18 14:17:11.638670     zmpkg          3742     ERR     Unable to run "/usr/bin/zmdc.pl startup", output is "Starting server"     zmpkg.pl     
2016-12-18 14:17:11.599610     zmdc          3970     FAT     Can't connect: No such file or directory     zmdc.pl     
2016-12-18 14:17:05.010480     zmdc          3992     FAT     Can't bind: Permission denied     zmdc.pl     
2016-12-18 14:17:01.440610     zmdc          3992     INF     Server starting at 16/12/18 14:17:01     zmdc.pl     
2016-12-18 14:16:56.358400     zmpkg          3742     INF     Command: start     zmpkg.pl     
2016-12-18 14:16:56.148500     zmpkg          3742     INF     Sanity checking States table...     zmpkg.pl
One possible clue is the user/group on the /run/zm directory is NOT set to admin/admin, like it normally is when ZoneMinder is running correctly:

Code: Select all

# ls -al /run
...
drwxr-xr-x  2 www-data         www-data           40 Dec 18 14:16 zm
But I don't see any obvious way to control the way /run/zm gets created during boot.

Any idea why ZoneMinder isn't automatically starting on boot and how to fix?

Thanks,
Greg

Re: ZoneMinder won't automatically start on boot

Posted: Mon Dec 19, 2016 12:48 pm
by bbunge

Re: ZoneMinder won't automatically start on boot

Posted: Mon Dec 19, 2016 2:34 pm
by gbeddow
Thanks. I followed those instructions, and in fact that's how ZoneMinder is attempting to start on boot, but it's failing. I take it the log info above wasn't sufficient to determine the cause. Is there any other log info that might provide further insight, or other ideas on where to look?

Re: ZoneMinder won't automatically start on boot

Posted: Mon Dec 19, 2016 10:11 pm
by gbeddow
After a LOT of dead-ends, out of desperation I tried:

Code: Select all

# crontab -e
@reboot rmdir /run/zm && service zoneminder start

# reboot
And ZoneMinder is finally starting up on boot.