Uploaded image for project: 'Mender'
  1. Mender
  2. MEN-2408

integration repository has problems with docker credentials

    XMLWordPrintable

    Details

    • Type: Bug
    • Status: Done
    • Priority: (None)
    • Resolution: Fixed
    • Affects Version/s: None
    • Fix Version/s: None
    • Labels:

      Description

      Report from a user:

      I'm only starting with Mender and faced an issue that https://docs.mender.io/1.7/getting-started/create-a-test-environment fails hard during images pulling when `docker login` was executed before and `~/.docker/config.json` file is present. I think this is caused by `sudo -E` usage.

      Distro

      No LSB modules are available.
      Distributor ID:    Ubuntu
      Description:    Ubuntu Disco Dingo (development branch)
      Release:    19.04
      Codename:    disco
      

      Docker engine

      Client:
       Version:           18.09.3
       API version:       1.39
       Go version:        go1.10.8
       Git commit:        774a1f4
       Built:             Thu Feb 28 06:47:20 2019
       OS/Arch:           linux/amd64
       Experimental:      false
      
      Server: Docker Engine - Community
       Engine:
        Version:          18.09.3
        API version:      1.39 (minimum version 1.12)
        Go version:       go1.10.8
        Git commit:       774a1f4
        Built:            Thu Feb 28 05:59:55 2019
        OS/Arch:          linux/amd64
        Experimental:     false
      

      docker-compose version

      docker-compose version 1.21.0, build unknown
      docker-py version: 3.4.1
      CPython version: 3.7.2+
      OpenSSL version: OpenSSL 1.1.1b  26 Feb 2019
      

      The output is like this:

      ./up
      -- adding the following entries to /etc/hosts:
      127.0.0.1 s3.docker.mender.io # added by mender integration
      127.0.0.1 docker.mender.io # added by mender integration
      Pulling mender-gui           ... 
      Pulling mender-mongo         ... 
      Pulling mender-useradm       ... 
      Pulling mender-inventory     ... 
      Pulling mender-device-auth   ... 
      Pulling mender-deployments   ... 
      Pulling mender-api-gateway   ... 
      Pulling mender-elasticsearch ... 
      Pulling mender-redis         ... 
      Pulling mender-conductor     ... 
      
      ERROR: for mender-inventory  Credentials store error: StoreError('Credentials store docker-credential-secretservice exited with "The connection is closed".')
      
      ERROR: for mender-gui  Credentials store error: StoreError('Credentials store docker-credential-secretservice exited with "The connection is closed".')
      
      ERROR: for mender-conductor  Credentials store error: StoreError('Credentials store docker-credential-secretservice exited with "The connection is closed".')
      
      ERROR: for mender-api-gateway  Credentials store error: StoreError('Credentials store docker-credential-secretservice exited with "The connection is closed".')
      
      ERROR: for mender-useradm  Credentials store error: StoreError('Credentials store docker-credential-secretservice exited with "The connection is closed".')
      
      ERROR: for mender-device-auth  Credentials store error: StoreError('Credentials store docker-credential-secretservice exited with "The connection is closed".')
      
      ERROR: for mender-deployments  Credentials store error: StoreError('Credentials store docker-credential-secretservice exited with "The connection is closed".')
      
      ERROR: for mender-elasticsearch  Credentials store error: StoreError('Credentials store docker-credential-secretservice exited with "The connection is closed".')
      
      ERROR: for mender-mongo  Credentials store error: StoreError('Credentials store docker-credential-secretservice exited with "The connection is closed".')
      
      ERROR: for mender-redis  Credentials store error: StoreError('Credentials store docker-credential-secretservice exited with "The connection is closed".')
      Traceback (most recent call last):
        File "/usr/lib/python3/dist-packages/dockerpycreds/store.py", line 74, in _execute
          [self.exe, subcmd], input=data_input, env=env,
        File "/usr/lib/python3.7/subprocess.py", line 395, in check_output
          **kwargs).stdout
        File "/usr/lib/python3.7/subprocess.py", line 487, in run
          output=stdout, stderr=stderr)
      subprocess.CalledProcessError: Command '['/usr/bin/docker-credential-secretservice', 'get']' returned non-zero exit status 1.
      
      During handling of the above exception, another exception occurred:
      
      Traceback (most recent call last):
        File "/usr/lib/python3/dist-packages/docker/auth.py", line 129, in _resolve_authconfig_credstore
          data = store.get(registry)
        File "/usr/lib/python3/dist-packages/dockerpycreds/store.py", line 35, in get
          data = self._execute('get', server)
        File "/usr/lib/python3/dist-packages/dockerpycreds/store.py", line 87, in _execute
          raise errors.process_store_error(e, self.program)
      dockerpycreds.errors.StoreError: Credentials store docker-credential-secretservice exited with "The connection is closed".
      
      During handling of the above exception, another exception occurred:
      
      Traceback (most recent call last):
        File "/usr/bin/docker-compose", line 11, in <module>
          load_entry_point('docker-compose==1.21.0', 'console_scripts', 'docker-compose')()
        File "/usr/lib/python3/dist-packages/compose/cli/main.py", line 71, in main
          command()
        File "/usr/lib/python3/dist-packages/compose/cli/main.py", line 127, in perform_command
          handler(command, command_options)
        File "/usr/lib/python3/dist-packages/compose/cli/main.py", line 729, in pull
          include_deps=options.get('--include-deps'),
        File "/usr/lib/python3/dist-packages/compose/project.py", line 556, in pull
          limit=5,
        File "/usr/lib/python3/dist-packages/compose/parallel.py", line 105, in parallel_execute
          raise error_to_reraise
        File "/usr/lib/python3/dist-packages/compose/parallel.py", line 203, in producer
          result = func(obj)
        File "/usr/lib/python3/dist-packages/compose/project.py", line 549, in pull_service
          service.pull(ignore_pull_failures, True)
        File "/usr/lib/python3/dist-packages/compose/service.py", line 1142, in pull
          output = self.client.pull(repo, **kwargs)
        File "/usr/lib/python3/dist-packages/docker/api/image.py", line 380, in pull
          header = auth.get_config_header(self, registry)
        File "/usr/lib/python3/dist-packages/docker/auth.py", line 48, in get_config_header
          client._auth_configs, registry, credstore_env=client.credstore_env
        File "/usr/lib/python3/dist-packages/docker/auth.py", line 96, in resolve_authconfig
          authconfig, registry, store_name, env=credstore_env
        File "/usr/lib/python3/dist-packages/docker/auth.py", line 146, in _resolve_authconfig_credstore
          'Credentials store error: {0}'.format(repr(e))
      docker.errors.DockerException: Credentials store error: StoreError('Credentials store docker-credential-secretservice exited with "The connection is closed".')
      Starting Mender demo environment..
      Creating network "mender-demo-integration-170_mender" with the default driver
      Pulling mender-client (mendersoftware/mender-client-qemu:1.7.0)...
      Traceback (most recent call last):
        File "/usr/lib/python3/dist-packages/dockerpycreds/store.py", line 74, in _execute
          [self.exe, subcmd], input=data_input, env=env,
        File "/usr/lib/python3.7/subprocess.py", line 395, in check_output
          **kwargs).stdout
        File "/usr/lib/python3.7/subprocess.py", line 487, in run
          output=stdout, stderr=stderr)
      subprocess.CalledProcessError: Command '['/usr/bin/docker-credential-secretservice', 'get']' returned non-zero exit status 1.
      
      During handling of the above exception, another exception occurred:
      
      Traceback (most recent call last):
        File "/usr/lib/python3/dist-packages/docker/auth.py", line 129, in _resolve_authconfig_credstore
          data = store.get(registry)
        File "/usr/lib/python3/dist-packages/dockerpycreds/store.py", line 35, in get
          data = self._execute('get', server)
        File "/usr/lib/python3/dist-packages/dockerpycreds/store.py", line 87, in _execute
          raise errors.process_store_error(e, self.program)
      dockerpycreds.errors.StoreError: Credentials store docker-credential-secretservice exited with "The connection is closed".
      
      During handling of the above exception, another exception occurred:
      
      Traceback (most recent call last):
        File "/usr/bin/docker-compose", line 11, in <module>
          load_entry_point('docker-compose==1.21.0', 'console_scripts', 'docker-compose')()
        File "/usr/lib/python3/dist-packages/compose/cli/main.py", line 71, in main
          command()
        File "/usr/lib/python3/dist-packages/compose/cli/main.py", line 127, in perform_command
          handler(command, command_options)
        File "/usr/lib/python3/dist-packages/compose/cli/main.py", line 1052, in up
          to_attach = up(False)
        File "/usr/lib/python3/dist-packages/compose/cli/main.py", line 1048, in up
          silent=options.get('--quiet-pull'),
        File "/usr/lib/python3/dist-packages/compose/project.py", line 466, in up
          svc.ensure_image_exists(do_build=do_build, silent=silent)
        File "/usr/lib/python3/dist-packages/compose/service.py", line 324, in ensure_image_exists
          self.pull(silent=silent)
        File "/usr/lib/python3/dist-packages/compose/service.py", line 1142, in pull
          output = self.client.pull(repo, **kwargs)
        File "/usr/lib/python3/dist-packages/docker/api/image.py", line 380, in pull
          header = auth.get_config_header(self, registry)
        File "/usr/lib/python3/dist-packages/docker/auth.py", line 48, in get_config_header
          client._auth_configs, registry, credstore_env=client.credstore_env
        File "/usr/lib/python3/dist-packages/docker/auth.py", line 96, in resolve_authconfig
          authconfig, registry, store_name, env=credstore_env
        File "/usr/lib/python3/dist-packages/docker/auth.py", line 146, in _resolve_authconfig_credstore
          'Credentials store error: {0}'.format(repr(e))
      docker.errors.DockerException: Credentials store error: StoreError('Credentials store docker-credential-secretservice exited with "The connection is closed".')
      

      As soon as I removed `~/.docker/config.json` file it worked fine. Just `docker logout` didn't help.

        Attachments

          Activity

            People

            • Assignee:
              lluis Lluís Campos
              Reporter:
              mirzak Mirza Krak
            • Votes:
              0 Vote for this issue
              Watchers:
              2 Start watching this issue

              Dates

              • Created:
                Updated:
                Resolved:

                Zendesk Support

                  Summary Panel