Page 1 of 2

Basic Setup

Posted: Tue Nov 16, 2004 4:16 pm
by thazard
I'm missing something obvious because this is the most difficult thing I have ever attempted to install!!!
Redhat 8
ZM 1.19.5
MySQL 4.1.7
PHP 5.0.2
Apache 2.0.40
Perl5 5.8.0

When I bring up the console, all I get is:

ZoneMinder -- :/:%

<?= $zmSlangRefresh ?> <?= $zmSlangAddNewMonitor ?> <?= $zmSlangDelete ?>


What gives? It seems like php isn't doing its job.

MySQL seems to be up and working as I can log in a browse tables.
I've looked through the various log files but nothing is obvious yet.

Any clues for the apparently clueless?

Posted: Tue Nov 16, 2004 5:27 pm
by thazard
Ok.... fixed the short-tags=On problem.

Now the console is up and looks normal. I created a monitor, but I get /var/log/messages errors that "cant connect to /tmp/mysql.sock when I try and view the monitor.
This is obvious as there is no /tmp/mysql.sock!

What process is supposed to set this up?

as before: mysql mysql works as well as the other users that were supposed to be set up.
BTW, xawtv works fine so the video should be no problem if I can just get to it.

Posted: Tue Nov 16, 2004 5:48 pm
by thazard
Hacked in a link from /tmp/mysql.sock to /var/lib/mysql/mysql.sock so those errors are gone.

Still no video
zmc --device 0 produces a segmentation fault with
Nov 16 09:44:36 localhost zmc-d0[25822]: INF [Debug Level = 0, Debug Log = ]
in /var/log/messages

Posted: Tue Nov 16, 2004 9:06 pm
by oskin
In mysql v4.1.7 it is a little changed API against the previous versions. I have noticed it at recompilation of some packages for Fedora Core 3 with mysql-4.1.7. Probably a reason in it.
I compiled ZoneMinder with mysql-4.1.6 and later have made upgrade mysql up to 4.1.7. It works. To compile ZoneMinder with mysql-4.1.7 yet did not try.
To Phil: I shall try it, but not earlier, than in a week...

Re: Basic Setup

Posted: Wed Nov 17, 2004 12:01 pm
by amit
same is the problem here when i am running mysql the error it is quoting is
"can't connect to local MySql server through socket '/var/lib/mysql/mysql.sock'.
any clues regrading this error.?????
________
weed vaporizers

Posted: Wed Nov 17, 2004 1:19 pm
by zoneminder
The mysql.sock errors are nearly always caused by a disagreement between the mysel server software and the mysql php module over where the mysql.sock actually is. Assuming mysql is actually running then you will sometimes have to create a link from it's actual location to where the mysql module expects it, as described above.

Phil,

Posted: Wed Nov 17, 2004 3:07 pm
by thazard
My current problem is zmc throwing a segmentation fault. i.e. when running 'zmc -d0'. My C++ debugging days have long gone but it seems to blowing up when it's calling the Monitor::Monitor creator function within Monitor::Load. I've tried stubbing off all the parameters coming from the database but it still fails. I tried setting the class variables within the body of the creator instead of the header to try and isolate the call, but to no avail.
If I comment out the new Monitor call, it fails elsewhere as it probably should but this seems to indicate to me that the creator function is having a problem.

Any thoughts?? (How about the 30 word tutorial on C++ debugging?)

Posted: Wed Nov 17, 2004 3:44 pm
by zoneminder
30 words eh?

Ok

Code: Select all

gdb zmc
run --device 0
<wait for crash>
bt (to get backtrace)
quit
If you can capture the output of the 'bt' bit and paste that here it would be a help. It does sounds a bit database-ish though.

Phil,

Posted: Wed Nov 17, 2004 4:15 pm
by thazard
Just the right incantation! Who said it couldn't be said in 30 words.
It looks like I was getting close. Seems to be in the Monitor creator function creating an Image object. The database was working up to this point to get the parameters to create the Monitor!


GNU gdb Red Hat Linux (5.2.1-4)
Copyright 2002 Free Software Foundation, Inc.
GDB is free software, covered by the GNU General Public License, and you are
welcome to change it and/or distribute copies of it under certain conditions.
Type "show copying" to see the conditions.
There is absolutely no warranty for GDB. Type "show warranty" for details.
This GDB was configured as "i386-redhat-linux"...
(gdb) run --device 0
Starting program: /home/tjames/zm-1.19.5/src/zmc --device 0

