Hung Process run.php on container restart

Team – My sysadmin has been running into a problem with the Xibo containers. Any advice on this?

Upon restart of the xibo containers, we see a bad gateway when visiting the main site. The fix so far is to open a bash shell inside of the container and manually kill the hung php process ‘/usr/bin/php bin/run.php’. The process was hung for over a day, and the containers were restarted numerous times. Transcript of those actions are below:

@xiboweb-test xibo]$ docker exec -ti xibo_cms-web_1 bash
bash-4.3# ps -ef
PID USER TIME COMMAND
1 root 0:00 {entrypoint.sh} /bin/sh /entrypoint.sh
46 apache 0:00 bash -c cd /var/www/cms && /usr/bin/php bin/run.php 1
47 apache 4:02 /usr/bin/php bin/run.php 1
50 root 0:00 bash
54 root 0:00 ps -ef
bash-4.3# kill -HUP 46
bash-4.3# ps -ef
PID USER TIME COMMAND
1 root 0:00 {httpd-foregroun} /bin/bash /usr/local/bin/httpd-foregrou
47 apache 4:02 /usr/bin/php bin/run.php 1
50 root 0:00 bash
56 root 0:00 /usr/sbin/crond
58 root 0:00 /usr/sbin/httpd -DFOREGROUND
59 apache 0:00 /usr/sbin/httpd -DFOREGROUND
60 apache 0:00 /usr/sbin/httpd -DFOREGROUND
61 apache 0:00 /usr/sbin/httpd -DFOREGROUND
62 apache 0:00 /usr/sbin/httpd -DFOREGROUND
63 apache 0:00 /usr/sbin/httpd -DFOREGROUND
64 root 0:00 ps -ef

Please check your settings for XMR, especially if you have an imported database rather than a fresh install of Docker.

If the XMR private address is incorrect, it can cause slow running of XTR (which is what you’re seeing), which in turn will cause other issues inside the CMS.

This seems like it may have been the case. This actually related directly to something we had seen previously where on docker restarts, the IPs seem to change, and we have to fix the configuration. Is there a known way to keep the IPs in the containers consistent so we don’t have to update the config every time?

The container’s IP does change every time, but the Players shouldn’t be looking at that address.

The Players should be given the address of the host machine - which should be fixed. The internal addressing for Docker doesn’t play in to that.

In addition, the XMR private address should be set to the default value - which uses a hostname, so that when that IP changes, it doesn’t cause an issue.

The private address should be set to tcp://cms-xmr:50001. The public address should be set to tcp://yourserver.yourdomain.com:9505, or tcp://ip.address:9505 where IP address is the public IP of the server (not the internal docker network addresses).