WIndows Gitlab-runner: Failed to requeue the runner - windows

I have a pipeline with 2 jobs.
I start user as super user on windows with debug mode and received next output:
Checking for jobs... received job=24173 repo_url=https://scm-01.oursite.com/theproject/theproject-tests.git runner=ub7wf5mg
Failed to requeue the runner builds=1 runner=ub7wf5mg
Running with gitlab-runner 12.8.0 (1b659122) job=24173 project=789 runner=ub7wf5mg
on vm14rkwEggplant ub7wf5mg job=24173 project=789 runner=ub7wf5mg
Shell configuration: environment: []
dockercommand:
- PowerShell
- -NoProfile
- -NoLogo
- -InputFormat
- text
- -OutputFormat
- text
- -NonInteractive
- -ExecutionPolicy
- Bypass
- -Command
- '-'
command: powershell
arguments:
- -noprofile
- -noninteractive
- -executionpolicy
- Bypass
- -command
passfile: true
extension: ps1
job=24173 project=789 runner=ub7wf5mg
Using Shell executor... job=24173 project=789 runner=ub7wf5mg
Waiting for signals... job=24173 project=789 runner=ub7wf5mg
No referees configured job=24173 project=789 runner=ub7wf5mg
Executing build stage build_stage=prepare_script job=24173 project=789 runner=ub7wf5mg
Executing build stage build_stage=get_sources job=24173 project=789 runner=ub7wf5mg
Feeding runners to channel builds=1
WARNING: Failed to parse "X-GitLab-Trace-Update-Interval" header error=strconv.Atoi: parsing "": invalid syntax header-value= job=24173 runner=ub7wf5mg
Appending trace to coordinator... ok code=202 job=24173 job-log=0-536 job-status=running runner=ub7wf5mg sent-log=0-535 status=202 Accepted update-interval=0s
Executing build stage build_stage=upload_artifacts_on_failure job=24173 project=789 runner=ub7wf5mg
Skipping referees execution job=24173 project=789 runner=ub7wf5mg
WARNING: Job failed: exit status 1 duration=4.9592837s job=24173 project=789 runner=ub7wf5mg
WARNING: Failed to parse "X-GitLab-Trace-Update-Interval" header error=strconv.Atoi: parsing "": invalid syntax header-value= job=24173 runner=ub7wf5mg
Appending trace to coordinator... ok code=202 job=24173 job-log=0-2526 job-status=running runner=ub7wf5mg sent-log=536-2525 status=202 Accepted update-interval=0s
Submitting job to coordinator... ok code=200 job=24173 job-status= runner=ub7wf5mg
WARNING: Failed to process runner builds=0 error=exit status 1 executor=shell runner=ub7wf5mg
Output of pipeline in gitlab is next:
Running with gitlab-runner 12.8.0 (1b659122)
on vm14rkwEggplant ub7wf5mg
Using Shell executor...
Running on KS-IDE-TS4...
Fetching changes with git depth set to 50...
Reinitialized existing Git repository in C:/GitLab-Runner/builds/ub7wf5mg/0/ourproject/ourproject-winappdriver-tests/.git/
From https://scm-01.ourproject.com/ourproject/ourproject-winappdriver-tests
* [new ref] refs/pipelines/5813 -> refs/pipelines/5813
Checking out c924c09b as master...
warning: failed to remove packages/Microsoft.Net.Compilers.Toolset.3.4.0/tasks/net472/Microsoft.CodeAnalysis.CSharp.dll: Invalid argument
warning: failed to remove packages/Microsoft.Net.Compilers.Toolset.3.4.0/tasks/net472/Microsoft.CodeAnalysis.dll: Invalid argument
warning: failed to remove packages/Microsoft.Net.Compilers.Toolset.3.4.0/tasks/net472/Microsoft.CodeAnalysis.VisualBasic.dll: Invalid argument
warning: failed to remove packages/Microsoft.Net.Compilers.Toolset.3.4.0/tasks/net472/Microsoft.DiaSymReader.Native.amd64.dll: Invalid argument
warning: failed to remove packages/Microsoft.Net.Compilers.Toolset.3.4.0/tasks/net472/System.Buffers.dll: Invalid argument
warning: failed to remove packages/Microsoft.Net.Compilers.Toolset.3.4.0/tasks/net472/System.Collections.Immutable.dll: Permission denied
warning: failed to remove packages/Microsoft.Net.Compilers.Toolset.3.4.0/tasks/net472/System.Memory.dll: Permission denied
warning: failed to remove packages/Microsoft.Net.Compilers.Toolset.3.4.0/tasks/net472/System.Numerics.Vectors.dll: Permission denied
warning: failed to remove packages/Microsoft.Net.Compilers.Toolset.3.4.0/tasks/net472/System.Reflection.Metadata.dll: Permission denied
warning: failed to remove packages/Microsoft.Net.Compilers.Toolset.3.4.0/tasks/net472/System.Runtime.CompilerServices.Unsafe.dll: Permission denied
warning: failed to remove packages/Microsoft.Net.Compilers.Toolset.3.4.0/tasks/net472/System.Threading.Tasks.Extensions.dll: Permission denied
warning: failed to remove packages/Microsoft.Net.Compilers.Toolset.3.4.0/tasks/net472/VBCSCompiler.exe: Invalid argument
ERROR: Job failed: exit status 1
If I restart the runner the first job became succesefull, but the secound one fails again with very similiar error.
The git version is
git version 2.25.1.windows.1
Is there any workaround for this issue? If downgrade of runner could help me?

