mpvd / vTuner-Emulator-YCast

YCast Docker for Rasberry Pi (Raspbian)
5 stars 1 forks source link

Error when I start docker and always restart #1

Open spider7611 opened 3 years ago

spider7611 commented 3 years ago

Want to use this docker on synology nas.

Get this error always

standard_init_linux.go:222: exec user process caused "exec format error"

Install with this: sudo docker run -d --name vtuner-ycast -v /volume1/docker/vtuner:/srv/ycast/ycast/stations/ -p 8989:80 --restart unless-stopped mpvd/vtuner-emulator-ycast:latest

what is the problem?

Thank you!

mpvd commented 3 years ago

Hi, I think it's because of #!/bin/sh in the Entrypoint.sh. I've changed it to #!/bin/bash. I don't have a synology here to test it. As far I know it has ARM too but instead of Debian it has some other Linux. Please try it mpvd/vtuner-emulator-ycast:1.2_synology and it would be great if you could give a short feedback if it's working. Regards

spider7611 commented 3 years ago

Ok, now its working half. So on my synology run this docker and reach this address: 192.168.1.120:8989 192.168.1.120 my nas ip and the port the ycast docker. Ok, but I can't write this ip with the port number in adguard DNS rewrites. So how can I solve this? Thank Your help!

mpvd commented 3 years ago

Good. The AVRs only address port 80, so you have to do a little trick: The docker network in the synology should be something around subnet 172.17.0.0/16. It would be better if you could create your own network for this docker (if possible) to make sure the ip doesn't change and you have access to this network from the outside of your synology, let's say subnet 172.16.0.0/24. Then you write a route in your router: subnet 172.16.0.0/24 to 192.168.1.120 (IP of your synology) and in your DNS-Server you put the ip of the docker container, for example 172.16.0.2. This is how I do it with the raspberry. Hope this works with a synology too, please let me know.

flummy1978 commented 3 years ago

i hope it is ok, when i go between it:

I m trying since 2 days to get a docker working with ycast. The error is still the same: standard_init_linux.go:222: exec user process caused "exec format error"

It would be nice, if its possible for you to check it. If its possible to help you with that, just let me know.

Andreas

p.s. wenn es möglich ist auf Deutsch zu antworten hab ich nix dagegen, dann brauche ich mir nicht die Zunge zu zerbrechen gg VG Andreas

mpvd commented 3 years ago

Hi,

-- deutsch darunter-- It depends on the Linux distribution you are using. It seems you are not using raspbian, right? You should change #!/bin/bash to #!/bin/sh

Es hängt mit der Linux Distribution zusammen. Es sieht so aus als würde der docker nicht im raspbian gestartet, sondern in einem anderen Betriebssystem. Man muss in dem Fall #!/bin/bash zu #!/bin/sh ändern. (Ich mache mal eine Mischung aus deutsch und englisch, damit auch andere den Fehler nachvollziehen können.)

Please let me know if it works. Siehe auch/check also docker-hub: https://hub.docker.com/layers/mpvd/vtuner-emulator-ycast/1.2_synology/images/sha256-b64ae4826ea305607d7276ab06d4dda33966721578aba7252270d83506ef126b?context=explore

regards/viele Grüße

Am 08.05.2021 um 16:32 schrieb flummy1978:

i hope it is ok, when i go between it:

I m trying since 2 days to get a docker working with ycast. The error is still the same: |standard_init_linux.go:222: exec user process caused "exec format error"|

It would be nice, if its possible for you to check it. If its possible to help you with that, just let me know.

Andreas

p.s. wenn es möglich ist auf Deutsch zu antworten hab ich nix dagegen, dann brauche ich mir nicht die Zunge zu zerbrechen /gg/ VG Andreas

— You are receiving this because you commented. Reply to this email directly, view it on GitHub https://github.com/mpvd/vTuner-Emulator-YCast/issues/1#issuecomment-835385527, or unsubscribe https://github.com/notifications/unsubscribe-auth/AP23VKW24CIZOGPCJJ6O5HDTMVDRNANCNFSM4TFITBLA.

flummy1978 commented 3 years ago

Thats right, it's a synology Diskstation. Sorry, that stupid question but how can I change that? I ve never modified a docker file. Can I take this Docker file? https://hub.docker.com/layers/mpvd/vtuner-emulator-ycast/1.2_synology/images/sha256-b64ae4826ea305607d7276ab06d4dda33966721578aba7252270d83506ef126b?context=explore

I didnt see that file before.... Regards Andreas

P.s. Hast schon Recht,macht Sinn für alle andern die es suchen.HHauptsache mein Wirrwarr ist halbwegs verständlich ;)

mpvd commented 3 years ago

I've uploaded the code of this synology docker container here: https://github.com/mpvd/vTuner-Emulator-YCast/releases/tag/1.2.synology As far as I remeber I only made changes to the entrypoint.sh, but to be sure I've uploaded my whole folder. The original entrypoint.sh was also missing in the master branch, so I uploaded it, too. Additionally there are some little changed in the ycast.py to fix a bug. You can use this instead of the original one.

If You don't want to play around with this code, just run this docker like in the description and it will be pulled from the docker hub.

Background info: In the first line in sh files has to be a #!/bin/bash statement. Depending on the Linux you are using, sometimes it has to be #!/bin/sh

PS: Klar, ich verstehe alles. Habe die einzelnen Teile hier früher auch nicht ganz sauber hochgeladen, das verwirrt nur noch mehr... Wenn weitere Fragen sind einfach melden. :-)

cheers

Am 09.05.2021 um 11:27 schrieb flummy1978:

Thats right, it's a synology Diskstation. Sorry, that stupid question but how can I change that? I ve never modified a docker file. Can I take this Docker file? https://hub.docker.com/layers/mpvd/vtuner-emulator-ycast/1.2_synology/images/sha256-b64ae4826ea305607d7276ab06d4dda33966721578aba7252270d83506ef126b?context=explore https://hub.docker.com/layers/mpvd/vtuner-emulator-ycast/1.2_synology/images/sha256-b64ae4826ea305607d7276ab06d4dda33966721578aba7252270d83506ef126b?context=explore

I didnt see that file before.... Regards Andreas

P.s. Hast schon Recht,macht Sinn für alle andern die es suchen.HHauptsache mein Wirrwarr ist halbwegs verständlich ;)

— You are receiving this because you commented. Reply to this email directly, view it on GitHub https://github.com/mpvd/vTuner-Emulator-YCast/issues/1#issuecomment-835762603, or unsubscribe https://github.com/notifications/unsubscribe-auth/AP23VKQTRHG36CWZC4ZT2FLTMZIPXANCNFSM4TFITBLA.

flummy1978 commented 3 years ago

Hey,

thx a lot for your work. Ive pulled the "mpvd/vtuner-emulator-ycast:1.2_synology". Unfortunately with the same result

Unbenannt

Im not very familiar in linux / docker ..... But i ve tried something: Checked in Portainer my current docker which runs normal (unifi controller, fhem and pihole) on every docker i can join the console with /bin/bash or /bin/sh. When i choose: /bin/sh i get the startline: # /bin/bash i get the startlinie: root@fhem:/opt/fhem#

on every container its the same. It seems for a linux dummy like me that bin/bash should be the right one. But no idea what could be wrong ;(

regards

p.s. Danke auch hier nochmal. Ich weiss dass ich englisch manchmal wie ein volldepp schreibe, daher sind manche Erklärungen für n ...... gg Aber wenn Du Dich dem annehmen kannst, wäre ich Dir sehr dankbar (weil das bei Dir scheinbar läuft) Wenn ich irgendwie helfen kann, den Fehler zu finden, lass es mich wissen ;)

mpvd commented 3 years ago

Hi,

I don't have a synology so I can't test the building process. It's running on my raspberry pi. According to user feedback I know, that the docker container for synology from docker hub is working. I biult it on my raspberry pi with the entrypoint.sh made for synology. I think, that's why it won't build on your synology. So please try also to change the #!bin/bash to

!bin/sh in run.sh and build.sh like it is already done in the entrypoint.sh

Please also try the synology docker container from docker hub: sudo docker run -d --name vtuner-ycast -v /home/vtuner/:/srv/ycast/ycast/stations/ -p 80:80 --restart unless-stopped mpvd/vtuner-emulator-ycast:1.2_synology

Does it start?

PS 4 Germany: Hoffentlich ist es verständlich, also bitte zwei Versuche: 1) in der build.sh und run.sh auch #!bin/bash gegen #!bin/sh ersetzen und dann 2) einfach mal den container direkt aus dem docker hub probieren. Der sollte eigentlich laufen und dann können wir zumindest die Fehlerursache eingrenzen. Viel Erfolg! :-)

Am 10.05.2021 um 11:28 schrieb flummy1978:

Hey,

thx a lot for your work. Ive pulled the "mpvd/vtuner-emulator-ycast:1.2_synology". Unfortunately with the same result

Unbenannt https://user-images.githubusercontent.com/49339206/117636400-0bb15280-b181-11eb-82dd-400d61af36d8.JPG

