Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[Bug]: socket problems should not swallow exceptions #8054

Closed
ciis0 opened this issue Jan 5, 2024 · 0 comments · Fixed by #8055
Closed

[Bug]: socket problems should not swallow exceptions #8054

ciis0 opened this issue Jan 5, 2024 · 0 comments · Fixed by #8055
Labels

Comments

@ciis0
Copy link
Contributor

ciis0 commented Jan 5, 2024

Module

Core

Testcontainers version

1.19.1

Using the latest Testcontainers version?

Yes

Host OS

Linux

Host Arch

x86

Docker version

Client: Docker Engine - Community
 Version:           24.0.7
 API version:       1.43
 Go version:        go1.20.10
 Git commit:        afdd53b
 Built:             Thu Oct 26 09:07:41 2023
 OS/Arch:           linux/amd64
 Context:           default

Server: Docker Engine - Community
 Engine:
  Version:          24.0.7
  API version:      1.43 (minimum version 1.12)
  Go version:       go1.20.10
  Git commit:       311b9ff
  Built:            Thu Oct 26 09:07:41 2023
  OS/Arch:          linux/amd64
  Experimental:     false
 containerd:
  Version:          1.6.26
  GitCommit:        3dd1e886e55dd695541fdcd67420c2888645a495
 runc:
  Version:          1.1.10
  GitCommit:        v1.1.10-0-g18a0cb0
 docker-init:
  Version:          0.19.0
  GitCommit:        de40ad0

What happened?

debugging DOCKER_HOST unix:///var/run/docker.sock is not listening problems is harder than necessary

Relevant log output

DOCKER_HOST unix:///var/run/docker.sock is not listening

Additional Information

relevant code is

} catch (Exception e) {
log.warn("DOCKER_HOST {} is not listening", dockerHost);
return false;
}

which swallows the exception.

attaching a debugger shows that the problem was "[13] permission denied". it was fixed by adding the missing docker group, but from log this was not obvious.

@ciis0 ciis0 added the type/bug label Jan 5, 2024
ciis0 added a commit to ciis0/testcontainers-java that referenced this issue Jan 5, 2024
Fixes testcontainers#8054

Note that SLF4J (1.6.0+) allows the last format parameter to be an exception to be printed https://www.slf4j.org/faq.html#paramException
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

Successfully merging a pull request may close this issue.

1 participant