So the problem was that I had a running process with a location in my repository. First, I kill it manually and the job started to work properly. Then I deleted this package at all from my solution and started to use the same file but from outside of the repository.
It was VBCSCompiler.exe file.
To try, you can first kill it manually from runner or by the cmd command:
tasklist | find /i "VBCSCompiler.exe" && taskkill /im VBCSCompiler.exe /F \|| echo process "VBCSCompiler.exe" not running.
Then I delete the nuget package Microsoft.Net.Compilers.Toolset, therefore this process path was changed to the
C:\Program Files (x86)\Microsoft Visual
Studio\2019\BuildTools\MSBuild\Current\Bin\Roslyn

Related

go application build with bazel can't link when running inside container

I am trying to containerize my application build, though, when running the build that uses bazel with bazel-gazelle inside a container I will get this error:
$ bazel run --spawn_strategy=local //:gazelle --verbose_failures
INFO: Analyzed target //:gazelle (0 packages loaded, 0 targets configured).
INFO: Found 1 target...
ERROR: /home/workstation/.cache/bazel/_bazel_workstation/fb227af4c7b6aa39cc5b15d7fd9b737a/external/go_sdk/BUILD.bazel:43:15: GoToolchainBinary external/go_sdk/builder [for host] failed: (Exit 1): go failed: error executing command
(cd /home/workstation/.cache/bazel/_bazel_workstation/fb227af4c7b6aa39cc5b15d7fd9b737a/execroot/__main__ && \
exec env - \
GOROOT_FINAL=GOROOT \
external/go_sdk/bin/go tool link -o bazel-out/host/bin/external/go_sdk/builder bazel-out/host/bin/external/go_sdk/builder.a)
# Configuration: e0f1106e28100863b4221c55fca6feb935acec078da5376e291cf644e275dae5
# Execution platform: #local_config_platform//:host
/opt/go/pkg/tool/linux_amd64/link: mapping output file failed: invalid argument
Target //:gazelle failed to build
INFO: Elapsed time: 2.302s, Critical Path: 0.35s
INFO: 2 processes: 2 internal.
FAILED: Build did NOT complete successfully
FAILED: Build did NOT complete successfully
I tried to run it standalone:
$ /home/workstation/.cache/bazel/_bazel_workstation/fb227af4c7b6aa39cc5b15d7fd9b737a/external/go_sdk/bin/go tool link -o bazel-out/host/bin/external/go_sdk/builder bazel-out/host/bin/external/go_sdk/builder.a
/opt/go/pkg/tool/linux_amd64/link: mapping output file failed: invalid argument
and still got no success.
Never had this kind of link problem and the linker don't provide much more information. Tried to install all packages I could think of and still no luck.
For context:
Running Ubuntu 20.04 LTS
Docker 20.10.9
Bazel 4.2.2
Rules GO v0.31.0
Bazel Gazelle v0.25.0
Also tried to run it with the strace, though I don't think I am skilled enough to find meaningful information from the tool output.
#edit
For more context:
e$ /home/workstation/.cache/bazel/_bazel_workstation/fb227af4c7b6aa39cc5b15d7fd9b737a/external/go_sdk/bin/go tool link -v -o bazel-out/host/bin/external/go_sdk/builder bazel-out/host/bin/external/go_sdk/builder.a
HEADER = -H5 -T0x401000 -R0x1000
searching for runtime.a in /opt/go/pkg/linux_amd64/runtime.a
/opt/go/pkg/tool/linux_amd64/link: mapping output file failed: invalid argument

