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

Intermittent error: Docker Login failed with exit code 1 running jobs in container #3384

Open
FRABUCHI opened this issue Jul 11, 2024 · 3 comments
Labels
bug Something isn't working

Comments

@FRABUCHI
Copy link

FRABUCHI commented Jul 11, 2024

Describe the bug
I'm experiencing intermittent errors when attempting to log in to Docker on GitHub Enterprise using a self-hosted runner.

The error resembles the one discussed in this issue.

I am trying to log in to Harbor, but there are no error traces in the Harbor logs corresponding to these login attempts.

When login information is incorrect, I expect an unauthorized error, but instead, I receive an error message saying "Docker login for [harbor url] failed with exit code 1".

I suspect the problem might be related to the runner. Notably, the workflow works correctly if I re-run the failed job.

To Reproduce
Steps to reproduce the behavior:

  1. Go to the job configuration.
  2. Run the GitHub Actions workflow.
  3. Observe the error.
  4. Re-run the failed workflow.
  5. Observe that it runs successfully the second time.

Expected behavior
This docker login should succeed every time without exception

Runner Version and Platform

Version of your runner? 2.311.0

OS of the machine running the runner? Amazon Linux 2

What's not working?

The intermittent error occurs during the Docker login command to Harbor. The specific error is:

Docker login for [harbor url] failed with exit code 1

jobs:
  publish-events:
    runs-on:
      - gprunner
      - pool=m5a.large
    container:
      image: [harbor url]/devops/actions/devops:latest
      credentials:
        username: temp@example.com
        password: ${{ secrets.HARBOR_PASSWORD }}
스크린샷 2024-07-11 오후 4 57 30

The workflow works correctly when re-run.

@FRABUCHI FRABUCHI added the bug Something isn't working label Jul 11, 2024
@nsudhanva
Copy link

nsudhanva commented Jul 13, 2024

Can confirm that the same error is happening with ECR as well:

Checking docker version
Clean up resources from previous jobs
Create local container network
Starting job container
  /usr/local/bin/docker --config /runner/_work/_temp/.docker_23e[8](https://github.com/***/***/actions/runs/9921460081/job/27410175185#step:3:9)bb56-03f0-455f-ad36-3bb699f691cc login ***.dkr.ecr.us-east-1.amazonaws.com -u *** --password-stdin
  Warning: Docker login for '0[15](https://github.com/***/***/actions/runs/9921460081/job/27410175185#step:3:18)551053535.dkr.ecr.us-east-1.amazonaws.com' failed with exit code 1, back off 2.521 seconds before retry.
  /usr/local/bin/docker --config /runner/_work/_temp/.docker_23e8bb56-03f0-455f-ad36-3bb699f691cc login ***.dkr.ecr.us-east-1.amazonaws.com -u *** --password-stdin
  Warning: Docker login for '***.dkr.ecr.us-east-1.amazonaws.com' failed with exit code 1, back off 3.036 seconds before retry.
  /usr/local/bin/docker --config /runner/_work/_temp/.docker_23e8bb56-03f0-455f-ad36-3bb699f691cc login ***.dkr.ecr.us-east-1.amazonaws.com -u *** --password-stdin
  Error: Docker login for '***.dkr.ecr.us-east-1.amazonaws.com' failed with exit code 1

This I have tested and tried so far:

  • Refreshed credentials for ECR, updated the secrets
  • Made sure that the secrets and development environment are intact

Runner Version and Platform

  • Self hosted on k8s, Linux, latest version

@spindev
Copy link

spindev commented Jul 17, 2024

We are facing the same issue with GitHub Container Registry for GHES using the normal GITHUB_TOKEN.

Runner version: 2.314.1
Runner os:

@mark-pearson-bluefruit
Copy link

We are facing the same issue. Here is the evidence
image
image

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

No branches or pull requests

4 participants