No live monitor with ubuntu 13.10, socket_sendto err SOLVED

Forum for questions and support relating to the 1.25.x releases only.
Locked
zone-user
Posts: 5
Joined: Sun Feb 02, 2014 7:37 am

No live monitor with ubuntu 13.10, socket_sendto err SOLVED

Post by zone-user »

Hello Zoneminder people! I hope someone can help with this, as I have spent days banging my head trying to get it to work. I'm using a Foscam wireless IP camera, FI8905W. I can access and configure it via its own Web admin interface. But I cannot get live monitoring in Zoneminder on Kubuntu 13.10. I have searched the Web and these forums and it seems a number of people have the same problem, but no fix. I'm starting to think it is a bug, because I was able to install Zoneminder and get up and running in ten minutes on an old Linux Mint 13 installation, including live monitoring. I followed the wiki pages at http://www.zoneminder.com/wiki/index.php/Foscam_FI8904W and http://www.zoneminder.com/wiki/index.ph ... e_easy_way, and it was easy. I don't even know where to start troubleshooting. The Zoneminder logs are clean.

A lot of people are plagued with the 'socket_sendto( tmp/zm/zms-.sock ) failed: No such file or
directory' error in their ZM logs. I fixed it on my system by changing gettimeofday() to
date_default_timezone_set() on line 412 of /usr/share/zoneminder/includes/logger.php

Any bright ideas on getting live monitoring to work on Kubuntu 13.10? Or even dim ones? Thank you!
Last edited by zone-user on Mon Feb 03, 2014 9:02 pm, edited 1 time in total.
zone-user
Posts: 5
Joined: Sun Feb 02, 2014 7:37 am

Re: No live monitor with ubuntu 13.10, socket_sendto error s

Post by zone-user »

OK, I'm getting a bit of traction here. Part of the problem is a missing /dev/video0. When I plug in a webcam, it automatically creates /dev/video0. On Mint 13 /dev/video0 is created at boot, so it is always available.

So I configure Zoneminder to use the webcam, and again there is no live view. The ZM logs show no errors, and indicate that it is capturing images.

So...two problems. How the heck does Ubuntu create /dev/video0, is this one of those fun Upstart jobs? I tried creating it manually:

mknod /dev/video0 c 81 0

But it is still reported as missing.

I'm starting to think flamethrower, or big hammer.
mikb
Posts: 677
Joined: Mon Mar 25, 2013 12:34 pm

Re: No live monitor with ubuntu 13.10, socket_sendto error s

Post by mikb »

zone-user wrote:OK, I'm getting a bit of traction here. Part of the problem is a missing /dev/video0. When I plug in a webcam, it automatically creates /dev/video0. On Mint 13 /dev/video0 is created at boot, so it is always available.

So I configure Zoneminder to use the webcam, and again there is no live view. The ZM logs show no errors, and indicate that it is capturing images.

So...two problems. How the heck does Ubuntu create /dev/video0, is this one of those fun Upstart jobs? I tried creating it manually:

mknod /dev/video0 c 81 0

But it is still reported as missing.
In the old days, when Linux was young, all the /dev files and nodes had to be created by hand, or by a script, or untarred from a file, with all the right major and minor numbers. And they just sat there whether the hardware was present or not.

Then udev and HAL and that came along, and they got populated automatically as hardware was discovered (and removed)

It sounds like Ubuntu is creating it in response to plugged in hardware, and Mint has either made a permanent device, or it's detected the NSA spy camera built into your motherboard. Both are valid approaches.

Either way, could these be a permissions problem on the device?

Code: Select all

ls -la /dev/video0 
crw-rw----+ 1 root video 81, 0 Jan 25 18:40 /dev/video0
Has the user trying to access this device got permission to read and write it? If the user isn't "root", is the user in group "video" e.g.

Also: If ZMC is running and capturing from the device, but you can't see a live monitor, then your problem is not at the /dev/video0 and capturing stage, move further down the pipeline. Are events being detected? You could have a problem with the actual live-view-streaming, not the capturing, if you see what I mean.
zone-user
Posts: 5
Joined: Sun Feb 02, 2014 7:37 am

Re: No live monitor with ubuntu 13.10, socket_sendto error s

Post by zone-user »

I'm ruling out /dev/video0 as having anything to do with this. Because ZM is capturing the feed over HTTP, and not a locally-attached camera.

So yes, it looks like an Apache issue. I copied the 'var streamSrc' URL from the page source of the ZM live view and pasted it into a browser, and got this:

Code: Select all

localhost/cgi-bin/zms?mode=jpeg&monitor=1&scale=100&maxfps=5&buffer=1000&connkey=860224&rand=1391382691

Not Found

The requested URL /cgi-bin/zms was not found on this server.
When I do that on Mint 13 I see the live feed in the browser. So Apache on Kubuntu is not seeing the CGI scripts. I've checked config files and permissions and ownership, and restarted services, and I've been pounding on this so long my eyes are crossing. Somebody somewhere must have a clue??
zone-user
Posts: 5
Joined: Sun Feb 02, 2014 7:37 am

Re: No live monitor with ubuntu 13.10, socket_sendto error s

Post by zone-user »

Oh FFS, cgi is not enabled in Ubuntu 13.10 by default. Enable it this way:

$ sudo a2enmod cgi

And now I have live streaming.
mikb
Posts: 677
Joined: Mon Mar 25, 2013 12:34 pm

Re: No live monitor with ubuntu 13.10, socket_sendto error s

Post by mikb »

zone-user wrote:And now I have live streaming.
Good to hear :)

"I'm ruling out /dev/video0 as having anything to do with this. Because ZM is capturing the feed over HTTP, and not a locally-attached camera."

Yes, that would also be true! I didn't pick up on the phrase "IP Camera" in your original post!
zone-user
Posts: 5
Joined: Sun Feb 02, 2014 7:37 am

Re: No live monitor with ubuntu 13.10, socket_sendto error s

Post by zone-user »

Hopefully this will help some other people. Now I can watch me at work because my cam is on my desk, and not mounted yet :)
Locked