Moode Forum
[SOLVED] mpd doesnt start if I add a secondary site to nginx - Printable Version

+- Moode Forum (https://moodeaudio.org/forum)
+-- Forum: moOde audio player (https://moodeaudio.org/forum/forumdisplay.php?fid=3)
+--- Forum: Support (https://moodeaudio.org/forum/forumdisplay.php?fid=7)
+--- Thread: [SOLVED] mpd doesnt start if I add a secondary site to nginx (/showthread.php?tid=2907)



mpd doesnt start if I add a secondary site to nginx - Mwoua - 08-18-2020

Hello,

I'm trying to host a secondary website on rasapberry, so I uncommented the line 
Code:
include /etc/nginx/sites-enabled/*;

 in the file /etc/nginx/nginx.conf
and added my sites in sites-availables and linked to it in sites enables
If i reset nginx (systemctl restart nginx) everything works fine, I cant access both moode on port 80, and my website on port 8002
However, when I restart my raspberry, there is an mpd error:

CPU scheduling priority is out of range, ignoring: 3


So moode doesnt work anymore.

How can I add a secondary website without breaking mpd?

My secondary website conf file is pretty basic:


Code:
server {
   listen 8002;
   access_log /var/log/nginx/access.log;
   error_log /var/log/nginx/error.log;

   # serve media files
   location /static {
       alias /media/data/mypro/staticfiles;
   }

   location / {
       proxy_pass http://unix:/media/data/mypro/mypro.sock;
   }
}



RE: mpd doesnt start if I add a secondary site to nginx - TheOldPresbyope - 08-18-2020

@Mwoua

That CPU scheduling error has been around for a long time. You'll have to look elsewhere for errors which help illuminate why things aren't working.

Regards,
Kent


RE: mpd doesnt start if I add a secondary site to nginx - Mwoua - 08-18-2020

Any suggestion on where to look?

I have also tried to move the line "include /etc/nginx/sites-enabled/*;" at the end of the nginx.conf file without any effect


RE: mpd doesnt start if I add a secondary site to nginx - TheOldPresbyope - 08-18-2020

Well, this is moOde after all. You could look at the moOde log.

Regards,
Kent


RE: mpd doesnt start if I add a secondary site to nginx - Mwoua - 08-19-2020

Code:
20200818 233715 worker: -- Start
20200818 233715 worker: Successfully daemonized
20200818 233716 worker: Integrity check (failed:3)
20200818 233716 worker: Exited
20200818 233720 moode.php: MPD connect failed: cmd=(playlist)
20200818 233723 moode.php: MPD connect failed: cmd=(playlist)
20200818 233726 moode.php: MPD connect failed: cmd=(playlist)
20200818 233727 moode.php: MPD connect failed: cmd=(loadlib)
20200818 233728 moode.php: MPD connect failed: cmd=(lsinfo)
20200818 233729 moode.php: MPD connect failed: cmd=(lsinfo)

But that doesnt speak to me at all


RE: mpd doesnt start if I add a secondary site to nginx - TheOldPresbyope - 08-19-2020

Maybe I just got up on the wrong side of the bed this morning but from where I'm sitting it's starting to look like you're asking us to do your homework for you.

Code:
20200818 233716 worker: Integrity check (failed:3)


There's an integrity check function built into moOde to make sure that critical files haven't been modified, hence possibly corrupted, when the system starts. One of those files is /etc/nginx/nginx.conf. Its hash is stored in /var/local/www/db/moode-sqlite3.db, table cfg_hash, row 1

Code:
sqlite> select * from cfg_hash;
1|/etc/nginx/nginx.conf|7cfa7f4c830f5c446396ae2397bf59a1|exit
...



You can peruse posts like moOde and Pi-Hole on Nginx to see how this can be undone.

Regards,
Kent


RE: mpd doesnt start if I add a secondary site to nginx - Mwoua - 08-19-2020

Thats it, thank you. I guess I didnt find it because I googled the error and not nginx