question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

docker for mac beta and docker:start with wait/tcp/ports incorrectly waits on container port

See original GitHub issue

Running a maven project that uses the wait/tcp/ports functionality to wait for the container to listen on a specific port:

Observed results:

With docker-machine, the logs output

[INFO] DOCKER> [mysql:5.7] "db": Start container 5289bed0ef48
[INFO] DOCKER> [mysql:5.7] "db": Waiting for exposed ports [32780] on remote host (192.168.251.207), since they are not directly accessible.

With docker for mac beta:

[INFO] DOCKER> [mysql:5.7] "db": Start container d79b36323981
[INFO] DOCKER> [mysql:5.7] "db": Waiting for ports [3306] directly on container with IP (172.17.0.2).
[ERROR] DOCKER> [mysql:5.7] "db": Timeout after 60405 ms while waiting on tcp port '[/172.17.0.2:3306]'
[ERROR] DOCKER> Error occurred during container startup, shutting down...

Expected results:

Build should pass with either docker-machine or docker for mac

Preliminary analysis:

Something seems to be going wrong in the detection of whether the container is directly accessible.

Issue Analytics

  • State:closed
  • Created 7 years ago
  • Comments:23

github_iconTop GitHub Comments

2reactions
Sammers21commented, Nov 8, 2017

@ol2ka , sure, just remove these tags

<wait>
            <tcp>
                        <ports>
                                       <port>
1reaction
joshua-rutherfordcommented, Nov 8, 2017

I for one haven’t had to use another work around, but reviewing the documentation. You could configure a health check that is more robust than just establishing an ephemeral connection and wait on that with the healthy wait: https://dmp.fabric8.io/#build-healthcheck

Haven’t looked at this, just tossing it out as an idea.

Read more comments on GitHub >

github_iconTop Results From Across the Web

error invoking remote method 'docker-start-container' ports are ...
Docker. Error: Cannot start container: port has already been allocated ... for mac beta and docker:start with wait/tcp/ports incorrectly waits on container ......
Read more >
Frequently asked questions - Docker Documentation
Compose stop attempts to stop a container by sending a SIGTERM . It then waits for a default timeout of 10 seconds. After...
Read more >
docker port - Docker Documentation
docker port : List port mappings or a specific mapping for the container.
Read more >
Docker Engine release notes - Docker Documentation
This release of Docker Engine contains some bug-fixes and packaging changes, updates to the docker scan and docker buildx commands, an updated version...
Read more >
Docker Engine release notes
Wasm is a fast, light alternative to Linux containers – try it out today with the Docker+Wasm Beta. ✕. Docker Docs.
Read more >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found