Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

rule hangs if docker-compose wants input #428

Open
sdyura opened this issue Dec 18, 2019 · 1 comment
Open

rule hangs if docker-compose wants input #428

sdyura opened this issue Dec 18, 2019 · 1 comment

Comments

@sdyura
Copy link

sdyura commented Dec 18, 2019

What happened?

my docker compose rule hangs without any clue as to what the issue is

stack trace:

"pool-1-thread-1" #10 prio=5 os_prio=0 tid=0x00007f3b5cb31800 nid=0x449b waiting on condition [0x00007f3b411dd000]
   java.lang.Thread.State: TIMED_WAITING (parking)
	at sun.misc.Unsafe.park(Native Method)
	- parking to wait for  <0x0000000775bb22e8> (a java.util.concurrent.FutureTask)
	at java.util.concurrent.locks.LockSupport.parkNanos(LockSupport.java:215)
	at java.util.concurrent.FutureTask.awaitDone(FutureTask.java:426)
	at java.util.concurrent.FutureTask.get(FutureTask.java:204)
	at com.palantir.docker.compose.execution.Command.waitForResultFrom(Command.java:92)
	at com.palantir.docker.compose.execution.Command.run(Command.java:76)
	at com.palantir.docker.compose.execution.Command.execute(Command.java:47)
	at com.palantir.docker.compose.execution.DefaultDockerCompose.up(DefaultDockerCompose.java:79)
	at com.palantir.docker.compose.execution.DelegatingDockerCompose.up(DelegatingDockerCompose.java:45)
	at com.palantir.docker.compose.execution.RetryingDockerCompose.lambda$up$0(RetryingDockerCompose.java:37)
	at com.palantir.docker.compose.execution.RetryingDockerCompose$$Lambda$163/1309559657.call(Unknown Source)
	at com.palantir.docker.compose.execution.Retryer.runWithRetries(Retryer.java:44)
	at com.palantir.docker.compose.execution.RetryingDockerCompose.up(RetryingDockerCompose.java:36)
	at com.palantir.docker.compose.execution.ConflictingContainerRemovingDockerCompose.up(ConflictingContainerRemovingDockerCompose.java:51)
	at com.palantir.docker.compose.DockerComposeManager$$Lambda$161/1074424607.run(Unknown Source)
	at com.palantir.docker.compose.EventEmitter.emitTask(EventEmitter.java:135)
	at com.palantir.docker.compose.EventEmitter.up(EventEmitter.java:76)
	at com.palantir.docker.compose.DockerComposeManager.pullBuildAndUp(DockerComposeManager.java:201)
	at com.palantir.docker.compose.DockerComposeManager.before(DockerComposeManager.java:184)
	at com.palantir.docker.compose.DockerComposeRule$1.evaluate(DockerComposeRule.java:41)
	at org.junit.rules.RunRules.evaluate(RunRules.java:20)
	at org.junit.runners.ParentRunner.run(ParentRunner.java:363)
	at org.junit.runners.Suite.runChild(Suite.java:128)
	at org.junit.runners.Suite.runChild(Suite.java:27)
	at org.junit.runners.ParentRunner$3.run(ParentRunner.java:290)
	at org.junit.runners.ParentRunner$1.schedule(ParentRunner.java:71)
	at org.junit.runners.ParentRunner.runChildren(ParentRunner.java:288)
	at org.junit.runners.ParentRunner.access$000(ParentRunner.java:58)
	at org.junit.runners.ParentRunner$2.evaluate(ParentRunner.java:268)
	at org.junit.runners.ParentRunner.run(ParentRunner.java:363)
	at org.junit.runner.JUnitCore.run(JUnitCore.java:137)
	at org.junit.runner.JUnitCore.run(JUnitCore.java:115)
	at com.novocode.junit.JUnitRunner$1.execute(JUnitRunner.java:132)
	at sbt.ForkMain$Run.lambda$runTest$1(ForkMain.java:304)
	at sbt.ForkMain$Run$$Lambda$4/1416233903.call(Unknown Source)
	at java.util.concurrent.FutureTask.run(FutureTask.java:266)
	at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1149)
	at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:624)
	at java.lang.Thread.run(Thread.java:748)

its totally stuck, and im not given any clue as to why its stuck

but if i debug i can find out that its stuck on this:

Pulling my-mock (company/mock:latest)...
ERROR: The image for the service you're trying to recreate has been removed. If you continue, volume data could be lost. Consider backing up your data before continuing.

Continue with the new image? [yN]

this is really really extra annoying when this happens on a server you do not fully control

What did you want to happen?

rule should not hang, it should throw an error if its asking for input, or do something about it

@sdyura
Copy link
Author

sdyura commented Mar 24, 2020

i have managed to get logging working correctly with:

    <logger name="com.palantir.docker.compose.execution.DefaultDockerCompose" level="TRACE" />

this is still happening intermittently, about every 3 times, but as soon as it starts happening, it happens always, until i log into the server and run the command manually

now i can see the logs:

10:08:53.720 [pool-4-thread-1] TRACE c.p.d.c.e.DefaultDockerCompose - myapp uses an image, skipping
10:08:53.721 [pool-4-thread-1] TRACE c.p.d.c.e.DefaultDockerCompose - mongodb uses an image, skipping
10:08:53.721 [pool-4-thread-1] TRACE c.p.d.c.e.DefaultDockerCompose - wire-mock uses an image, skipping
10:08:54.550 [pool-5-thread-1] TRACE c.p.d.c.e.DefaultDockerCompose - Pulling mongodb (mongo:latest)...
10:08:55.409 [pool-5-thread-1] TRACE c.p.d.c.e.DefaultDockerCompose - latest: Pulling from library/mongo
10:09:02.874 [pool-5-thread-1] TRACE c.p.d.c.e.DefaultDockerCompose - Digest: sha256:58b25d51baa11a85b6aedf7c4e05710d12a27ddc2883e2692e7d58527d98bd73
10:09:02.880 [pool-5-thread-1] TRACE c.p.d.c.e.DefaultDockerCompose - Status: Downloaded newer image for mongo:latest
10:09:02.899 [pool-5-thread-1] TRACE c.p.d.c.e.DefaultDockerCompose - Pulling wire-mock (companyname/wire-mock:latest)...
10:09:03.706 [pool-5-thread-1] TRACE c.p.d.c.e.DefaultDockerCompose - The image for the service you're trying to recreate has been removed. If you continue, volume data could be lost. Consider backing up your data before continuing.
10:09:03.706 [pool-5-thread-1] TRACE c.p.d.c.e.DefaultDockerCompose - 
Aborted by Yura
Sending interrupt signal to process
17:35:01.201 [pool-5-thread-1] TRACE c.p.d.c.e.DefaultDockerCompose - Continue with the new image? [yN]

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant