Closed Solidifyconceptdevelopment closed 4 years ago
Can you share the last log of the application? You should have a log file in a directory like this /var/lib/docker/volumes/yourdocker_logs/_data/HomeAutio.Mqtt.GoogleHome-20200505.log
there is no such file to be found
/var/lib/docker $ sudo find -name *.log
gives
./containers/5beec5649f9bfdf0df47cdbef5b47530e4d6df459e4f46f6402a98d4c774685b/5beec5649f9bfdf0df47cdbef5b47530e4d6df459e4f46f6402a98d4c774685b-json.log ./overlay2/7392dcde43351b30c50c8322b5b918edbacb45c960c3fe224bb6c21080582c28/diff/var/log/apt/term.log ./overlay2/7392dcde43351b30c50c8322b5b918edbacb45c960c3fe224bb6c21080582c28/diff/var/log/apt/history.log ./overlay2/7392dcde43351b30c50c8322b5b918edbacb45c960c3fe224bb6c21080582c28/diff/var/log/dpkg.log ./overlay2/4ac81b79d091da7ae51700d52e4eb7cd665f21557b2b497b55c248c259419184/diff/var/log/apt/term.log ./overlay2/4ac81b79d091da7ae51700d52e4eb7cd665f21557b2b497b55c248c259419184/diff/var/log/apt/history.log ./overlay2/4ac81b79d091da7ae51700d52e4eb7cd665f21557b2b497b55c248c259419184/diff/var/log/dpkg.log
I do however noticed I can't acces the /var/lib/docker folders (permission denied). Might this be causing the issue?
Probably: By default, on linux hosts, docker stores volumes in /var/lib/docker/volumes/
The docker user should have write access to that folder, and you should be able to see the logs files directory inside it in order to debugging (and the data directory in order to configure the app).
Anyway: the first of the files that you found (5beec....-json.log) might also have the logs too. Check if the beginning of the files name matches with Homeautio containers id, and if so, review that file.
By the way, your docker version is really old. I tried with that version in this project, but it had big limitations on managing volumes, and upgraded to version 19.03.
Actually I don't think Rasberry Pi Zero supports .NET core, which means I don't think you can run this there.
All models of generation 1 and Pi Zero are not supported, because the .NET Core JIT depends on armv7 instructions not available on those versions.
Actually I don't think Rasberry Pi Zero supports .NET core, which means I don't think you can run this there.
All models of generation 1 and Pi Zero are not supported, because the .NET Core JIT depends on armv7 instructions not available on those versions.
I'll give it a go on a Rpi 2 then
sidenote: the ...-json.log file is empty
On Rpi 2 I get exit code=132. CPU not recent enough? Is there an older image which is compatible with Rpi 2? Or should I upgrade to a later model?
That's a Docker exit code, which unfortunately I don't know anything about. I think you can get that if you're trying to run the Intel based image instead of the arm based image though...
You are sure you're pulling the "latest-arm32" docker image and not the default one here right?
positive. I'll give it another try on Rpi 4
Same isse: exitcode=132 on Rpi 4
My command :
docker run --restart=always --name homeautio.mqtt.googlehome --user=1000 -dit -p 5000:5000 -v /home/pi/app/config:/app/config -v /home/pi/app/logs:/app/logs -e ASPNETCORE_PATHBASE="/google/home" -e TZ=Europe/Brussels i8beef/homeautio.mqtt.googlehome:latest-arm32
Done on a fresh install of Raspbian Buster with Docker 19.03.8
Can you run other docker containers ok?
Did the hello-world test succesfully, but haven't tried any other containers. New to docker just for this.
docker image inspect i8beef/homeautio.mqtt.googlehome | grep Arch
What do you get when you run that?
pi@raspberrypi:~ $ docker image inspect i8beef/homeautio.mqtt.googlehome:latest-arm32 | grep "Architecture"
"Architecture": "amd64"
pi@raspberrypi:~ $ docker images REPOSITORY TAG IMAGE ID CREATED SIZE i8beef/homeautio.mqtt.googlehome latest-arm32 bfe16d4f6d3a 8 months ago 248MB
Had to add the tag or the image wasn't found
Im not sure here. I don't run on a Pi, and don't even have a Pi 4 to play with. Im unable to find anything searching that sounds like your issue, with code 132 sounding like a processor architecture issue... your command looks right I think, so you might need to go digging in log files to see if there's more information than just an exit code we can get.
For reference, I'm running on an Intel build, but with Docker 18.03, so my Docker build is even older than yours.
I believe if you had the wrong image you'd instead get a "Exec format error" when trying to run it. I am suspecting there is something weird about your Docker setup...
Im not sure here. I don't run on a Pi, and don't even have a Pi 4 to play with. Im unable to find anything searching that sounds like your issue, with code 132 sounding like a processor architecture issue... your command looks right I think, so you might need to go digging in log files to see if there's more information than just an exit code we can get.
For reference, I'm running on an Intel build, but with Docker 18.03, so my Docker build is even older than yours.
Shouldn't this say arm32 instead of amd64?
No, that's a quirk of how Microsoft images apparently do staged builds. It picks it up as a the ARCH of the build container which comes first instead of runtime container that comes second apparently.
Seems like I'll have to figure out something about the permissions of the docker folder in Raspbian. I checked the log as suggested by @Vayatoalla and found
Access to the path '/app/config/tempkey.rsa' is denied. containerlog.log
Found it! I can't start with the volumes in the /home/pi folder. Changed it to
docker run --name homeautio.mqtt.googlehome --user=1000 -dit -p 5000:5000 -v config:/app/config -v logs:/app/logs -e ASPNETCORE_PATHBASE="/google/home" -e TZ=Europe/Brussels i8beef/homeautio.mqtt.googlehome:latest-arm32
now the volumes are in the /var/lib/docker/volumes folder where the docker group has all permissions. I can acces the files (config and logs) through WinScp with
sudo su -
in advanced settings.
Thanks for the help, I can continue from here!
edit: it even works on the Rpi 2
Hm interesting... Im glad you figured it out, but Im surprised thats the error Docker was throwing on you then. Is your pi user not user=1000?
I tend to create folders under /srv, so I have like /srv/homeautio.mqtt.googlehome/config and /srv/homeautio.mqtt.googlehome/logs with the right permissions setup for my UUID 1000 user to write there and mount those in... Im not aware of a reason a home directory location wouldn't be usable the same way (as long as you have the permissions / userid right), but i haven't tried it.
I tried to follow the instructions as best as I could, but I can't seem to get this to work on Rpi Zero W. I'm running Raspbian Jessie with Docker 18.06.3-ce, using the :latest-arm32 image from Docker Hub. I created the necessary volume folders with "appsettings.Production.json" and "googleDevices.json" in the config folder but I keep getting an exit code=139 in docker, so the container keeps restarting. Any help would be greatly appreciated!