Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Live view wrong socket name #563

Closed
milefork opened this issue Nov 10, 2014 · 18 comments
Closed

Live view wrong socket name #563

milefork opened this issue Nov 10, 2014 · 18 comments

Comments

@milefork
Copy link

Hi,

if i want to Live view the Camera I recently added I get an error like this:

socket_sendto( /var/run/zm/zms-152934s.sock ) failed: No such file or directory

while looking at this directory there exists a zms-152934w.sock .
Have I configured something wrong?

@knight-of-ni
Copy link
Member

That happens when your Apache ScriptAlias directive is configured incorrectly or overlaps with another ScriptAlias (like the one that ships with your httpd.conf). I once figured out why it manifests as a name discrepancy, but I forget now.

You did not state what distro you are using so I can't be more specific than that.

@milefork
Copy link
Author

my distry:

DISTRIB_ID=Ubuntu
DISTRIB_RELEASE=14.04
DISTRIB_CODENAME=trusty
DISTRIB_DESCRIPTION="Ubuntu 14.04.1 LTS"

my apache2 config:

root@fork-virtual-machine:/etc/apache2/sites-enabled# ls -la
insgesamt 12
drwxr-xr-x 2 root root 4096 Nov 10 21:14 .
drwxr-xr-x 8 root root 4096 Nov 10 21:14 ..
-rw-r--r-- 1 root root 981 Sep 29 16:24 000-default
lrwxrwxrwx 1 root root 35 Sep 29 16:19 000-default.conf -> ../sites-available/000-default.conf
lrwxrwxrwx 1 root root 19 Nov 10 21:09 zoneminder.conf -> /etc/zm/apache.conf

and my zoneminder.conf

root@fork-virtual-machine:/etc/apache2/sites-enabled# cat zoneminder.conf
Alias /zm /usr/share/zoneminder
ScriptAlias /cgi-bin /usr/share/zoneminder/cgi-bin

<Directory /usr/share/zoneminder>
php_flag register_globals off
Options Indexes FollowSymLinks

DirectoryIndex index.php

<Directory "/usr/share/zoneminder/cgi-bin">
AllowOverride None
Options +ExecCGI -MultiViews +SymLinksIfOwnerMatch
Order allow,deny
Allow from all

still get's the error

@knight-of-ni
Copy link
Member

Check the contents of 000-default. It also contains a ScriptAlias directive that likely overlaps with the one you added to zoneminder.conf.

@milefork
Copy link
Author

no sorry: http://pastebin.com/W6cJkiuu

i think whatever creates the socket, names it wrong instread with a swith a w

@SteveGilvarry
Copy link
Member

Nope looks like w and s files are two separate things, remote remsockfile and local locsockfile.
https://github.com/ZoneMinder/ZoneMinder/blob/master/web/ajax/stream.php

@knight-of-ni
Copy link
Member

That's correct. Steve you beat me to it! ;-)

There is a configuration issue somewhere, which is why that second sock file is not being created. Verify the paths under options, especially if this is part of an upgrade and you have changed your (zoneminder) build method or version of Ubuntu.

Can you give us a full page of your log file, so we can get some context as to what is going on?

@SteveGilvarry
Copy link
Member

Could it be this Apache ModCGI? I think I found the package doesn't do any apache config when I installed Ubuntu 14.04 1.28 last week.
https://bugs.debian.org/cgi-bin/bugreport.cgi?bug=741738#30

@milefork
Copy link
Author

Log from restart : http://puu.sh/cMNM2/26c55d18d8.png

Options:Path: http://puu.sh/cMNGn/fced549b57.png

Camera Page 1: http://puu.sh/cMNQ9/1a92b86a58.png
Camera Page 2: http://puu.sh/cMNUf/5a4dfb4a45.png

If you need something more please tell me 👍

Also done the steps in the last post of the BugReport on Debian -> see Images.

@knight-of-ni
Copy link
Member

That looks like a Foscam camera.

Without attempting to open a live stream, (re)start zoneminder and wait a little longer while watching your logs... you should get repeating INFO messages stating "Capturing at x.xx fps", which indicates the backend is working properly. Please confirm.

You've got the monitor configured for 320x240 resolution. Is that exact same resolution set in the camera?

This isn't related, but you should get increased performance by setting your colorspace to 32bits.

@milefork
Copy link
Author

Yes it's a Foscam http://puu.sh/cMR43/0e93955472.png

And yes the entries are in the log -> http://puu.sh/cMQWE/20a4e28fd1.png

Also updated my resolution and bitrate

@knight-of-ni
Copy link
Member

That's the same camera I've got. It works well.

ZM_PATH_ZMS is relative to your webroot. It cannot be an absolute folder path.
Change it to /cgi-bin/nph-zms

@milefork
Copy link
Author

Lol nice now it works! With fancy 3,4 fps :D
It seems that I had to wait until this comes http://puu.sh/cMTtd/b76631fbb7.png
But what does the warning mean?

@knight-of-ni
Copy link
Member

You do have to wait a little longer for ffmpeg cameras to "warm up" before the live view works. My camera does the same thing.

You can ignore that shared data warning. It just means that, for a split second, the shared memory for that monitor wasn't ready. Since you did get an image, it became ready shortly after.

I'm not sure about the other one. Never seen that one.

@SteveGilvarry
Copy link
Member

@milefork Assume this can be closed?

@milefork
Copy link
Author

Yes thank you all!

teocci added a commit to teocci/ZoneMinder that referenced this issue Jun 15, 2016
When watch.php calls to this address we have a problem because this address is not recognized by the apache server.
http://localhost/cgi-bin/nph-zms?mode=jpeg&scale=100&maxfps=5&buffer=1000&monitor=3&connkey=29272&rand=686800
Also, according to the default configuration the ScriptAlias  was defined like this "/zm/cgi-bin" and the Alias as /zm.
Therefore, we hate to add the ZM_BASE_PATH to the ZM_BASE_URL to create the $streamSrc path.
And also cam be combined with this command to ensure that the problem is solved
sudo ln -s /usr/lib/zoneminder/cgi-bin/nph-zms /usr/lib/cgi-bin/

Related with the issue ZoneMinder#563
@slippers
Copy link

had this issue: the PATH_ZMS path and the apache path for the cgi did not match. was missing /zm/cgi...

also added +FollowSymLinks to the zonminder.conf for cgi

@grndamgt4
Copy link

slippers, thank you. Adding "/zm" in front of "/cgi-bin/nph-zms" to make it "/zm/cgi-bin/nph-zms" under options->path tab->PATH_ZMS fixed this for me.

@knight-of-ni
Copy link
Member

Guys, properly configuring PATH_ZMS is part of the installation documentation of every distro we support.
Please make sure and read the documentation for your distro after every installation and upgrade.

@ZoneMinder ZoneMinder locked and limited conversation to collaborators Jan 6, 2017
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

No branches or pull requests

5 participants