Getting error while bootstrapping opensearch dashboard

I am setting up opensearch dashboard in my windows PC and following below guide -
https://github.com/opensearch-project/OpenSearch-Dashboards/blob/main/DEVELOPER_GUIDE.md
While bootstrapping, I am getting below error -
PS D:\opensearch\OpenSearch-Dashboards> yarn osd bootstrap
yarn run v1.22.18
$ node scripts/osd bootstrap
info [opensearch-dashboards] running yarn
$ node ./preinstall_check
[1/5] Validating package.json...
[2/5] Resolving packages...
warning Resolution field "typescript#4.0.2" is incompatible with requested version "typescript#~4.5.2"
success Already up-to-date.
succ yarn.lock analysis completed without any issues
succ 10 bootstrap builds are cached
info [#osd/i18n] running [osd:bootstrap] script
info [#osd/monaco] running [osd:bootstrap] script
info [#osd/opensearch-archiver] running [osd:bootstrap] script
info [#osd/opensearch] running [osd:bootstrap] script
ERROR [bootstrap] failed:
ERROR Error: Command failed with exit code 1: C:\Users\st\AppData\Roaming\nvm\v14.18.2\node_modules\yarn\bin\yarn.js run osd:bootstrap
'rm' is not recognized as an internal or external command,
operable program or batch file.
error Command failed with exit code 1.
$ rm -rf target && tsc
info Visit https://yarnpkg.com/en/docs/cli/run for documentation about this command.
at makeError (D:\opensearch\OpenSearch-Dashboards\packages\osd-pm\dist\index.js:25150:11)
at handlePromise (D:\opensearch\OpenSearch-Dashboards\packages\osd-pm\dist\index.js:24085:26)
at processTicksAndRejections (internal/process/task_queues.js:95:5)
at async D:\opensearch\OpenSearch-Dashboards\packages\osd-pm\dist\index.js:9051:9
at async scheduleItem (D:\opensearch\OpenSearch-Dashboards\packages\osd-pm\dist\index.js:10938:9)
error Command failed with exit code 1.
info Visit https://yarnpkg.com/en/docs/cli/run for documentation about this command.
what I see here is, rm command is not recognized in windows and which is correct.
So how to fix this ?

GitLab CI Error: Uploading artifacts to coordinator - failed - responseStatus 400 Bad Request

I'm working with GitLab (free edition) pipelines and started receiving the error below on a pipeline that was working.
This is a minimal example from my .gitlab-ci.yml that reproduce the error (Although I don't think it is related to my code):
default:
image: node:10-alpine
stages:
- build
build:
stage: build
script:
- npm install
artifacts:
paths:
- node_modules/
only:
- Staging
.
.
.
Error's log:
64 packages are looking for funding
run `npm fund` for details
Running after_script
Saving cache
Uploading artifacts for successful job
Uploading artifacts...
node_modules/: found 62788 matching files
WARNING: Uploading artifacts to coordinator... failed id=512111 responseStatus=400 Bad Request status=400 Bad Request token=4Dwaaa
WARNING: Retrying... context=artifacts-uploader error=invalid argument
WARNING: Uploading artifacts to coordinator... failed id=512111 responseStatus=400 Bad Request status=400 Bad Request token=4Dwaaa
WARNING: Retrying... context=artifacts-uploader error=invalid argument
WARNING: Uploading artifacts to coordinator... failed id=512111 responseStatus=400 Bad Request status=400 Bad Request token=4Dwaaa
FATAL: invalid argument
ERROR: Job failed: exit code 1
Found this thread in Stackoverfow but it is related to different status error.
There are multiple threads (1 , 2 , 3 ) on this issue on Gitlab forum but it is hard to understand the cause of the problem and how to resolve it.
Any help will be highly appriciated.

GitLab Runner Unable to clone repository

I have registred gitlab runner to the gitlab instance. My registered URL is as follows: http://azurestackgitlab1.southeastasia.cloudapp.azure.com/ci
However while running the build for that project; build is getting failed and giving the below message:
Running with gitlab-ci-multi-runner 1.11.1 (a67a225)
on java test (96d320b3)
WARNING: image is not supported by selected executor and shell
Using Shell executor...
Running on AzureStackPOCVM...
Cloning repository...
Cloning into '/home/gitlab-runner/builds/96d320b3/0/root/demoproject'...
fatal: unable to access 'http://gitlab-ci-token:xxxxxx#gitlab-ce.hxakzvpf0otezeojz3wqhme5wg.cx.internal.cloudapp.net/root/demoproject.git/': Could not resolve host: gitlab-ce.hxakzvpf0otezeojz3wqhme5wg.cx.internal.cloudapp.net
ERROR: Job failed: exit status 1
snippet of config.toml:
[[runners]]
name = "java test"
url = "http://azurestackgitlab1.southeastasia.cloudapp.azure.com/ci"
token = "96d320b33d3c69d706dad7f90df84e"
executor = "shell"
[runners.cache]
How to overcome this problem?
You will get this URL mentioned in etc/gitlab/gitlab.rb file. If you will change "hxakzvpf0otezeojz3wqhme5wg.cx.internal.cloudapp.net"
with your "http://azurestackgitlab1.southeastasia.cloudapp.azure.com"
It should work!
For more information you can refer : http://azurestackgitlab1.southeastasia.cloudapp.azure.com/help/administration/environment_variables.md

Create a build job for sample cucumber ruby project

I am trying to create a build job for my cucumber test in mac. However its throwing error. Not sure what i am doing wrong. I can run my tests using this in Terminal:
bundle exec cucumber -t #tests
in Jenkins "Execute Batch commands" section i have added below:
bundle install
bundle exec cucumber -t #tests
I am getting this below errors in my Jenkins Console Output:
Started by user anonymous
Building in workspace /Users/MacPro/.jenkins/workspace/build_job_name
[tests_build] $ cmd /c call /var/folders/fx/m8ltp5dx17lbmqpgpwlc9ps00000gn/T/hudson6634803463309653425.bat
FATAL: command execution failed
java.io.IOException: Cannot run program "cmd" (in directory "/Users/MacPro/.jenkins/workspace/tests_build"): error=2, No such file or directory
at java.lang.ProcessBuilder.start(ProcessBuilder.java:1047)
at hudson.Proc$LocalProc.<init>(Proc.java:244)
at hudson.Proc$LocalProc.<init>(Proc.java:216)
at hudson.Launcher$LocalLauncher.launch(Launcher.java:815)
at hudson.Launcher$ProcStarter.start(Launcher.java:381)
at hudson.tasks.CommandInterpreter.perform(CommandInterpreter.java:95)
at hudson.tasks.CommandInterpreter.perform(CommandInterpreter.java:64)
at hudson.tasks.BuildStepMonitor$1.perform(BuildStepMonitor.java:20)
at hudson.model.AbstractBuild$AbstractBuildExecution.perform(AbstractBuild.java:782)
at hudson.model.Build$BuildExecution.build(Build.java:205)
at hudson.model.Build$BuildExecution.doRun(Build.java:162)
at hudson.model.AbstractBuild$AbstractBuildExecution.run(AbstractBuild.java:534)
at hudson.model.Run.execute(Run.java:1738)
at hudson.model.FreeStyleBuild.run(FreeStyleBuild.java:43)
at hudson.model.ResourceController.execute(ResourceController.java:98)
at hudson.model.Executor.run(Executor.java:410)
Caused by: java.io.IOException: error=2, No such file or directory
at java.lang.UNIXProcess.forkAndExec(Native Method)
at java.lang.UNIXProcess.<init>(UNIXProcess.java:184)
at java.lang.ProcessImpl.start(ProcessImpl.java:130)
at java.lang.ProcessBuilder.start(ProcessBuilder.java:1028)
... 15 more
Build step 'Execute Windows batch command' marked build as failure
An attempt to send an e-mail to empty list of recipients, ignored.
Finished: FAILURE
Need help to resolve this.

Resources