Zoneminder no streaming images for web interface

Forum for questions and support relating to the 1.25.x releases only.
Locked
elbek
Posts: 11
Joined: Tue Dec 06, 2011 5:33 pm

Zoneminder no streaming images for web interface

Post by elbek »

Hi everybody. I had a Debian Squeeze 64 bits + Zoneminder box with 8 cameras working for many months without errors. My DVR card is a Pico2000 chipset 16 Channels. Today when open a window for streaming theres no image in any one camera. :?:

First I check logs. This is what i found

This error appears many times:

Mar 13 08:15:56 zm web_php[18340]: ERR [socket_sendto( /tmp/zm/zms-686810s.sock ) failed: No such file or directory]

and this appears when try to watch streaming images. Many times too:

Mar 13 08:15:55 zm zms[1021]: ERR [Unable to authenticate user]
Mar 13 08:15:55 zm zms[1022]: ERR [Unable to authenticate user]
Mar 13 08:15:55 zm zms[1023]: ERR [Unable to authenticate user]


Looks like a Msyql password error. I check for Users, Passwords in Mysql and .conf files for Zoneminder but everything is ok.

I downloaded zm4ms (ViseonViewer) and configure it to work with zoneminder server and surprise: it works!! then check for records. I can't see record streaming but can see images. I mean zoneminder and cameras are working but not for my web interface.

shutting down server I see an error message:

Stoping ZoneMinder: DBI connect('database=zm;host=localhost','user',...) failed: Can't connect to MySQL server through socket '/var/run/msyqld/mysqld.sock' (2) at /usr/local/share/perl/5.10.1/ZoneMinder/Logger.pm line 458 DBI connect('database=zm;host=localhost','user',...) failed: Can't connect to MySQL server through socket '/var/run/msyqld/mysqld.sock' (2) at /usr/local/share/perl/5.10.1/ZoneMinder/Database.pm line 90 Can't call method "trace" on an undefined value at /usr/local/share/perl/5.10.1/ZoneMinder/Database.pm line 92. Failure

Again I check for Users, Passwords in Mysql and .conf files for Zoneminder but everything is ok.

Starting server again the error message doesnt appear. Same situation with /etc/init.d/zm restart or start :roll:

Could somebody please help me. At this momento I dont know what else I can do

Thanks. :|
elbek
Posts: 11
Joined: Tue Dec 06, 2011 5:33 pm

Re: Zoneminder no streaming images for web interface

Post by elbek »

Well, after search and search info about this issue finally its solved. Not in the best way but it works meanwhile.

You can find the answer for this issue in: http://debianyderivadas.blogspot.com/20 ... on-de.html

Basically you can check option OPT_USE_AUTH for users login but you must change: Options ----> System ----> AUTH_RELAY to none.

I will try to search about this especifically issue with relay authentication methods.

Thanks. 8)
Gukanzu
Posts: 1
Joined: Thu Mar 22, 2012 1:55 am

Re: Zoneminder no streaming images for web interface

Post by Gukanzu »

I have exactly the same problem.

in my case this happened when i updated Zoneminder between 1.25.x versions on OpenSUSE 12.1

I tried the solution you gave and it worked :D .

thank you very much.
pd: sorry for my bad english.
cbagwell
Posts: 4
Joined: Sat Jun 16, 2012 1:59 am

Re: Zoneminder no streaming images for web interface

Post by cbagwell »

Here is what I found to be a better solution. It works but maybe someone else can use it to come up with a code change solution inside zoneminder that works out-of-the-box.

The issue seems to be AUTH_RELAY defaults to hash (a good thing) but that the way the hash is computed is based on a different time&date then what is used by zm_user.cpp when authenticating.

The PHP version is defaulting to UTC timezone in most people's fresh setup but zm_user.cpp is using localtime(); which is your local timezone.

The fix for me was to edit /etc/php.ini, uncomment the date.timezone line and and; in my case; change the line 'date.timezone = America/Chicago'. Now the hash is built with matching hour+date after restarting.

How do other apps handle this? Are there UTC-always versions of these functions in both PHP and C?

Chris
elbek
Posts: 11
Joined: Tue Dec 06, 2011 5:33 pm

Re: Zoneminder no streaming images for web interface

Post by elbek »

Thanks cbagwell.

This looks like a better solution. I will try it soon.

Thank you.
Locked