Thank you for your donation!


Cloudsmith graciously provides open-source package management and distribution for our project.


Instruction Guide moOde and Pi-Hole on Nginx
#11
(02-21-2021, 10:20 PM)felichas Wrote: Hi,
Installing pi-hole works fine for me, but breaks Moode Audio.

I was running moode v6.7.1. Followed instructions and ended with a working pi-hole and a broken moode.
I didn't investigate much, to be hones, because I had to update to moode v7.0.1.
I have flashed my RPi Zero with HiFiBerry DAC and upgraded to v7.0.1. moode worked great again.
I have followed this intructions again... and moode is now broken, just like v6.7.1 was.

Configuration pages System, Network and Audio seem to work.
But the configuration page for the Library is now broken
This is the error I get:
Code:
lib-config: Connection to MPD failed

But most importantly, the main player is broken

I see the same error in /var/log/moode.log
Code:
20210221 223036 lib-config: Connection to MPD failed
20210221 223036 moode.php: MPD connect failed: cmd=(playlist)
20210221 223040 moode.php: MPD connect failed: cmd=(playlist)
20210221 223044 moode.php: MPD connect failed: cmd=(lsinfo)
20210221 223044 moode.php: MPD connect failed: cmd=(loadlib)

And no errors in /var/log/php_errors.log


Any advice on how to fix this? I like the idea of having both services in the same device.

I did some more investigation, based on this post.

I think I missed the Integrity check bit from my /var/log/moode.log
Code:
20210222 084056 worker: -- Start
20210222 084057 worker: Successfully daemonized
20210222 084058 worker: Integrity check (failed:1)
20210222 084058 worker: Exited

I guess failed:1 referes to the 1st line of the cfg_hash table

Code:
$ md5sum /etc/nginx/nginx.conf
d0d1e0705a10974f26271f6623d87215  /etc/nginx/nginx.conf

$ sudo sqlite3 "/var/local/www/db/moode-sqlite3.db" "SELECT * FROM cfg_hash where id=1"
1|/etc/nginx/nginx.conf|390ed3c2876a41cbe45479a709470410|warning

I have indeed, following the instructions above, modified nginx.conf. And now the md5sum in the database does not match the actual hash of the file. But this should not be a problem, because the record has been now updated to warning   Huh

I can still try to udate the record (1st time I deal with sqlite in my life).

Code:
$ sudo sqlite3 "/var/local/www/db/moode-sqlite3.db"
SQLite version 3.27.2 2019-02-25 16:06:06
Enter ".help" for usage hints.
sqlite> .header on
sqlite> SELECT * FROM cfg_hash where id=1;
id|param|value|action
1|/etc/nginx/nginx.conf|390ed3c2876a41cbe45479a709470410|warning
sqlite> UPDATE cfg_hash SET VALUE = 'd0d1e0705a10974f26271f6623d87215' WHERE ID = 1 ;
sqlite> SELECT * FROM cfg_hash WHERE ID = 1;
id|param|value|action
1|/etc/nginx/nginx.conf|d0d1e0705a10974f26271f6623d87215|warning
sqlite> .quit

And finally, I can confirm everything else is now aligned database and file system

Code:
$ sudo sqlite3 "/var/local/www/db/moode-sqlite3.db" "select value,param from cfg_hash" |awk -F'|' '{print $1,$2}' |md5sum --check
/etc/nginx/nginx.conf: OK
/etc/nginx/fastcgi_params: OK
/etc/php/7.3/cli/php.ini: OK
/etc/php/7.3/fpm/php-fpm.conf: OK
/etc/php/7.3/fpm/php.ini: OK
/etc/php/7.3/fpm/pool.d/www.conf: OK
/etc/php/7.3/mods-available/opcache.ini: OK
/tmp/cfg_audiodev.sql: OK
/var/www/command/worker.php: OK
/var/www/inc/playerlib.php: OK
/var/www/css/main.min.css: OK
/var/www/js/config.min.js: OK
/var/www/js/lib.min.js: OK
/var/www/js/main.min.js: OK
/etc/rc.local: OK

But after restarting, I continue getting the same error. Any further help would be much appreciated.
Reply


Messages In This Thread
moOde and Pi-Hole on Nginx - by TookaFace - 11-30-2019, 04:37 PM
RE: moOde and Pi-Hole on Nginx - by Jempie - 06-19-2020, 05:25 AM
RE: moOde and Pi-Hole on Nginx - by TookaFace - 06-19-2020, 09:23 AM
RE: moOde and Pi-Hole on Nginx - by TookaFace - 08-19-2020, 02:12 PM
RE: moOde and Pi-Hole on Nginx - by LowkeyFlex - 01-14-2021, 05:33 PM
RE: moOde and Pi-Hole on Nginx - by TookaFace - 01-14-2021, 05:44 PM
RE: moOde and Pi-Hole on Nginx - by Prince - 01-14-2021, 07:00 PM
RE: moOde and Pi-Hole on Nginx - by TookaFace - 01-14-2021, 09:25 PM
RE: moOde and Pi-Hole on Nginx - by felichas - 02-21-2021, 10:20 PM
RE: moOde and Pi-Hole on Nginx - by felichas - 02-22-2021, 08:09 AM
RE: moOde and Pi-Hole on Nginx - by TookaFace - 02-22-2021, 08:06 AM
RE: moOde and Pi-Hole on Nginx - by TookaFace - 02-22-2021, 08:45 AM
RE: moOde and Pi-Hole on Nginx - by felichas - 02-22-2021, 05:56 PM
RE: moOde and Pi-Hole on Nginx - by Daksha - 03-31-2021, 05:42 PM
RE: moOde and Pi-Hole on Nginx - by pyhfsg - 09-29-2021, 03:43 AM
RE: moOde and Pi-Hole on Nginx - by DRONE7 - 09-29-2021, 04:23 AM
RE: moOde and Pi-Hole on Nginx - by TookaFace - 09-29-2021, 02:40 PM
RE: moOde and Pi-Hole on Nginx - by pyhfsg - 09-30-2021, 11:49 AM
RE: moOde and Pi-Hole on Nginx - by pyhfsg - 09-30-2021, 12:06 PM
RE: moOde and Pi-Hole on Nginx - by pyhfsg - 09-30-2021, 12:35 PM
RE: moOde and Pi-Hole on Nginx - by Prince - 02-02-2023, 06:17 PM

Forum Jump: