shi-yang / jnoj

Jiangnan Online Judge
https://www.jnoj.dev
Other
241 stars 62 forks source link

当容器恢复运行的时候,dispatch判题服务异常 #69

Closed LiuChangFreeman closed 4 years ago

LiuChangFreeman commented 4 years ago
docker pull  docker.io/liuchangfreeman/oj:1.0
docker run -dit -p 8000:80 --name=oj --privileged=true liuchangfreeman/oj:1.0  /sbin/init
#刚启动的容器,此时网页能正常打开,但是判题服务运行异常
docker stop oj
docker start oj 
#停止后,再恢复运行,原本正常正常的判题服务也会变成异常
sudo docker exec -it oj /bin/bash
systemctl restart jnoj-judge 
#进入容器内手动重启服务后可以正常判题,systemd服务不能识别这种异常,因为dispatch程序是正常启动的,但是无法正常工作

微信截图_20200113141343

LiuChangFreeman commented 4 years ago

找到方法了,在service中指定judge晚于mysql+php+nginx服务启动即可 微信截图_20200113145951