Blue screen on network camera after upgrade

Forum for questions and support relating to the 1.30.x releases only.
Post Reply
bukowski
Posts: 11
Joined: Thu Feb 21, 2008 11:27 am

Blue screen on network camera after upgrade

Post by bukowski » Fri Sep 02, 2016 11:26 am

Hi
I installed new server Centos 7 and 1.30 version of Zoneminder and cameras stop working (there was Centos 5 and 1.24 zm)
First i see in log

Code: Select all

08/31/16 09:54:34.848957 zmc_m1[10971].ERR-zm_remote_camera_http.cpp/1141 [Unable to get response, disconnecting]
08/31/16 09:54:35.021066 zmc_m1[10971].ERR-zm_remote_camera_http.cpp/1040 [Unable to read content]
I set debug

Code: Select all

2016-09-02 12:52:49.564140	zmwatch		7460	INF	Restarting capture daemon for Brana, shared data not valid	zmwatch.pl	
2016-09-02 12:52:49.521380	zmwatch		7460	ERR	Memory map file '/tmp/zm.mmap.1' does not exist. zmc might not be running.	zmwatch.pl	
2016-09-02 12:52:39.533360	zmdc		7392	INF	'zmc -m 1' crashed, signal 6	zmdc.pl	
2016-09-02 12:52:39.498480	zmdc		7673	INF	'zmc -m 1' started at 16/09/02 12:52:39	zmdc.pl	
2016-09-02 12:52:39.498480	zmdc		7392	INF	'zmc -m 1' starting at 16/09/02 12:52:39, pid = 7673
When i run in cli

Code: Select all

# zmc -m 1
terminate called after throwing an instance of 'std::logic_error'
  what():  basic_string::_S_construct null not valid
Neúspěšně ukončen (SIGABRT)

jorgon
Posts: 1
Joined: Thu Oct 13, 2016 10:23 pm

Re: Blue screen on network camera after upgrade

Post by jorgon » Thu Oct 13, 2016 10:29 pm

I am having exactly the same issue on CentOS 6.7 with ZM1.30. Just one camera for the time being (rtsp, though), but I can connect to it directly and it is working fine, just not in ZM. Any ideas, anyone?

For reference: the camera is TV-IP320PI, and I configured according to this: https://wiki.zoneminder.com/Trendnet#TV-IP320PI

bukowski
Posts: 11
Joined: Thu Feb 21, 2008 11:27 am

Re: Blue screen on network camera after upgrade

Post by bukowski » Thu Jan 05, 2017 10:55 am