Im not very familiar in linux / docker ..... But i ve tried something: Checked in Portainer my current docker which runs normal (unifi controller, fhem and pihole) on every docker i can join the console with /bin/bash or /bin/sh. When i choose: /bin/sh i get the startline: # /bin/bash i get the startlinie: @.***:/opt/fhem#

on every container its the same. It seems for a linux dummy like me that bin/bash should be the right one. But no idea what could be wrong ;(

regards

p.s. Danke auch hier nochmal. Ich weiss dass ich englisch manchmal wie ein volldepp schreibe, daher sind manche Erklärungen für n ...... /gg/ Aber wenn Du Dich dem annehmen kannst, wäre ich Dir sehr dankbar (weil das bei Dir scheinbar läuft) Wenn ich irgendwie helfen kann, den Fehler zu finden, lass es mich wissen ;)

— You are receiving this because you commented. Reply to this email directly, view it on GitHub https://github.com/mpvd/vTuner-Emulator-YCast/issues/1#issuecomment-836461068, or unsubscribe https://github.com/notifications/unsubscribe-auth/AP23VKWX3ARBXGZDTVGCZ4LTM6RLVANCNFSM4TFITBLA.

flummy1978 commented 3 years ago

Except today in the morning I couldnt check it, cause still at work. But today at night I'll try it, but if i understand it right: Please also try the synology docker container from docker hub: sudo docker run -d --name vtuner-ycast -v /home/vtuner/:/srv/ycast/ycast/stations/ -p 80:80 --restart unless-stopped mpvd/vtuner-emulator-ycast:1.2_synology

This was, what I tried already today in the morning an my answer at 11:28 today was after I tried the synology version......

I hope I didn't see it wrong, but when I compare the synology and the master version, why is there so much difference between the parts, when (hopefully) just /bin/sh and /bin/bash is the problem? Seen here https://github.com/mpvd/vTuner-Emulator-YCast/compare/1.2...1.2.synology

Pls let me know if you changed there something else today,so I'll try it tonight again.

Thx and cheers

PS Wie gesagt bin in der Linux Welt nicht grad der hellste Stern am Himmel, aber ich gebe mir Mühe ;)

  1. Wie komme ich an die Dateien, wenn sie durch den Docker installiert wurden?
  2. War das über den Docker hub genau das was ich probiert hab. Hab die synology Version runter geladen und dann mit Portweiterleigung und Pfadanpassung installiert.
mpvd commented 3 years ago

Hi, Just wanted to give a ping. I'm quite busy in the last days. I'll check it again during the next days. There shouldn't be almost any difference in the code between Synology and master. The error you described in the beginning happens when it is about bin/bash and bin/sh. You have two ways to get the docker: 1) build I yourself, which is more secure because you can check the code, but it is more complex, because there are a lot of dependencies and you have to understand what happens there 2) you pull it from docker hub

Which one gave you this error message you mentioned first? I understand that Option 2 is restarting all the time, right? Please post the docker run, how you are doing it. Are you running pihole, too? It could be in conflict with pinhole, therefore you have to run a new docker network and write a route in your router. Did you already did this?

Cheers

PS: wollte mich nur kurz melden "Ping" :), bin gerade ziemlich eingespannt. Ich prüfe alles nochmal genauer in den nächsten Tagen und versuche es etwas genauer zu dokumentieren.

flummy1978 commented 3 years ago

Hai, dont worry, i'm not waiting until you answer and get impatient when you dont do it in couple hours. Conversely I´m very happy, someone try to help me, even i don't know linux very well. You understand that right. I take the second version and get it directly from docker hub:

  1. I pulled and installed your version directly on the Diskstation with sudo docker run -d --name vtuner-ycast -v /volume1/docker/vtuner-ycast/:/srv/ycast/ycast/stations/ -p 8083:80 --restart unless-stopped mpvd/vtuner-emulator-ycast:1.2_synology (the port is changed because the Dikstation is using already the Port 80 - i know its a little tricky to let the Diskstaion listen to the port instead of 80, but it works, and this will be the next part, after the docker is running ;) )
  2. After that i got the container in my Docker app in the Diskstation, try to start with the same error like above in the Screenshot. I ve never tried to build a docker by myself.

Question about the pihole: Yes, there is a pihole docker on the same machine. BUT i ve installed it after i tried the Ycast docker and even if i disable the pihole, the ycast docker crashes same. I know i have to route the yamaha requests on the ycast docker WHEN the docker is working. Now i m routing the radioyamaha.vtuner.com requests to a ycast service in the www. I would be very happy if it works to run it on my own machine ;)

