Page 1 of 1

Can't bind address problems.

Posted: Thu Feb 03, 2005 11:18 am
by Knoppix-Zoneminder
I am running ZM 1.19.5 on Knoppix (3.7) that has been installed to Hard Disk.

I had a little trouble getting ZM to run initially, but for the last 2 months or so it has been working reliably.

The only way i could get my devices to turn green was to change from modetect to monitor, trying to run any other way didnt work, still i was happy as i did have a working system.

My eventual aim was to be able to run direct from a remastered Knoppix CD, and i am still working on this, and will release this if / when i ever get it working, with this in mind i tried to get the zm script in the /etc/init.d directory to work, during this attempt i have broken my hdd version.

The first hint of this in the logfiles (zmdc.log) is

"Can't locate MIME/Entity.pm in @INC (@INC contains: /etc/perl /usr/local/lib/perl/5.8.4 /usr/local/share/perl/5.8.4 /usr/lib/perl5 /usr/share/perl5 /usr/lib/perl/5.8 /usr/share/perl/5.8 /usr/local/lib/site_perl) at /usr/local/bin/zmfilter.pl line 87."

Now zmc wont start, this shows up in the same log file as "Can't bind: Address already in use at /usr/local/bin/zmdc.pl line 166"

Can anyone give me a hint as to what has gone wrong ?.

Here is a section of the zmdc.log.

---------------------------------------------------------------------
Can't bind: Address already in use at /usr/local/bin/zmdc.pl line 166.
Starting pending process, zmfilter.pl
'zmfilter.pl' starting at 05/02/02 20:09:49, pid = 32309
'zmfilter.pl' started at 05/02/02 20:09:49
Can't locate MIME/Entity.pm in @INC (@INC contains: /etc/perl /usr/local/lib/perl/5.8.4 /usr/local/share/perl/5.8.4 /usr/lib/perl5 /usr/share/perl5 /usr/lib/perl/5.8 /usr/share/perl/5.8 /usr/local/lib/site_perl) at /usr/local/bin/zmfilter.pl line 87.
BEGIN failed--compilation aborted at /usr/local/bin/zmfilter.pl line 87.
'zmfilter.pl ' crashed at 05/02/02 20:09:49, exit status 2
'zmc -d 0' died at 05/02/02 20:10:21
'zmc -d 0' starting at 05/02/02 20:10:21, pid = 32364
'zmc -d 0' started at 05/02/02 20:10:21
Server starting at 05/02/02 20:10:32
zmc(32364): Operation not permitted
zma(30344): Operation not permitted
zma(30353): Operation not permitted
zmaudit.pl(30362): Operation not permitted
zmwatch.pl(30367): Operation not permitted
zmupdate.pl(30374): Operation not permitted
zmc(32364): Operation not permitted
zma(30344): Operation not permitted
zma(30353): Operation not permitted
zmaudit.pl(30362): Operation not permitted
zmwatch.pl(30367): Operation not permitted
zmupdate.pl(30374): Operation not permitted
Can't bind: Address already in use at /usr/local/bin/zmdc.pl line 166.
Server starting at 05/02/02 20:10:42
zmc(32364): Operation not permitted
zma(30344): Operation not permitted
zma(30353): Operation not permitted
zmaudit.pl(30362): Operation not permitted
zmwatch.pl(30367): Operation not permitted
zmupdate.pl(30374): Operation not permitted
zmc(32364): Operation not permitted
zma(30344): Operation not permitted
zma(30353): Operation not permitted
zmaudit.pl(30362): Operation not permitted
zmwatch.pl(30367): Operation not permitted
zmupdate.pl(30374): Operation not permitted
Can't bind: Address already in use at /usr/local/bin/zmdc.pl line 166.
Server starting at 05/02/02 20:10:52
zmc(32364): Operation not permitted
zma(30344): Operation not permitted
zma(30353): Operation not permitted
zmaudit.pl(30362): Operation not permitted
zmwatch.pl(30367): Operation not permitted
zmupdate.pl(30374): Operation not permitted
zmc(32364): Operation not permitted
zma(30344): Operation not permitted
zma(30353): Operation not permitted
zmaudit.pl(30362): Operation not permitted
zmwatch.pl(30367): Operation not permitted
zmupdate.pl(30374): Operation not permitted
Can't bind: Address already in use at /usr/local/bin/zmdc.pl line 166.
Server starting at 05/02/02 20:11:03
zmc(32364): Operation not permitted
zma(30344): Operation not permitted
zma(30353): Operation not permitted
zmaudit.pl(30362): Operation not permitted
zmwatch.pl(30367): Operation not permitted
zmupdate.pl(30374): Operation not permitted
zmc(32364): Operation not permitted
zma(30344): Operation not permitted
zma(30353): Operation not permitted
zmaudit.pl(30362): Operation not permitted
zmwatch.pl(30367): Operation not permitted
zmupdate.pl(30374): Operation not permitted
Can't bind: Address already in use at /usr/local/bin/zmdc.pl line 166.
-------------------------------------------------------------