I stiil have problem :(
some more info strace on fresh install zoneminder 1.30.0 on Centos 7

Code: Select all

stat("/etc/localtime", {st_mode=S_IFREG|0644, st_size=2246, ...}) = 0
rt_sigprocmask(SIG_UNBLOCK, [USR1 USR2], NULL, 8) = 0
rt_sigprocmask(SIG_BLOCK, [USR1 USR2], NULL, 8) = 0
socket(PF_INET, SOCK_STREAM, IPPROTO_TCP) = 8
connect(8, {sa_family=AF_INET, sin_port=htons(80), sin_addr=inet_addr("192.168.10.11")}, 16) = 0
write(8, "GET /cgi-bin/video.jpg HTTP/1.1\r"..., 87) = 87
select(9, [8], NULL, NULL, {2, 500000}) = 1 (in [8], left {2, 401457})
ioctl(8, FIONREAD, [217])               = 0
read(8, "HTTP/1.0 200 OK\r\nContent-Type: i"..., 217) = 217
select(9, [8], NULL, NULL, {2, 500000}) = 1 (in [8], left {2, 490452})
ioctl(8, FIONREAD, [1460])              = 0
read(8, "\377\330\377\340\0\20JFIF\0\1\2\1\0H\0H\0\0\377\333\0\204\0\20\v\f\16\f\n\20"..., 1460) = 1460
select(9, [8], NULL, NULL, {2, 500000}) = 1 (in [8], left {2, 497257})
ioctl(8, FIONREAD, [1460])              = 0
read(8, "\317\351\353D\252c\311\226\340F9\30685[\3556\352\300'\231#\22\1\220\360)..g\215\314"..., 1460) = 1460
select(9, [8], NULL, NULL, {2, 500000}) = 1 (in [8], left {2, 497934})
ioctl(8, FIONREAD, [1460])              = 0
read(8, ";\324\337o\267.\252\v\35\304\0\301x\374\352\303\272\242\226b\0\36\265\203,\322\254\254\363H\6\374"..., 1460) = 1460
select(9, [8], NULL, NULL, {2, 500000}) = 1 (in [8], left {2, 497316})
ioctl(8, FIONREAD, [1460])              = 0
read(8, "\322\362\276\313t'\375\266\351R\303f\3y\223;H\376\347\201VA\0`\16\224\214\331\340Vf\247"..., 1460) = 1460
select(9, [8], NULL, NULL, {2, 500000}) = 1 (in [8], left {2, 489150})
ioctl(8, FIONREAD, [1460])              = 0
read(8, "\271\34\16\365L\217\336\306[\220\334\22+Z1\205\3\2368\346\244\30\35zS\227-\302\360=j\274"..., 1460) = 1460
select(9, [8], NULL, NULL, {2, 500000}) = 1 (in [8], left {2, 485474})
ioctl(8, FIONREAD, [2002])              = 0
read(8, "Va\220\36\17Z%?5Z\24\300v\222OBi\300\26\372S\202\200)\244`\347\267z\230\n^"..., 2002) = 2002
select(9, [8], NULL, NULL, {2, 500000}) = 1 (in [8], left {2, 475728})
ioctl(8, FIONREAD, [0])                 = 0
stat("/etc/localtime", {st_mode=S_IFREG|0644, st_size=2246, ...}) = 0
gettid()                                = 4030
poll([{fd=5, events=POLLIN|POLLPRI}], 1, 0) = 0 (Timeout)
write(5, "\321\0\0\0\3insert into Logs ( TimeKey,"..., 213) = 213
read(5, "\7\0\0\1\0\1\0\2\0\0\0", 16384) = 11
sendto(6, "<139>Jan  5 10:34:50 zmc_m1[4030"..., 63, MSG_NOSIGNAL, NULL, 0) = 63
stat("/etc/localtime", {st_mode=S_IFREG|0644, st_size=2246, ...}) = 0
gettid()                                = 4030
poll([{fd=5, events=POLLIN|POLLPRI}], 1, 0) = 0 (Timeout)
write(5, "\340\0\0\0\3insert into Logs ( TimeKey,"..., 228) = 228
read(5, "\7\0\0\1\0\1\0\2\0\0\0", 16384) = 11
sendto(6, "<139>Jan  5 10:34:50 zmc_m1[4030"..., 78, MSG_NOSIGNAL, NULL, 0) = 78
close(8) 

bukowski
Posts: 11
Joined: Thu Feb 21, 2008 11:27 am

Re: Blue screen on network camera after upgrade

Post by bukowski » Mon Jan 09, 2017 10:10 am

More debug info:

Code: Select all

01/09/17 11:04:05.861665 zmc_m1[13534].DB3-zm_remote_camera_http.cpp/124 [Connected to host, socket = 6]
01/09/17 11:04:05.861678 zmc_m1[13534].DB2-zm_remote_camera_http.cpp/138 [Sending request: GET /cgi-bin/video.jpg HTTP/1.0
User-Agent: ZoneMinder/1.30.0
Host: 192.168.10.11
Connection: Keep-Alive

]
01/09/17 11:04:05.861690 zmc_m1[13534].DB3-zm_remote_camera_http.cpp/147 [Request sent]
01/09/17 11:04:05.958980 zmc_m1[13534].DB3-zm_remote_camera_http.cpp/207 [Just getting 198]
01/09/17 11:04:05.958992 zmc_m1[13534].DB3-zm_remote_camera_http.cpp/210 [Expecting 198 bytes]
01/09/17 11:04:05.959001 zmc_m1[13534].DB3-zm_remote_camera_http.cpp/232 [Read 198 bytes]
01/09/17 11:04:05.959011 zmc_m1[13534].DB3-zm_remote_camera_http.cpp/773 [Got status '200' (OK), http version 1.0]
01/09/17 11:04:05.959017 zmc_m1[13534].DB3-zm_remote_camera_http.cpp/814 [Got content type 'image/jpeg']
01/09/17 11:04:05.959146 zmc_m1[13534].DB3-zm_remote_camera_http.cpp/207 [Just getting 1360]
01/09/17 11:04:05.959155 zmc_m1[13534].DB3-zm_remote_camera_http.cpp/210 [Expecting 1360 bytes]
01/09/17 11:04:05.959164 zmc_m1[13534].DB3-zm_remote_camera_http.cpp/232 [Read 1360 bytes]
01/09/17 11:04:05.967035 zmc_m1[13534].DB3-zm_remote_camera_http.cpp/207 [Just getting 100]
01/09/17 11:04:05.967044 zmc_m1[13534].DB3-zm_remote_camera_http.cpp/210 [Expecting 100 bytes]
01/09/17 11:04:05.967051 zmc_m1[13534].DB3-zm_remote_camera_http.cpp/232 [Read 100 bytes]
01/09/17 11:04:05.967309 zmc_m1[13534].DB3-zm_remote_camera_http.cpp/207 [Just getting 1360]
01/09/17 11:04:05.967318 zmc_m1[13534].DB3-zm_remote_camera_http.cpp/210 [Expecting 1360 bytes]
01/09/17 11:04:05.967326 zmc_m1[13534].DB3-zm_remote_camera_http.cpp/232 [Read 1360 bytes]
01/09/17 11:04:06.278609 zmc_m1[13534].DB3-zm_remote_camera_http.cpp/207 [Just getting 1460]
01/09/17 11:04:06.278620 zmc_m1[13534].DB3-zm_remote_camera_http.cpp/210 [Expecting 1460 bytes]
01/09/17 11:04:06.278628 zmc_m1[13534].DB3-zm_remote_camera_http.cpp/232 [Read 1460 bytes]
01/09/17 11:04:06.315873 zmc_m1[13534].DB3-zm_remote_camera_http.cpp/207 [Just getting 100]
01/09/17 11:04:06.315882 zmc_m1[13534].DB3-zm_remote_camera_http.cpp/210 [Expecting 100 bytes]
01/09/17 11:04:06.315890 zmc_m1[13534].DB3-zm_remote_camera_http.cpp/232 [Read 100 bytes]
01/09/17 11:04:06.341174 zmc_m1[13534].DB3-zm_remote_camera_http.cpp/207 [Just getting 1360]
01/09/17 11:04:06.341183 zmc_m1[13534].DB3-zm_remote_camera_http.cpp/210 [Expecting 1360 bytes]
01/09/17 11:04:06.341190 zmc_m1[13534].DB3-zm_remote_camera_http.cpp/232 [Read 1360 bytes]
01/09/17 11:04:06.371037 zmc_m1[13534].DB3-zm_remote_camera_http.cpp/207 [Just getting 4243]
01/09/17 11:04:06.371048 zmc_m1[13534].DB3-zm_remote_camera_http.cpp/210 [Expecting 4243 bytes]
01/09/17 11:04:06.371057 zmc_m1[13534].DB3-zm_remote_camera_http.cpp/232 [Read 4243 bytes]
01/09/17 11:04:06.371064 zmc_m1[13534].DB3-zm_remote_camera_http.cpp/197 [Socket closed remotely]
01/09/17 11:04:06.371070 zmc_m1[13534].ERR-zm_remote_camera_http.cpp/1040 [Unable to read content]
01/09/17 11:04:06.371471 zmc_m1[13534].ERR-zm_remote_camera_http.cpp/1141 [Unable to get response, disconnecting]
01/09/17 11:04:06.371842 zmc_m1[13534].DB3-zm_remote_camera_http.cpp/132 [Disconnected from host]
I found in source code:

Code: Select all

if ( total_bytes_to_read == 0 )
    {
      if( mode == SINGLE_IMAGE )
		  return( 0 );
      // If socket is closed locally, then select will fail, but if it is closed remotely
      // then we have an exception on our socket.. but no data.
      Debug( 3, "Socket closed remotely" );
      //Disconnect(); // Disconnect is done outside of ReadData now.
      return( -1 );
    }
But i dont know why is set to multi image when i from camera i get one jpeg image:

Code: Select all

curl -v 192.168.10.11/cgi-bin/video.jpg
* About to connect() to 192.168.10.11 port 80 (#0)
*   Trying 192.168.10.11...
* Connected to 192.168.10.11 (192.168.10.11) port 80 (#0)
> GET /cgi-bin/video.jpg HTTP/1.1
> User-Agent: curl/7.29.0
> Host: 192.168.10.11
> Accept: */*
> 
* HTTP 1.0, assume close after body
< HTTP/1.0 200 OK
< Content-Type: image/jpeg
< Date: Sun, 09 Jan 2017 12:03:47 GMT
< Expires: Thu, 01 Jan 1970 01:00:00 GMT
< Cache-Control: no-cache
< Content-Language: en
< Server: Network Dome Camera
< Connection: close
May be this? https://github.com/ZoneMinder/ZoneMinde ... 999f8ceb2e

User avatar
iconnor
Posts: 1325
Joined: Fri Oct 29, 2010 1:43 am
Location: Toronto
Contact:

Re: Blue screen on network camera after upgrade

Post by iconnor » Tue Jan 10, 2017 2:55 am

I'm pretty sure the
if( mode == SINGLE_IMAGE )
return( 0 );

is no good. I have removed it in my builds.

bukowski
Posts: 11
Joined: Thu Feb 21, 2008 11:27 am

Re: Blue screen on network camera after upgrade

Post by bukowski » Thu Jan 12, 2017 11:40 am

I make new searching.
When I build 1.30-4 where this commit isnt, I get same error "Unable to get response, disconnecting"
May be this commit (return 0 change to -1): https://github.com/ZoneMinder/ZoneMinde ... 8f3cd5b38f

Code: Select all

 else if ( bytes_read == 0)
          {
 -            Debug( 3, "Socket closed" );
 -            Disconnect();
 -            return( 0 );
 +            Debug( 2, "Socket closed" );
 +            //Disconnect(); // Disconnect is done outside of ReadData now.
 +            return( -1 );
          }
          else if ( bytes_read < bytes_to_read )
I want to test earler version, when i try install from repo: yum install zoneminder-1.29.0-3.el7.centos
I get dependencies error:

Code: Select all

Chyba: Balíček: zoneminder-1.29.0-3.el7.centos.x86_64 (zmrepo)
           Vyžaduje: libavformat.so.55()(64bit)
           Dostupné: ffmpeg-libs-2.1.5-1.el7.centos.x86_64 (zmrepo)
               libavformat.so.55()(64bit)
           Nainstalováno: ffmpeg-libs-2.8.7-1.el7.centos.x86_64 (@zmrepo)
              ~libavformat.so.56()(64bit)
Chyba: Balíček: zoneminder-1.29.0-3.el7.centos.x86_64 (zmrepo)
           Vyžaduje: libavformat.so.55(LIBAVFORMAT_55)(64bit)
           Dostupné: ffmpeg-libs-2.1.5-1.el7.centos.x86_64 (zmrepo)
               libavformat.so.55(LIBAVFORMAT_55)(64bit)
           Nainstalováno: ffmpeg-libs-2.8.7-1.el7.centos.x86_64 (@zmrepo)
              ~libavformat.so.56(LIBAVFORMAT_56)(64bit)
Chyba: Balíček: zoneminder-1.29.0-3.el7.centos.x86_64 (zmrepo)
           Vyžaduje: libavcodec.so.55(LIBAVCODEC_55)(64bit)
           Dostupné: ffmpeg-libs-2.1.5-1.el7.centos.x86_64 (zmrepo)
               libavcodec.so.55(LIBAVCODEC_55)(64bit)
           Nainstalováno: ffmpeg-libs-2.8.7-1.el7.centos.x86_64 (@zmrepo)
              ~libavcodec.so.56(LIBAVCODEC_56)(64bit)
When I try build earler version, i get error:

Code: Select all

+ /usr/bin/mkdir -p /builddir/build/BUILDROOT/zoneminder-1.28.1-2.el7.centos.x86_64/usr/share/doc/zoneminder-1.28.1
+ cp -pr AUTHORS /builddir/build/BUILDROOT/zoneminder-1.28.1-2.el7.centos.x86_64/usr/share/doc/zoneminder-1.28.1
+ cp -pr COPYING /builddir/build/BUILDROOT/zoneminder-1.28.1-2.el7.centos.x86_64/usr/share/doc/zoneminder-1.28.1
+ cp -pr README.md /builddir/build/BUILDROOT/zoneminder-1.28.1-2.el7.centos.x86_64/usr/share/doc/zoneminder-1.28.1
+ cp -pr distros/redhat/README.Centos7 /builddir/build/BUILDROOT/zoneminder-1.28.1-2.el7.centos.x86_64/usr/share/doc/zoneminder-1.28.1
+ cp -pr distros/redhat/jscalendar-doc /builddir/build/BUILDROOT/zoneminder-1.28.1-2.el7.centos.x86_64/usr/share/doc/zoneminder-1.28.1
cp: cannot stat 'distros/redhat/jscalendar-doc': No such file or directory
chyba: Špatný návratový kód z /var/tmp/rpm-tmp.IZwE7T (%doc)


chyby sestavení RPM:
    Špatný návratový kód z /var/tmp/rpm-tmp.IZwE7T (%doc)
ERROR: Exception(/home/builder/rpmbuild/SRPMS/zoneminder-1.28.1-2.el7.centos.src.rpm) Config(zmrepo-el7-x86_64) 1 minutes 16 seconds
INFO: Results and/or logs in: /var/lib/mock/zmrepo-el7-x86_64/result
ERROR: Command failed. See logs for output.
 # bash --login -c /usr/bin/rpmbuild -bb --target x86_64 --nodeps /builddir/build/SPECS/zoneminder.el7.spec

The build script reported failure. You should inspect the build logfiles...

/var/lib/mock/zmrepo-el7-x86_64/result/build.log  /var/lib/mock/zmrepo-el7-x86_64/result/root.log  /var/lib/mock/zmrepo-el7-x86_64/result/state.log
I am frustrated because i know that 1.29 version is working because i have it on some machines.
Someone from Mount Olympus any idea :)

bukowski
Posts: 11
Joined: Thu Feb 21, 2008 11:27 am

Re: Blue screen on network camera after upgrade

Post by bukowski » Fri Jan 13, 2017 10:36 am

So I am sure this commit broke my cameras (VIVOTEK-FD61x2)

I rebuild source and change on line 199 return( -1 ); to return( 0 ); and camera WORKS!
This is only hack for testing. Could somebody tell me why this broke old cameras?

pablopr
Posts: 1
Joined: Mon Aug 14, 2017 11:15 pm

Re: Blue screen on network camera after upgrade

Post by pablopr » Mon Aug 14, 2017 11:32 pm

I can confirm the mentioned fix does work.

Post Reply

Who is online

Users browsing this forum: Baidu [Spider] and 4 guests