avast/gradle-docker-compose-plugin
JavaExec does not exit properly when interrupted with container logging enabled and no output from a container
开放
#242 创建于 2020年6月11日
help wantedquestion
仓库指标
- 星标
- (429 个星标)
- PR 合并指标
- (平均合并 24天 11小时) (30 天内合并 2 个 PR)
描述
Long running JavaExec processes are left running when used with docker compose if the following happens:
- The process is long running
- The docker-compose stanza in gradle attempts to log the container output using one of
- captureContainersOutput
- captureContainersOutputToFile
- The container doesn't actually produce any output
- Ran into this with the memcached container specifically
The following demonstrates the issue:
- Execute
./gradlew runto start- Web server that is long running
- Has capture output statements in the docker-compose stanza
- Uses memcached in the associated docker-compose file
- Inspect the process list
- See that the process is running
- Interrupt gradle with ctrl-c
- Inspect the process list again
- Notice that the process is still running
- The process doesn't exit
Not sure how much of this is relevant but adding it in case it's useful:
- O/S is Ubuntu 18.04
- OpenJDK 11 from the O/S
- Happens on the command line and when invoked with IntelliJ
- Interestingly, doesn't seem to be an issue when gradle/the application is run in debug mode
I'm happy to provide more detail or information as required.