Koozali.org: home of the SME Server

ZoneMinder contrib problems....

Offline FreakWent

  • ***
  • 85
  • +0/-0
ZoneMinder contrib problems....
« on: January 28, 2022, 11:11:37 AM »
Hello everyone!

I've followed the instructions at https://wiki.koozali.org/Zoneminder.... but the URL my.server.com/zm just gives me a 404 error.

There was no string zm in any file under /etc/httpd.  I copied /etc/zm/www/zoneminder.httpd.conf
 into /etc/httpd/conf.d but I'm not sure those files are even getting included anyway. 

*before* I start messing about trying to fix it and end up making it worse and not being able to remember what I changed, has anyone else done this before who can tell me what the missing steps might be to get the apache configuration setup correctly?

Thanks in advance anyone....

Offline FreakWent

  • ***
  • 85
  • +0/-0
Re: ZoneMinder contrib problems....
« Reply #1 on: January 28, 2022, 11:25:30 AM »
If I add a line at the end of httpd.conf to include the zoneminder config, the service restarts okay, but then apache logs the error "AH01797: client denied by server configuration: /usr/share/zoneminder/www"

So this is annoying, has someone managed to get shinobi working easily on SME server perhaps?

Offline FreakWent

  • ***
  • 85
  • +0/-0
Re: ZoneMinder contrib problems....
« Reply #2 on: January 28, 2022, 12:40:56 PM »
I also installed motion, hoping that would work, but it segfaults as soon as I connect to port 8080.

Offline TerryF

  • grumpy old man
  • *
  • 1,826
  • +6/-0
Re: ZoneMinder contrib problems....
« Reply #3 on: January 28, 2022, 12:49:26 PM »
I've followed the instructions at https://wiki.koozali.org/Zoneminder.... but the URL my.server.com/zm just gives me a 404 error.

*before* I start messing about trying to fix it and end up making it worse and not being able to remember what I changed, has anyone else done this before who can tell me what the missing steps might be to get the apache configuration setup correctly?

Well worth looking at the Bug the contrib has not been fully migrated to sme10 as yet

https://bugs.koozali.org/show_bug.cgi?id=11226
--
qui scribit bis legit

Offline FreakWent

  • ***
  • 85
  • +0/-0
Re: ZoneMinder contrib problems....
« Reply #4 on: January 28, 2022, 01:05:57 PM »
This is a great response, thanks -- I'll work through that.

I pushed on the Shinobi front, what the hell is all this npm nodey stuff? Just reinvents the wheel AFAICT.  Anyway it didn't work either.


 pm2 start camera.js
/usr/lib/node_modules/pm2/node_modules/chalk/source/index.js:103
   ...styles,
   ^^^
SyntaxError: Unexpected token ...
    at createScript (vm.js:53:10)
    at Object.runInThisContext (vm.js:95:10)
    at Module._compile (module.js:543:28)
    at Object.Module._extensions..js (module.js:580:10)
    at Module.load (module.js:488:32)
    at tryModuleLoad (module.js:447:12)
    at Function.Module._load (module.js:439:3)
    at Module.require (module.js:498:17)
    at require (internal/module.js:20:19)
    at Object.<anonymous> (/usr/lib/node_modules/pm2/constants.js:10:14)


So now I have messed with my system a lot and have three broken CCTV systems on it.  I'll follow up on the bug report thread, thanks!

Offline ReetP

  • *
  • 3,734
  • +5/-0
Re: ZoneMinder contrib problems....
« Reply #5 on: January 28, 2022, 05:15:22 PM »
So now I have messed with my system a lot and have three broken CCTV systems on it.  I'll follow up on the bug report thread, thanks!

To be fair Brian opened that bug in Dec 2020 whilst we were working probably on v10 Alpha or Beta 1 and you could easily have joined in testing with this sort of thing. It wasn't as if we didn't shout and scream for people to assist, but very few could be bothered.

It was entirely disappointing and depressing knowing there were thousands of sysadmins using, relying on (and some profiting from) Koozali SME every day, many complaining v10 wasn't 'done in time' but only a handful actually helping us build and test it.

The fact that you have left it so late to test and figure this contrib is not really anyone elses fault.

If you have further information on the bug then please comment accordingly so we can verify it works correctly and can release it.

Thanks.
...
1. Read the Manual
2. Read the Wiki
3. Don't ask for support on Unsupported versions of software
4. I have a job, wife, and kids and do this in my spare time. If you want something fixed, please help.

Bugs are easier than you think: http://wiki.contribs.org/Bugzilla_Help

If you love SME and don't want to lose it, join in: http://wiki.contribs.org/Koozali_Foundation

Offline FreakWent

  • ***
  • 85
  • +0/-0
Re: ZoneMinder contrib problems....
« Reply #6 on: January 30, 2022, 01:51:59 AM »
Oh I absolutely saw those, and I did not help.  I wasn't meaning to express any disappointment in the devs or with SME - I love it!  Been using it since 4.03 or so and I hope it never goes away.  Very grateful to all contributors.

This is my first time using this contrib, so it's unlikey I would have tested this anyway -- but your point still stands!

The bug says it's fixed -- and I don't have the same symptoms as the bug.  I can't even configure PHP properly.  I don't have the existing experience with PHP to get this to a state where I can even find a bug with zoneminder or the contribs for it.  I can't get index.php to run.  This is competency problem, not a bug report.

So to be of any help, I need to figure out what I need to put in the apache config so that index.php is run on the server instead of being sent in the browser to the client.  The way SME server is setup, I guess this means it should be in an ibay so that I can manage it via the GUI -- but that's not where the contribs installed it, they put it in /usr/share/zoneminder/www/

So I need to follow the SME path of how to do it or the contribs path, and I generally follow the path of least resistance (hence "install zm... nope! Install shinobi... nope! install motion....nope!)

I'm under no illusions that me following the "easiest' paths somehow obliges anyone else to help me -- for free no less.  I've already had more help from the forums over the years than I've contributed back!

Anyway this is the wrong code for the Directory stanza in the zm.conf. 

    AddType application/x-httpd-php .php
<FilesMatch \.(phar|php)$>
        <If "-f %{SCRIPT_FILENAME}">
        SetHandler "proxy:unix:/var/run/php-fpm/php74-primary.sock|fcgi://localhost"
        </If>
    </FilesMatch>

... because (I guess??) zoneminder doesn't work with this fastphp model? 

https://stackoverflow.com/questions/14555996/no-input-file-specified

So that's where I'm up to.  I assume motion falls over because it wants a special version of ffmpeg that it doesn't have, and as for shinobi if my woeful attempts to make php work are any guide, I have no hope with node.js and npm!

So if anyone would like to pass me a stanza to try, that's great! Either way, this problem is mine and it's nobody else's "job" to fix it.

Have a great 2022 all.

Offline FreakWent

  • ***
  • 85
  • +0/-0
Re: ZoneMinder contrib problems....
« Reply #7 on: January 30, 2022, 02:39:37 AM »
I managed to get shinobi installed without too much thinking, planning or caution, using this:

https://wiki.koozali.org/NodeJS#For_SME_9

I also needed

npm install socket.io --save

So the Shinobi Gui loads, and I can login as super user, but I can't make any changes, so progress there but still not actually working....
 :smile:


.... because the database tables weren't installed during the ninja install. 

so now I can login but I get a warning that MS bought github so the whole thing is moving to gitlabs, so that's another thread to pull on
https://hub.shinobi.video/articles/view/KAgVFFNBDiamauW

Anyway, we may be drifting off topic here as I'm talking about shinobi now, so I'll stop adding content unless it's about zoneminder.
« Last Edit: January 30, 2022, 02:53:34 AM by FreakWent »

Offline ReetP

  • *
  • 3,734
  • +5/-0
Re: ZoneMinder contrib problems....
« Reply #8 on: February 09, 2022, 11:39:40 AM »
Quote
I've already had more help from the forums over the years than I've contributed back!

In that case it is about time you reversed that. You are liable to get more help if you do.

Quote
I managed to get shinobi installed without too much thinking, planning or caution, using this:

I sincerely hope that is on a test machine because with your apparent lack of knowledge - and the reason you need to sit down and start learning a bit more instead of relying on spoon fed answers where you learn nothing - you are going to leave yourself wide open to a hack.

Quote
so I'll stop adding content unless it's about zoneminder.

Yup - you are just conflating issues which does nothing but confuse. And you just end up getting ignored.

Quote
Anyway this is the wrong code for the Directory stanza in the zm.conf. 

Hmmmm. I think Brian may know a bit more about PHP than you. Also note on the comments bug:

Quote
Ok, took out the Afters in the override and zoneminder starts ok.
So, that just leaves us the MooTools message on the web page.

Read this post (Brian posted the original forum link on the bug)

https://forums.zoneminder.com/viewtopic.php?p=119252#p119252

Quote
HEADS UP: In the quest to replace mootools with jQuery, I made a ton of changes to the JavaScript that supports the (single) event playback view. Please test. If something does not appear to work correctly, I need know to what errors appear in the web browser console.

At a guess the newer versions of zoneminder don't have the Mootools issue so it may require updated RPMs.

So if we then search it seems there may be some:

https://rpm.pbone.net/info_idpl_77537556_distro_redhatel7_com_zoneminder-httpd-1.36.12-1.el7.x86_64.rpm.html

That needs adding to the bug (done), and then someone may take a look if you test and feed back you may get some help if you have issues.

Quote
zoneminder doesn't work with this fastphp model?

It isn't fast PHP. It is PHP FPM and as per Brians comments on the bug it works - you need to read the wiki and understand how PHP works now.

So, follow the bug, read the wiki page, add the RPMFusion repo and the contrib (which worked bar the Mootools warnings which should be fixed in 1.35+) and it may just work.

https://wiki.koozali.org/Extrarepositories
https://wiki.koozali.org/Zoneminder#SME10

Please test and feedback on the bug. Also the wiki may need updating so keep notes and get a wiki account so you can do that yourself.

NB. Don't do any of this on a production machine - test box only.

(And note I know nothing about Zoneminder - I just went and searched the interwebs and did some reading)


...
1. Read the Manual
2. Read the Wiki
3. Don't ask for support on Unsupported versions of software
4. I have a job, wife, and kids and do this in my spare time. If you want something fixed, please help.

Bugs are easier than you think: http://wiki.contribs.org/Bugzilla_Help

If you love SME and don't want to lose it, join in: http://wiki.contribs.org/Koozali_Foundation