wouterdebie / locast2tuner

Locast to Emby/Plex/Channels server
https://wouterdebie.github.io/locast2tuner/
MIT License
52 stars 8 forks source link

Docker on Mac exits with error 139 (Probably not a Bug) #51

Closed sumocomputers closed 3 years ago

sumocomputers commented 3 years ago

I have absolutely zero experience with Docker before trying this, so it is likely to be user error.

I did follow the instructions pretty closely, and for some reason I don't think the Docker image is starting up. This is what I ran exactly:

mkdir ~/Downloads/Locast2Tuner/.locast2tuner
curl -o ~/Downloads/Locast2Tuner/.locast2tuner/config https://raw.githubusercontent.com/wouterdebie/locast2tuner/main/assets/config.example
docker pull ghcr.io/wouterdebie/locast2tuner:latest
docker run -p 6078:6078 -v ~/Downloads/Locast2Tuner/.locast2tuner/:/app/config --name locast2tuner -d ghcr.io/wouterdebie/locast2tuner:latest

Couldn't find the tuner at 127.0.0.1:6078 using Plex add manually, and didn't know how to tell the status of the Docker Container from the command line, so using the Desktop Docker app shows anytime I try to start the container, it exits with error 139.

A little guidance on where to go next would be appreciated.

Thanks,

Chris

eiddor commented 3 years ago

@sumocomputers You should be using -p 6078:6077 in the CLI. By default locast2tuner will try to attach to port 6077 inside the container and you're telling docker to map 6078 on your host to 6077 in the container.

Give that a try first.

sumocomputers commented 3 years ago

OK, so I deleted the container and recreated with -p 6078:6077, and still exits with 139.

I did find the log file in the Docker UI, and this is all that it will show when you try to start, and it exits with 139:

config selected = /app/config/config

eiddor commented 3 years ago

Just for fun (these will work with any container).

docker ps -a will tell you if the container is running docker attach locast2tuner will attach you to a running container docker exec -it locast2tuner /bin/sh will pop you into a shell inside the container docker logs locast2tuner will show you the logs and probably tell us what's happening

You can do some stuff from the Mac GUI but I haven't messed with it much.

My guess is that your config isn't sane, but the logs command above will tell you for sure.

wouterdebie commented 3 years ago

@sumocomputers is you config valid?

sumocomputers commented 3 years ago

Thank you @eiddor.

So yes it does appear it is a config issue, and it simply cannot login according to logs:

INFO Logging in with my_locast@username thread 'main' panicked at 'Login failed', src/credentials.rs:70:9

Since I do have a valid config file that I was using with the Homebrew version, can I point Docker to that config file, and if so, how do I do that?

eiddor commented 3 years ago

@sumocomputers Yeah, just copy your Homebrew config file to ~/Downloads/Locast2Tuner/.locast2tuner/config and you should be good to go.

(Just make sure your port number(s) in the docker command match whatever you put in your config file)

sumocomputers commented 3 years ago

I was able to get it running, and I left the config as default of port 6077 for locast2tuner, and added the tuner as 127.0.0.1:6078 since that is the Docker port, and seems to be working well.

Perhaps we could add a few lines of Docker/Mac instructions for people like me who might come along and not have a clue? I would be happy to write them up.

Now I am on to my real purpose: Use Docker (and other tools) to monitor the health of locast2tuner, send me messages when it starts or stops, and maybe other cool stuff.

Thanks for the help,

Chris

eiddor commented 3 years ago

Perhaps we could add a few lines of Docker/Mac instructions for people like me who might come along and not have a clue? I would be happy to write them up.

Feel free to submit a PR if you think something needs clarification!

The doc does show "... edit the file ..." after the curl step, which is what you were missing.

Most folks would general leave the ports as default since they'd only be running one instance of locast2tuner.

Also, my assumption is that a lot of people who end up running the Docker version are already running Docker, but maybe that's wishful thinking - Everyone needs to start somewhere (wait until you use docker-compose)!

Oh, and if you're bored and want to learn more, I wrote a whole series on Docker that you can find by searching my name plus Docker :-)

sumocomputers commented 3 years ago

The doc does show "... edit the file ..." after the curl step, which is what you were missing.

I definitely skipped that part as it is a little vague, so maybe I will submit a PR to clarify

Oh, and if you're bored and want to learn more, I wrote a whole series on Docker that you can find by searching my name plus Docker :-)

I think I found your page, will definitely check it out (especially interested in docker-compose): https://ccie.tv/tag/getting-started/

eiddor commented 3 years ago

That's the one - Feel free to ping me on Glitter (link on this repo) if you have questions!