Hi all
I am receiving the following error in my self hosted gitlab runner pipeline:
npm ERR! code UNKNOWN
npm ERR! syscall write
npm ERR! errno -116
npm ERR! UNKNOWN: unknown error, write
npm ERR! A complete log of this run can be found in:
npm ERR! /root/.npm/_logs/2023-05-26T08_01_31_226Z-debug-0.log
npm ERR! code UNKNOWN
npm ERR! syscall write
npm ERR! errno -116
npm ERR! UNKNOWN: unknown error, write
npm ERR! A complete log of this run can be found in:
npm ERR! /root/.npm/_logs/2023-05-26T08_01_30_890Z-debug-0.log
The …debug-0.log is empty btw.
Has anybody ever seen this error. I cannot find anything in the internet regarding this
Mostly this happens at the very end of the pipeline (right beofre the job would succeed).
It is around 50:50 chance that when retrying the failed steps the pipeline will succeed.
I am quite sure that this is not a memory error as the runner has sufficient memory left.
Happy for any help
Hello @Handset1285
The error code UNKNOWN
and the syscall write
suggest that the error is related to writing to a file or a device. The error number -116
is a low-level system error code, which can be difficult to diagnose without more context.
Here are a few steps you can take to further investigate and possibly resolve this issue:
- Check File Permissions : Ensure that the user running the GitLab runner has sufficient permissions to write to the necessary directories and files.
- Upgrade npm and Node.js : If you’re not already using the latest stable versions of npm and Node.js, consider upgrading. Sometimes, these kinds of issues can be resolved by updates in these tools.
- Try Running npm with --verbose : Running npm with the
--verbose
flag can provide more detailed logging, which might give more insight into what’s causing the error. You can do this by adding --verbose
to your npm command like so: npm install --verbose
.
If that does not help you identify the issue, can you please share some additional information about the CI job and project? Sharing additional details like the following can help us help you figure this out and fix the issue:
- what is CI job definition (in
.gitlab-ci.yml
) for the job that is failing
- are there any differences or discrepancies between the Gitlab Runner (eg. runner version, executor, or configuration) between jobs where the job is successful vs. when the job fails
Thanks!
I have same issue with my project which is spring boot + Angular 17. Node version is 18.20.0
Build process is through pom installing node 18.20.0 then build angular code putting into static folder then build jar file. Through docker file will running the jar file.
on file permission we are using root user who has all permission. The confusion i have its worked after rebuild some time 2 or more. Not sure why its working after re run, there is no configuration difference the failed and successful run.
Any suggestion here