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.

Can't use autoCreateCustomNetworks + custom IP + wait

See original GitHub issue

Description

When using a custom network, I am unable to use the tcp wait correctly.

Info

  • d-m-p version : 0.19.0
  • Maven version (mvn -v) : 3.3.9
  • Docker version : 1.11.2, build b9f10c9

Repro steps

  1. Configure a container with a custom network
  2. Set autoCreateCustomNetworks to true
  3. Attempt to use a <wait> (tcp) configuration for the container
  4. Execute docker:start RESULT: the wait fails

Sample Project

Sample project : https://github.com/who/docker-maven-plugin-bugdemo1

Issue Analytics

  • State:open
  • Created 7 years ago
  • Comments:5 (1 by maintainers)

github_iconTop GitHub Comments

1reaction
rhusscommented, Feb 14, 2017

Looks like in your un that the Docker internal DNS resolution didn’t worked (that why nslookup failed). Maybe you could try it by adding a sleep 2; just before the nslookup call in the configuration ? Looks like a race condition.

0reactions
boly38commented, Oct 3, 2018

Hi, I had a similar issue on my project, after switching to a custom network, the tcp wait were no more working on jenkins side only (were docker host is “localhost”): the wait result was Timeout.

To make tcp wait step working again in that case, I had to enforce wait tcp mode to ‘mapped’. (according to the doc http://dmp.fabric8.io/#start-wait default mode were ‘direct’ when host is localhost)

Example:

<wait>
  <tcp>
    <mode>mapped</mode>
    <ports>
      <port>3306</port>
    </ports>
  </tcp>
  <time>20000</time>
</wait>

My 2 cents

Read more comments on GitHub >

github_iconTop Results From Across the Web

How to set static ip when using default network #3739 - GitHub
So, now it's two ways: define your custom network from docker-compose; configure static ip for container somewhere outside of compose (inside ...
Read more >
docker network create - Docker Documentation
Once connected, the containers can communicate using only another container's IP address or name. For overlay networks or custom plugins that support ...
Read more >
Create networks automatically in Docker Compose
When using custom networks in Docker like
Read more >
Configuring and managing networking Red Hat Enterprise ...
Creating static routes configuration files in ip-command format when using the ... Using nmstate-autoconf to automatically configure network interfaces.
Read more >
Set up and manage network address translation with Cloud NAT
When you use automatic NAT IP address allocation, Google Cloud reserves IP addresses in your project automatically. These addresses count against your static...
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