Open rplati opened 3 years ago
I’ve looked at this at more depth. I made a docker-image for debugging: I removed the ENTRYPOINT
that seems to be causing the crashes and replaced it with ENTRYPOINT tail -f /dev/null
in order to keep the container alive. This prevented the crashing and I was able to connect to the container via docker exec
and check that there were no missing folders. I then tried starting splash with the command corresponding to the ENTRYPOINT
in the original splash dockerfile.
Starting splash this way in azure container instances sometimes works and in those cases the APIs work fine. But more often than not I got the following error message that apparently refers to chromium.
# python3 /app/bin/splash --proxy-profiles-path /etc/splash/proxy-profiles --js-profiles-path /etc/splash/js-profiles --filters-path /etc/splash/filters --lua-package-path /etc/splash/lua_modules/?.lua
2021-02-05 07:26:29+0000 [-] Log opened.
2021-02-05 07:26:29.496673 [-] Xvfb is started: ['Xvfb', ':311916652', '-screen', '0', '1024x768x24', '-nolisten', 'tcp']
QStandardPaths: XDG_RUNTIME_DIR not set, defaulting to '/tmp/runtime-root'
2021-02-05 07:26:31.359701 [-] Splash version: 3.5
[7158:7158:0205/072631.728516:ERROR:zygote_host_impl_linux.cc(89)] Running as root without --no-sandbox is not supported. See https://crbug.com/638180.
I then tried figuring out why I am sometimes able to get splash to start on ACI and sometimes not. In the West Europe region where I was testing, ACI apparently starts containers on (at least) two different types of machines: splash works on one but not on the other. I requested the info on the machine with uname -v
, uname -n
ja lscpu
.
The machine type where splash works has kernel version #114~16.04.1-Ubuntu SMP Wed Dec 16 02:39:42 UTC 2020
and the CPU supports VT-x Virtualization. The machine type where splash doesn’t start has kernel version #1 SMP Tue Oct 27 21:35:05 UTC 2020
and apparently no VT-x Virtualization. There may be more differences that a was not able to get with the commands I was using, but starting splash consistently worked on one type of machine and failed on the other.
I’ve read https://www.docker.com/blog/compiling-qt-with-docker-multi-stage-and-multi-platform/ as suggested by @Gallaecio in #1100 and from what I can gather, Qt seems to be the reason why splash is so sensitive to the machine it is running on. But I’m not familiar with Qt and docker enough to know how to approach fixing this. Any ideas are appreciated.
Maybe related to this question https://github.com/containerd/cri/issues/1507
I use k8s, the solution is to start a container locally, and then use
docker cp ...:/etc/splash splash
, And then use the k8s volume to mount into the container
The image works locally, but crashes on Azure Container Instances – log below. The container apparently cannot be started because the folder
/etc/splash/filters
is not found.Might be related to issue 1025, where the same error message was encountered trying to deploy on Heroku. See also issue 1 in Shokesu / splash.