question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

gitlab runner fails at with Error: GitLab API not found

See original GitHub issue

I am trying to test CML on a locally deployed GitLab server. I setup the token which seems to work. However, the pipeline fails due to an API error on “cml-send-comment”

Running with gitlab-runner 13.10.0 (54944146)
  on dev01 XXXXXXX
section_start:1618225417:prepare_executor
Preparing the "docker" executor
Using Docker executor with image dvcorg/cml-py3:latest ...
Using locally found image version due to "if-not-present" pull policy
Using docker image sha256:1ace1dc1b2a0543e4a7a9b34733456f5b69acb9b658d9165f912e7b2c0661dfc for dvcorg/cml-py3:latest with digest dvcorg/cml-py3@sha256:54bc3c205f7d643b83807915a752f2447c0d85790035e5d524290bfbc8966373 ...
section_end:1618225420:prepare_executor
section_start:1618225420:prepare_script
Preparing environment
Running on runner-xfdxembn-project-2-concurrent-0 via a250b8db9876...
section_end:1618225422:prepare_script
section_start:1618225422:get_sources
Getting source from Git repository
Fetching changes with git depth set to 50...
Reinitialized existing Git repository in /builds/root/cml-test/.git/
Checking out c121223b as master...
Removing report.md

Skipping Git submodules setup
section_end:1618225424:get_sources
section_start:1618225424:step_script
Executing "step_script" stage of the job script
Using docker image sha256:1ace1dc1b2a0543e4a7a9b34733456f5b69acb9b658d9165f912e7b2c0661dfc for dvcorg/cml-py3:latest with digest dvcorg/cml-py3@sha256:54bc3c205f7d643b83807915a752f2447c0d85790035e5d524290bfbc8966373 ...
$ echo 'Hi from CML!' >> report.md
$ cml-send-comment report.md
Error: GitLab API not found
    at Gitlab.repo_base (/cml/src/drivers/gitlab.js:55:37)
    at processTicksAndRejections (internal/process/task_queues.js:97:5)
    at async Gitlab.project_path (/cml/src/drivers/gitlab.js:25:23)
    at async Gitlab.comment_create (/cml/src/drivers/gitlab.js:63:26)
    at async CML.comment_create (/cml/src/cml.js:83:12)
    at async run (/cml/bin/cml-send-comment.js:20:3)
section_end:1618225426:step_script
section_start:1618225426:cleanup_file_variables
Cleaning up file based variables
section_end:1618225427:cleanup_file_variables
ERROR: Job failed: exit code 1

my .gitlab-ci.yml files looks like this

stages: 
    - cml_run
    
cml:
    stage: cml_run
    image: dvcorg/cml-py3:latest
    
    script:
      - echo 'Hi from CML!' >> report.md
      - cml-send-comment report.md

Issue Analytics

  • State:closed
  • Created 2 years ago
  • Comments:14 (7 by maintainers)

github_iconTop GitHub Comments

4reactions
Chichilelecommented, Apr 12, 2021

Setting the node variable solved it.

cml-send-comment report.md
(node:10) Warning: Setting the NODE_TLS_REJECT_UNAUTHORIZED environment variable to '0' makes TLS connections and HTTPS requests insecure by disabling certificate verification.

thanks a lot!

2reactions
DavidGOrtegacommented, Apr 12, 2021

@Chichilele also probably you should setup this enviroonment variable to overcome that insecure SSL in the workflow or in the CI as env variable

export NODE_TLS_REJECT_UNAUTHORIZED=0
Read more comments on GitHub >

github_iconTop Results From Across the Web

Registering runner... failed runner=38BUk9-k status=404 Not ...
It looks like 404 Not Found is an inaccurately chosen error code coming from this endpoint. In this case it actually means that...
Read more >
Verifying runner failed status=404 Not Found when using ...
Summary If your central instance runs Gitlab CE 8.16.7 and your runners use gitlab-ci-multi-runner 9.0.0 (because you upgrade them nightly ...
Read more >
Troubleshooting GitLab Runner
In this case, the authentication failure is caused by a service in between the Internet and the GitLab service. This service uses separate...
Read more >
Troubleshooting CI/CD - GitLab Docs
A new pipeline starts running on the example branch again, however, the previous pipeline (2) fails because of fatal: reference is not a...
Read more >
GitLab runner: repository not found (#1915) · Issues
It fails on same error message, only when i trigger the build with API. It fail only on projects with submodules. The "Retry...
Read more >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found