Open KarlBaumann opened 4 years ago
@KarlBaumann do you have any more debugging info?
Not really, I am new to Docker so I did not know how to debug it better. Afterwards I uninstalled docker and installed it the "Raspbian" way. This method kind a works, but very often kerberosio service is getting killed by OOM killer and I think this might have been the case with docker as well. Basically there is not enough RAM available. I can try to set up the docker environment again later if that helps.
Not really, I am new to Docker so I did not know how to debug it better. Afterwards I uninstalled docker and installed it the "Raspbian" way. This method kind a works, but very often kerberosio service is getting killed by OOM killer and I think this might have been the case with docker as well. Basically there is not enough RAM available. I can try to set up the docker environment again later if that helps.
Thanks that would be of great help.
okay, after I set it up again, what would be the steps to get more debugging info?
try to run the docker container and run docker logs.
Logs are compleately empty. I also do not see any messages in /var/log/messages about OOM killer, so it must be something else.
Could it be that that Docker image is simply not compatible with Pi Zero? Has anyone ever tested it?
its an armv7 processor?
ARMv6:
interesting, which image did it download can you inspect the docker image kerberos/kerberos
Thanks what happens if you just do docker run -p 80:80 -p 8889:8889 kerberos/kerberos.
nothing
cann you try this image? (using the tag, kerberos/kerberos:linux-armv7)
Compleately the same with that image
will look into this @KarlBaumann
Hi, I have a whole bunch of Raspberry Pi Zero Ws. And I am very psyched about getting kerberos.io working with them using Docker. uname -r
on the units reveal they are ARMv6. I noticed there was no ARMv6 build in the Docker Hub registry. I also noticed that the instructions for cross compiling are on the readme.md
. I tried a cross compile for ARMv6 and the build fails when grabbing PHP 7.1 packages from sury.org for debian stretch. I'll contact Sury about ARMv6 PHP packages, or changes to the Dockerfile might work. I have tried changing the PHP version, but that is all.
FWIW... I opened this on Surý's bug tracker: https://github.com/oerdnj/deb.sury.org/issues/1455
thanks @dbwest yes we still need to add support for ARMv6, thanks for helping ;)
Wow, immediately heard back that there is no support and no intention to support armv6 from Surý. I am seeing if a Raspian base image is a thing because there is an ArmPort for Raspian that supports hard-float and targets armv6.
Ok, maybe we might need to create an exception for this, and create an additional Dockerfile?
On 27 Aug 2020, at 15:45, David West notifications@github.com wrote:
Wow, immediately heard back that there is no support and no intention to support armv6 from Surý. I am seeing if a Raspian base image is a thing because there is an ArmPort for Raspian that supports hard-float and targets armv6.
— You are receiving this because you were assigned. Reply to this email directly, view it on GitHub https://github.com/kerberos-io/kerberos-docker/issues/23#issuecomment-681958467, or unsubscribe https://github.com/notifications/unsubscribe-auth/AALZUG35VWMIAF6RA5MPV2TSCZPP3ANCNFSM4KSENSZQ.
That sounds good. I am doing some sort of hackery now where I changed the Dockerfile in my fork. Build is here and going now. It has at least gotten to the NASM bit with some changes to use Raspbian and get Node differently: https://github.com/dbwest/kerberos-docker/runs/1036980595?check_suite_focus=true
You are right about an additional Dockerfile, or something better organized than what I am trying now. Provided this builds and pushes to my Dockerhub, I'll test it on some hardware.
The rest is organization and preferences and I'll leave the direction up to you on how to organize and fold it in to the upstream if desired.
That would be great @dbwest let me know if you need help or would get stuck. More then happy to help!
So it looks like it built. I am going to try deploying it to the pi zero w I want to use with kerberos.io, and if it works I will tidy this up and do a pull request with a new Dockerfile and submit for review.
WONDERFUL! share with me your findings ;)
On 27 Aug 2020, at 20:40, David West notifications@github.com wrote:
So it looks like it built. I am going to try deploying it to the pi zero w I want to use with kerberos.io, and if it works I will tidy this up and do a pull request with a new Dockerfile and submit for review.
https://hub.docker.com/repository/docker/dbwest/kerberos-io https://hub.docker.com/repository/docker/dbwest/kerberos-io — You are receiving this because you were assigned. Reply to this email directly, view it on GitHub https://github.com/kerberos-io/kerberos-docker/issues/23#issuecomment-682122636, or unsubscribe https://github.com/notifications/unsubscribe-auth/AALZUG7UN4D3UKU3X4YP4ITSC2SBBANCNFSM4KSENSZQ.
I deployed it and there are still problems. Attaching the log FWIW. I tried deploying to balena.io with this repo: https://github.com/dbwest/kerberos
Logs attached from the failing service... kerberos-balena-dbw_young-frog-27.08.20_17_2716(-0400).txt
I'll hook up the Pi Zero W soon, after I finish some other things I have to do, and get some debugging in with the image I uploaded to Docker hub, maybe by supressing the entrypoint and going into the container without it and trying to start things up inside and poke around.
Thanks for sharing ;) Can you show contents of run.sh
27.08.20 16:22:13 (-0400) <main> /run.sh: line 49: 13 Done
#!/bin/bash
autoremoval() {
while true; do
sleep 60
if [[ $(df -h /etc/opt/kerberosio/capture | tail -1 | awk -F' ' '{ print $5/1 }' | tr ['%'] ["0"]) -gt 90 ]];
then
echo "Cleaning disk"
find /etc/opt/kerberosio/capture/ -type f | sort | head -n 100 | xargs rm;
fi;
done
}
copyConfigFiles() {
# Check if the config dir is empty, this can happen due to mapping
# an empty filesystem to the volume.
TEMPLATE_DIR=/etc/opt/kerberosio/template
CONFIG_DIR=/etc/opt/kerberosio/config
if [ "$(ls -A $CONFIG_DIR)" ]; then
echo "Config files are available."
else
echo "Config files are missing, copying from template."
cp /etc/opt/kerberosio/template/* /etc/opt/kerberosio/config/
chmod -R 777 /etc/opt/kerberosio/config
fi
# Do the same for the web config
TEMPLATE_DIR=/var/www/web/template
CONFIG_DIR=/var/www/web/config
if [ "$(ls -A $CONFIG_DIR)" ]; then
echo "Config files are available."
else
echo "Config files are missing, copying from template."
cp /var/www/web/template/* /var/www/web/config/
chmod -R 777 /var/www/web/config
fi
}
# replace SESSION_COOKIE_NAME
random=$((1+RANDOM%10000))
sed -i -e "s/kerberosio_session/kerberosio_session_$random/" /var/www/web/.env
autoremoval &
copyConfigFiles &
# changes for php 7.1
echo "[www]" > /etc/php/7.1/fpm/pool.d/env.conf
echo "" >> /etc/php/7.1/fpm/pool.d/env.conf
env | grep "KERBEROSIO_" | sed "s/\(.*\)=\(.*\)/env[\1]='\2'/" >> /etc/php/7.1/fpm/pool.d/env.conf
service php7.1-fpm start
/usr/bin/supervisord -n -c /etc/supervisord.conf
I poked around more in that container, and although cat
works, ls
and sed
and other common utilities give segfaults. Think if I redo that container and add back in some common utilities then it will work...
@dbwest thanks, let us know if you have any break through ;)
@dbwest not sure if already changed something? I have some time to elaborate on this issue.
How is this handled on KiOS, that works with RPi Zero W no problem?