Page 1 of 1

Install woes: Can't get shared memory id:

Posted: Thu Feb 05, 2004 6:13 am
by pchan
Redhat 9
Kernel 2.6.1
1536M Memory

(from zmfilter-1.log)
Error: Can't get shared memory id: No such file or directory at /usr/local/bin/zmfilter.pl line 202.

(From /var/log/messages)
Feb 4 19:51:43 gw zmc-d0[5391]: INF [Debug Level = 0, Debug Log = ]
Feb 4 19:51:43 gw zmc-d0[5391]: INF [Got 1 monitors]
Feb 4 19:51:43 gw zmc-d0[5391]: INF [X:0]
Feb 4 19:51:43 gw zmc-d0[5391]: INF [Y:0]
Feb 4 19:51:43 gw zmc-d0[5391]: INF [W:320]
Feb 4 19:51:43 gw zmc-d0[5391]: INF [H:240]
Feb 4 19:51:43 gw zmc-d0[5391]: ERR [Failed to set window attributes: Invalid argument]

I've gotten ZM installed but having trouble getting it started. I've pretty much accepted all the defaults.
I'm not sure what other info would be pertinent but let me know and I'll post it. Also if there's anything else I can do to debug this, please let me know.

Thanks in advance - I really look forward to getting this running!
Pchan

[root@gw scripts]# cat /proc/sys/kernel/shmmax
1572864000
[root@gw scripts]# cat /proc/sys/kernel/shmall
134217728
[root@gw scripts]# cat /proc/sys/kernel/shmmni
4096

Re: Install woes: Can't get shared memory id:

Posted: Thu Feb 05, 2004 9:56 am
by zoneminder
Hi,

The first error is a consequence of the second. This is discussed in the following <a href="http://www.zoneminder.com/index.php?id= ... faq=9">FAQ Entry</a>.

Phil,

Re: Install woes: Can't get shared memory id:

Posted: Thu Feb 05, 2004 5:00 pm
by pchan
Phil,

Thanks for the tip. I actually tried that after the post and it did work...until..

I deleted the 1st monitor event with ID 1, and then created a new one. By default, it came up with ID 2. I got the exact same errors as I did above but this time even with ZM_STRICT_VIDEO_CONFIG set to off. Next, I modified the ID field in mysql to change it to 1 and restarted ZM - this time it was happy. As soon as I set it back to 2 without a event ID 1, ZM didn't want to startup.

Maybe I was just doing something silly since I was learning ZM, but I speculate that when a event monitor with ID 1 doesn't exist, ZM doesn't want to startup.

Great work and i'm going to enjoy trying ZM!
Pchan

Re: Install woes: Can't get shared memory id:

Posted: Thu Feb 05, 2004 5:28 pm
by zoneminder
One thing you have to be careful of is that shared memory is not deleted unless you do a full restart (as normally something else might still be using it). The consequence of this is that if you make changes that require the size of shared memory to be large than it was it can fail as shared memory cannot be resized up and will not be autocleaned while things are connected to it. You can do stuff that requires less of it but not more.

In essence what I am saying is do a 'restart' whenever you add, delete, or significantly edit, monitors. That tends to fix more things than you might expect.

Phil,