Wait with log does not exit even if successfully matched
See original GitHub issueDescription
When I set the <log> tag even if the condition is matched the execution does not exit as I expect.
I set the <log>
and the <time>
, I run the command mvn integration-test
, the image is built and container is started.
WebSphere Liberty Profile starts and application is then deployed:
[INFO] DOCKER> Pattern '(?s).*Application *******-war started in .*' matched for container 7816e2e8242d
but then Maven does not exist with Build Successful
as I expect.
This is part of my Maven configuration
<!-- Once fulfilled the condition the startup will be complete -->
<wait>
<log>(?s).*Application ${docker.run.context.root} started in .*</log>
<time>600000</time>
</wait>
<!-- Log configuration -->
<log>
<date>ISO8601</date>
<color>blue</color>
</log>
Am I missing something?
My system:
- Maven version: 3.6.1
- Docker Engine: 19.03.5
- Docker Desktop: 2.1.0.5
- Windows 10
Issue Analytics
- State:
- Created 4 years ago
- Reactions:3
- Comments:6
Top Results From Across the Web
bash wait exit on error code - Stack Overflow
I am not very interested in the error codes themselves, only that they're not success. Is there a less verbose way to make...
Read more >Waiting for containers to start or be ready - Testcontainers
This strategy is intended for use with containers that only run briefly and exit of their own accord. As such, success is deemed...
Read more >How do I wait for a file in the shell script? - Unix Stack Exchange
I included the open event to also register touch /tmp/sleep.txt when the file ... In case it gets created/opened, then the exit status...
Read more >Error handling in Step Functions - AWS Documentation
Errors can happen for various reasons, such as the following examples: State machine definition issues (for example, no matching rule in a Choice...
Read more >Cypress cy.intercept Problems - Gleb Bahmutov
It looks reasonable, it even shows the call in the Command Log - but does NOT pass. The intercept times out waiting.
Read more >
Top Related Medium Post
No results found
Top Related StackOverflow Question
No results found
Troubleshoot Live Code
Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free
Top Related Reddit Thread
No results found
Top Related Hackernoon Post
No results found
Top Related Tweet
No results found
Top Related Dev.to Post
No results found
Top Related Hashnode Post
No results found
I also have this problem. I ran docker-maven-plugin (d-m-p) in debug mode and found out that after the log is matched, d-m-p tries to close the tasks, which is somehow locked because the log file is locked by the container (I think this is a Windows problem, because I doesn’t have it running on Linux). If anyone can point out a possible solution or give me more information on how to solve it, I will try to contribute a pull request.
LogRequestor tries to close the request HTTPGet request to the log file:
Which in turn use Apache’s HTTPGet client and request this:
GET npipe://127.0.0.1:1/v1.40/containers/ca923dc3d82a/logs?follow=1&stderr=1&stdout=1×tamps=1 HTTP/1.1
This request failed because the log file is locked by the system, that’s my guess (of course only the docker container locks it).
The maven process will then be halted without any explanation and has to be force stopped.
System info:
Hello, I have overcame the issue creating an heartbeat service to poll, when the application is up an running it exists with successful build, so I don’t inspect anymore the logs 😊
Tell me if I can close the issue.