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

Is there anything I could do to fix the warning "Failure when attempting to lookup auth config" ? #1399

Closed
saoj opened this issue Apr 13, 2019 · 11 comments

Comments

@saoj
Copy link

saoj commented Apr 13, 2019

Hello,

I'm running Testcontainer with maven on Ubuntu 17.04. It works but I get the warning below in bold every time. Is there something that I can do to fix it? Thanks so much!

11:14:50.379381-INFO Loaded org.testcontainers.dockerclient.ProxiedUnixSocketClientProviderStrategy from ~/.testcontainers.properties, will try it first
11:14:50.427417-INFO Will use 'okhttp' transport
11:14:50.883633-INFO Found Docker environment with local Unix socket (via TCP proxy)
11:14:50.885215-INFO Docker host IP address is localhost
11:14:51.012482-INFO Connected to docker:
Server Version: 17.12.0-ce
API Version: 1.35
Operating System: Ubuntu 17.04
Total Memory: 15934 MB
11:14:51.041070-WARN Failure when attempting to lookup auth config (dockerImageName: [Ljava.lang.Object;@63a65a25, configFile: {}. Falling back to docker-java default behaviour. Exception message: {}
11:14:51.571326-INFO Ryuk started - will monitor and terminate Testcontainers containers on JVM exit
ℹ︎ Checking the system...
✔ Docker version should be at least 1.6.0
✔ Docker environment should have more than 2GB free disk space
Tests run: 4, Failures: 0, Errors: 0, Skipped: 0, Time elapsed: 3.698 sec

@shobhitsharma11
Copy link

I found the same issue:

When runs on local:
2019-06-13 09:02:54.437 INFO --- [ main] [] org.testcontainers.DockerClientFactory : Docker host IP address is localhost
2019-06-13 09:02:55.222 INFO --- [ main] [] org.testcontainers.DockerClientFactory : Connected to docker:
Server Version: 18.09.0
API Version: 1.39
Operating System: Docker for Windows
Total Memory: 1980 MB
2019-06-13 09:02:56.304 INFO --- [ main] [] o.t.utility.RegistryAuthLocator : Credentials not found for host (quay.io) when using credential helper/store (docker-credential-wincred)
2019-06-13 09:03:02.008 INFO --- [ main] [] org.testcontainers.DockerClientFactory : Ryuk started - will monitor and terminate Testcontainers containers on JVM exit
?? Checking the system...
? Docker version should be at least 1.6.0
2019-06-13 09:03:02.373 INFO --- [ main] [] docker[google/cloud-sdk:latest] : Creating container for image: google/cloud-sdk:latest
2019-06-13 09:03:03.279 INFO --- [ main] [] o.t.utility.RegistryAuthLocator : Credentials not found for host (index.docker.io) when using credential helper/store (docker-credential-wincred)
2019-06-13 09:03:03.924 INFO --- [ main] [] docker[google/cloud-sdk:latest] : Starting container with ID: e6e8bec7a9a026aa32245206bc80d21b985b7e35535a1fbae10aa9ad7f500164
2019-06-13 09:03:06.433 INFO --- [ main] [] docker[google/cloud-sdk:latest] : Container google/cloud-sdk:latest is starting: e6e8bec7a9a026aa32245206bc80d21b985b7e35535a1fbae10aa9ad7f500164
2019-06-13 09:03:11.020 INFO --- [ main] [] docker[google/cloud-sdk:latest] : Container google/cloud-sdk:latest started

When runs on Docker:
2019-06-13 09:19:01.624 INFO --- [ main] [] org.testcontainers.DockerClientFactory : Docker host IP address is XXX.XX.0.1
2019-06-13 09:19:01.716 INFO --- [ main] [] org.testcontainers.DockerClientFactory : Connected to docker:
Server Version: 18.09.2
API Version: 1.39
Operating System: Ubuntu 16.04.6 LTS
Total Memory: 5967 MB
2019-06-13 09:19:01.886 WARN --- [ main] [] o.t.utility.RegistryAuthLocator : Failure when attempting to lookup auth config (dockerImageName: quay.io/testcontainers/ryuk:0.2.2, configFile: /root/.docker/config.json. Falling back to docker-java default behaviour. Exception message: /root/.docker/config.json (No such file or directory)
2019-06-13 09:19:02.602 INFO --- [ main] [] org.testcontainers.DockerClientFactory : Ryuk started - will monitor and terminate Testcontainers containers on JVM exit
ℹ︎ Checking the system...
✔ Docker version should be at least 1.6.0
2019-06-13 09:19:02.822 INFO --- [ main] [] 🐳 [google/cloud-sdk:latest] : Creating container for image: google/cloud-sdk:latest
2019-06-13 09:19:02.822 WARN --- [ main] [] o.t.utility.RegistryAuthLocator : Failure when attempting to lookup auth config (dockerImageName: google/cloud-sdk:latest, configFile: /root/.docker/config.json. Falling back to docker-java default behaviour. Exception message: /root/.docker/config.json (No such file or directory)
2019-06-13 09:19:02.901 INFO --- [ main] [] 🐳 [google/cloud-sdk:latest] : Starting container with ID: bf2b3ee32a3599f04ec7676a8ed58a54b411a8b58e8859a5d56a1275860b267f
2019-06-13 09:19:03.433 INFO --- [ main] [] 🐳 [google/cloud-sdk:latest] : Container google/cloud-sdk:latest is starting: bf2b3ee32a3599f04ec7676a8ed58a54b411a8b58e8859a5d56a1275860b267f
2019-06-13 09:19:06.384 INFO --- [ main] [] 🐳 [google/cloud-sdk:latest] : Container google/cloud-sdk:latest started

@stale
Copy link

stale bot commented Sep 11, 2019

This issue has been automatically marked as stale because it has not had recent activity. It will be closed if no further activity occurs. If you believe this is a mistake, please reply to this comment to keep it open. If there isn't one already, a PR to fix or at least reproduce the problem in a test case will always help us get back on track to tackle this.

@stale stale bot added the stale label Sep 11, 2019
@heruan
Copy link

heruan commented Sep 19, 2019

I'm getting the same error when running Testcontainer in a GitLab CI/CD environment (docker in docker):

org.testcontainers.DockerClientFactory   : Ryuk started - will monitor and terminate Testcontainers containers on JVM exit
        ?? Checking the system...
        ? Docker version should be at least 1.6.0
        ? Docker environment should have more than 2GB free disk space
o.t.containers.SeleniumUtils             : Selenium API version 3.141.59 detected on classpath
d.141.59]                                : Creating container for image: selenium/standalone-chrome-debug:3.141.59
o.t.utility.RegistryAuthLocator          : Failure when attempting to lookup auth config (dockerImageName: selenium/standalone-chrome-debug:3.141.59, configFile: /root/.docker/config.json. Falling back to docker-java default behaviour. Exception message: /root/.docker/config.json (No such file or directory)
d.141.59]                                : Starting container with ID: e0650280f1262955a2cce15fb93e7edbc17bd217c68bb95785adc43b566d6a5d
d.141.59]                                : Container selenium/standalone-chrome-debug:3.141.59 is starting: e0650280f1262955a2cce15fb93e7edbc17bd217c68bb95785adc43b566d6a5d
d.141.59]                                : Container selenium/standalone-chrome-debug:3.141.59 started
o.o.selenium.remote.ProtocolHandshake    : Detected dialect: OSS
d.io/testcontainers/vnc-recorder:1.1.0]  : Creating container for image: quay.io/testcontainers/vnc-recorder:1.1.0
o.t.utility.RegistryAuthLocator          : Failure when attempting to lookup auth config (dockerImageName: quay.io/testcontainers/vnc-recorder:1.1.0, configFile: /root/.docker/config.json. Falling back to docker-java default behaviour. Exception message: /root/.docker/config.json (No such file or directory)

And then tests fail. Is there anything I can do?

@stale stale bot removed the stale label Sep 19, 2019
@rnorth
Copy link
Member

rnorth commented Sep 30, 2019

That particular message is not a problem - it's simply saying that you don't have any credentials set for quay.io, which is correct. That warning is only expected to be helpful if you have docker images in an authenticated registry and there's an authentication problem.

Please disregard that and look at other possible causes if you have test failures!

I think we'd welcome a PR to clarify the wording for this log statement!

@dntbrme
Copy link

dntbrme commented Oct 9, 2019

I also am having this problem when using Bitbucket piplines,

this is from the logs :

019-10-09 22:13:40,251 INFO o.t.d.DockerClientProviderStrategy [main] Will use 'okhttp' transport
2019-10-09 22:13:40,759 INFO o.t.d.EnvironmentAndSystemPropertyClientProviderStrategy [main] Found docker client settings from environment
2019-10-09 22:13:40,783 INFO o.t.d.DockerClientProviderStrategy [main] Found Docker environment with Environment variables, system properties and defaults. Resolved:
dockerHost=tcp://localhost:2375
apiVersion='{UNKNOWN_VERSION}'
registryUrl='https://index.docker.io/v1/'
registryUsername='root'
registryPassword='null'
registryEmail='null'
dockerConfig='DefaultDockerClientConfig[dockerHost=tcp://localhost:2375,registryUsername=root,registryPassword=,registryEmail=,registryUrl=https://index.docker.io/v1/,dockerConfigPath=/root/.docker,sslConfig=,apiVersion={UNKNOWN_VERSION},dockerConfig=]'

2019-10-09 22:13:40,786 INFO o.t.DockerClientFactory [main] Docker host IP address is localhost
2019-10-09 22:13:40,956 INFO o.t.DockerClientFactory [main] Connected to docker:
Server Version: 18.09.1
API Version: 1.39
Operating System: Alpine Linux v3.8 (containerized)
Total Memory: 31368 MB
2019-10-09 22:13:40,989 WARN o.t.u.RegistryAuthLocator [main] Failure when attempting to lookup auth config (dockerImageName: quay.io/testcontainers/ryuk:0.2.2, configFile: /root/.docker/config.json. Falling back to docker-java default behaviour. Exception message: /root/.docker/config.json (No such file or directory)
2019-10-09 22:13:41,879 WARN o.t.u.RegistryAuthLocator [main] Failure when attempting to lookup auth config (dockerImageName: quay.io/testcontainers/ryuk:0.2.2, configFile: /root/.docker/config.json. Falling back to docker-java default behaviour. Exception message: /root/.docker/config.json (No such file or directory)
2019-10-09 22:13:42,515 WARN o.t.u.ResourceReaper [testcontainers-ryuk] Can not connect to Ryuk at localhost:32768 java.net.ConnectException: Connection refused (Connection refused)
at java.net.PlainSocketImpl.socketConnect(Native Method)
at java.net.AbstractPlainSocketImpl.doConnect(AbstractPlainSocketImpl.java:350)
at java.net.AbstractPlainSocketImpl.connectToAddress(AbstractPlainSocketImpl.java:206)
at java.net.AbstractPlainSocketImpl.connect(AbstractPlainSocketImpl.java:188)
at java.net.SocksSocketImpl.connect(SocksSocketImpl.java:392)
at java.net.Socket.connect(Socket.java:589)
at java.net.Socket.connect(Socket.java:538)
at java.net.Socket.(Socket.java:434)
at java.net.Socket.(Socket.java:211)
at org.testcontainers.utility.ResourceReaper.lambda$start$1(ResourceReaper.java:112)
at java.lang.Thread.run(Thread.java:748)


Figured out my problem.. upgrade. see also ticket #700

@binkley
Copy link

binkley commented Dec 1, 2019

Hi @rnorth ! Agreed, the warning is "harmless", meaning, nothing is actually wrong.

This does, however, create extra build output which devs need to read and think about.

Is there a way to suppress it? A property setting or something ... ?

I'm scanning GitHub, and to look at the source of the warning (

log.warn("Failure when attempting to lookup auth config (dockerImageName: {}, configFile: {}. Falling back to docker-java default behaviour. Exception message: {}",
), as well as the callers of lookupAuthConfig, nothing obvious jumps out at me.

@johnlabarge
Copy link

Seems that maybe 'warn' is too important a level for this message in most circumstances. I have several of these warnings pertaining to Ryuk which I'm not expecting I'm using.

@rnorth
Copy link
Member

rnorth commented Apr 10, 2020

I think we could consider changing it. Perhaps to INFO level, plus make the message clearer that this is probably not a problem.

WDYT?

@DevilzOwn
Copy link
Contributor

Is this already done? Shall I make it info and raise the PR?

@rnorth
Copy link
Member

rnorth commented Oct 17, 2020

@DevilzOwn I don't think it's been changed. If you'd be able to have a look and raise a small PR if necessary, I'd be grateful! Thanks

@DevilzOwn
Copy link
Contributor

#3353
@rnorth

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

8 participants