ivadim / fruitnanny

Raspberry PI based baby monitor
136 stars 57 forks source link

Docker: Permanently restarting - Janus exits with code 132 #23

Closed GeneralLuzi closed 4 years ago

GeneralLuzi commented 4 years ago

Hi,

I followed the complete docker installation guide without any errors. After starting all containers, I recognized that the containers are permanently restarting. Especially, the container janus terminates with error 132.

Unfortunately, I am not able to see any logs of any container. I am also not able to enter a bash of a container. All containers are within a restarting loop.

I am using the following distribution on my Rasp Zero W: Raspbian 10 (buster). I did not modify any the content of the repo.

Any ideas? Thanks in advanced!

BR GL

alogoc commented 4 years ago

Hi @GeneralLuzi , actually today I was trying to figure out the same issue - using Rasp Zero W as well :D Looking at docker-compose, the docker images are built with armv7 support which is not compatible with Rasp Zero hardware architecture. As a workaround I would suggest to pull the repo and rebuild the images with armv6 architecture support. I'm going to give this a shot myself tomorrow once I find some time.

GeneralLuzi commented 4 years ago

Hi,

you are right. It is the wrong base image. For Raspberry PI Zero WH I would suggest to update each Dockerfile (/opt/fruitnanny/docker/*) with the base image balenalib/raspberry-pi-debian-node:latest.

I also did update the compose file and included the build tag. The following example for the Janus-Server build: context: /opt/fruitnanny dockerfile: /opt/fruitnanny/docker/janus/Dockerfile

Within this build tag there is an error, which I am not able to solve. Both Gstreamer can be build without errors. The other two containers, fruitnanny and janus, are not able to be built. The reason I guess is the context entry or maybe missing build arguments, which I am not able to set in a correct way.

Does anyone had a successful build? If yes, what are the valid build parameters / build commands? Currently, I am struggling...

GeneralLuzi commented 4 years ago

OK. I managed to build Fruitnanny and the GStreamer Containers. While bulding Janus I get some errors. The command I used was

pi@raspberry:/opt/fruitnanny/docker/janus $ docker build -f ./Dockerfile /opt/fruitnanny/

There were a lot of errors, but the last one I got was:

[...]
Error: Cannot find module 'minimist'
Require stack:
- /usr/lib/nodejs/rollup/bin/rollup
    at Function.Module._resolveFilename (internal/modules/cjs/loader.js:966:17)
    at Function.Module._load (internal/modules/cjs/loader.js:859:27)
    at Module.require (internal/modules/cjs/loader.js:1028:19)
    at require (internal/modules/cjs/helpers.js:72:18)
    at Object.<anonymous> (/usr/lib/nodejs/rollup/bin/rollup:6:32)
    at Module._compile (internal/modules/cjs/loader.js:1139:30)
    at Object.Module._extensions..js (internal/modules/cjs/loader.js:1159:10)
    at Module.load (internal/modules/cjs/loader.js:988:32)
    at Function.Module._load (internal/modules/cjs/loader.js:896:14)
    at Function.executeUserEntryPoint [as runMain] (internal/modules/run_main.js:71:12) {
  code: 'MODULE_NOT_FOUND',
  requireStack: [ '/usr/lib/nodejs/rollup/bin/rollup' ]
}
make[1]: *** [debian/rules:39: debian/js/janus.js] Error 1
make[1]: Leaving directory '/tmp/janus'
make: *** [debian/rules:64: binary] Error 2
dpkg-buildpackage: error: debian/rules binary subprocess returned exit status 2
The command '/bin/sh -c buildDeps="build-essential git debhelper gobject-introspection gtk-doc-tools libgirepository1.0-dev libglib2.0-dev libgnutls28-dev libgstreamer1.0-dev libgupnp-igd-1.0-dev autotools-dev dh-autoreconf dh-systemd gengetopt libavcodec-dev libavformat-dev libavutil-dev libconfig-dev libcurl4-openssl-dev libcurl4-openssl-dev libjansson-dev liblua5.3-dev libmicrohttpd-dev libnanomsg-dev libogg-dev libopus-dev librabbitmq-dev libre-dev libsofia-sip-ua-dev libsrtp2-dev libssl-dev libsystemd-dev libusrsctp-dev libwebsockets-dev pkg-config rename fakeroot gir1.2-glib-2.0 libgirepository-1.0-1 pandoc brotli doxygen graphviz node-rollup-plugin-replace pigz rollup uglifyjs node-terser uglifyjs.terser"     && runDeps="avahi-daemon libnss-mdns"     && echo 'APT::Install-Recommends "false";' >/etc/apt/apt.conf.d/00recommends     && echo 'APT::Install-Suggests "false";' >>/etc/apt/apt.conf.d/00recommends     && apt-get update     && apt-get install $buildDeps $runDeps     && git clone --depth 1 --single-branch --branch debian/0.1.16-1 https://salsa.debian.org/telepathy-team/libnice.git /tmp/libnice     && cd /tmp/libnice     && dpkg-buildpackage -b --no-sign -rfakeroot     && dpkg -i ../libnice10_0.1.16-1_armhf.deb ../gir1.2-nice-0.1_0.1.16-1_armhf.deb ../libnice-dev_0.1.16-1_armhf.deb     && git clone --depth 1 --single-branch --branch debian/0.7.3-2 https://salsa.debian.org/pkg-voip-team/janus.git  /tmp/janus     && cd /tmp/janus     && dpkg-buildpackage -b --no-sign -rfakeroot     && dpkg -i ../janus_0.7.3-2_armhf.deb ../janus-tools_0.7.3-2_armhf.deb     && cd /     && apt-get --purge remove libnice-dev $buildDeps     && apt-get --purge autoremove     && apt-get clean     && rm -rf /tmp/*     && rm -rf /var/lib/apt/lists/*' returned a non-zero code: 2

Any hints on that? Which build command do you use, resp. how do you build?

Thanks in advanced.

ivadim commented 4 years ago

Could you guys please test setup on Raspberry Pi Zero and Raspberry Pi 2? I've updated all container images to work with armv6 instead of having armv7

GeneralLuzi commented 4 years ago

I will tonight.

But I am still wondering, why my build on the RSP Zero is faulty. Do you have any idea? Would be great to know..

Have you ever built it once on a RSP directly or just over Azure DevOps?