Mocord Turned Orange After Power Cut

Forum for questions and support relating to the 1.24.x releases only.
Locked
sunucu
Posts: 13
Joined: Fri May 02, 2008 11:02 am

Mocord Turned Orange After Power Cut

Post by sunucu »

Hi
Yesterday, two times power cut happend in my region. So my ZM server had power loss two times too. When I power on my zm server today again, it was not continue recording in Mocord function and source path was orange. I tried reboot server, restart zm service from tty, restart from web interface and changing back function again and again, but nothing changed.
Image

I searched in forum and the FAQS and i saw it might be about database problem. Then i tried this instruction to fix database. Bu didn't help. The problem is still continue.

There are the first 94 rows from zm_debug.log of the running device (/dev/video3)
(I didnt paste all of log, because each log files are about 7KB)

Code: Select all

01/07/10 16:04:53.780219 zmc_dvideo3[1762].INF-zm_debug.c/296 [New Debug Level = 5, New Debug Log = /tmp/zm_debug.log.01762]
01/07/10 16:04:53.780959 zmc_dvideo3[1762].DB1-zm_monitor.cpp/1723 [Got 1 monitors]
01/07/10 16:04:53.781050 zmc_dvideo3[1762].DB2-zm_local_camera.cpp/286 [V4L2 support enabled, using V4L1 api]
01/07/10 16:04:53.781583 zmc_dvideo3[1762].DB1-zm_monitor.cpp/338 [monitor purpose=1]
01/07/10 16:04:53.781612 zmc_dvideo3[1762].DB1-zm_monitor.cpp/345 [mem.size=9217192]
01/07/10 16:04:53.781693 zmc_dvideo3[1762].DB1-zm_monitor.cpp/369 [Unable to map file /dev/shm/zm.mmap.3 (9217192 bytes) to locked memory, trying unlocked]
01/07/10 16:04:53.795203 zmc_dvideo3[1762].DB1-zm_zone.cpp/50 [Initialised zone 0/All - 1 - 320x240 - Rgb:ff0000, CM:3, MnAT:15, MxAT:0, MnAP:50, MxAP:75000, FB:3x3, MnFP:50, MxFP:50000, MnBS:10, MxBS:0, MnB:0, MxB:0, OF: 0]
01/07/10 16:04:53.796855 zmc_dvideo3[1762].DB1-zm_monitor.cpp/458 [Monitor Kapi has function 5]
01/07/10 16:04:53.796882 zmc_dvideo3[1762].DB1-zm_monitor.cpp/459 [Monitor Kapi LBF = '%N - %y/%m/%d %H:%M:%S', LBX = 0, LBY = 0]
01/07/10 16:04:53.796893 zmc_dvideo3[1762].DB1-zm_monitor.cpp/460 [Monitor Kapi IBC = 40, WUC = 25, pEC = 10, PEC = 10, EAF = 1, FRI = 1000, RBP = 7, FM = 0]
01/07/10 16:04:53.816800 zmc_dvideo3[1762].DB1-zm_zone.cpp/889 [Got 1 zones for monitor Kapi]
01/07/10 16:04:53.816839 zmc_dvideo3[1762].DB5-zm_zone.cpp/918 [Parsing polygon 0,0 319,0 319,239 0,239]
01/07/10 16:04:53.816852 zmc_dvideo3[1762].DB3-zm_zone.cpp/758 [Parsing polygon string '0,0 319,0 319,239 0,239']
01/07/10 16:04:53.816864 zmc_dvideo3[1762].DB3-zm_zone.cpp/796 [Got coordinate 0,0 from polygon string]
01/07/10 16:04:53.816875 zmc_dvideo3[1762].DB3-zm_zone.cpp/796 [Got coordinate 319,0 from polygon string]
01/07/10 16:04:53.816886 zmc_dvideo3[1762].DB3-zm_zone.cpp/796 [Got coordinate 319,239 from polygon string]
01/07/10 16:04:53.816896 zmc_dvideo3[1762].DB3-zm_zone.cpp/796 [Got coordinate 0,239 from polygon string]
01/07/10 16:04:53.816911 zmc_dvideo3[1762].DB3-zm_zone.cpp/816 [Successfully parsed polygon string]
01/07/10 16:04:53.816923 zmc_dvideo3[1762].DB1-zm_zone.cpp/50 [Initialised zone 3/All - 1 - 320x240 - Rgb:ff0000, CM:3, MnAT:25, MxAT:0, MnAP:2304, MxAP:57600, FB:3x3, MnFP:2304, MxFP:57600, MnBS:1536, MxBS:0, MnB:1, MxB:0, OF: 0]
01/07/10 16:04:53.818525 zmc_dvideo3[1762].DB1-zm_monitor.cpp/1825 [Loaded monitor 3(Kapi), 1 zones]
01/07/10 16:04:53.818549 zmc_dvideo3[1762].INF-zmc.cpp/188 [Starting Capture]
01/07/10 16:04:53.818643 zmc_dvideo3[1762].DB3-zm_local_camera.cpp/349 [Opening video device /dev/video3]
01/07/10 16:04:53.818679 zmc_dvideo3[1762].DB2-zm_local_camera.cpp/355 [V4L2 support enabled, using V4L1 api]
01/07/10 16:04:53.818691 zmc_dvideo3[1762].DB3-zm_local_camera.cpp/502 [Configuring picture attributes]
01/07/10 16:04:53.818691 zmc_dvideo3[1762].DB3-zm_local_camera.cpp/502 [Configuring picture attributes]
01/07/10 16:04:53.818721 zmc_dvideo3[1762].DB4-zm_local_camera.cpp/509 [Old P:4]
01/07/10 16:04:53.818732 zmc_dvideo3[1762].DB4-zm_local_camera.cpp/510 [Old D:24]
01/07/10 16:04:53.818743 zmc_dvideo3[1762].DB4-zm_local_camera.cpp/511 [Old B:32639]
01/07/10 16:04:53.818753 zmc_dvideo3[1762].DB4-zm_local_camera.cpp/512 [Old h:32639]
01/07/10 16:04:53.818763 zmc_dvideo3[1762].DB4-zm_local_camera.cpp/513 [Old Cl:32639]
01/07/10 16:04:53.818773 zmc_dvideo3[1762].DB4-zm_local_camera.cpp/514 [Old Cn:16191]
01/07/10 16:04:53.818793 zmc_dvideo3[1762].DB3-zm_local_camera.cpp/551 [Configuring window attributes]
01/07/10 16:04:53.818806 zmc_dvideo3[1762].DB4-zm_local_camera.cpp/560 [Old X:0]
01/07/10 16:04:53.818818 zmc_dvideo3[1762].DB4-zm_local_camera.cpp/561 [Old Y:0]
01/07/10 16:04:53.818828 zmc_dvideo3[1762].DB4-zm_local_camera.cpp/562 [Old W:320]
01/07/10 16:04:53.818839 zmc_dvideo3[1762].DB4-zm_local_camera.cpp/563 [Old H:240]
01/07/10 16:04:53.818853 zmc_dvideo3[1762].DB3-zm_local_camera.cpp/578 [Setting up request buffers]
01/07/10 16:04:53.818873 zmc_dvideo3[1762].DB4-zm_local_camera.cpp/584 [vmb.frames = 8]
01/07/10 16:04:53.818884 zmc_dvideo3[1762].DB4-zm_local_camera.cpp/585 [vmb.size = 1867776]
01/07/10 16:04:53.818895 zmc_dvideo3[1762].DB3-zm_local_camera.cpp/587 [Setting up 8 frame buffers]
01/07/10 16:04:53.818968 zmc_dvideo3[1762].DB3-zm_local_camera.cpp/612 [Configuring video source]
01/07/10 16:04:53.818986 zmc_dvideo3[1762].DB4-zm_local_camera.cpp/620 [Old C:0]
01/07/10 16:04:53.818997 zmc_dvideo3[1762].DB4-zm_local_camera.cpp/621 [Old F:1]
01/07/10 16:04:53.819008 zmc_dvideo3[1762].DB4-zm_local_camera.cpp/622 [Old Fl:1]
01/07/10 16:04:53.819018 zmc_dvideo3[1762].DB4-zm_local_camera.cpp/623 [Old T:1]
01/07/10 16:04:53.947022 zmc_dvideo3[1762].DB4-zm_local_camera.cpp/638 [New X:0]
01/07/10 16:04:53.947053 zmc_dvideo3[1762].DB4-zm_local_camera.cpp/639 [New Y:0]
01/07/10 16:04:53.947064 zmc_dvideo3[1762].DB4-zm_local_camera.cpp/640 [New W:320]
01/07/10 16:04:53.947075 zmc_dvideo3[1762].DB4-zm_local_camera.cpp/641 [New H:240]
01/07/10 16:04:53.947096 zmc_dvideo3[1762].DB4-zm_local_camera.cpp/646 [New P:4]
01/07/10 16:04:53.947107 zmc_dvideo3[1762].DB4-zm_local_camera.cpp/647 [New D:24]
01/07/10 16:04:53.947117 zmc_dvideo3[1762].DB4-zm_local_camera.cpp/648 [New B:32639]
01/07/10 16:04:53.947127 zmc_dvideo3[1762].DB4-zm_local_camera.cpp/649 [New h:32639]
01/07/10 16:04:53.947137 zmc_dvideo3[1762].DB4-zm_local_camera.cpp/650 [New Cl:32639]
01/07/10 16:04:53.947147 zmc_dvideo3[1762].DB4-zm_local_camera.cpp/651 [New Cn:16191]
01/07/10 16:04:53.947157 zmc_dvideo3[1762].DB3-zm_local_camera.cpp/654 [Setting up static colour tables]
01/07/10 16:04:53.947177 zmc_dvideo3[1762].DB2-zm_local_camera.cpp/1439 [Priming capture]
01/07/10 16:04:53.947188 zmc_dvideo3[1762].DB3-zm_local_camera.cpp/1471 [Queueing frame 0]
01/07/10 16:04:53.947382 zmc_dvideo3[1762].DB3-zm_local_camera.cpp/1471 [Queueing frame 1]
01/07/10 16:04:53.947557 zmc_dvideo3[1762].DB3-zm_local_camera.cpp/1471 [Queueing frame 2]
01/07/10 16:04:53.947757 zmc_dvideo3[1762].DB3-zm_local_camera.cpp/1471 [Queueing frame 3]
01/07/10 16:04:53.947956 zmc_dvideo3[1762].DB3-zm_local_camera.cpp/1471 [Queueing frame 4]
01/07/10 16:04:53.948166 zmc_dvideo3[1762].DB3-zm_local_camera.cpp/1471 [Queueing frame 5]
01/07/10 16:04:53.948376 zmc_dvideo3[1762].DB3-zm_local_camera.cpp/1471 [Queueing frame 6]
01/07/10 16:04:53.948591 zmc_dvideo3[1762].DB3-zm_local_camera.cpp/1471 [Queueing frame 7]
01/07/10 16:04:53.948845 zmc_dvideo3[1762].DB2-zm_local_camera.cpp/1485 [Pre-capturing]
01/07/10 16:04:53.948868 zmc_dvideo3[1762].DB3-zm_local_camera.cpp/1491 [Capturing]
01/07/10 16:04:53.948882 zmc_dvideo3[1762].DB3-zm_local_camera.cpp/1546 [Capturing 1 frames]
01/07/10 16:04:53.948892 zmc_dvideo3[1762].DB3-zm_local_camera.cpp/1549 [Syncing frame 0]
01/07/10 16:04:53.982631 zmc_dvideo3[1762].DB3-zm_local_camera.cpp/1567 [Captured 0 for channel 0]
01/07/10 16:04:53.982664 zmc_dvideo3[1762].DB3-zm_local_camera.cpp/1572 [Doing format conversion]
01/07/10 16:04:53.983086 zmc_dvideo3[1762].DB3-zm_local_camera.cpp/1878 [Assigning image]
01/07/10 16:04:53.983378 zmc_dvideo3[1762].DB2-zm_local_camera.cpp/1886 [Post-capturing]
01/07/10 16:04:53.983395 zmc_dvideo3[1762].DB3-zm_local_camera.cpp/1944 [Requeueing frame 0]
01/07/10 16:04:53.983425 zmc_dvideo3[1762].DB2-zm_local_camera.cpp/1485 [Pre-capturing]
01/07/10 16:04:53.983436 zmc_dvideo3[1762].DB3-zm_local_camera.cpp/1491 [Capturing]
01/07/10 16:04:53.983446 zmc_dvideo3[1762].DB3-zm_local_camera.cpp/1546 [Capturing 1 frames]
01/07/10 16:04:53.983457 zmc_dvideo3[1762].DB3-zm_local_camera.cpp/1549 [Syncing frame 1]
01/07/10 16:04:54.019132 zmc_dvideo3[1762].DB3-zm_local_camera.cpp/1567 [Captured 1 for channel 0]
01/07/10 16:04:54.019168 zmc_dvideo3[1762].DB3-zm_local_camera.cpp/1572 [Doing format conversion]
01/07/10 16:04:54.019421 zmc_dvideo3[1762].DB3-zm_local_camera.cpp/1878 [Assigning image]
01/07/10 16:04:54.019823 zmc_dvideo3[1762].DB2-zm_local_camera.cpp/1886 [Post-capturing]
01/07/10 16:04:54.019845 zmc_dvideo3[1762].DB3-zm_local_camera.cpp/1944 [Requeueing frame 1]
01/07/10 16:04:54.019884 zmc_dvideo3[1762].DB2-zm_local_camera.cpp/1485 [Pre-capturing]
01/07/10 16:04:54.019900 zmc_dvideo3[1762].DB3-zm_local_camera.cpp/1491 [Capturing]
01/07/10 16:04:54.019912 zmc_dvideo3[1762].DB3-zm_local_camera.cpp/1546 [Capturing 1 frames]
01/07/10 16:04:54.019996 zmc_dvideo3[1762].DB3-zm_local_camera.cpp/1549 [Syncing frame 2]
01/07/10 16:04:54.071710 zmc_dvideo3[1762].DB3-zm_local_camera.cpp/1567 [Captured 2 for channel 0]
01/07/10 16:04:54.071744 zmc_dvideo3[1762].DB3-zm_local_camera.cpp/1572 [Doing format conversion]
01/07/10 16:04:54.071971 zmc_dvideo3[1762].DB3-zm_local_camera.cpp/1878 [Assigning image]
01/07/10 16:04:54.072326 zmc_dvideo3[1762].DB2-zm_local_camera.cpp/1886 [Post-capturing]
01/07/10 16:04:54.072342 zmc_dvideo3[1762].DB3-zm_local_camera.cpp/1944 [Requeueing frame 2]
01/07/10 16:04:54.072376 zmc_dvideo3[1762].DB2-zm_local_camera.cpp/1485 [Pre-capturing]
01/07/10 16:04:54.072391 zmc_dvideo3[1762].DB3-zm_local_camera.cpp/1491 [Capturing]

