Reputation: 215
I am new to GitLab CI/CD's and I wonder what my pipeline is doing. The syntax is correct but the job keeps failing, but I don't know why and would like to check the trace. When viewing the job trace it says 'This job does not have a trace'. The same is happening if I view the job logs. There is just the text 'no job log'.
Every single job I ran has no trace, so I suspect it is a configuration issue in our self-hosted gitlab-runner. I found posts with the same issue but without any solution. I tried to run the gitlab-runner debug mode but its output is of no use.
I am using a shell executor and installed docker on the gitlab-runner.
Edit: I coincidently got a job log once, but rerunning the job gives me the same "no job log" / "This job has no trace".
Upvotes: 11
Views: 10165
Reputation: 11
i installed gitlab 16.3 and where as my gitlab-ruuner version was 11.something. since i was on ubuntu 20 i uninstalled runner by using following commands
Stop the GitLab Runner service: sudo systemctl stop gitlab-runner
Remove the GitLab Runner package: sudo apt-get remove gitlab-runner
To completely remove its configuration files as well, use the following command:sudo apt-get purge gitlab-runner
Optionally, you can also remove the GitLab Runner user:sudo deluser gitlab-runner
then i reinstalled gitlab runner 16.3.0
to install gitlab runner latest versions i follow this document https://docs.gitlab.com/runner/install/linux-repository.html
Upvotes: 1
Reputation: 181
Find GitLab-runner builds folder.
/home/GitLab-runner or other location
chown -R gitlab-runner:gitlab-runner builds/
Upvotes: 0
Reputation: 21
I had the same problem, and solved it today. Components:
GitLab 13.10.0
GitLab Shell 13.17.0
GitLab Workhorse v13.10.0
GitLab API v4
Ruby 2.7.2p137
Rails 6.0.3.4
PostgreSQL 12.5
Redis 6.0.10
gitlab-runner version:
Version: 14.3.2
Git revision: e0218c92
Git branch: 14-3-stable
GO version: go1.13.8
Built: 2021-09-30T16:10:52+0000
OS/Arch: linux/arm64
In /etc/systemd/system/gitlab-runner.service file there is a line with the "--working-directory" "/var/lib/gitlab-runner". What I've found that this directory didn't existed under /var/lib/. I've created the directory, gaved access permissions with the following command:
chown -R gitlab-runner:gitlab-runner /var/lib/gitlab-runner
and restarted the CI.
PS: GitLab is running in a docker container, what is running on a raspberry-pi 4 with Ubuntu 20.04. Also the gitlab-runner is running on a raspberry-pi 4 with Ubuntu 20.04.
Upvotes: 2
Reputation: 215
The issue was that the Gitlab Runner (11.0.2) was incompatible with the GitLab (14.0.6). This happened because we did migrate GitLab to version 14.0.6 but without updating the runner. We solved it by uninstalling the GitLab runner and installing the correct GitLab runner version. I suspect we got no job logs because the GitLab runner couldn't create logs with the GitLab versions being incompatible.
Upvotes: 9