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

The self-hosted runner: cml-xxx lost communication with the server #1053

Closed
TorRient opened this issue Jun 9, 2022 · 5 comments
Closed

The self-hosted runner: cml-xxx lost communication with the server #1053

TorRient opened this issue Jun 9, 2022 · 5 comments
Labels
ci-github cml-runner Subcommand duplicate Déjà lu p1-important High priority

Comments

@TorRient
Copy link

TorRient commented Jun 9, 2022

Hi everyone, i have a problem when i using CML to create host runner.

Log issue:
The self-hosted runner: cml-xxx lost communication with the server. Verify the machine is running and has a healthy network connection. Anything in your workflow that terminates the runner process, starves it for CPU/Memory, or blocks its network access can cause this error.

My cml.yaml:

name: CML Report
on:
  push:
    branches:
    - master
jobs:
  deploy-runner:
    runs-on: ubuntu-latest
    steps:
      - uses: iterative/setup-cml@v1
      - uses: actions/checkout@v2
      - name: Deploy runner on EC2
        env:
          REPO_TOKEN: ${{ secrets.PERSONAL_ACCESS_TOKEN }}
          GOOGLE_APPLICATION_CREDENTIALS_DATA: ${{ secrets.GOOGLE_APPLICATION_CREDENTIALS_DATA }}
        run: |
          cml runner \
              --cloud=gcp \
              --cloud-region=us-west \
              --cloud-type=e2-highmem-4 \
              --labels=cml-cpu \
  evaluate:
    needs: [deploy-runner]
    runs-on: [self-hosted, cml-cpu]
    container:
      image: docker://ghcr.io/iterative/cml:0-dvc2-base1
    steps:
      - uses: actions/checkout@v2
      - name: Generate metrics report
        env:
          REPO_TOKEN: ${{ secrets.PERSONAL_ACCESS_TOKEN }}
          GOOGLE_APPLICATION_CREDENTIALS_DATA: ${{ secrets.GOOGLE_APPLICATION_CREDENTIALS_DATA }}
        run: |
          pip install -r requirements.txt
          dvc repro
          echo "## Metrics" >> report.md
          dvc metrics show --show-md >> report.md
          cml send-comment report.md

Any solution?
Thanks all!

@dacbd
Copy link
Contributor

dacbd commented Jun 9, 2022

This is a known issue, if you are able to provide more logs we can try and give you a recommendation on what to change.

You can monitor this issue for updates: #1016
And this issue for how to get some additional logs that may help us if possible: #1006

The GHA agent tends to fail in rough ways when the instance becomes starved, Increasing the instance size should solve the problem but we are working to make a solution that allows the instance to fail safely and still be able to clean up the instance.

@DavidGOrtega
Copy link
Contributor

duplicated of #1014

@TorRient
Copy link
Author

TorRient commented Jun 9, 2022

The best solution is to not use cml runner, create runner on GitHub client and use VM instance on GCP / AWS ... connect to it 👍

@dacbd dacbd closed this as not planned Won't fix, can't repro, duplicate, stale Jun 9, 2022
@DavidGOrtega
Copy link
Contributor

Just to clarify... cml runner uses GH runner internally 😁 So probably you have not yet solved your issue

@TorRient
Copy link
Author

It is a temporary alternative to CML RUNNER, it's better to be faulty :D. I'm kidding.
I still appreciate cml runner, I am trying to fix that.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
ci-github cml-runner Subcommand duplicate Déjà lu p1-important High priority
Projects
None yet
Development

No branches or pull requests

3 participants