motion not starting as a daemon in 16.04

The name of the pictureThe name of the pictureThe name of the pictureClash Royale CLAN TAG#URR8PPP








up vote
0
down vote

favorite












I have motion installed and starts OK manually,
It is enabled in /etc/default/motion.
But on a reboot its not starting



if I do root@odroid64:/# systemctl start motion:



root@odroid64:/# systemctl status motion
● motion.service - LSB: Start Motion detection
Loaded: loaded (/etc/init.d/motion; bad; vendor preset: enabled)
Active: active (exited) since Thu 2016-02-11 16:28:03 GMT; 2 years 2 months ago
Docs: man:systemd-sysv-generator(8)
Process: 565 ExecStart=/etc/init.d/motion start (code=exited, status=0/SUCCESS)
Apr 23 13:56:36 odroid64 systemd[1]: Started LSB: Start Motion detection.




root@odroid64:/# ps ax | grep motion

3489 pts/0 S+ 0:00 grep --color=auto motion


Strange, no process running.
Verified as I can't access the motion server .
Nothing in the motion.log, just previous entries from yesterday



root@odroid64:/# cat /etc/default/motion
# set to 'yes' to enable the motion daemon
start_motion_daemon=yes


any ideas, the device its on is a odroid C2 SBC 64bit



sorry formatting is awful, first time I've used this




Update 1:



In response to systemctl start motion
journal -ex shows :



Apr 23 17:19:22 odroid64 systemd[1]: Started LSB: Start Motion detection 
-- Subject: Unit motion.service has finished start-up
-- Defined-By: systemd
--
-- Unit motion.service has finished starting up.
--




root@odroid64:/# systemctl list-units --state=running | less 


Shows no instance of motion running



root@odroid64:/# tail /var/log/motion/motion.log

[3] [NTC] [NET] [Apr 22 11:45:49] netcam_read_html_jpeg: Potential split boundary - 1447 chars flushed, 1 re-positioned.


That log entry is 7 hrs old, so nothing new, there is nothing in syslog.



/var/log/faillog is empty



Permissions on motion.log are 664
so it shouldn't crash for not being able to use its log file.
motion.conf is in /etc/motion which is the default location.



I could start it on boot in rc.local, but I need to be able to use cron to
to start and stop motion , which if I start in rc.local means an awkward script to get the pid, so it can be killed.



Update 2:



It looks like when motion is started by a user



sudo motion & 


it is started by root



However, when started by systemd its started as motion



Both the config file /etc/motion/motion.conf and the log file /var/log/motion/motion.log
need to be in group motion.







share|improve this question






















  • Did you do sudo systemctl enable motion after install, or did you miss a step in the setup process?
    – George Udosen
    Apr 23 at 13:42











  • I see the option to have it start on boot by adding it to your startup applications! howtoinstall.co/en/ubuntu/xenial/motion
    – George Udosen
    Apr 23 at 13:48










  • Then you have to create a service for it!
    – George Udosen
    Apr 23 at 15:33










  • Click on the grey edit below your question to add pertinent information into it, or press the orange one here: edit
    – Fabby
    Apr 24 at 7:26














up vote
0
down vote

favorite












I have motion installed and starts OK manually,
It is enabled in /etc/default/motion.
But on a reboot its not starting



if I do root@odroid64:/# systemctl start motion:



root@odroid64:/# systemctl status motion
● motion.service - LSB: Start Motion detection
Loaded: loaded (/etc/init.d/motion; bad; vendor preset: enabled)
Active: active (exited) since Thu 2016-02-11 16:28:03 GMT; 2 years 2 months ago
Docs: man:systemd-sysv-generator(8)
Process: 565 ExecStart=/etc/init.d/motion start (code=exited, status=0/SUCCESS)
Apr 23 13:56:36 odroid64 systemd[1]: Started LSB: Start Motion detection.




root@odroid64:/# ps ax | grep motion

3489 pts/0 S+ 0:00 grep --color=auto motion


Strange, no process running.
Verified as I can't access the motion server .
Nothing in the motion.log, just previous entries from yesterday



root@odroid64:/# cat /etc/default/motion
# set to 'yes' to enable the motion daemon
start_motion_daemon=yes


any ideas, the device its on is a odroid C2 SBC 64bit



sorry formatting is awful, first time I've used this




Update 1:



In response to systemctl start motion
journal -ex shows :



Apr 23 17:19:22 odroid64 systemd[1]: Started LSB: Start Motion detection 
-- Subject: Unit motion.service has finished start-up
-- Defined-By: systemd
--
-- Unit motion.service has finished starting up.
--




root@odroid64:/# systemctl list-units --state=running | less 


Shows no instance of motion running



root@odroid64:/# tail /var/log/motion/motion.log

[3] [NTC] [NET] [Apr 22 11:45:49] netcam_read_html_jpeg: Potential split boundary - 1447 chars flushed, 1 re-positioned.


That log entry is 7 hrs old, so nothing new, there is nothing in syslog.



/var/log/faillog is empty



Permissions on motion.log are 664
so it shouldn't crash for not being able to use its log file.
motion.conf is in /etc/motion which is the default location.



I could start it on boot in rc.local, but I need to be able to use cron to
to start and stop motion , which if I start in rc.local means an awkward script to get the pid, so it can be killed.



Update 2:



It looks like when motion is started by a user



sudo motion & 


it is started by root



However, when started by systemd its started as motion



Both the config file /etc/motion/motion.conf and the log file /var/log/motion/motion.log
need to be in group motion.







share|improve this question






















  • Did you do sudo systemctl enable motion after install, or did you miss a step in the setup process?
    – George Udosen
    Apr 23 at 13:42











  • I see the option to have it start on boot by adding it to your startup applications! howtoinstall.co/en/ubuntu/xenial/motion
    – George Udosen
    Apr 23 at 13:48










  • Then you have to create a service for it!
    – George Udosen
    Apr 23 at 15:33










  • Click on the grey edit below your question to add pertinent information into it, or press the orange one here: edit
    – Fabby
    Apr 24 at 7:26












up vote
0
down vote

favorite









up vote
0
down vote

favorite











I have motion installed and starts OK manually,
It is enabled in /etc/default/motion.
But on a reboot its not starting



if I do root@odroid64:/# systemctl start motion:



root@odroid64:/# systemctl status motion
● motion.service - LSB: Start Motion detection
Loaded: loaded (/etc/init.d/motion; bad; vendor preset: enabled)
Active: active (exited) since Thu 2016-02-11 16:28:03 GMT; 2 years 2 months ago
Docs: man:systemd-sysv-generator(8)
Process: 565 ExecStart=/etc/init.d/motion start (code=exited, status=0/SUCCESS)
Apr 23 13:56:36 odroid64 systemd[1]: Started LSB: Start Motion detection.




root@odroid64:/# ps ax | grep motion

3489 pts/0 S+ 0:00 grep --color=auto motion


Strange, no process running.
Verified as I can't access the motion server .
Nothing in the motion.log, just previous entries from yesterday



root@odroid64:/# cat /etc/default/motion
# set to 'yes' to enable the motion daemon
start_motion_daemon=yes


any ideas, the device its on is a odroid C2 SBC 64bit



sorry formatting is awful, first time I've used this




Update 1:



In response to systemctl start motion
journal -ex shows :



Apr 23 17:19:22 odroid64 systemd[1]: Started LSB: Start Motion detection 
-- Subject: Unit motion.service has finished start-up
-- Defined-By: systemd
--
-- Unit motion.service has finished starting up.
--




root@odroid64:/# systemctl list-units --state=running | less 


Shows no instance of motion running



root@odroid64:/# tail /var/log/motion/motion.log

[3] [NTC] [NET] [Apr 22 11:45:49] netcam_read_html_jpeg: Potential split boundary - 1447 chars flushed, 1 re-positioned.


That log entry is 7 hrs old, so nothing new, there is nothing in syslog.



/var/log/faillog is empty



Permissions on motion.log are 664
so it shouldn't crash for not being able to use its log file.
motion.conf is in /etc/motion which is the default location.



I could start it on boot in rc.local, but I need to be able to use cron to
to start and stop motion , which if I start in rc.local means an awkward script to get the pid, so it can be killed.



Update 2:



It looks like when motion is started by a user



sudo motion & 


it is started by root



However, when started by systemd its started as motion



Both the config file /etc/motion/motion.conf and the log file /var/log/motion/motion.log
need to be in group motion.







share|improve this question














I have motion installed and starts OK manually,
It is enabled in /etc/default/motion.
But on a reboot its not starting



if I do root@odroid64:/# systemctl start motion:



root@odroid64:/# systemctl status motion
● motion.service - LSB: Start Motion detection
Loaded: loaded (/etc/init.d/motion; bad; vendor preset: enabled)
Active: active (exited) since Thu 2016-02-11 16:28:03 GMT; 2 years 2 months ago
Docs: man:systemd-sysv-generator(8)
Process: 565 ExecStart=/etc/init.d/motion start (code=exited, status=0/SUCCESS)
Apr 23 13:56:36 odroid64 systemd[1]: Started LSB: Start Motion detection.




root@odroid64:/# ps ax | grep motion

3489 pts/0 S+ 0:00 grep --color=auto motion


Strange, no process running.
Verified as I can't access the motion server .
Nothing in the motion.log, just previous entries from yesterday



root@odroid64:/# cat /etc/default/motion
# set to 'yes' to enable the motion daemon
start_motion_daemon=yes


any ideas, the device its on is a odroid C2 SBC 64bit



sorry formatting is awful, first time I've used this




Update 1:



In response to systemctl start motion
journal -ex shows :



Apr 23 17:19:22 odroid64 systemd[1]: Started LSB: Start Motion detection 
-- Subject: Unit motion.service has finished start-up
-- Defined-By: systemd
--
-- Unit motion.service has finished starting up.
--