I'm recording images to a additional drive (/dev/sdb1) which is mounted at init

Code: Select all

/dev/sda5 on / type ext3 (rw,relatime,errors=remount-ro)
proc on /proc type proc (rw)
none on /sys type sysfs (rw,noexec,nosuid,nodev)
none on /sys/fs/fuse/connections type fusectl (rw)
none on /sys/kernel/debug type debugfs (rw)
none on /sys/kernel/security type securityfs (rw)
udev on /dev type tmpfs (rw,mode=0755)
none on /dev/pts type devpts (rw,noexec,nosuid,gid=5,mode=0620)
none on /dev/shm type tmpfs (rw,nosuid,nodev)
none on /var/run type tmpfs (rw,nosuid,mode=0755)
none on /var/lock type tmpfs (rw,noexec,nosuid,nodev)
none on /lib/init/rw type tmpfs (rw,nosuid,mode=0755)
/dev/sdb1 on /var/www/events type ext3 (rw,noatime)
I do not know what can I do to fix this problem. Please help.
Thanks
OSVER: Ubuntu Server 9.10 Karmic
ZMVER: ZoneMinder 1.24.2
DEVICE: Conexant CX23881 (4 Channel) with 2 CCD cams.
VIDEO: GeForce 9400GT 1GB (non-shared)
RAM: 1GB DDR2
CPU: Intel Pentium Dual 2.00GHz
sunucu
Posts: 13
Joined: Fri May 02, 2008 11:02 am

