Closed Asp3ctus closed 8 years ago
How did you restart container?
I have the exact same problem (Error #10 on container restart). I've restarted my container by rebooting by computer. However, even if I just do a "docker stop zabbix-agent-xxl" followed by a "docker start zabbix-agent-xxl", I run into the same issue (Error #10). My docker run is slightly different though:
docker run \
--name=zabbixagent-xxl \
-p 10250:10050 \
-v /:/rootfs \
-v /var/run:/var/run \
-e "ZA_Server=monitoring.domain.local" \
-e "ZA_ServerActive=monitoring.domain.local" \
-h docker-agent-1 \
-d --restart=always monitoringartist/zabbix-agent-xxl-limited:latest
--restart=always
Unfortunately restart policy is not supported. At least not in public free image. I have idea how to fix it, but I don't want to waste my time. To be honest I don't like Docker restart policy. IMO it's should be task of your Docker orchestration.
Ok. However, even if I remove the restart policy from the run command, I still run into the same issue if I do a "docker stop" followed by "docker start". Are you saying that stopping and starting the container aren't supported at all? The only way to use this is removing the container and rebuilding it each time? (Just trying to confirm)
Thanks!
docker stop
+ docker start
= docker restart
= --restart=always
= still the same problem.
Yes, you need to remove old zabbix-agent container and start new one in your case. Container is stateless, so it's not a problem.
Does this mean that if a machine reboots, we will have to remove the zabbix-agent container and start a new one every time ?
Yes, you have to remove the zabbix-agent container and start a new one every time. I recommend to use it as a systemd
service, so you can create service "hook" which will remove container before start.
I've got the same issue, and that's quite weird, if I need to recreate container each time instead of just start it again.
Can you put more description for #10 error? Maybe it's possible to solve this issue by user?
zabbix-agentd
properlyIt's expected behaviour/architecture design and you are not able to solve it from the user space.
+1 & solve my problem thanks.
It starts and works but after i stop and start the container is breaking: