Skip to content

[Neo4j] Default wait strategy breaks on IPv6-enabled environments #4454

Closed

Description

@fbiville

The JDBC driver project I am working on recently got build errors with TestContainers (with Neo4jContainer) tests in our TeamCity instance, that looked like this:

org.testcontainers.containers.ContainerLaunchException: Container startup failed
    org.testcontainers.containers.ContainerLaunchException: Container startup failed
    Caused by: org.rnorth.ducttape.RetryCountExceededException: Retry limit hit with exception
    Caused by: org.testcontainers.containers.ContainerLaunchException: Could not create/start container
    Caused by: org.testcontainers.containers.ContainerLaunchException: 
    Timed out waiting for log output matching '.*Bolt enabled on 0\.0\.0\.0:7687\.

After dumping the logs via withLogConsumer(outputFrame -> System.err.print(outputFrame.getUtf8String())), something interesting appeared:

2021-09-08 15:38:05.635+0000 INFO  Starting...
17:38:09      2021-09-08 15:38:09.752+0000 INFO  ======== Neo4j 4.3.3 ========
17:38:13      2021-09-08 15:38:13.989+0000 INFO  Initializing system graph model for component 'security-users' with version -1 and status UNINITIALIZED
[...]
17:38:14      2021-09-08 15:38:14.314+0000 INFO  Bolt enabled on [0:0:0:0:0:0:0:0%0]:7687.

The log includes an IPv6-formatted address and the default, regex-based, wait strategy will not match.

Activity

  1. bsideup commented on Sep 8, 2021

    @bsideup
    Member

    ooooh, that's a fun one. We should probably not be that strict about the listener at all, but instead wait for just Bolt enabled on or some other indicator, thanks for reporting!

    Would you like to submit a PR with a fix? We will be releasing 1.16.1 relatively soon and will be happy to include it!

  2. fbiville commented on Sep 8, 2021

    @fbiville
    ContributorAuthor

    Yep, I'll try to send a PR now.

  3. added a commit that references this issue on Oct 22, 2021
    1469b22
  4. added this to the next milestone on Oct 22, 2021
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Type

    No type

    Projects

    No projects

      Milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions