Open jvanaert opened 9 years ago
Hey, Jeroen,
Thanks for taking a look at my Dockerfile. I have a couple of questions that will help me figure out what is going on:
Based on the behavior, it seems that you are running this on a Mac (via "Boot2Docker") or on a Ubuntu VM that has Docker installed, thus creating a second "VM" for the Docker image.
The Dockerfile is set to use a Node.js script to set the "external IP" value in the configuration file "turnserver.conf" during initial startup. If that external IP is detected to be on the host computer and not the external IP assigned to the container itself, the CoTurn server will fail to start, because it cannot bind to the detected external IP address.
However, this doesn't matter, since in that configuration STUN/TURN won't work properly anyway. You will need to install a separate TURN server in a part of the network that has a valid Internet accessible external IP address, since NAT traversal is performed in that context.
It looks like both SSH and Kurento Media Server loaded, so you can SSH into it and check the logs at "/var/logs/turn-xxx-xxx.log" to see what is happening with CoTurn inside the container.
You can also use nano or vi inside the container to reconfigure things as needed and use "supervisorctl" to restart all the processes managed by "supervisor".
I will revise my Dockerfile to use the "-c" parameter in loading the supervisor configuration as suggested, so that warning will go away.
In the event, that loading CoTurn inside the container is moot, supervisord gives up loading it after a while, and Kurento is still usable.
Let me know if this helps or if you find anything amiss elsewhere...
Travis
When the container starts I get the following loglines:
npm WARN package.json @ No license field. /usr/lib/python2.7/dist-packages/supervisor/options.py:295: UserWarning: Supervisord is running as root and it is searching for its configuration file in default locations (including its current working directory); you probably want to specify a "-c" argument specifying an absolute path to a configuration file for improved security. 'Supervisord is running as root and it is searching ' 2015-08-05 07:57:00,837 CRIT Supervisor running as root (no user in config file) 2015-08-05 07:57:00,837 WARN Included extra file "/etc/supervisor/conf.d/supervisord.conf" during parsing 2015-08-05 07:57:00,860 INFO RPC interface 'supervisor' initialized 2015-08-05 07:57:00,861 CRIT Server 'unix_http_server' running without any HTTP authentication checking 2015-08-05 07:57:00,861 INFO supervisord started with pid 1 2015-08-05 07:57:01,864 INFO spawned: 'kurento-media-server' with pid 36 2015-08-05 07:57:01,866 INFO spawned: 'sshd' with pid 37 2015-08-05 07:57:01,867 INFO spawned: 'turnserver' with pid 38 2015-08-05 07:57:02,903 INFO success: kurento-media-server entered RUNNING state, process has stayed up for > than 1 seconds (startsecs) 2015-08-05 07:57:02,903 INFO success: sshd entered RUNNING state, process has stayed up for > than 1 seconds (startsecs) 2015-08-05 07:57:02,903 INFO success: turnserver entered RUNNING state, process has stayed up for > than 1 seconds (startsecs) 2015-08-05 07:58:02,027 INFO exited: turnserver (exit status 255; not expected) 2015-08-05 07:58:03,030 INFO spawned: 'turnserver' with pid 61 2015-08-05 07:58:04,071 INFO success: turnserver entered RUNNING state, process has stayed up for > than 1 seconds (startsecs)
and then every minute the turnserver restarts. Do you have any clue on this ?
Thanks for any help on this.
Jeroen