root@odroid64:/# systemctl list-units --state=running | less 


Shows no instance of motion running



root@odroid64:/# tail /var/log/motion/motion.log

[3] [NTC] [NET] [Apr 22 11:45:49] netcam_read_html_jpeg: Potential split boundary - 1447 chars flushed, 1 re-positioned.


That log entry is 7 hrs old, so nothing new, there is nothing in syslog.



/var/log/faillog is empty



Permissions on motion.log are 664
so it shouldn't crash for not being able to use its log file.
motion.conf is in /etc/motion which is the default location.



I could start it on boot in rc.local, but I need to be able to use cron to
to start and stop motion , which if I start in rc.local means an awkward script to get the pid, so it can be killed.



Update 2:



It looks like when motion is started by a user



sudo motion & 


it is started by root



However, when started by systemd its started as motion



Both the config file /etc/motion/motion.conf and the log file /var/log/motion/motion.log
need to be in group motion.









share|improve this question













share|improve this question




share|improve this question








edited Apr 23 at 22:51









Byte Commander

59.2k26159267




59.2k26159267










asked Apr 23 at 13:11









richard-g8jvm

12




12











  • Did you do sudo systemctl enable motion after install, or did you miss a step in the setup process?
    – George Udosen
    Apr 23 at 13:42











  • I see the option to have it start on boot by adding it to your startup applications! howtoinstall.co/en/ubuntu/xenial/motion
    – George Udosen
    Apr 23 at 13:48










  • Then you have to create a service for it!
    – George Udosen
    Apr 23 at 15:33










  • Click on the grey edit below your question to add pertinent information into it, or press the orange one here: edit
    – Fabby
    Apr 24 at 7:26
















  • Did you do sudo systemctl enable motion after install, or did you miss a step in the setup process?
    – George Udosen
    Apr 23 at 13:42











  • I see the option to have it start on boot by adding it to your startup applications! howtoinstall.co/en/ubuntu/xenial/motion
    – George Udosen
    Apr 23 at 13:48










  • Then you have to create a service for it!
    – George Udosen
    Apr 23 at 15:33










  • Click on the grey edit below your question to add pertinent information into it, or press the orange one here: edit
    – Fabby
    Apr 24 at 7:26















Did you do sudo systemctl enable motion after install, or did you miss a step in the setup process?
– George Udosen
Apr 23 at 13:42





Did you do sudo systemctl enable motion after install, or did you miss a step in the setup process?
– George Udosen
Apr 23 at 13:42













I see the option to have it start on boot by adding it to your startup applications! howtoinstall.co/en/ubuntu/xenial/motion
– George Udosen
Apr 23 at 13:48




I see the option to have it start on boot by adding it to your startup applications! howtoinstall.co/en/ubuntu/xenial/motion
– George Udosen
Apr 23 at 13:48












Then you have to create a service for it!
– George Udosen
Apr 23 at 15:33




Then you have to create a service for it!
– George Udosen
Apr 23 at 15:33












Click on the grey edit below your question to add pertinent information into it, or press the orange one here: edit
– Fabby
Apr 24 at 7:26




Click on the grey edit below your question to add pertinent information into it, or press the orange one here: edit
– Fabby
Apr 24 at 7:26















active

oldest

votes











Your Answer







StackExchange.ready(function()
var channelOptions =
tags: "".split(" "),
id: "89"
;
initTagRenderer("".split(" "), "".split(" "), channelOptions);

StackExchange.using("externalEditor", function()
// Have to fire editor after snippets, if snippets enabled
if (StackExchange.settings.snippets.snippetsEnabled)
StackExchange.using("snippets", function()
createEditor();
);

else
createEditor();

);

function createEditor()
StackExchange.prepareEditor(
heartbeatType: 'answer',
convertImagesToLinks: true,
noModals: false,
showLowRepImageUploadWarning: true,
reputationToPostImages: 10,
bindNavPrevention: true,
postfix: "",
onDemand: true,
discardSelector: ".discard-answer"
,immediatelyShowMarkdownHelp:true
);



);













 

draft saved


draft discarded


















StackExchange.ready(
function ()
StackExchange.openid.initPostLogin('.new-post-login', 'https%3a%2f%2faskubuntu.com%2fquestions%2f1027459%2fmotion-not-starting-as-a-daemon-in-16-04%23new-answer', 'question_page');

);

Post as a guest



































active

oldest

votes













active

oldest

votes









active

oldest

votes






active

oldest

votes















 

draft saved


draft discarded















































 


draft saved


draft discarded














StackExchange.ready(
function ()
StackExchange.openid.initPostLogin('.new-post-login', 'https%3a%2f%2faskubuntu.com%2fquestions%2f1027459%2fmotion-not-starting-as-a-daemon-in-16-04%23new-answer', 'question_page');

);

Post as a guest













































































Popular posts from this blog

GRUB: Fatal! inconsistent data read from (0x84) 0+xxxxxx

What makes Checkinstall packages not suitable for distribution?

Running the scala interactive shell from the command line