Posted: Thu Feb 03, 2005 6:18 pm
by zoneminder
You can ignore MIME::Entity as that just applies to emailed filters, though it won't hurt to install it otherwise filters won't work automatically.

The bind problem is just a general socket problem in that zmdc can't start as the address (or socket file in this case) it wants to use is still in use by something else. Most likely a previous instance of zmdc.pl. You should shutdown zm and then make sure all zm processes are gone before trying to restart which should hopefully fix it.

Phil

Posted: Thu Feb 03, 2005 7:42 pm
by Knoppix-Zoneminder
Thanks for the advice regarding Entity.

As for the other problem, i guessed it was a socket problem, however a reboot didnt fix the problem (tried this 2 or 3 times) .

I did manage to eventually fix the problem, while in the /tmp directory i noticed a "zm sock" file (sorry cant remember the exact name) , and deleted this and ZM started working again, hope this helps someone in the future.

It still wont work from the startup script, any hints on how to get this to work under Knoppix would be very well recieved.

As a reminder the only way i can start ZM is to change from say "Modetect" to "Monitor" (using Function) , I have to do this with all 4 cameras to get the corresponding "source" to turn green. If i click on Running (or indeed Stopped) and select a different action, then the state of ZM does not change, EG , if i select Stop, ZM does not stop, if i select start it does not start.

Posted: Thu Feb 03, 2005 8:09 pm
by zoneminder
Are you using Ross's LiveCD version? That is an off the shelf Knoppix based ZM distro. Either way Ross is the expert at Knoppix so I would suggest posting your question inthe LiveCD forum as I'm sure he'll be able to help.

Phil

Posted: Fri Feb 04, 2005 8:01 am
by Knoppix-Zoneminder
No, i am using a bog standard HD Knoppix install that i modified myself.

I wasn't aware there was a Knoppix / ZM version available, i thought the Live CD was Mandrake based.

Ill go take a look, thanks.

Posted: Fri Feb 04, 2005 8:10 am
by Knoppix-Zoneminder
I've looked again at the Live CD version, and it does indeed look like a Mandrake based system, i am running knoppix which is a system based upon Debian.

My aim (still very early days) is to be able to remaster Knoppix and have ZM run directly from the CD, EG, no hdd install needed.

Posted: Fri Feb 04, 2005 8:52 am
by zoneminder
Ooops, sorry. I don't know where I got Knoppix from! I think I must have had it on the brain that day.

I don't know if this applies to Knippix but Slackware for example doesn't like the syntax of some of the 'su' commands in the scripts. You could try search the forum for slackware and applying the same changes. Actually there is a document in the Documentation section that describes them. It was originally written for an older version of ZM but it should pretty much apply still.

Phil

Posted: Sat Feb 05, 2005 8:44 pm
by Knoppix-Zoneminder
I am aware of the problems with slackware, Ill investigate these problems when i have the time, but with 14 - 16 hour days 6 days a week, i 'm not sure when that will be.