question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

[Feature]: Expose class's fetch containerInfo timeout to user.

See original GitHub issue

Module

Core

Problem

) KXEUHVA{152NEB`_BA830

Some conditions container will excute long time to expose ports , but currently only wait 5 seconds to fetch containerInfo.

Solution

Expose class’s fetch containerInfo timeout to user and with defalt value.

Benefit

We can wait more time for heavy container to started.

Alternatives

None.

Would you like to help contributing this feature?

Yes

Issue Analytics

  • State:closed
  • Created 10 months ago
  • Comments:5 (2 by maintainers)

github_iconTop GitHub Comments

1reaction
GOODBOY008commented, Nov 8, 2022

@eddumelendez Thanks , it’s worked.

1reaction
eddumelendezcommented, Nov 8, 2022

Hi @GOODBOY008! thanks for sharing! the issue is related to the host mode. I use the the following code

    private Network network = Network.newNetwork();

    @Test
    public void demonstration() {

        try (
                GenericContainer<?> OB_SERVER =
                        new GenericContainer<>("oceanbase/oceanbase-ce:3.1.4")
                                .withNetwork(network)
                                .withExposedPorts(OB_SERVER_SQL_PORT, OB_SERVER_RPC_PORT)
                                .withEnv("OB_ROOT_PASSWORD", OB_SYS_PASSWORD)
                                .waitingFor(Wait.forLogMessage(".*boot success!.*", 1))
                                .withLogConsumer(new Slf4jLogConsumer(LOG));
                GenericContainer<?> LOG_PROXY =
                        new GenericContainer<>("whhe/oblogproxy:1.0.3")
                                .withNetwork(network)
                                .withExposedPorts(LOG_PROXY_PORT)
                                .withEnv("OB_SYS_USERNAME", OB_SYS_USERNAME)
                                .withEnv("OB_SYS_PASSWORD", OB_SYS_PASSWORD)
                                .waitingFor(Wait.forLogMessage(".*boot success!.*", 1))
                                .withLogConsumer(new Slf4jLogConsumer(LOG));
        ) {
            Startables.deepStart(Stream.of(OB_SERVER, LOG_PROXY)).join();
        }
    }

and it worked. is it helps? Otherwise, I think you can follow #5151 due to this is duplicated.

Read more comments on GitHub >

github_iconTop Results From Across the Web

Containers — Docker SDK for Python 6.0.1 documentation
timeout (int) – Number of seconds to try to stop for before killing the container. Once killed it will then be restarted. Default...
Read more >
Configuring Ingress features | Google Kubernetes Engine (GKE)
You can use a BackendConfig to set a backend service timeout period in seconds. If you do not specify a value, the default...
Read more >
Configure Liveness, Readiness and Startup Probes
This page shows how to configure liveness, readiness and startup probes for containers. The kubelet uses liveness probes to know when to restart ......
Read more >
Container Scanning - GitLab Docs
GitLab compares the found vulnerabilities between the source and target branches, and shows the information directly in the merge request. Container ...
Read more >
docker run - Docker Documentation
For information on connecting a container to a network, see the “Docker network ... Cgroup namespace to use (host|private) 'host': Run the container...
Read more >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found