Gentoo Forums
Gentoo Forums
Gentoo Forums
Quick Search: in
Zoneminder Segfault after MariaDB-10.1.34
View unanswered posts
View posts from last 24 hours

Goto page Previous  1, 2, 3  
Reply to topic    Gentoo Forums Forum Index Multimedia
View previous topic :: View next topic  
Author Message
shimitar
Guru
Guru


Joined: 23 Nov 2003
Posts: 320
Location: Italy, Torino

PostPosted: Fri Dec 14, 2018 7:06 am    Post subject: Reply with quote

I fixed it. It seems one symlink was missing from:
Code:

ln -s /var/cache/zoneminder /usr/share/zoneminder/www/cache

_________________
Willy Gardiol
willy@gardiol.org
Back to top
View user's profile Send private message
number9
n00b
n00b


Joined: 23 Nov 2018
Posts: 7

PostPosted: Fri Dec 21, 2018 12:14 pm    Post subject: Late to the game, but Reply with quote

I note that this thread solved my issue a while back, but I just did an emerge sync and then update world, BUT I forgot to lock down zoneminder,
and it was upgraded to 1.30.4. Well, my once working zoneminder will no longer start. I am having some trouble figuring out
why it will not start. /var/log/messages seems to indicate that there is a problem with libmysqlclient.so.18.4.0, and also with AnalysisFPS, but
for some reason I feel like that might be a red herring.

Also note, I upgraded the db with zmupdate.pl, it seemed to run without incident.

Here is the output of /var/log/messages after I start zoneminder.

Code:

