ironsmile / euterpe

Self-hosted music streaming server 🎶 with RESTful API and Web interface. Think of it as your very own Spotify! ☁️🎧
https://listen-to-euterpe.eu
GNU General Public License v3.0
534 stars 43 forks source link

Euterpe not starting (WebUI) after mounting '/root/.euterpe' #42

Closed SmartPhoneLover closed 1 year ago

SmartPhoneLover commented 2 years ago

Hello, I'm having problems when I try to mount the '/root/.euterpe' container directory.

When I start the container with this mount, pointing to a physical directory on my server to allow the persistance of the information (db, logs, configs), Euterpe just doesn't start. I mean, the container starts without erros (no terminal errors nor nothing related, I think, in the log file), but it doesn't show the WebUI from port 9996.

I tried changing the permissions of the mounted volume manually, if that could be the problem, being Euterpe not able to access or write to the directory, but nothing. It has full access as all the files are created: config.json, euterpe.db, euterpe.log, pidfile,pid.

Thank you for your attention.

ironsmile commented 2 years ago

If the container is still running and there are no error messages I would guess that the Euterpe process is running fine. I think the problem might be that it is not listening on the correct interface. Do you, by any chance, have set it up to use localhost or 127.0.0.1 as its listening address? I am talking about the listen in the config.json. When run inside a container it should be set to 0.0.0.0:9996 or :9996. Which looks like this:

{
  "listen": "0.0.0.0:9996",
  // other stuff
}

This is what the the published Docker image has configured by default if one does not use volumes.

I will certainly make sure the default generated "listen" is back to "0.0.0.0:9996" in the next version. It seems to trip up a lot of people when it is localhost.

Hope this helps!

SmartPhoneLover commented 2 years ago

I tried mounting the 'config.json' file, but I cannot get Euterpe container to see it.

For example, when I change the credentials for the following argument, those credentials doesn't work when I restart/rebuild the container: // User and password for the HTTP basic authentication. "authentication": { "user": "euterpe", "password": "euterpe",

And when I try mounting it on '/root/.euterpe/config.json' I get the following error, also without editing anything (default one): parsing configuration: decoding config: invalid character '/' looking for beginning of object key string

ironsmile commented 1 year ago

Oh, I've somehow missed your last response from so long ago! So, the problem is that your JSON file includes the line

// User and password for the HTTP basic authentication.

Lines like this make the JSON incorrect. I've added them to the examples only to document what each property does.

I am closing the issue.