Page 1 of 1

ERR [Can't run query: Commands out of sync; You can't run..

Posted: Tue Oct 12, 2004 3:25 am
by royleonard
Hi,

I've recently installed zoneminder. It looks great, but I haven't yet got it to work. I've read the Readme and the trouble shooting FAQ, and I'm still at a loss. I've got kdb out to help me along too!

I seem to be having multiple problems: "Shared Memory" & SQL Query issues.

I've installed 1.19.5.

zmc seems to be crashing on startup.
In zmdc.log, I'm getting

"zmc -d 0 crashed at...exit status 222"


I'm also getting

"ERR [Can't run query: Commands out of sync; You can't run this command now]"
This seems to be coming from zm_config.cpp line 144 in Config::Load()

in zmwatch.log, i'm getting more bad messages:
"Can't get shared memory id '...': no such file or directory."

I've also implemented the faq about changing /proc/sys/kernel/shmall but to no avail.


Has anybody encountered these issues before? Can anyone point me in the right direction?

I'ld much appreciate it!

Cheers,

Roy

Posted: Tue Oct 12, 2004 11:02 am
by zoneminder
Hi,

I think your second error is a result of your first so that's the first one to address.

It looks like it's mysql complaining about sequencing but I've never seen it before. WHat version of mysql do you have installed?

Phil,

Posted: Tue Oct 12, 2004 3:23 pm
by royleonard
Hi,

It's "mysql Ver 11.18 Distrib 3.23.58, for redhat-linux-gnu (i386)" .

I'm double checking it right now, and I think I might have screwed up. When compiling, I think that I used a different version of mysql.

Thanks,

Roy

Posted: Tue Oct 12, 2004 5:54 pm
by royleonard
I've double checked the version of the database, it's good now

mysql Ver 12.22 Distrib 4.0.21, for pc-linux (i686)

Any other suggestions for something that I can check?

Can I see the full sequence of SQL queries that are going on? maybe I could attempt them by hand?

Cheers,

Roy

Posted: Tue Oct 12, 2004 8:10 pm
by zoneminder
The error indicates that one query is starting before another finishes. This may be the case as the configuration is loaded only when the first config item is accessed and this may be during another query, though I can't think of where. However I've used concurrent queries a number of times before with no problem so I don't know what the issue is that you are getting, and more importantly why you are the only one who gets it.

If you have access to a debugger maybe you could run the zmc command from gdb and put a break point on 'exit', then at least we could trace what the other query was. If you need more instructions on how to do this just let me know.

Phil,

Posted: Fri Oct 22, 2004 11:54 pm
by royleonard
Hi Phil

I was using the /dev/video0 device (Hauupauge WIntv Card). When I changed to using a network Camera D-Link DCS-900, i don't get the error. If I change back again, it will fail again.

whats the easiest way to trace all SQL Commands coming from Zoneminder (zmc) ?
Or do I just grab a pencil and Step through the debugger?

Cheers,

Roy

Posted: Sat Oct 23, 2004 5:53 pm
by zoneminder
I think you ca set mysel to log all commands though off the top of my head I can't remember how.

The easiest way to debug this is to shut down ZM and then do

Code: Select all

gdb zmc
and then type

Code: Select all

b exit
run -d 0
which should run until it gets the error when it will break back to the prompt, so type

Code: Select all

bt
for a backtrace and post what you see.

Sometimes of course these things don't show up in the debugger but fingers crossed it will.

Phil,