#711196 motion: Crash immediately after start

Package:
motion
Source:
motion
Description:
V4L capture program supporting motion detection
Submitter:
Markus Glugla
Date:
2015-07-12 23:57:08 UTC
Severity:
normal
#711196#5
Date:
2013-06-05 11:28:36 UTC
From:
To:
Dear Maintainer,

I start motion via "/etc/init.d/motion start".

After a short time the following error message appears in the syslog:
Jun  5 12:58:24 hostname motion: [0] Not config file to process using default values
[...]
Jun  5 12:58:24 hostname motion: [1] Resizing pre_capture buffer to 1 items
Jun  5 12:58:47 hostname motion: [1] Error opening file ./01-20130605125847-00.jpg with mode w: Permission denied
Jun  5 12:58:47 hostname motion: [1] Can't write picture to file ./01-20130605125847-00.jpg - check access rights to target directory: Permission denied
Jun  5 12:58:47 hostname motion: [1] Thread is going to finish due to this fatal error: Permission denied
Jun  5 12:58:47 hostname motion: [1] Calling vid_close() from motion_cleanup
Jun  5 12:58:47 hostname motion: [1] Closing video device /dev/video0
Jun  5 12:58:48 hostname motion: [0] Motion terminating


Starting motion by hand with "motion -c /etc/motion/motion.conf" everythings works fine. The syslog file contains the following line:
Jun  5 12:59:57 hostname motion: [0] Processing thread 0 - config file /etc/motion/motion.conf

It sounds like an error in "/etc/init.d/motion".

Thank you,

Markus Glugla

#711196#10
Date:
2013-06-05 13:38:16 UTC
From:
To:
Hi Markus,

By default, motion dumps pictures or videos in /tmp/motion (you can change
it in /etc/motion/motion.conf). Please, check that this directory exists
and is writable for user 'motion'.

Regards,


2013/6/5 Markus Glugla <markus.glugla@physik.tu-berlin.de>

#711196#15
Date:
2013-06-05 21:59:02 UTC
From:
To:
Hi Juan,

Thank you for your tip. I had checked the permissions of all motion
paths. All permission are ok.

But I think, that an evalutation of the shown parts of my syslog leads
to a problem with the init script "/etc/init.d/motion".

Best Regards,
Markus Glugla

#711196#20
Date:
2015-02-02 00:35:21 UTC
From:
To:
Dear Maintainer,

Motion crashes right after I start it. Sometimes it works for a while,
but most of times I just see one or two frames in web interface and
then get the unable to connect screen on browser.

This is what systemctl tells me about motion:

systemctl status motion
● motion.service - LSB: Start Motion detection
   Loaded: loaded (/etc/init.d/motion)
      Active: active (exited) since Fri 2015-01-30 19:52:13 BRST; 2 days ago
        Process: 2742 ExecStop=/etc/init.d/motion stop (code=exited, status=0/SUCCESS)
	  Process: 2751 ExecStart=/etc/init.d/motion start (code=exited, status=0/SUCCESS)

I available to provide any further information upon request.

Thanks in advance,
Alexandre.

#711196#25
Date:
2015-07-12 23:53:51 UTC
From:
To:
Hi,

Does the bug still exist for you in the latest version of the package?

Based on the log you submitted previously, I don't see how this would be a problem with motion's initscript. As indicated by your log, the program started correctly, after which the initscript is no longer doing anything.

Motion exited based on a permissions error. Could you dump the output of `ls -la` for all the paths that you think are relevant, as well as the parts of `motion.conf` that point to these paths?

X