This job is stuck because you don’t have any active runners online with any of these tags assigned

I have CI configured so that it triggers the pipeline when I apply a tag to a commit in the production branch. When the tag is applied the job in the pipeline is initiated then stuck with this message:

“This job is stuck because you don’t have any active runners online with any of these tags assigned to them: deploy_prod”

But I have a shared runner with this tag:

My two runners are shown below. The second runner works properly.

Within the project’s settings I see this:

And my .gitlab-ci.yml is as follows:

stages:
  - deploy

deploy_test:
  stage: deploy
  tags:
    - deploy_test
  script:
    - php /efs/runner/deploy_ci_app.php
  environment:
    name: test_env
    url: https://agencymosaic-test.com
  only:
    - master

deploy_prod:
  stage: deploy
  tags:
    - do_it
  script:
    - php /efs/runner/deploy_ci_app.php
  environment:
    name: prod_env
    url: https://agencymosaic.com
  only:
    - tags
  except:
    - master

It all looks in order to me. I am at a lose as to why it does not like the configured runner.

It is strange indeed…:thinking:

But what I notice, is that your .gitlab-yml does not use the deploy_prod tag at all. Rather it uses the do_it tag. What will happen if you remove deploy_prod tag from the runner’s definition?

Sorry, my error in documenting the issue. Originally, it was using deploy_prod in the .gitlab-yml and complaining that no active runners were online with that tag assigned. As a test, I added the do_it tag and updated the yml file accordingly (hoping that if I was firm it would work).

I have just tested this again, using a different project in the same group, with the yml file shown below, and the same error message that was previously documented.

stages:
  - deploy

deploy_test:
  stage: deploy
  tags:
    - deploy_test
  script:
    - php /efs/runner/deploy_ci_app.php
  environment:
    name: test_env
    url: https://agencymosaic-test.com
  only:
    - master

deploy_prod:
  stage: deploy
  tags:
    - deploy_prod
  script:
    - php /efs/runner/deploy_ci_app.php
  environment:
    name: prod_env
    url: https://agencymosaic.com
  only:
    - tags
  except:
    - master

Hello,

I have the same issue. I have my runner with stable tag
17
and my gilab-ci.yml has:

  stage: Deploying code
  environment:
    name: $PROD_DOMAIN
    url: $PROD_DOMAIN
  script:
    - cd $CI_PROJECT_DIR
    - export APP_ENV = prod
    - export APP_DEBUG = 0
    - php composer.phar install --no-dev --optimize-autoloader
    - sudo rsync  -az --force --delete --progress --exclude-from=.htexclude . $MASTER_DIRECTORY
    - cd $MASTER_DIRECTORY
    - php bin/console doctrine:schema:update
  only:
    refs:
      # only runs if branch is stable (or a Merge to a stable branch)
      - stable
  tags:
    # only runs if runner has a tag stable
    - stable
    - master

But i receive this message: This job is stuck because you don't have any active runners online with any of these tags assigned to them: master stable.

I tried to change tags, other runners but it doesn’t work. With other projects the same runner works perfectly…

Any help??

Thanks!!

Finally I found the problem. I must enable “Shared Runners” in CI/CD project’s config. Now it works!

1 Like

I have this issue too… it might be due to re-writing history. So the runners have the old history and they cannot pick up the job…

EDIT: no looks like it’s not re-writing the history. Had to build again a new version and runners were then able to pick it up… no idea why.

Ensure enable group runners is also selected. I had all of my tagged runners go offline and for whatever reason, this checkbox was unchecked the next time I looked.

Untitled