title: Kurento Docker: Failed to connect to 127.0.0.1 port 8888: Connection refused
body: <p>Just did <code>docker build -t kurento-media-server .</code> inside here: <a href="https://github.com/Kurento/kurento-docker/tree/master/kurento-media-server" rel="nofollow noreferrer">https://github.com/Kurento/kurento-docker/tree/master/kurento-media-server</a>.</p>
  
  <p>Everything built. I ran <code>docker run -p 8888:8888 kurento-media-server</code> and then <code>curl -i -N -H "Connection: Upgrade" -H "Upgrade: websocket" -H "Host: 127.0.0.1:8888" -H "Origin: 127.0.0.1" http://127.0.0.1:8888/kurento</code>. It error'ed saying it couldn't connect to the port.</p>
  
  <p>The output from the container is below:</p>
  
  <pre><code>+ set -e
  + '[' -n '' ']'
  + '[' -n '' -a -n '' ']'
  + sed /::1/d
  + cat /etc/hosts
  + tee /etc/hosts
  + exec /usr/bin/kurento-media-server
  libdc1394 error: Failed to initialize libdc1394
  0:00:00.388968390     1      0x1a0ed80 INFO    KurentoModuleManager ModuleManager.cpp:173:loadModules: Found module: /usr/lib/x86_64-linux-gnu/kurento/modules/libkmsfiltersmodule.so
  0:00:00.391239217     1      0x1a0ed80 DEBUG   KurentoModuleManager ModuleManager.cpp:89:loadModule: Module loaded from /usr/lib/x86_64-linux-gnu/kurento/modules/libkmsfiltersmodule.so
  0:00:00.391323949     1      0x1a0ed80 INFO    KurentoModuleManager ModuleManager.cpp:135:loadModule: Loaded filters version 6.6.2 generated at Jul 25 2017 13:36:15
  0:00:00.391373374     1      0x1a0ed80 INFO    KurentoModuleManager ModuleManager.cpp:173:loadModules: Found module: /usr/lib/x86_64-linux-gnu/kurento/modules/libkmselementsmodule.so
  0:00:00.397720952     1      0x1a0ed80 DEBUG   KurentoModuleManager ModuleManager.cpp:89:loadModule: Module loaded from /usr/lib/x86_64-linux-gnu/kurento/modules/libkmselementsmodule.so
  0:00:00.397775428     1      0x1a0ed80 INFO    KurentoModuleManager ModuleManager.cpp:135:loadModule: Loaded elements version 6.6.3 generated at Aug 11 2017 20:18:10
  0:00:00.397813668     1      0x1a0ed80 INFO    KurentoModuleManager ModuleManager.cpp:173:loadModules: Found module: /usr/lib/x86_64-linux-gnu/kurento/modules/libkmscoremodule.so
  0:00:00.400336082     1      0x1a0ed80 DEBUG   KurentoModuleManager ModuleManager.cpp:89:loadModule: Module loaded from /usr/lib/x86_64-linux-gnu/kurento/modules/libkmscoremodule.so
  0:00:00.400394600     1      0x1a0ed80 INFO    KurentoModuleManager ModuleManager.cpp:135:loadModule: Loaded core version 6.6.3 generated at Aug 11 2017 19:36:36
  0:00:00.400440935     1      0x1a0ed80 INFO      KurentoMediaServer main.cpp:238:main: Kmsc version: 6.6.2
  0:00:00.400446370     1      0x1a0ed80 INFO      KurentoMediaServer main.cpp:239:main: Compiled at: Jul 25 2017 13:53:46
  0:00:00.400450958     1      0x1a0ed80 INFO       KurentoLoadConfig loadConfig.cpp:230:loadConfig: Reading configuration from: /etc/kurento/kurento.conf.json
  0:00:00.401349714     1      0x1a0ed80 INFO       KurentoLoadConfig loadConfig.cpp:167:loadModulesConfigFromDir: Looking for config files in /etc/kurento/modules
  0:00:00.401476528     1      0x1a0ed80 INFO       KurentoLoadConfig loadConfig.cpp:167:loadModulesConfigFromDir: Looking for config files in /etc/kurento/modules/kurento
  0:00:00.402000771     1      0x1a0ed80 INFO       KurentoLoadConfig loadConfig.cpp:192:loadModulesConfigFromDir: Loaded module config from: /etc/kurento/modules/kurento/MediaElement.conf.ini
  0:00:00.402443799     1      0x1a0ed80 INFO       KurentoLoadConfig loadConfig.cpp:192:loadModulesConfigFromDir: Loaded module config from: /etc/kurento/modules/kurento/BaseRtpEndpoint.conf.ini
  0:00:00.402952686     1      0x1a0ed80 INFO       KurentoLoadConfig loadConfig.cpp:192:loadModulesConfigFromDir: Loaded module config from: /etc/kurento/modules/kurento/WebRtcEndpoint.conf.ini
  0:00:00.403411471     1      0x1a0ed80 INFO       KurentoLoadConfig loadConfig.cpp:192:loadModulesConfigFromDir: Loaded module config from: /etc/kurento/modules/kurento/UriEndpoint.conf.ini
  0:00:00.403949526     1      0x1a0ed80 INFO       KurentoLoadConfig loadConfig.cpp:192:loadModulesConfigFromDir: Loaded module config from: /etc/kurento/modules/kurento/SdpEndpoint.conf.json
  0:00:00.404450739     1      0x1a0ed80 INFO       KurentoLoadConfig loadConfig.cpp:192:loadModulesConfigFromDir: Loaded module config from: /etc/kurento/modules/kurento/HttpEndpoint.conf.ini
  0:00:00.404520754     1      0x1a0ed80 INFO       KurentoLoadConfig loadConfig.cpp:246:loadConfig: Configuration loaded successfully
  0:00:00.404618365     1      0x1a0ed80 DEBUG      KurentoLoadConfig loadConfig.cpp:252:loadConfig: Effective loaded config:
  {
      "mediaServer":
      {
          "resources":
          {
              "garbageCollectorPeriod": "240"
          },
          "net":
          {
              "websocket":
              {
                  "port": "8888",
                  "path": "kurento",
                  "threads": "10"
              }
          }
      },
      "configPath": "\/etc\/kurento",
      "modules":
      {
          "kurento":
          {
              "MediaElement":
              {
                  "configPath": "\/etc\/kurento\/modules\/kurento"
              },
              "BaseRtpEndpoint":
              {
                  "configPath": "\/etc\/kurento\/modules\/kurento"
              },
              "WebRtcEndpoint":
              {
                  "configPath": "\/etc\/kurento\/modules\/kurento"
              },
              "UriEndpoint":
              {
                  "defaultPath": "file:\/\/\/var\/kurento\/",
                  "configPath": "\/etc\/kurento\/modules\/kurento"
              },
              "SdpEndpoint":
              {
                  "numAudioMedias": "1",
                  "numVideoMedias": "1",
                  "audioCodecs":
                  [
                      {
                          "name": "opus\/48000\/2"
                      },
                      {
                          "name": "PCMU\/8000"
                      },
                      {
                          "name": "AMR\/8000"
                      }
                  ],
                  "videoCodecs":
                  [
                      {
                          "name": "VP8\/90000"
                      },
                      {
                          "name": "H264\/90000"
                      }
                  ],
                  "configPath": "\/etc\/kurento\/modules\/kurento"
              },
              "HttpEndpoint":
              {
                  "serverAddress": "localhost",
                  "port": "9091",
                  "configPath": "\/etc\/kurento\/modules\/kurento"
              }
          }
      }
  }
  
  0:00:00.404814109     1      0x1a0ed80 INFO    KurentoServerMethods ServerMethods.cpp:89:ServerMethods: Not enough resources exception will be raised when resources reach 0.800000 
  0:00:00.405296158     1      0x1a0f2a0 DEBUG      KurentoWorkerPool WorkerPool.cpp:39:workerThreadLoop: Working thread starting
  0:00:00.405839379     1      0x1a0ed80 INFO    KurentoWebSocketTransport WebSocketTransport.cpp:209:WebSocketTransport: Secure websocket server not enabled
  0:00:00.405310438     1 0x7f4c68001840 DEBUG      KurentoWorkerPool WorkerPool.cpp:39:workerThreadLoop: Working thread starting
  0:00:00.407012759     1      0x1a0ed80 INFO      KurentoMediaServer main.cpp:256:main: Mediaserver started
  0:04:00.405721382     1 0x7f4c60001780 DEBUG        KurentoMediaSet MediaSet.cpp:122:doGarbageCollection: Running garbage collector
  </code></pre>