{"id":97,"date":"2016-10-19T23:43:32","date_gmt":"2016-10-19T16:43:32","guid":{"rendered":"http:\/\/prosindo.com\/blog\/?p=97"},"modified":"2016-10-19T23:43:32","modified_gmt":"2016-10-19T16:43:32","slug":"fix-zoneminder-failed-to-start-automatically-on-boot","status":"publish","type":"post","link":"https:\/\/prosindo.com\/blog\/2016\/10\/19\/fix-zoneminder-failed-to-start-automatically-on-boot\/","title":{"rendered":"Fix Zoneminder Failed to Start Automatically on Boot"},"content":{"rendered":"<p>See log file to see the problem:<\/p>\n<p><code>cat \/var\/log\/syslog | tr -d '\\0' | grep \"Failed to start\" -A 10 -B 10<\/code><\/p>\n<p>If you see this line below, then we may have solution:<\/p>\n<p><code>Can't connect to local MySQL server through socket<\/code><\/p>\n<p>Ubuntu 16.04.01 LTS is using systemd<br \/>\nUse this command to see your ubuntu version:<\/p>\n<p><code>lsb_release -a<\/code><\/p>\n<p>Zoneminder service described in this file:<\/p>\n<p><code>\/etc\/systemd\/system\/multi-user.target.wants\/zoneminder.service<\/code><\/p>\n<p>By default it is remarked:<\/p>\n<p><code>#Requires=mysql.service<\/code><\/p>\n<p>Remove the remark so it waits mysql before starts:<\/p>\n<p><code>Requires=mysql.service<\/code><\/p>\n<p>For Ubuntu 14.04 add sleep command in <code>\/etc\/init.d\/zoneminder<\/code> after <code>start()<\/code> line, so it looks like below:<\/p>\n<p><code>start() {<\/code><br \/>\n<code> sleep 15 #wait for mysql<\/code><br \/>\n<code> echo -n \"Starting $prog: \"<\/code><\/p>\n<p>Source:<br \/>\n&#8211; https:\/\/forums.zoneminder.com\/viewtopic.php?t=23630<br \/>\n&#8211; https:\/\/wiki.zoneminder.com\/Ubuntu_Server_14.04_64-bit_with_Zoneminder_1.28.0_the_easy_way<\/p>\n","protected":false},"excerpt":{"rendered":"<p>See log file to see the problem: cat \/var\/log\/syslog | tr -d &#8216;\\0&#8217; | grep &#8220;Failed to start&#8221; -A 10 -B 10 If you see this line below, then we may have solution: Can&#8217;t connect to local MySQL server through socket Ubuntu 16.04.01 LTS is using systemd Use this command to see your ubuntu version: &hellip; <a href=\"https:\/\/prosindo.com\/blog\/2016\/10\/19\/fix-zoneminder-failed-to-start-automatically-on-boot\/\" class=\"more-link\">Continue reading<span class=\"screen-reader-text\"> &#8220;Fix Zoneminder Failed to Start Automatically on Boot&#8221;<\/span><\/a><\/p>\n","protected":false},"author":1,"featured_media":0,"comment_status":"open","ping_status":"open","sticky":false,"template":"","format":"standard","meta":{"footnotes":""},"categories":[1],"tags":[4,17,36],"class_list":["post-97","post","type-post","status-publish","format-standard","hentry","category-uncategorized","tag-autostart","tag-mysql-problem","tag-zoneminder"],"_links":{"self":[{"href":"https:\/\/prosindo.com\/blog\/wp-json\/wp\/v2\/posts\/97","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/prosindo.com\/blog\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/prosindo.com\/blog\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/prosindo.com\/blog\/wp-json\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"https:\/\/prosindo.com\/blog\/wp-json\/wp\/v2\/comments?post=97"}],"version-history":[{"count":0,"href":"https:\/\/prosindo.com\/blog\/wp-json\/wp\/v2\/posts\/97\/revisions"}],"wp:attachment":[{"href":"https:\/\/prosindo.com\/blog\/wp-json\/wp\/v2\/media?parent=97"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/prosindo.com\/blog\/wp-json\/wp\/v2\/categories?post=97"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/prosindo.com\/blog\/wp-json\/wp\/v2\/tags?post=97"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}