Closed rmartinsanta closed 5 years ago
I wonder why Python3 is not available in the chroot, as it should be there I think for newer versions...
Can you run dj_run_chroot
without arguments and see if you can ping stuff? Try both a domain (google.com) and an IP (8.8.8.8) to check if DNS is the issue.
EDIT: Ping command is not available inside the chroot @nickygerritsen
As far as I know we do not limit internet connectivity in the chroot globally, only when running submissions. I just chrooted inside a chroot I have set up and I do have internet connectivity there.
Another option that you might try is to remove the chroot directory and run
/opt/domjudge/judgehost/bin/dj_make_chroot -i python3
to recreate it but then with python3.
it looks like a problem with DNS resolution inside the chroot, will keep investigating and see what can be done.
Edit: Contents of resolv.conf file
# This file is included on the metadata iso
nameserver 192.168.65.1
search fruitsalad
domain fruitsalad
The nameserver is not valid, will try to set google dns and see what happens
I wonder how it gets that nameserver.... fruitsalad
is my home domain name, so clearly it got it from there.
Can you copy /etc/resolv.conf
to the chroot directory? That should probably work.
If so, I will add a step to the Docker startup that does the same.
Edit: wait, we do that already: https://github.com/DOMjudge/domjudge-packaging/blob/master/docker/judgehost/scripts/start.sh#L36
See also https://github.com/DOMjudge/domjudge-packaging/issues/17
Are you running an older container by any chance?
I was using a previous container version, I made a db backup, recreated all the containers, reimport and install python3 just in case, everything seems to work right now.
Thanks for your help!
P.D: I made an script to install everything from scratch in a clean ubuntu server (docker, docker-compose, domjudge containers, configure everything), I can submit it as a PR if you are interested.
Feel free to open a pr to add this to the readme!
I will close this issue now.
I have not been able to make Python3 work inside the judgehost, steps taken:
In #38 it looks like apt worked inside the chroot, how can I replicate the behaviour? Is there any other way to start using Python3?
Thanks in advance