regards Andreas

P.S. Wie gesagt, kein Stress, bin schon heilfroh, dass überhaupt jemand Lust hat mir helfen zu wollen. Ich hoffe nur dass alles verständlich ist und ich das richtig erklärte. Durch den Merkelschen Knast hab ich momentan einfach noch die Zeit mich darum etwas mehr zu kümmern. Wenn Du irgendwelche Infos mehr brauchst, als das was hier ist, kannst Du auch direkt per Mail antworten. Ich glaube viele Details helfen hier anderen auch kaum weiter lach DANKE für Deine Zeit und Mühe :)

mpvd commented 3 years ago

Hi,

Pihole needs Port 80 and blocks it, even when it's turned off. I suggest you to do the following steps: 1) create new Docker network: sudo docker network create --subnet=172.18.0.0/24 multimedia 2>/dev/null

2) run docker and join the network: mkdir -p /home/vtuner sudo docker run -d \     --name vey-1.2_synology \     -v /home/vtuner/:/srv/ycast/ycast/stations/ \     -p 8081:80 \     --net multimedia \     --ip 172.18.0.100 \     --restart unless-stopped \ mpvd/vtuner-emulator-ycast:1.2_synology sudo chmod -R 755 /home/vtuner

3) route in Router to network: 172.18.0.100 to the device where the docker containers are running, for example 192.168.178.100 /24 (test with ping 172.18.0.100)

4) DNS setting in Pihole or Router: radioyamaha.vtuner.com to 172.18.0.100

PS: Sorry war ne harte letzte Woche, konnte mich nicht darum kümmern. Viele Grüße

Am 13.05.2021 um 14:42 schrieb flummy1978:

Hai, dont worry, i'm not waiting until you answer and get impatient when you dont do it in couple hours. Conversely I´m very happy, someone try to help me, even i don't know linux very well. You understand that right. I take the second version and get it directly from docker hub:

  1. I pulled and installed your version directly on the Diskstation with |sudo docker run -d --name vtuner-ycast -v /volume1/docker/vtuner-ycast/:/srv/ycast/ycast/stations/ -p 8083:80 --restart unless-stopped mpvd/vtuner-emulator-ycast:1.2_synology| (the port is changed because the Dikstation is using already the Port 80 - i know its a little tricky to let the Diskstaion listen to the port instead of 80, but it works, and this will be the next part, after the docker is running ;) )
  2. After that i got the container in my Docker app in the Diskstation, try to start with the same error like above in the Screenshot. I ve never tried to build a docker by myself.

Question about the pihole: Yes, there is a pihole docker on the same machine. BUT i ve installed it after i tried the Ycast docker and even if i disable the pihole, the ycast docker crashes same. I know i have to route the yamaha requests on the ycast docker WHEN the docker is working. Now i m routing the radioyamaha.vtuner.com requests to a ycast service in the www http://www. I would be very happy if it works to run it on my own machine ;)

regards Andreas

P.S. Wie gesagt, kein Stress, bin schon heilfroh, dass überhaupt jemand Lust hat mir helfen zu wollen. Ich hoffe nur dass alles verständlich ist und ich das richtig erklärte. Durch den Merkelschen Knast hab ich momentan einfach noch die Zeit mich darum etwas mehr zu kümmern. Wenn Du irgendwelche Infos mehr brauchst, als das was hier ist, kannst Du auch direkt per Mail antworten. Ich glaube viele Details helfen hier anderen auch kaum weiter /lach/ DANKE für Deine Zeit und Mühe :)

— You are receiving this because you commented. Reply to this email directly, view it on GitHub https://github.com/mpvd/vTuner-Emulator-YCast/issues/1#issuecomment-840529605, or unsubscribe https://github.com/notifications/unsubscribe-auth/AP23VKX46UPJ6K3UB4HALWDTNPCLVANCNFSM4TFITBLA.

flummy1978 commented 3 years ago

Hey,

Do you think a blocked Port causes an error like: standard_init_linux.go:222: exec user process caused "exec format error ? i dont think so ..... but i ve no idea +g+

I'll try your solution, if its possible (and i understand everything correctly), but for now unfortunately it have to wait because of a bereavement in the family. regards

p.s. Mach Dir keinen Stress, ich danke Dir vielmals für Deine Mühe und Wille mir helfen zu wollen. Wie Du siehst war meine Woche alles andere als einfach. Ich komme momentan nur dazu sowas zu beantworten wenn ich arbeiten bin, oder mal wieder nicht pennen kann. Klaren Gedanken für solche Aufgaben kann ich grad eh nicht fassen ;(