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

Hello World Job Completes With a Failed Result on the EC2 Instance #91

Closed
shahzadlone opened this issue Jan 13, 2022 · 1 comment · Fixed by #88
Closed

Hello World Job Completes With a Failed Result on the EC2 Instance #91

shahzadlone opened this issue Jan 13, 2022 · 1 comment · Fixed by #88

Comments

@shahzadlone
Copy link

I have followed all the instructions that are mentioned in the README.md but the hello world job results in failure for me.

Here is the output from the EC2 Serial Console:
image

Here is the output from the GitHub action (it stays stuck here):
image

Here is what's in my .github/workflows/aws-ec2-job.yml file:

name: aws-ec2-job

on: pull_request

jobs:

  start-runner:
    name: Start self-hosted EC2 runner
    runs-on: ubuntu-latest
    outputs:
      label: ${{ steps.start-ec2-runner.outputs.label }}
      ec2-instance-id: ${{ steps.start-ec2-runner.outputs.ec2-instance-id }}

    steps:

      - name: Configure AWS credentials
        uses: aws-actions/configure-aws-credentials@v1
        with:
          aws-access-key-id: ${{ secrets.AWS_ACCESS_KEY_ID }}
          aws-secret-access-key: ${{ secrets.AWS_SECRET_ACCESS_KEY }}
          aws-region: ${{ secrets.AWS_REGION }}

      - name: Start EC2 runner
        id: start-ec2-runner
        uses: machulav/ec2-github-runner@v2
        with:
          mode: start
          github-token: ${{ secrets.REPO_SCOPE_PAT }}
          ec2-image-id: ${{ secrets.EC2_IMAGE_ID }}
          ec2-instance-type: t3.xlarge
          subnet-id: ${{ secrets.SUBNET_ID }}
          security-group-id: ${{ secrets.SECURITY_GROUP_ID }}

  aws-ec2-job:

    name: run the benchmarks on the runner
    needs: start-runner # required to start the main job when the runner is ready

    runs-on: ${{ needs.start-runner.outputs.label }} # run the job on the newly created runner

    steps:
      - name: Hello World
        run: echo 'Hello World!'

  stop-runner:

    name: Stop self-hosted EC2 runner
    needs:
      - start-runner # required to get output from the start-runner job
      - aws-ec2-job # required to wait when the main job is done

    runs-on: ubuntu-latest

    if: ${{ always() }} # required to stop the runner even if the error happened in the previous jobs

    steps:

      - name: Configure AWS credentials
        uses: aws-actions/configure-aws-credentials@v1
        with:
          aws-access-key-id: ${{ secrets.AWS_ACCESS_KEY_ID }}
          aws-secret-access-key: ${{ secrets.AWS_SECRET_ACCESS_KEY }}
          aws-region: ${{ secrets.AWS_REGION }}

      - name: Stop EC2 runner
        uses: machulav/ec2-github-runner@v2
        with:
          mode: stop
          github-token: ${{ secrets.REPO_SCOPE_PAT }}
          label: ${{ needs.start-runner.outputs.label }}
          ec2-instance-id: ${{ needs.start-runner.outputs.ec2-instance-id }}

@richardcalahan
Copy link

This just started happening for me today as well. Happening on setups that have been working for months, no changes.

Seeing this error from github:

System.Globalization.CultureNotFoundException: Only the invariant culture is supported in globalization-invariant mode. See https://aka.ms/GlobalizationInvariantMode for more information. (Parameter 'name')
en-US is an invalid culture identifier.
   at System.Globalization.CultureInfo..ctor(String name, Boolean useUserOverride)
   at System.Globalization.CultureInfo..ctor(String name)
   at GitHub.Runner.Common.HostContext.SetDefaultCulture(String name)
   at GitHub.Runner.Worker.Worker.SetCulture(AgentJobRequestMessage message)
   at GitHub.Runner.Worker.Worker.RunAsync(String pipeIn, String pipeOut)
   at GitHub.Runner.Worker.Program.MainAsync(IHostContext context, String[] args)

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

Successfully merging a pull request may close this issue.

2 participants