On Sat, Jun 14, 2025 at 11:27 AM Piotr P. Karwasz <pi...@mailing.copernik.eu> wrote: > > Hi Gary, > > On 14.06.2025 13:00, Gary Gregory wrote: > > On Sat, Jun 14, 2025 at 3:09 AM Piotr P. Karwasz > > <pi...@mailing.copernik.eu> wrote: > >> I hope this helps you debug what is going on during the ElasticSearch > >> startup. > > > > It appears that port 9200 is published in Docker, but it doesn't seem > > to be visible outside of Docker, maybe. > > > > See https://gist.github.com/garydgregory/a83914942faa2d904bd16966559d07bc > > > > Does that ring a bell? > > Unfortunately, I don’t see any significant differences between your > startup logs and mine. On my setup, it ends with: > > [INFO] DOCKER> [elasticsearch:8.17.3] "elasticsearch": Waited on tcp > port '[/172.19.0.2:9200]' 6521 ms > > Whereas yours ends in a timeout: > > [ERROR] DOCKER> [elasticsearch:8.17.3] "elasticsearch": Timeout after > 60739 ms while waiting on tcp port '[/172.19.0.2:9200]' > > As for the port binding, the Docker Maven Plugin is configured to bind > the container port 9200 to an ephemeral host port, assigning it to the > `elasticsearch.port` Maven property: > > <ports> > <!-- Binds an ephemeral port to the `elasticsearch.port` Maven > property. --> > <port>localhost:elasticsearch.port:9200</port> > </ports> > > This assumes that the Docker host is accessible via `localhost`, which > is valid on Linux, but may not hold on macOS. > > You might want to try omitting the host name altogether: > > <ports> > <!-- Binds an ephemeral port to the `elasticsearch.port` Maven > property. --> > <port>elasticsearch.port:9200</port> > </ports>
Sadly, no love using: <port>elasticsearch.port:9200</port> [ES]{"@timestamp":"2025-06-14T16:15:37.506Z", "log.level": "INFO", "message":"closing ...", "ecs.version": "1.2.0","service.name":"ES_ECS","event.dataset":"elasticsearch.server","process.thread.name":"elasticsearch-shutdown","log.logger":"org.elasticsearch.node.Node","elasticsearch.cluster.uuid":"GLSBe1MIRiSH5-Yn083k7Q","elasticsearch.node.id":"ABZT_d4JQbSOLCZlEemDdQ","elasticsearch.node.name":"af7394eff833","elasticsearch.cluster.name":"docker-cluster"} [ES]{"@timestamp":"2025-06-14T16:15:37.512Z", "log.level": "INFO", "message":"closed", "ecs.version": "1.2.0","service.name":"ES_ECS","event.dataset":"elasticsearch.server","process.thread.name":"elasticsearch-shutdown","log.logger":"org.elasticsearch.node.Node","elasticsearch.cluster.uuid":"GLSBe1MIRiSH5-Yn083k7Q","elasticsearch.node.id":"ABZT_d4JQbSOLCZlEemDdQ","elasticsearch.node.name":"af7394eff833","elasticsearch.cluster.name":"docker-cluster"} [INFO] DOCKER> [elasticsearch:8.17.3] "elasticsearch": Stop and removed container af7394eff833 after 0 ms [ERROR] DOCKER> I/O Error [[elasticsearch:8.17.3] "elasticsearch": Timeout after 60723 ms while waiting on tcp port '[/172.19.0.2:9200]'] :( Gary > > If that works, please submit a PR to fix the issue in > `log4j-layout-template-json` and `log4j-mongodb`. > > Piotr