Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Need a hand troubleshooting Motioneye.eo #8

Open
JLLucci opened this issue Feb 25, 2022 · 8 comments
Open

Need a hand troubleshooting Motioneye.eo #8

JLLucci opened this issue Feb 25, 2022 · 8 comments

Comments

@JLLucci
Copy link

JLLucci commented Feb 25, 2022

motioneye.log

Running on a Rasberry PI 4b 2gig and Deitpi (Debian Bullseye) and I've got more strange errors that I can shake a stick at. Biggest problem is it not recording. It works great as a viewing portal; however, this software is supposed to do more. Media folder is located on a drobo 5n and is mapped through dietpi-Drive manager under root. I'm a bit of a noob so I can use all the help I can get

@jmichault
Copy link
Owner

You must give write access to the user executing motioneye on the /mnt/Drobo-5n_1/Security_livestream folder.
Making this depends on how is formatted your partition.

If user is motion and format is exfat, you can type in a terminal windows under root :
usermod -G dietpi motion

If user is motion and format is ext4 or btrfs, you can type in a terminal windows under root :
chown motion /mnt/Drobo-5n_1/Security_livestream

@JLLucci
Copy link
Author

JLLucci commented Feb 26, 2022

Hi Jean,

I managed to clear the "Root media folder errors" Now I'm looking at the stream errors
Is this still related to permissions?

motioneye.log
motion.log
s

@jmichault
Copy link
Owner

Hi,

What are the symptoms ? No display for all cams, or some cams ? Display loss for all cams, or some cams ?

Errors in motion.log like [13:nc13:Patio_Pan_] [ERR] [NET] netcam_rtsp_handler_reconnect: Normal resolution: Reconnecting with camera.... are related to a connection loss between motion and your netcam.
If it's not frequent, you can ignore them. If it's frequent, first verify your network.
Next try to connect to your cam with ffmpeg to see if it's motion specific.

Errors in motioneye.log like 'ERROR: mjpg client for camera 6 on port 9086 error: Stream is closed' is a known bug causing display loss for some seconds, currently under investigation. You can't do anything.

[ERR] [ALL] myfopen: Error opening file /mnt/Drobo-5N_1/Security_livestream/Sally_Port/2022-02-25/23-45-56.jpg : seems like you have already some permissions issues.

@JLLucci
Copy link
Author

JLLucci commented Feb 28, 2022

Hi Jean,
Camera 2 and 3 and 10 aren't refreshing. and none of my 11 cams are recording. Reading through the motion eye log I'm seeing:
Feb 26 06:13:03 Lucci-Motioneye motion[7173]: [7:ml7:Patio_Pan_C] [ERR] [ENC] ffmpeg_set_codec: Could not open codec Encoder not found

However ffmpeg is installed and the latest version.

ffmpeg version 4.3.3-0+rpt2+deb11u1 Copyright (c) 2000-2021 the FFmpeg developers
built with gcc 10 (Raspbian 10.2.1-6+rpi1)

Feb 26 06:13:13 Lucci-Motioneye motion[7173]: [11:ml11:Sally Port] [ERR] [EVT] event_ffmpeg_newfile: Error opening context for movie output.

I'm thinking I'm still having some kind of permissions issue with my share; however, the whole shebang was installed under root. I do have a motion group but no motion user only users I have are dietpi and root.

Thanks!

John

@jmichault
Copy link
Owner

Hi John,

for cameras not refreshing :
first verify your url is correct with : ffplay -i URL
Note : for mjpeg cameras, the correct url depend of your exact configuration, sometimes you must use "http://xxxx", sometimes "mjpg://xxxx".

for write permissions :
I don't know dietpi, but it would be surprising if you have only 2 users. Verify what user is used with ps -ef|egrep "motion|python3" (user is in first column).
How is formatted your partition (ext4, btrfs, exfat, fat32, ...) ? (mount|grep mnt to see format type)

@JLLucci
Copy link
Author

JLLucci commented Mar 1, 2022

Hi Jean,

All my cams are Wyze cams either V.2 or 1st gen pan cams running the respective RTSP firmware. The Stuck cams are as follows Camera 2 is a V2 , Cam 3 is a 1st gen pan cam, and 10 is a V2 black. I've tried removing them and then re-adding them. They will hold the image the first get when the connect up .

ON the FFplay Command I tried : ffplay -i rtsp://10.0.0.7/live which is what I use within motion eye ; however , I also tried ffplay -i rtsp://username:password@10,0,0.7/live which is the url from the Wyze app Both resulted in the following error:
error: XDG_RUNTIME_DIR not set in the environment.
The path /dev/dri/ cannot be opened or is not available
The path /dev/dri/ cannot be opened or is not available
Could not initialize SDL - No available video device
(Did you set the DISPLAY variable?)
Results of PS -ef|egrep "Motion|Python3"
motion 505 1 18 Feb24 ? 21:45:43 /usr/bin/python3 /usr/local/bin/meyectl startserver -c /etc/motioneye/motioneye.conf
motion 551 505 99 20:24 ? 00:37:29 /usr/bin/motion -n -c /etc/motioneye/motion.conf -d 5
motion 609 505 0 Feb24 ? 00:00:00 /usr/bin/python3 /usr/local/bin/meyectl startserver -c /etc/motioneye/motioneye.conf
root 3896 6939 0 20:34 pts/0 00:00:00 grep -E motion|python3

Okay maybe motioneye created a motion user?
Results of Mount |grp mnt :
mount|grep mnt
systemd-1 on /mnt/WD500_gig type autofs (rw,relatime,fd=54,pgrp=1,timeout=0,minproto=5,maxproto=5,direct)
/dev/sda1 on /mnt/WD500_gig type ext4 (rw,noatime,lazytime,x-systemd.automount)
//10.0.0.100/Drobo-5N_1 on /mnt/Drobo-5N_1 type cifs (rw,relatime,vers=3.1.1,cache=strict,username=jllucci,uid=1000,forceuid,gid=1000,forcegid,addr=10.0.0.100,file_mode=0770,dir_mode=0770,soft,nounix,serverino,mapposix,rsize=4194304,wsize=4194304,bsize=1048576,echo_interval=60,actimeo=1)
root@Lucci-Motioneye:/var/log/motioneye#

@jmichault
Copy link
Owner

Hi John,

I forgot to specify that ffplay must be launched in a graphical session. Since you get the first frame, your URL is fine, but testing with ffplay may get more information about the problem.

Note: if you don't have a monitor connected to the PI, you can remotely access the X session by running vnc on the pi.
To do this :

  • install vnc: sudo aptitude install x11vnc
  • if you have disabled the graphical session, start it: sudo systemctl start lightdm
  • launch a vnc server on the X session: x11vnc -auth /home/pi/.Xauthority -display:0
  • now you can access the X session with a vnc viewer.

For your hard disk: the user with uid 1000 and the group with gid 1000 have write access.
You can add a move to the group with gid 1000 with this command:
sudo user mod -G 1000 motion
So motion should get write access after restarting motioneye (sudo systemctl restart motioneye). (If user jllucci on drobo has write access).

@JLLucci
Copy link
Author

JLLucci commented Mar 2, 2022

motioneye.log
Well I have results! All cams are now recording except for cam 7 . Occasionally I've got green screens I still need to try the last procedure with motion. Will try that tomorrow night

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants