Search code examples
dockercontainersapache-superset

Unable to start container from Apache-Superset container (tar file) image (Failed to connect to localhost port)


I'm quite new to Docker and Apache-Superset and trying to run a container (using docker) from the container image. Loaded the .tar file with

docker load --input ./inc_superset.tar

Which went as expected, tried running the container from this image file with

docker run --cidfile ./cid.txt <IMAGE_ID>

This starts my container but is has unhealthy status; upon inspecting the container ( with docker inspect) I get a huge JSON, below is a snippet of the log received (can post the entire log on request).

"Health": {
  "Status": "unhealthy",
  "FailingStreak": 5,
  "Log": [
    {
      "Start": "2019-01-22T19:59:00.8036984+05:30",
      "End": "2019-01-22T19:59:01.5698797+05:30",
      "ExitCode": 7,
      "Output": " % Total % Received % Xferd Average Speed Time Time Time Current\n Dload Upload Total Spent Left Speed\n\r 0 0 0 0 0 0 0 0 --:--:-- --:--:-- --:--:-- 0curl: (7) Failed to connect to localhost port 8088: Connection refused\n"
    },
    ...
    ...
    {
      "Start": "2019-01-22T20:01:02.589517677+05:30",
      "End": "2019-01-22T20:01:02.794486003+05:30",
      "ExitCode": 7,
      "Output": " % Total % Received % Xferd Average Speed Time Time Time Current\n Dload Upload Total Spent Left Speed\n\r 0 0 0 0 0 0 0 0 --:--:-- --:--:-- --:--:-- 0curl: (7) Failed to connect to localhost port 8088: Connection refused\n"
    }
  ]
}

Am I making any mistake? Am I missing something? Any troubleshooting help on this requested.

Thanks


Solution

  • The problem was the webserver within the superset container doesn't run by default as of the configuration available on apache.org as of 7 September 2019.

    Solved it as follows:

    #Go into the container
    docker-compose exec superset bash
    #Start the webserver that is exposed on all interfaces so that we can access it from docker host
    superset run -p 8088 --host 0.0.0.0
    

    I was facing the same issue. Ran via docker-compose using the instructions on https://superset.incubator.apache.org/installation.html but get no response from localhost:8088.

    Docker inspect State.Health.Status = "unhealthy" and log show several entries with curl: (7) Failed to connect to localhost port 8088: Connection refused\n"

    docker ps shows that the container is exposed on 0.0.0.0:8088