Hi Phil,
regarding to my posting of zmc crashing I'm sending part of /var/log/messages:
Nov 7 17:01:13 embed1 zmfix[1309]: INF [Debug Level = 0, Debug Log = ]
Nov 7 17:01:17 embed1 zmc-d0[1332]: INF [Debug Level = 0, Debug Log = ]
Nov 7 17:01:17 embed1 zmc-d0[1332]: INF [Got 1 monitors]
Nov 7 17:01:17 embed1 zmc-d0[1332]: ERR [Failed to open video device /dev/video0: Permission denied]
Nov 7 17:01:17 embed1 zmc-d0[1334]: INF [Debug Level = 0, Debug Log = ]
Nov 7 17:01:17 embed1 zmc-d0[1334]: INF [Got 1 monitors]
Nov 7 17:01:17 embed1 zmc-d0[1334]: ERR [Failed to open video device /dev/video0: Permission denied]
Nov 7 17:01:22 embed1 zmc-d0[1354]: INF [Debug Level = 0, Debug Log = ]
Nov 7 17:01:22 embed1 zmc-d0[1354]: INF [Got 1 monitors]
I'm logged in my linux sessions as root, and as admin in ZM. Why do I have a permission problem?
If I open camstream or some other V4L software it shows my USB cam on /dev/video0 correctly.
Another interesting thing - if I run zmfix in linux shell, it reports Segmentation fault.
Regards, Darko
Faild to open /dev/video0: permission denied !?
Re: Faild to open /dev/video0: permission denied !?
I was able to resolve this, I've set chmod settings to allow anyone to use /dev/video0.
But it still doesn't work, now messages log says: zmc -d0 Can't run query, commands out of sync...
What the heck is that?
D.
But it still doesn't work, now messages log says: zmc -d0 Can't run query, commands out of sync...
What the heck is that?
D.
- zoneminder
- Site Admin
- Posts: 5215
- Joined: Wed Jul 09, 2003 2:07 pm
- Location: Bristol, UK
- Contact:
Re: Faild to open /dev/video0: permission denied !?
Hi,
All the permissions problems are because zmfix is crashing I think. zmfix exists only to set up the correct permissions on the video devices.
Before we can get too much further with this can you tell me what version of ZM you are using and which distro you are running on. Also which USB camera you have which driver it is using if you know (if you don't know just do 'lsmod' and copy the whole listing here).
To help track down the zmfix problem can you run it in gdb if you have it? Type (without the quotes)
'gdb zmfix'
then at the prompt
'run'
then if/when it crashes
'bt'
and post here what you see.
Also I've never seen that 'out of sync' error, can you post the whole line you see it on.
Cheers,
Phil
All the permissions problems are because zmfix is crashing I think. zmfix exists only to set up the correct permissions on the video devices.
Before we can get too much further with this can you tell me what version of ZM you are using and which distro you are running on. Also which USB camera you have which driver it is using if you know (if you don't know just do 'lsmod' and copy the whole listing here).
To help track down the zmfix problem can you run it in gdb if you have it? Type (without the quotes)
'gdb zmfix'
then at the prompt
'run'
then if/when it crashes
'bt'
and post here what you see.
Also I've never seen that 'out of sync' error, can you post the whole line you see it on.
Cheers,
Phil
Re: Faild to open /dev/video0: permission denied !?
Hi Phil,
********************************************************************
ZM: zm-0.9.16, now beta 2
OS: RedHat8
web server: Apache/2.0.48
USB cam: Logitech QuickCam Pro 4000:/dev/video0
********************************************************************
LSMOD:
bash-2.05b# lsmod
Module Size Used by Tainted: PF
autofs 12180 0 (autoclean) (unused)
via-rhine 15376 1
mii 3720 0 [via-rhine]
iptable_filter 2316 0 (autoclean) (unused)
ip_tables 14520 1 [iptable_filter]
pwcx-i386 88288 0
pwc 44712 0 [pwcx-i386]
videodev 7808 1 [pwc]
mousedev 5268 1
keybdev 2752 0 (unused)
hid 20932 0 (unused)
input 5696 0 [mousedev keybdev hid]
usb-uhci 24716 0 (unused)
usbcore 73344 1 [pwc hid usb-uhci]
ext3 64704 4
jbd 47892 4 [ext3]
***********************************************************************
GDB:
(gdb) run
Starting program: /usr/local/bin/zmfix
Program received signal SIGSEGV, Segmentation fault.
0x401dc429 in strcmp () from /lib/libc.so.6
(gdb) bt
#0 0x401dc429 in strcmp () from /lib/libc.so.6
#1 0x401f85db in __tzstring () from /lib/libc.so.6
#2 0x401f9f2d in __tzfile_read () from /lib/libc.so.6
#3 0x401f8c7e in tzset_internal () from /lib/libc.so.6
#4 0x401f868b in __tz_convert () from /lib/libc.so.6
#5 0x401f7738 in localtime () from /lib/libc.so.6
#6 0x08049936 in zmDbgOutput (
fstring=0x8049b80 "Permissions on %s are ok at %o") at zm_debug.c:310
#7 0x08048ecb in fixDevice(int) (device=0) at zmfix.cpp:71
#8 0x08049025 in main (argc=1, argv=0x804e643) at zmfix.cpp:127
#9 0x4017e4ed in __libc_start_main () from /lib/libc.so.6
(gdb)
****************************************************************************
SYNC:
Nov 10 11:56:03 embed1 zmc-d0[1334]: INF [Got 1 monitors]
Nov 10 11:56:03 embed1 zmc-d0[1334]: INF [X:0]
Nov 10 11:56:03 embed1 zmc-d0[1334]: INF [Y:0]
Nov 10 11:56:03 embed1 zmc-d0[1334]: INF [W:176]
Nov 10 11:56:03 embed1 zmc-d0[1334]: INF [H:144]
Nov 10 11:56:03 embed1 zmc-d0[1334]: INF [P:15]
Nov 10 11:56:03 embed1 zmc-d0[1334]: INF [D:24]
Nov 10 11:56:03 embed1 zmc-d0[1334]: INF [B:31744]
Nov 10 11:56:03 embed1 zmc-d0[1334]: INF [h:65535]
Nov 10 11:56:03 embed1 zmc-d0[1334]: INF [Cl:32768]
Nov 10 11:56:03 embed1 zmc-d0[1334]: INF [Cn:32768]
Nov 10 11:56:03 embed1 zmc-d0[1334]: INF [vmb.frames = 2]
Nov 10 11:56:03 embed1 zmc-d0[1334]: INF [vmb.size = 921600]
Nov 10 11:56:03 embed1 zmc-d0[1334]: INF [C:0]
Nov 10 11:56:03 embed1 zmc-d0[1334]: INF [F:49151]
Nov 10 11:56:03 embed1 zmc-d0[1334]: INF [Fl:0]
Nov 10 11:56:03 embed1 zmc-d0[1334]: INF [T:2]
Nov 10 11:56:03 embed1 zmc-d0[1334]: INF [X:0]
Nov 10 11:56:03 embed1 zmc-d0[1334]: INF [Y:0]
Nov 10 11:56:03 embed1 zmc-d0[1334]: INF [W:320]
Nov 10 11:56:03 embed1 zmc-d0[1334]: INF [H:240]
Nov 10 11:56:03 embed1 zmc-d0[1334]: INF [P:15]
Nov 10 11:56:03 embed1 zmc-d0[1334]: INF [D:24]
Nov 10 11:56:03 embed1 zmc-d0[1334]: INF [B:31744]
Nov 10 11:56:03 embed1 zmc-d0[1334]: INF [h:65535]
Nov 10 11:56:03 embed1 zmc-d0[1334]: INF [Cl:32768]
Nov 10 11:56:03 embed1 zmc-d0[1334]: INF [Cn:32768]
Nov 10 11:56:03 embed1 zmc-d0[1334]: INF [monitor purpose=1]
Nov 10 11:56:03 embed1 zmc-d0[1334]: INF [shm.size=23040448]
Nov 10 11:56:03 embed1 zmc-d0[1334]: ERR [Can't run query: Commands out of sync; You can't run this command now]
Nov 10 11:56:03 embed1 zmc-d0[1339]: INF [Debug Level = 0, Debug Log = ]
Nov 10 11:56:03 embed1 zmc-d0[1339]: INF [Got 1 monitors]
Thank you for your help.
Darko
********************************************************************
ZM: zm-0.9.16, now beta 2
OS: RedHat8
web server: Apache/2.0.48
USB cam: Logitech QuickCam Pro 4000:/dev/video0
********************************************************************
LSMOD:
bash-2.05b# lsmod
Module Size Used by Tainted: PF
autofs 12180 0 (autoclean) (unused)
via-rhine 15376 1
mii 3720 0 [via-rhine]
iptable_filter 2316 0 (autoclean) (unused)
ip_tables 14520 1 [iptable_filter]
pwcx-i386 88288 0
pwc 44712 0 [pwcx-i386]
videodev 7808 1 [pwc]
mousedev 5268 1
keybdev 2752 0 (unused)
hid 20932 0 (unused)
input 5696 0 [mousedev keybdev hid]
usb-uhci 24716 0 (unused)
usbcore 73344 1 [pwc hid usb-uhci]
ext3 64704 4
jbd 47892 4 [ext3]
***********************************************************************
GDB:
(gdb) run
Starting program: /usr/local/bin/zmfix
Program received signal SIGSEGV, Segmentation fault.
0x401dc429 in strcmp () from /lib/libc.so.6
(gdb) bt
#0 0x401dc429 in strcmp () from /lib/libc.so.6
#1 0x401f85db in __tzstring () from /lib/libc.so.6
#2 0x401f9f2d in __tzfile_read () from /lib/libc.so.6
#3 0x401f8c7e in tzset_internal () from /lib/libc.so.6
#4 0x401f868b in __tz_convert () from /lib/libc.so.6
#5 0x401f7738 in localtime () from /lib/libc.so.6
#6 0x08049936 in zmDbgOutput (
fstring=0x8049b80 "Permissions on %s are ok at %o") at zm_debug.c:310
#7 0x08048ecb in fixDevice(int) (device=0) at zmfix.cpp:71
#8 0x08049025 in main (argc=1, argv=0x804e643) at zmfix.cpp:127
#9 0x4017e4ed in __libc_start_main () from /lib/libc.so.6
(gdb)
****************************************************************************
SYNC:
Nov 10 11:56:03 embed1 zmc-d0[1334]: INF [Got 1 monitors]
Nov 10 11:56:03 embed1 zmc-d0[1334]: INF [X:0]
Nov 10 11:56:03 embed1 zmc-d0[1334]: INF [Y:0]
Nov 10 11:56:03 embed1 zmc-d0[1334]: INF [W:176]
Nov 10 11:56:03 embed1 zmc-d0[1334]: INF [H:144]
Nov 10 11:56:03 embed1 zmc-d0[1334]: INF [P:15]
Nov 10 11:56:03 embed1 zmc-d0[1334]: INF [D:24]
Nov 10 11:56:03 embed1 zmc-d0[1334]: INF [B:31744]
Nov 10 11:56:03 embed1 zmc-d0[1334]: INF [h:65535]
Nov 10 11:56:03 embed1 zmc-d0[1334]: INF [Cl:32768]
Nov 10 11:56:03 embed1 zmc-d0[1334]: INF [Cn:32768]
Nov 10 11:56:03 embed1 zmc-d0[1334]: INF [vmb.frames = 2]
Nov 10 11:56:03 embed1 zmc-d0[1334]: INF [vmb.size = 921600]
Nov 10 11:56:03 embed1 zmc-d0[1334]: INF [C:0]
Nov 10 11:56:03 embed1 zmc-d0[1334]: INF [F:49151]
Nov 10 11:56:03 embed1 zmc-d0[1334]: INF [Fl:0]
Nov 10 11:56:03 embed1 zmc-d0[1334]: INF [T:2]
Nov 10 11:56:03 embed1 zmc-d0[1334]: INF [X:0]
Nov 10 11:56:03 embed1 zmc-d0[1334]: INF [Y:0]
Nov 10 11:56:03 embed1 zmc-d0[1334]: INF [W:320]
Nov 10 11:56:03 embed1 zmc-d0[1334]: INF [H:240]
Nov 10 11:56:03 embed1 zmc-d0[1334]: INF [P:15]
Nov 10 11:56:03 embed1 zmc-d0[1334]: INF [D:24]
Nov 10 11:56:03 embed1 zmc-d0[1334]: INF [B:31744]
Nov 10 11:56:03 embed1 zmc-d0[1334]: INF [h:65535]
Nov 10 11:56:03 embed1 zmc-d0[1334]: INF [Cl:32768]
Nov 10 11:56:03 embed1 zmc-d0[1334]: INF [Cn:32768]
Nov 10 11:56:03 embed1 zmc-d0[1334]: INF [monitor purpose=1]
Nov 10 11:56:03 embed1 zmc-d0[1334]: INF [shm.size=23040448]
Nov 10 11:56:03 embed1 zmc-d0[1334]: ERR [Can't run query: Commands out of sync; You can't run this command now]
Nov 10 11:56:03 embed1 zmc-d0[1339]: INF [Debug Level = 0, Debug Log = ]
Nov 10 11:56:03 embed1 zmc-d0[1339]: INF [Got 1 monitors]
Thank you for your help.
Darko
- zoneminder
- Site Admin
- Posts: 5215
- Joined: Wed Jul 09, 2003 2:07 pm
- Location: Bristol, UK
- Contact:
Re: Faild to open /dev/video0: permission denied !?
Hi,
There is some funny stuff going on here. The crash in zmfix appears to in localtime which is as vanilla a function as you can get really. Do you know if you have valgrind on your system? If so then run 'valgrind zmfix' and see if it shows up anything messing things up before it gets to the crash.
The other error is even wierder. It's a mysql error that I've never seen before either. I'm not sure what version of mysql you are runnign but you could try running myisamcheck to make sure your database isn't broken. I've just googled for it and have also seen causes ranging from broken hard disks, to high system load and mismatches of mysql libraries to executable. It might be worth checking that none of these apply to you.
Cheers,
Phil,
There is some funny stuff going on here. The crash in zmfix appears to in localtime which is as vanilla a function as you can get really. Do you know if you have valgrind on your system? If so then run 'valgrind zmfix' and see if it shows up anything messing things up before it gets to the crash.
The other error is even wierder. It's a mysql error that I've never seen before either. I'm not sure what version of mysql you are runnign but you could try running myisamcheck to make sure your database isn't broken. I've just googled for it and have also seen causes ranging from broken hard disks, to high system load and mismatches of mysql libraries to executable. It might be worth checking that none of these apply to you.
Cheers,
Phil,
Re: Faild to open /dev/video0: permission denied !?
Hi Phil,
will try to install on other PC and new RedHat9 installation.
Thank you,
Darko
will try to install on other PC and new RedHat9 installation.
Thank you,
Darko