Program received signal SIGSEGV, Segmentation fault.
0x0807a7cc in mysql_send_query ()
(gdb) bt
#0 0x0807a7cc in mysql_send_query ()
#1 0x0807a7fb in mysql_real_query ()
#2 0x08064c8f in mysql_query ()
#3 0x0804c5f2 in Config::Load() (this=0x81649e0) at zm_config.cpp:142
#4 0x0804c7b5 in Config::Item(int) (this=0x81649e0, id=11)
at zm_config.cpp:166
#5 0x0804c844 in Image::Initialise() () at zm_config.h:73
#6 0x0804ea8d in Image (this=0xd29cc64, p_width=384, p_height=288,
p_colours=3, p_buffer=0x0) at zm_image.h:106
#7 0x0805776d in Monitor (this=0xd29cb80, p_id=0,
p_name=0xd29ee66 "Wireless", p_function=0, p_device=0, p_channel=0,
p_format=1, p_width=0, p_height=0, p_palette=4, p_orientation=1,
p_brightness=-1, p_contrast=-1, p_hue=-1, p_colour=-1,
p_event_prefix=0xd29ee8f "Event-",
p_label_format=0xd29ee96 "%%s - %y/%m/%d %H:%M:%S",
p_label_coord=@0x81629e0, p_image_buffer_count=0, p_warmup_count=0,
p_pre_event_count=0, p_post_event_count=0, p_alarm_frame_count=0,
p_section_length=0, p_frame_skip=0, p_capture_delay=0,
p_fps_report_interval=0, p_ref_blend_perc=0, p_purpose=QUERY, p_n_zones=0,
p_zones=0x0) at zm_monitor.cpp:95
#8 0x0805aabf in Monitor::Load(int, Monitor**&, Monitor::Purpose) (device=0,
monitors=@0xbffff6d8, purpose=CAPTURE) at /usr/include/stdlib.h:382
#9 0x0804b4d5 in main (argc=-1073743712, argv=0xbffff914) at zmc.cpp:155
#10 0x420158d4 in __libc_start_main () from /lib/i686/libc.so.6
(gdb)

What next?? (some parameter or setting I have mis-configured?)

Posted: Wed Nov 17, 2004 4:31 pm
by zoneminder
It's actually dying in the Config::Load call. This is called whenever the first configuration item value is requested.

I suspect this may be related to another problem that someone else reported. Can you find and check the mysql log file?

Phil,

Posted: Thu Nov 18, 2004 4:36 am
by thazard
The last entries in the /var/log/mysqld.log file are:
041116 17:58:55 mysqld started
041116 17:58:58 InnoDB: Started; log sequence number 0 43634
/usr/local/mysql/bin/mysqld: ready for connections.
Version: '4.1.7-max' socket: '/var/lib/mysql/mysql.sock' port: 3306 Official MySQL-max binary

i.e. no errors!

Is there a more relevant mysql log somewhere else?

the results of a printf("query->%s\n",sql); placed just before the
mysql_query(&dbconn,sql); in Config::Load is:
query->select Name, Value, Type from Config order by Id

If this query is preformed in mysql by hand, i.e. is:
mysql mysql
use zm
select Name, Value, Type from Config order by Id;

produces 128 rows of results and seems ok

Posted: Thu Nov 18, 2004 8:47 am
by zoneminder
Someone else (though only one person) reported a problem with mysql dying if a query was executed while aother query was active. As this should be the same for everyone it seems odd that no-one else gets an error.

Anyway, you could try adding a line

Code: Select all

    Image temp_image();
just after the zmDbConnect in zmc.cpp and then rebuilding, reinstalling etc. That should force the config to be loaded before the other query runs.

Phil,

RE:to queries related with mysql.sock

Posted: Thu Nov 18, 2004 12:39 pm
by amit
this problem is related to mysql daemon
probably this is stopped on your system, as was on my system.

start the mysqld
using service mysqld start
hopefully that will work for you guys..

now i have a problem
i 'm not able to start zm

i give a command to start
./zm start
and this error is thrown

Starting ZoneMinder: Bareword "ZM_PATH_LOGS" not allowed while "strict subs" in use at /usr/local/bin/zmpkg.pl line 62.
BEGIN not safe after errors--compilation aborted at /usr/local/bin/zmpkg.pl line 63.
FAILED]

please help at the earliest
________
smoke weed every day

Posted: Thu Nov 18, 2004 12:52 pm
by zoneminder
Have you run zmconfig.pl to populate the database with your initial configuration?

Phil,

Posted: Thu Nov 18, 2004 1:25 pm
by amit
no i am getting this problem on ./zm start
Starting ZoneMinder: Can't chdir to 'yes': No such file or directory at /usr/local/bin/zmpkg.pl line 149.
FAILED]
________
vaporizer shop