Post by sunucu »

There is a weird problem. I ve got two cams and "Itriat" named cam has black screen error. I m working for that. But at this time, "Kapi" named cam's work is more important than other cam. So i turned off the "Itriat" named cam. Then "Kapi" turned orange

Name.....Function......Source
Itriat........None........./dev/video1 (0)
Kapi........Mocord........./dev/video3 (0)

Then i enabled the Itriat to Mocord and Kapi resume recording again

Name.....Function......Source
Itriat........Mocord........./dev/video1 (0)
Kapi........Mocord........./dev/video3 (0)

I did some changes in sysctl.conf these are:

Code: Select all

# RAM=1GB => shmall=1000x1024x1024/4096
kernel.shmall = 256000
# Image Resolution=640x480 ColorDept=RGB24 
# Image BufferRing=50 with 2 Cams
# shmax=640x480x24x50x2 width %10 Tolerance = 811008000 bit
# But I need bytes 811008000/8=101376000 bytes
# kernel.shmmax = 101376000
# was for 640x480
kernel.shmmax = 32947200
# is for 320x240 and image buffer ring 65
Now both /dev/videoX:
320x240 RGB24 image_buffer_ring=65

Any ideas?
OSVER: Ubuntu Server 9.10 Karmic
ZMVER: ZoneMinder 1.24.2
DEVICE: Conexant CX23881 (4 Channel) with 2 CCD cams.
VIDEO: GeForce 9400GT 1GB (non-shared)
RAM: 1GB DDR2
CPU: Intel Pentium Dual 2.00GHz
User avatar
cordel
Posts: 5210
Joined: Fri Mar 05, 2004 4:47 pm
Location: /USA/Washington/Seattle

Post by cordel »

You have them both working now but if you can duplicate the previous issue try debug on zma since it is responsible for writing to disk and the database maybe something useful will turn up there.
bj0nes
Posts: 6
Joined: Tue Feb 16, 2010 3:29 pm

Post by bj0nes »

I'm on v1.23.3, but I came across this thread with a similar issue (power outage last week, source path orange, not recording). In my case what fixed it was:

service zm stop
mysqlcheck -A --auto-repair -u<user> -p<password>
service zm start

Once the database was cleaned up, happily recording once again.

Hope this helps someone in future!
Locked