You are not logged in.

#1 2016-05-11 10:22:01

geekinthesticks
Member
From: England
Registered: 2011-09-21
Posts: 143
Website

Motion Fails to Start with Timeout Error.

I haven't used motion for a while, but have just set up my system again, using config files that worked previously. If I start motion from a command prompt it works as expected:

/usr/bin/motion -c /etc/motion/motion.conf

However, when systemd tries to start motion, it always fails with a timeout error.

May 11 11:17:06 salt systemd[1]: Starting Motion daemon...
May 11 11:17:06 salt systemd[1]: motion.service: PID file /run/motion/motion.pid not readable (yet?) after start: No such file or dir
ectory
May 11 11:17:06 salt motion[10484]: [0] Motion running as daemon process
May 11 11:17:06 salt motion[10484]: [0] ffmpeg LIBAVCODEC_BUILD 3489124 LIBAVFORMAT_BUILD 3481700
May 11 11:17:06 salt motion[10484]: [0] Thread 1 is from /etc/motion/thread1.conf
May 11 11:17:06 salt motion[10484]: [0] Thread 2 is from /etc/motion/thread2.conf
May 11 11:17:06 salt motion[10484]: [0] motion-httpd/3.2.12 running, accepting connections
May 11 11:17:06 salt motion[10484]: [0] motion-httpd: waiting for data on port TCP 8080
May 11 11:17:06 salt motion[10484]: [2] Thread 2 started
May 11 11:17:06 salt motion[10484]: [1] Thread 1 started
May 11 11:17:06 salt motion[10484]: [2] Resizing pre_capture buffer to 1 items
May 11 11:17:06 salt motion[10484]: [2] Started stream webcam server in port 8082
May 11 11:17:06 salt motion[10484]: [1] Resizing pre_capture buffer to 1 items
May 11 11:17:06 salt motion[10484]: [1] Started stream webcam server in port 8083
May 11 11:18:36 salt systemd[1]: motion.service: Start operation timed out. Terminating.

Here is my sytemd file:

[Unit]
Description=Motion daemon
After=local-fs.target

[Service]
PIDFile=/run/motion/motion.pid
ExecStart=/usr/bin/motion -c /etc/motion/motion.conf
Type=forking
#StandardOutput=null
StandardError=null

[Install]
WantedBy=multi-user.target

/run/motion exists:

drwxr-xr-x  2 root root   40 May 10 08:15 motion

Last edited by geekinthesticks (2016-05-11 10:22:36)

Offline

Board footer

Powered by FluxBB