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 stop does not work

See original GitHub issue

Hello,

I have a maven project and the docker plug in configuration for it is listed below. Starting works fine. But after the integration tests are done and the plug in shuts down the container it just hangs with this output forever

[INFO] — docker-maven-plugin:0.14.1:stop (stop) @ wh-cdc-web — 08:52:37.421 DB> 2016-09-06 06:52:37 UTC [1-2] LOG: received smart shutdown request 08:52:37.421 DB> 2016-09-06 06:52:37 UTC [10-2] LOG: autovacuum launcher shutting down

The container is not running anymore so it was shutdown, it’s just the plugin waiting for something.

PlugIn Version: 0.15.16 Docker version 1.12.1, build 23cf638

Dockerfile.txt

<plugin>
                <groupId>io.fabric8</groupId>
                <artifactId>docker-maven-plugin</artifactId>
                <version>${docker.maven.plugin.fabric8.version}</version>
                <configuration>
                    <logDate>default</logDate>
                    <autoPull>true</autoPull>
                    <images>
                        <image>
                            <alias>db</alias>
                            <name>postgres:9</name>
                            <build>
                                <ports>
                                    <port>5432</port>
                                </ports>
                                <dockerFileDir>${project.basedir}/docker</dockerFileDir>
                            </build>
                            <run>
                                <ports>
                                    <port>${dbPort}:5432</port>
                                </ports>
                                <wait>
                                    <log>database system is ready to accept connections</log>
                                    <time>20000</time>
                                </wait>
                                <log>
                                    <prefix>DB</prefix>
                                    <color>yellow</color>
                                </log>
                            </run>
                        </image>
                    </images>
                </configuration>

                <!-- Hooking into the lifecycle -->
                <executions>
                    <execution>

                        <id>start</id>
                        <phase>pre-integration-test</phase>
                        <goals>
                            <goal>build</goal>
                            <goal>start</goal>
                        </goals>
                    </execution>
                    <execution>
                        <id>stop</id>
                        <phase>post-integration-test</phase>
                        <goals>
                            <goal>stop</goal>
                        </goals>
                    </execution>
                </executions>
            </plugin>

Issue Analytics

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

github_iconTop GitHub Comments

3reactions
rhusscommented, Jun 1, 2017

Thanks ! I will try to reproduce this on a virtual box image and can hopefully trigger the same bug.

1reaction
rhusscommented, May 24, 2018

@andreasaronsson I tried jnr-unixsocket-0.19 already but I got tons of issues with closed streams. Not sure that’s d-m-p doing something wrong or the lib. Going to investigate this further, as it seems that it contains some fix which could be related to this issue.

Read more comments on GitHub >

github_iconTop Results From Across the Web

Cannot stop or restart a docker container - Stack Overflow
I couldn't locate boot2docker in my machine. So, I came up with something that worked for me. $ sudo systemctl restart docker.socket docker.service...
Read more >
Docker stop doesn't stop the docker container #34097 - GitHub
Steps to reproduce the issue: Run a docker container; Stop it using docker stop containerid; Run docker ps and it still shows it...
Read more >
docker stop - Docker Documentation
The main process inside the container will receive SIGTERM , and after a grace period, SIGKILL . The first signal can be changed...
Read more >
Why Does My Docker Container Stop? - Tutorial Works
Run a long-lived service inside the container : Most containers run a long-living service, like a database or a web server. · Add...
Read more >
Docker container not stopping - Super User
It appears something has gotten into an invalid state, possibly a bug in dockerd, containerd, or runc. Upgrade to the current stable release...
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