Dec 21 05:56:12 grid zmpkg[30004]: INF [Sanity checking States table...]
Dec 21 05:56:12 grid zmpkg[30004]: INF [Command: start]
Dec 21 05:56:12 grid su[30014]: Successful su for apache by root
Dec 21 05:56:12 grid su[30014]: + /dev/pts/0 root:apache
Dec 21 05:56:12 grid su[30014]: pam_unix(su:session): session opened for user apache by number9(uid=0)
Dec 21 05:56:12 grid su[30014]: pam_unix(su:session): session closed for user apache
Dec 21 05:56:12 grid su[30016]: Successful su for apache by root
Dec 21 05:56:12 grid su[30016]: + /dev/pts/0 root:apache
Dec 21 05:56:12 grid su[30016]: pam_unix(su:session): session opened for user apache by number9(uid=0)
Dec 21 05:56:12 grid su[30016]: pam_unix(su:session): session closed for user apache
Dec 21 05:56:12 grid su[30020]: Successful su for apache by root
Dec 21 05:56:12 grid su[30020]: + /dev/pts/0 root:apache
Dec 21 05:56:12 grid su[30020]: pam_unix(su:session): session opened for user apache by number9(uid=0)
Dec 21 05:56:12 grid zmdc[30024]: INF [Server starting at 18/12/21 05:56:12]
Dec 21 05:56:15 grid su[30020]: pam_unix(su:session): session closed for user apache
Dec 21 05:56:15 grid zmpkg[30004]: INF [Single server configuration detected. Starting up services.]
Dec 21 05:56:15 grid su[30049]: Successful su for apache by root
Dec 21 05:56:15 grid su[30049]: + /dev/pts/0 root:apache
Dec 21 05:56:15 grid su[30049]: pam_unix(su:session): session opened for user apache by number9(uid=0)
Dec 21 05:56:16 grid zmdc[30024]: INF ['zmc -m 1' starting at 18/12/21 05:56:16, pid = 30053]
Dec 21 05:56:16 grid zmdc[30053]: INF ['zmc -m 1' started at 18/12/21 05:56:16]
Dec 21 05:56:16 grid su[30049]: pam_unix(su:session): session closed for user apache
Dec 21 05:56:16 grid su[30056]: Successful su for apache by root
Dec 21 05:56:16 grid su[30056]: + /dev/pts/0 root:apache
Dec 21 05:56:16 grid su[30056]: pam_unix(su:session): session opened for user apache by number9(uid=0)
Dec 21 05:56:16 grid zmc_m1[30053]: ERR [Can't run query: Unknown column 'AnalysisFPS' in 'field list']
Dec 21 05:56:16 grid zmdc[30024]: INF ['zmc -m 1' crashed, signal 10]
Dec 21 05:56:16 grid kernel: zmc[30053]: segfault at 0 ip 00007fbdcf684850 sp 00007ffef08dcad8 error 4 in libmysqlclient.so.18.4.0[7fbdcf642000+34a000]
Dec 21 05:56:16 grid zmdc[30024]: INF [Starting pending process, zmc -m 1]
Dec 21 05:56:16 grid zmdc[30024]: INF ['zmc -m 1' starting at 18/12/21 05:56:16, pid = 30060]
Dec 21 05:56:16 grid zmdc[30060]: INF ['zmc -m 1' started at 18/12/21 05:56:16]
Dec 21 05:56:16 grid zmc_m1[30060]: ERR [Can't run query: Unknown column 'AnalysisFPS' in 'field list']
Dec 21 05:56:16 grid zmdc[30024]: INF ['zmc -m 1' crashed, signal 10]
Dec 21 05:56:16 grid kernel: zmc[30060]: segfault at 0 ip 00007f6fa38e9850 sp 00007fff2d04d758 error 4 in libmysqlclient.so.18.4.0[7f6fa38a7000+34a000]
Dec 21 05:56:16 grid zmdc[30024]: INF ['zma -m 1' starting at 18/12/21 05:56:16, pid = 30067]
Dec 21 05:56:16 grid zmdc[30067]: INF ['zma -m 1' started at 18/12/21 05:56:16]
Dec 21 05:56:16 grid su[30056]: pam_unix(su:session): session closed for user apache
Dec 21 05:56:16 grid su[30070]: Successful su for apache by root
Dec 21 05:56:16 grid su[30070]: + /dev/pts/0 root:apache
Dec 21 05:56:16 grid su[30070]: pam_unix(su:session): session opened for user apache by number9(uid=0)
Dec 21 05:56:16 grid zma_m1[30067]: ERR [Can't run query: Unknown column 'AnalysisFPS' in 'field list']
Dec 21 05:56:16 grid kernel: zma[30067]: segfault at 0 ip 00007f4423fa3850 sp 00007ffc71638278 error 4 in libmysqlclient.so.18.4.0[7f4423f61000+34a000]
Dec 21 05:56:16 grid zmdc[30024]: INF ['zma -m 1' crashed, signal 10]
Dec 21 05:56:16 grid zmdc[30024]: INF [Starting pending process, zma -m 1]
Dec 21 05:56:16 grid zmdc[30024]: INF ['zma -m 1' starting at 18/12/21 05:56:16, pid = 30074]
Dec 21 05:56:16 grid zmdc[30074]: INF ['zma -m 1' started at 18/12/21 05:56:16]
Dec 21 05:56:16 grid zma_m1[30074]: ERR [Can't run query: Unknown column 'AnalysisFPS' in 'field list']
Dec 21 05:56:16 grid kernel: zma[30074]: segfault at 0 ip 00007f9b3c2c1850 sp 00007ffe2bd501a8 error 4 in libmysqlclient.so.18.4.0[7f9b3c27f000+34a000]
Dec 21 05:56:16 grid zmdc[30024]: INF ['zma -m 1' crashed, signal 10]
Dec 21 05:56:16 grid zmdc[30024]: INF ['zmc -m 2' starting at 18/12/21 05:56:16, pid = 30081]
Dec 21 05:56:16 grid zmdc[30081]: INF ['zmc -m 2' started at 18/12/21 05:56:16]
Dec 21 05:56:16 grid su[30070]: pam_unix(su:session): session closed for user apache
Dec 21 05:56:16 grid su[30084]: Successful su for apache by root
Dec 21 05:56:16 grid su[30084]: + /dev/pts/0 root:apache
Dec 21 05:56:16 grid su[30084]: pam_unix(su:session): session opened for user apache by number9(uid=0)
Dec 21 05:56:16 grid zmc_m2[30081]: ERR [Can't run query: Unknown column 'AnalysisFPS' in 'field list']
Dec 21 05:56:16 grid zmdc[30024]: INF ['zmc -m 2' crashed, signal 10]
Dec 21 05:56:16 grid kernel: zmc[30081]: segfault at 0 ip 00007f5aaea58850 sp 00007ffdc9f98698 error 4 in libmysqlclient.so.18.4.0[7f5aaea16000+34a000]
Dec 21 05:56:16 grid zmdc[30024]: INF [Starting pending process, zmc -m 2]
Dec 21 05:56:16 grid zmdc[30024]: INF ['zmc -m 2' starting at 18/12/21 05:56:16, pid = 30088]
Dec 21 05:56:16 grid zmdc[30088]: INF ['zmc -m 2' started at 18/12/21 05:56:16]
Dec 21 05:56:16 grid zmc_m2[30088]: ERR [Can't run query: Unknown column 'AnalysisFPS' in 'field list']
Dec 21 05:56:16 grid zmdc[30024]: INF ['zmc -m 2' crashed, signal 10]
Dec 21 05:56:16 grid kernel: zmc[30088]: segfault at 0 ip 00007fd8c216d850 sp 00007ffe35503658 error 4 in libmysqlclient.so.18.4.0[7fd8c212b000+34a000]
Dec 21 05:56:16 grid zmdc[30024]: INF ['zma -m 2' starting at 18/12/21 05:56:16, pid = 30095]
Dec 21 05:56:16 grid zmdc[30095]: INF ['zma -m 2' started at 18/12/21 05:56:16]
Dec 21 05:56:16 grid su[30084]: pam_unix(su:session): session closed for user apache
Dec 21 05:56:16 grid su[30098]: Successful su for apache by root
Dec 21 05:56:16 grid su[30098]: + /dev/pts/0 root:apache
Dec 21 05:56:16 grid su[30098]: pam_unix(su:session): session opened for user apache by number9(uid=0)
Dec 21 05:56:16 grid zma_m2[30095]: ERR [Can't run query: Unknown column 'AnalysisFPS' in 'field list']
Dec 21 05:56:16 grid kernel: zma[30095]: segfault at 0 ip 00007f27233a2850 sp 00007ffee86dc6e8 error 4 in libmysqlclient.so.18.4.0[7f2723360000+34a000]
Dec 21 05:56:16 grid zmdc[30024]: INF ['zma -m 2' crashed, signal 10]
Dec 21 05:56:16 grid zmdc[30024]: INF [Starting pending process, zma -m 2]
Dec 21 05:56:16 grid zmdc[30024]: INF ['zma -m 2' starting at 18/12/21 05:56:16, pid = 30102]
Dec 21 05:56:16 grid zmdc[30102]: INF ['zma -m 2' started at 18/12/21 05:56:16]
Dec 21 05:56:16 grid zma_m2[30102]: ERR [Can't run query: Unknown column 'AnalysisFPS' in 'field list']
Dec 21 05:56:16 grid kernel: zma[30102]: segfault at 0 ip 00007f7fc7961850 sp 00007fff73429458 error 4 in libmysqlclient.so.18.4.0[7f7fc791f000+34a000]
Dec 21 05:56:16 grid zmdc[30024]: INF ['zma -m 2' crashed, signal 10]
Dec 21 05:56:16 grid zmdc[30024]: INF ['zmc -m 3' starting at 18/12/21 05:56:16, pid = 30109]
Dec 21 05:56:16 grid zmdc[30109]: INF ['zmc -m 3' started at 18/12/21 05:56:16]
Dec 21 05:56:16 grid su[30098]: pam_unix(su:session): session closed for user apache


The above output just keeps repeating as the pl script tries repeatedly to launch the zm.

zmadit.pl gets stuck in a loop, and spits this out until you break it:

Code:

Argument "Porch1" isn't numeric in numeric comparison (<=>) at /usr/bin/zmaudit.pl line 196.
Argument "Porch2" isn't numeric in numeric comparison (<=>) at /usr/bin/zmaudit.pl line 196.
Argument "Garage" isn't numeric in numeric comparison (<=>) at /usr/bin/zmaudit.pl line 196.
Argument "back_porch" isn't numeric in numeric comparison (<=>) at /usr/bin/zmaudit.pl line 196.
Argument "back_door" isn't numeric in numeric comparison (<=>) at /usr/bin/zmaudit.pl line 196.


Porch{1,2}, Garage, back_door and back_porch are monitors, I see that in /var/lib/zoneminder/events they are symlinks
to 1,2,3,4,5

I do not recall if they were like that before the upgrade, but the time stamps on directories 1,2,3,4,5 are from
yesterday when I installed.

The last time this happened it was a libmysqlclient update issue... Not sure why it is doing this now. Any suggestions?

Thanks.
Back to top
View user's profile Send private message
number9
n00b
n00b


Joined: 23 Nov 2018
Posts: 7

PostPosted: Fri Dec 21, 2018 3:11 pm    Post subject: Reply with quote

Update to my previous post.

I realized through some other reading that the AnalysisFPS was in fact an error, and I fixed that with the following mysql command:

Code:

 alter Table `Monitors` change column `AnalysisFPSLimit` `AnalysisFPS` decimal(2,2);


Now, it seems my libmysql error has moved to a libc error:

Code:

Dec 21 09:07:03 grid zmdc[31506]: INF [Starting pending process, zma -m 1]
Dec 21 09:07:03 grid zmdc[31506]: INF ['zmc -m 3' crashed, signal 10]
Dec 21 09:07:03 grid zmdc[31506]: INF ['zma -m 1' starting at 18/12/21 09:07:03, pid = 31755]
Dec 21 09:07:03 grid zmdc[31755]: INF ['zma -m 1' started at 18/12/21 09:07:03]
Dec 21 09:07:03 grid zmdc[31506]: INF [Starting pending process, zmc -m 4]
Dec 21 09:07:03 grid zmdc[31506]: INF ['zmc -m 4' starting at 18/12/21 09:07:03, pid = 31758]
Dec 21 09:07:03 grid zmdc[31758]: INF ['zmc -m 4' started at 18/12/21 09:07:03]
Dec 21 09:07:03 grid zmdc[31506]: INF ['zma -m 1' crashed, signal 10]
Dec 21 09:07:03 grid zmdc[31506]: INF ['zmc -m 4' crashed, signal 10]
Dec 21 09:07:04 grid zmdc[31506]: INF [Starting pending process, zma -m 5]
Dec 21 09:07:04 grid zmdc[31506]: INF ['zma -m 5' starting at 18/12/21 09:07:04, pid = 31765]
Dec 21 09:07:04 grid zmdc[31765]: INF ['zma -m 5' started at 18/12/21 09:07:04]
Dec 21 09:07:04 grid zmdc[31506]: INF [Starting pending process, zma -m 4]
Dec 21 09:07:04 grid zmdc[31506]: INF ['zma -m 4' starting at 18/12/21 09:07:04, pid = 31768]
Dec 21 09:07:04 grid zmdc[31768]: INF ['zma -m 4' started at 18/12/21 09:07:04]
Dec 21 09:07:04 grid zmdc[31506]: INF [Starting pending process, zmc -m 5]
Dec 21 09:07:04 grid kernel: do_general_protection: 17 callbacks suppressed
Dec 21 09:07:04 grid kernel: traps: zma[31765] general protection ip:7fc908469e00 sp:7fff9d8ca8b0 error:0 in libc-2.27.so[7fc90842e000+1be000]
Dec 21 09:07:04 grid zmdc[31506]: INF ['zma -m 5' crashed, signal 10]
Dec 21 09:07:04 grid kernel: traps: zma[31768] general protection ip:7f5b72c56e00 sp:7ffea2bfb590 error:0 in libc-2.27.so[7f5b72c1b000+1be000]
Dec 21 09:07:04 grid zmdc[31506]: INF ['zma -m 4' crashed, signal 10]
Dec 21 09:07:04 grid zmdc[31506]: INF ['zmc -m 5' starting at 18/12/21 09:07:04, pid = 31775]
Dec 21 09:07:04 grid zmdc[31775]: INF ['zmc -m 5' started at 18/12/21 09:07:04]
Dec 21 09:07:04 grid zmdc[31506]: INF ['zmc -m 5' crashed, signal 10]
Dec 21 09:07:04 grid kernel: traps: zmc[31775] general protection ip:7f4dbc5a2e00 sp:7ffd694e0b20 error:0 in libc-2.27.so[7f4dbc567000+1be000]
Dec 21 09:07:13 grid zmdc[31506]: INF [Starting pending process, zmc -m 2]
Dec 21 09:07:13 grid zmdc[31506]: INF ['zmc -m 2' starting at 18/12/21 09:07:13, pid = 31781]
Dec 21 09:07:13 grid zmdc[31781]: INF ['zmc -m 2' started at 18/12/21 09:07:13]
Dec 21 09:07:13 grid zmdc[31506]: INF [Starting pending process, zma -m 2]
Dec 21 09:07:13 grid zmdc[31506]: INF ['zma -m 2' starting at 18/12/21 09:07:13, pid = 31784]
Dec 21 09:07:13 grid zmdc[31784]: INF ['zma -m 2' started at 18/12/21 09:07:13]
Dec 21 09:07:13 grid kernel: traps: zmc[31781] general protection ip:7f9727498e00 sp:7ffcd678c580 error:0 in libc-2.27.so[7f972745d000+1be000]
Dec 21 09:07:13 grid zmdc[31506]: INF ['zmc -m 2' crashed, signal 10]
Dec 21 09:07:13 grid zmdc[31506]: INF [Starting pending process, zmc -m 1]
Dec 21 09:07:13 grid kernel: traps: zma[31784] general protection ip:7ff658197e00 sp:7ffde6e1c2a0 error:0 in libc-2.27.so[7ff65815c000+1be000]
Dec 21 09:07:13 grid zmdc[31506]: INF ['zma -m 2' crashed, signal 10]
Dec 21 09:07:13 grid zmdc[31506]: INF ['zmc -m 1' starting at 18/12/21 09:07:13, pid = 31791]
Dec 21 09:07:13 grid zmdc[31791]: INF ['zmc -m 1' started at 18/12/21 09:07:13]
Dec 21 09:07:13 grid zmdc[31506]: INF [Starting pending process, zma -m 3]
Dec 21 09:07:13 grid zmdc[31506]: INF ['zma -m 3' starting at 18/12/21 09:07:13, pid = 31795]
Dec 21 09:07:13 grid zmdc[31795]: INF ['zma -m 3' started at 18/12/21 09:07:13]


Zoneminder is still not starting.
Back to top
View user's profile Send private message
Hu
Moderator
Moderator


Joined: 06 Mar 2007
Posts: 21607

PostPosted: Sat Dec 22, 2018 1:35 am    Post subject: Reply with quote

That message just means that the faulting instruction was in libc. It is probably an application misuse of a C library function, such as passing a null pointer where that is not permitted. We would need to know the faulting function, register context, and preferably a backtrace to diagnose the problem. You will need to build the affected modules with debug symbols (CFLAGS including -ggdb and FEATURES including one of nostrip or splitdebug).
Back to top
View user's profile Send private message
number9
n00b
n00b


Joined: 23 Nov 2018
Posts: 7

PostPosted: Sat Dec 22, 2018 2:47 am    Post subject: Reply with quote

I am not sure if this is what you are after, but I enabled debug and did a trace on /etc/init.d/zonemidner and received the following:

https://pastebin.com/SWdjZ1gp

I now see this in /var/log/messages:

Code:

Dec 21 20:46:03 grid zmwatch[4358]: ERR [Memory map file '/dev/shm/zm.mmap.1' does not exist.  zmc might not be running.]
Dec 21 20:46:03 grid zmwatch[4358]: INF [Restarting capture daemon for Porch1, shared data not valid]
Dec 21 20:46:03 grid zmdc[4169]: INF ['zmc -m 1' starting at 18/12/21 20:46:03, pid = 5390]
Dec 21 20:46:03 grid zmdc[5390]: INF ['zmc -m 1' started at 18/12/21 20:46:03]
Dec 21 20:46:03 grid zmwatch[4358]: ERR [Memory map file '/dev/shm/zm.mmap.2' does not exist.  zmc might not be running.]
Dec 21 20:46:03 grid zmdc[4169]: INF ['zmc -m 1' crashed, signal 10]
Dec 21 20:46:03 grid zmwatch[4358]: INF [Restarting capture daemon for Porch2, shared data not valid]
Dec 21 20:46:03 grid kernel: traps: zmc[5390] general protection ip:7f1d1744fe00 sp:7ffc505fc7c0 error:0 in libc-2.27.so[7f1d17414000+1be000]
Dec 21 20:46:03 grid zmdc[4169]: INF ['zmc -m 2' starting at 18/12/21 20:46:03, pid = 5398]
Dec 21 20:46:03 grid zmdc[5398]: INF ['zmc -m 2' started at 18/12/21 20:46:03]
Dec 21 20:46:03 grid zmwatch[4358]: ERR [Memory map file '/dev/shm/zm.mmap.3' does not exist.  zmc might not be running.]
Dec 21 20:46:03 grid kernel: traps: zmc[5398] general protection ip:7f7eac2c9e00 sp:7ffe7ed07b50 error:0 in libc-2.27.so[7f7eac28e000+1be000]
Dec 21 20:46:03 grid zmwatch[4358]: INF [Restarting capture daemon for Garage, shared data not valid]
Dec 21 20:46:03 grid zmdc[4169]: INF ['zmc -m 2' crashed, signal 10]
Dec 21 20:46:03 grid zmdc[4169]: INF ['zmc -m 3' starting at 18/12/21 20:46:03, pid = 5406]
Dec 21 20:46:03 grid zmdc[5406]: INF ['zmc -m 3' started at 18/12/21 20:46:03]
Dec 21 20:46:03 grid zmwatch[4358]: ERR [Memory map file '/dev/shm/zm.mmap.4' does not exist.  zmc might not be running.]
Dec 21 20:46:03 grid kernel: traps: zmc[5406] general protection ip:7f50f5200e00 sp:7fff3aa52790 error:0 in libc-2.27.so[7f50f51c5000+1be000]
Dec 21 20:46:03 grid zmwatch[4358]: INF [Restarting capture daemon for back_door, shared data not valid]
Dec 21 20:46:03 grid zmdc[4169]: INF ['zmc -m 3' crashed, signal 10]
Dec 21 20:46:03 grid zmdc[4169]: INF ['zmc -m 4' starting at 18/12/21 20:46:03, pid = 5414]
Dec 21 20:46:03 grid zmdc[5414]: INF ['zmc -m 4' started at 18/12/21 20:46:03]
Dec 21 20:46:03 grid zmwatch[4358]: ERR [Memory map file '/dev/shm/zm.mmap.5' does not exist.  zmc might not be running.]
Dec 21 20:46:03 grid zmdc[4169]: INF ['zmc -m 4' crashed, signal 10]
Dec 21 20:46:03 grid kernel: traps: zmc[5414] general protection ip:7f3b5cb4fe00 sp:7ffd78fd44e0 error:0 in libc-2.27.so[7f3b5cb14000+1be000]
Dec 21 20:46:03 grid zmwatch[4358]: INF [Restarting capture daemon for back_porch, shared data not valid]
Dec 21 20:46:03 grid zmdc[4169]: INF ['zmc -m 5' starting at 18/12/21 20:46:03, pid = 5422]
Dec 21 20:46:03 grid zmdc[5422]: INF ['zmc -m 5' started at 18/12/21 20:46:03]
Dec 21 20:46:03 grid kernel: traps: zmc[5422] general protection ip:7f387a2cee00 sp:7fffb5b731e0 error:0 in libc-2.27.so[7f387a293000+1be000]
Dec 21 20:46:03 grid zmdc[4169]: INF ['zmc -m 5' crashed, signal 10]


Running zmc from the command line, and I am pretty sure that will break anyway, gives:

https://pastebin.com/VvCUD5Em
Back to top
View user's profile Send private message
guerro
Guru
Guru


Joined: 21 Jun 2004
Posts: 402
Location: Brescia

PostPosted: Sat Dec 22, 2018 11:35 am    Post subject: Reply with quote

I've installed 1.32.3 and seems it worrk, but I can't access to api:
when I test api version http://[server]/zm/api/host/getVersion.json i recive "The requested URL /zm/api/host/getVersion.json was not found on this server."

This is my apache2 config file for zoneminder (10_zoneminder_app.conf)
Code:

ScriptAlias /zm/cgi-bin/ "/usr/libexec/zoneminder/cgi-bin/"
<Directory "/usr/libexec/zoneminder/cgi-bin">
    Options +ExecCGI
    AllowOverride All
    Require all granted
</Directory>

Alias /zm "/usr/share/zoneminder/www"
<Directory "/usr/share/zoneminder/www">
    Options -Indexes +MultiViews +FollowSymLinks
    AllowOverride All
    Require all granted
</Directory>


I don't understand what is wrong..... can someone help me? I'd like to use zmNinja, but until api work, I can't :( :(

P.S.
All web interface seems works like a charm
_________________
(.(*. .*).)
.. G u e r r o ..
(.(.* *.).)
Back to top
View user's profile Send private message
number9
n00b
n00b


Joined: 23 Nov 2018
Posts: 7

PostPosted: Sat Dec 22, 2018 12:27 pm    Post subject: Reply with quote

guerro wrote:
I've installed 1.32.3 and seems it worrk, but I can't access to api:
when I test api version http://[server]/zm/api/host/getVersion.json i recive "The requested URL /zm/api/host/getVersion.json was not found on this server."

I don't understand what is wrong..... can someone help me? I'd like to use zmNinja, but until api work, I can't :( :(

P.S.
All web interface seems works like a charm


If you are getting a URL error, check your apache log files and see what apache thinks
is the problem. Then you can assess if it is permissions, paths, or a zoneminder issue.
Back to top
View user's profile Send private message
Hu
Moderator
Moderator


Joined: 06 Mar 2007
Posts: 21607

PostPosted: Sat Dec 22, 2018 4:43 pm    Post subject: Reply with quote

number9 wrote:
I am not sure if this is what you are after, but I enabled debug and did a trace on /etc/init.d/zonemidner and received the following:
It is not. I wanted a backtrace, as produced by gdb, not a system call log, as produced by strace. Your strace output confirms a null pointer dereference. Since the newer version worked for guerro, it would be worth checking if it works for you too. If it does, we can skip debugging the null pointer problem.
Back to top
View user's profile Send private message
guerro
Guru
Guru


Joined: 21 Jun 2004
Posts: 402
Location: Brescia

PostPosted: Sat Dec 22, 2018 5:33 pm    Post subject: Reply with quote

number9 wrote:
guerro wrote:
I've installed 1.32.3 and seems it worrk, but I can't access to api:
when I test api version http://[server]/zm/api/host/getVersion.json i recive "The requested URL /zm/api/host/getVersion.json was not found on this server."

I don't understand what is wrong..... can someone help me? I'd like to use zmNinja, but until api work, I can't :( :(

P.S.
All web interface seems works like a charm


If you are getting a URL error, check your apache log files and see what apache thinks
is the problem. Then you can assess if it is permissions, paths, or a zoneminder issue.


In apache's log file there's only message reported in response page...
Can someone show me how is his apache zoneminder's config file? Is it possible that mine is incomplete or wrong (for "api" directory)?
if I go to http://[server]/zm/api/ , I get this error:
Code:
Fatal error: Cannot use 'object' as class name as it is reserved in /usr/share/zoneminder/www/api/lib/Cake/Core/Object.php on line 18


It seems that CakePHP doesn't work....
_________________
(.(*. .*).)
.. G u e r r o ..
(.(.* *.).)
Back to top
View user's profile Send private message
number9
n00b
n00b


Joined: 23 Nov 2018
Posts: 7

PostPosted: Sat Dec 22, 2018 9:07 pm    Post subject: Reply with quote

Hu wrote:
number9 wrote:
I am not sure if this is what you are after, but I enabled debug and did a trace on /etc/init.d/zonemidner and received the following:
It is not. I wanted a backtrace, as produced by gdb, not a system call log, as produced by strace. Your strace output confirms a null pointer dereference. Since the newer version worked for guerro, it would be worth checking if it works for you too. If it does, we can skip debugging the null pointer problem.


I enabled debugging, it seems to work, but it does not give any real output:

Code:

# gdb /usr/bin/zmc
GNU gdb (Gentoo 8.1 p1) 8.1
Copyright (C) 2018 Free Software Foundation, Inc.
License GPLv3+: GNU GPL version 3 or later <http://gnu.org/licenses/gpl.html>
This is free software: you are free to change and redistribute it.
There is NO WARRANTY, to the extent permitted by law.  Type "show copying"
and "show warranty" for details.
This GDB was configured as "x86_64-pc-linux-gnu".
Type "show configuration" for configuration details.
For bug reporting instructions, please see:
<https://bugs.gentoo.org/>.
Find the GDB manual and other documentation resources online at:
<http://www.gnu.org/software/gdb/documentation/>.
For help, type "help".
Type "apropos word" to search for commands related to "word"...
Reading symbols from /usr/bin/zmc...Reading symbols from /usr/lib64/debug//usr/bin/zmc.debug...done.
done.
(gdb) r -m 2
Starting program: /usr/bin/zmc -m 2
[Thread debugging using libthread_db enabled]
Using host libthread_db library "/lib64/libthread_db.so.1".

Program received signal SIGSEGV, Segmentation fault.
0x00007ffff39d3e00 in ?? () from /lib64/libc.so.6

Back to top
View user's profile Send private message
guerro
Guru
Guru


Joined: 21 Jun 2004
Posts: 402
Location: Brescia

PostPosted: Sun Dec 23, 2018 10:09 am    Post subject: Reply with quote

API Issue SOLVED!!!
With PHP 7.2 we have to make this correction:
in apache configuration we have to add this:
Code:

# For better visibility, the following directives have been migrated from the
# default .htaccess files included with the CakePHP project.
# Parameters not set here are inherited from the parent directive above.
<Directory "/usr/share/zoneminder/www/api">
   RewriteEngine on
   RewriteRule ^$ app/webroot/ [L]
   RewriteRule (.*) app/webroot/$1 [L]
   RewriteBase /zm/api
</Directory>

<Directory "/usr/share/zoneminder/www/api/app">
   RewriteEngine on
   RewriteRule ^$ webroot/ [L]
   RewriteRule (.*) webroot/$1 [L]
   RewriteBase /zm/api
</Directory>

<Directory "/usr/share/zoneminder/www/api/app/webroot">
    RewriteEngine On
    RewriteCond %{REQUEST_FILENAME} !-d
    RewriteCond %{REQUEST_FILENAME} !-f
    RewriteRule ^ index.php [L]
    RewriteBase /zm/api
</Directory>


we have to modifiy /usr/share/zoneminder/www/api/app/Plugin/Crud/Controller/Crud/CrudBaseObject.php (line 15)
from
Code:
abstract class CrudBaseObject extends Object implements CakeEventListener {

to
Code:
abstract class CrudBaseObject extends CakeObject implements CakeEventListener {


we have to add CakePHP-Enum-Behavior plugin (folder exists in /usr/share/zoneminder/www/api/app/Plugin, but it's empty) downloading it from here
https://github.com/asper/CakePHP-Enum-Behavior

I hope that this fixes will be added to new ebuild 8) :) :)
I'll link this post to bug #66607
_________________
(.(*. .*).)
.. G u e r r o ..
(.(.* *.).)
Back to top
View user's profile Send private message
number9
n00b
n00b


Joined: 23 Nov 2018
Posts: 7

PostPosted: Sun Dec 23, 2018 12:59 pm    Post subject: Reply with quote

Hu wrote:
number9 wrote:
I am not sure if this is what you are after, but I enabled debug and did a trace on /etc/init.d/zonemidner and received the following:
It is not. I wanted a backtrace, as produced by gdb, not a system call log, as produced by strace. Your strace output confirms a null pointer dereference. Since the newer version worked for guerro, it would be worth checking if it works for you too. If it does, we can skip debugging the null pointer problem.


Re-reading your response, I just realized that you note that Guerro is using 1.32.3...

I do not see that in the portage tree as an option (in www-misc/zoneminder or its files)... are you saying install it from the zonemidner project and test?

Thanks.
Back to top
View user's profile Send private message
Hu
Moderator
Moderator


Joined: 06 Mar 2007
Posts: 21607

PostPosted: Sun Dec 23, 2018 5:01 pm    Post subject: Reply with quote

I was not suggesting any particular origin. I thought from guerro's remarks that 1.32.3 was available in the main tree. I did not check that, and see now that there is no 1.32.3 in the main tree.

I categorically discourage anyone installing outside Portage if at all available, because only the simplest of out-of-tree programs avoid making a mess. If you want to use an out-of-tree version, I strongly suggest you find or create an ebuild to wrap the version you want to use, then install that ebuild.
Back to top
View user's profile Send private message
number9
n00b
n00b


Joined: 23 Nov 2018
Posts: 7

PostPosted: Sun Dec 23, 2018 7:22 pm    Post subject: Reply with quote

Hu wrote:
I was not suggesting any particular origin. I thought from guerro's remarks that 1.32.3 was available in the main tree. I did not check that, and see now that there is no 1.32.3 in the main tree.

I categorically discourage anyone installing outside Portage if at all available, because only the simplest of out-of-tree programs avoid making a mess. If you want to use an out-of-tree version, I strongly suggest you find or create an ebuild to wrap the version you want to use, then install that ebuild.


I would like to use an in-tree version...

again, my main concern was, and I know this is cliche (I have been a sysadmin for many decades), that 'it was working fine" and then I did an emerge --sync
and then an emerge -uDU --with-bdeps=y @world and then the only thing that breaks was zoneminder.

I wonder why no one else noticed this (e.g. is this an isolated issue)?

Thanks.
Back to top
View user's profile Send private message
Hu
Moderator
Moderator


Joined: 06 Mar 2007
Posts: 21607

PostPosted: Sun Dec 23, 2018 7:55 pm    Post subject: Reply with quote

To answer that, we would need to know exactly what was changed, trace down exactly how it now dies, or both. If I were to guess, I would say that Zoneminder was doing something that is not technically legal, but happened to work with your old package setup. When you upgraded, you switched to a package which no longer allows the technically invalid operation.
Back to top
View user's profile Send private message
Raffi
l33t
l33t


Joined: 17 Mar 2003
Posts: 731
Location: Moscow, Id.

PostPosted: Fri Mar 29, 2019 2:04 pm    Post subject: Reply with quote

The oubliette overlay has a working zoneminder-1.32.3. From what I can tell, there is no current zoneminder maintaner for the current tree so an overlay my be your best bet.
Back to top
View user's profile Send private message
Display posts from previous:   
Reply to topic    Gentoo Forums Forum Index Multimedia All times are GMT
Goto page Previous  1, 2, 3
Page 3 of 3

 
Jump to:  
You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot vote in polls in this forum