ERROR: /home/builder/gerrit-3.2.14/lib/bouncycastle/BUILD:3:13: //lib/bouncycastle:bcprov depends on #bcprov//jar:jar in repository #bcprov which failed to fetch. no such package '#bcprov//jar': failed [/usr/bin/python3, /home/builder/gerrit-3.2.14/tools/download_file.py, "-o", /home/builder/.cache/bazel/_bazel_builder/9afd9023b67c60c8c3f995a3b1c75370/external/bcprov/jar/bcprov-jdk15on-1.61.jar, "-u", "MAVEN_CENTRAL:/org/bouncycastle/bcprov-jdk15on/1.61/bcprov-jdk15on-1.61.jar", "-v", "00df4b474e71be02c1349c3292d98886f888d1f7"]: https://repo1.maven.org/maven2/org/bouncycastle/bcprov-jdk15on/1.61/bcprov-jdk15on-1.61.jar:
expected 00df4b474e71be02c1349c3292d98886f888d1f7
received 8f13ba4527c222db2995b9cf052d88a4540890f9
Related
I need to build apache beam using gradle . ./gradlew build . However, I got the following error :
Execution failed for task ':website:buildDockerImage'. > A problem occurred starting process 'command 'docker''
java version : openjdk version "1.8.0_265"
gradle version : Gradle 5.4
By using --info , I got the following :
Caching disabled for task ':website:buildDockerImage' because:
Caching has not been enabled for the task
Task ':website:buildDockerImage' is not up-to-date because:
Task has not declared any outputs despite executing actions.
Starting process 'command 'docker''. Working directory: /home/namenode/beam/website Command: docker build -t beam-website .
:website:buildDockerImage (Thread[Daemon worker Thread 20,5,main]) completed. Took 0.018 secs.
Closing Git repo: /home/namenode/beam/.git
Closing Git repo: /home/namenode/beam/.git
FAILURE: Build failed with an exception.
* What went wrong:
Execution failed for task ':website:buildDockerImage'.
> A problem occurred starting process 'command 'docker''
while --stacktrace outputs :
* Exception is:
org.gradle.api.tasks.TaskExecutionException: Execution failed for task ':website:buildDockerImage'.
at org.gradle.api.internal.tasks.execution.ExecuteActionsTaskExecuter.lambda$executeIfValid$1(ExecuteActionsTaskExecuter.java:200)
at org.gradle.internal.Try$Failure.ifSuccessfulOrElse(Try.java:263)
at org.gradle.api.internal.tasks.execution.ExecuteActionsTaskExecuter.executeIfValid(ExecuteActionsTaskExecuter.java:198)
at org.gradle.process.internal.ExecHandleRunner.startProcess(ExecHandleRunner.java:98)
at org.gradle.process.internal.ExecHandleRunner.run(ExecHandleRunner.java:71)
... more
Caused by: java.io.IOException: Cannot run program "docker" (in directory "/home/namenode/beam/website"): error=2, No such file or directory
at net.rubygrapefruit.platform.internal.DefaultProcessLauncher.start(DefaultProcessLauncher.java:25)
... 7 more
Caused by: java.io.IOException: error=2, No such file or directory
... 8 more
BUILD FAILED in 1s
1 actionable task: 1 executed
[root#namenode beam]# ./gradlew build
Watching the file system is not supported on this operating system.
Configuration on demand is an incubating feature.
> Task :website:buildDockerImage FAILED
FAILURE: Build failed with an exception.
* What went wrong:
Execution failed for task ':website:buildDockerImage'.
> A problem occurred starting process 'command 'docker''
how can I proceed ?
I'm trying to test the build of google/or-tools using the Bazel based build system on various GNU/Linux distro by using various common distros
When trying to use bazel inside an Alpine:edge based Dockerfile (i.e. in a RUN cmd), at "docker build" time.
I don't have a consistency build between my Archlinux and on Github action workflow runners (ubuntu 18.04 IIRC).
Dockerfile: https://github.com/google/or-tools/blob/master/bazel/docker/alpine/Dockerfile
I run it using my Makefile target alpine_build in google/or-tools/bazel
ref: https://github.com/google/or-tools/blob/master/bazel/Makefile
From GH ubuntu-latest (18.04 LTS ?) runner, I got this trace
$ make alpine_build
...
Step 11/11 : RUN bazel build --curses=no --copt='-Wno-sign-compare' //...:all
---> Running in 9a2f9b6f24c7
Extracting Bazel installation...
Starting local Bazel server and connecting to it...
Loading:
Loading: 0 packages loaded
Loading: 0 packages loaded
Loading: 0 packages loaded
DEBUG: Rule 'com_google_protobuf' indicated that a canonical reproducible form can be obtained by modifying arguments commit = "fe1790ca0df67173702f70d5646b82f48f412b99", shallow_since = "1576187991 -0800"
DEBUG: Call stack for the definition of repository 'com_google_protobuf' which is a git_repository (rule definition at /root/.cache/bazel/_bazel_root/86fee77ec27da0053940f3f327a6fd59/external/bazel_tools/tools/build_defs/repo/git.bzl:195:18):
- /home/lib/WORKSPACE:22:1
Loading: 2 packages loaded
Analyzing: 301 targets (16 packages loaded, 0 targets configured)
Analyzing: 301 targets (25 packages loaded, 43 targets configured)
Analyzing: 301 targets (26 packages loaded, 43 targets configured)
...
ref: https://github.com/google/or-tools/runs/568849544?check_suite_focus=true
So everything seems fine up to this point (still need to figure out the jdk javac issue but it's an other topic)
On the contrary on my Archlinux, I've got:
$ make alpine_build
...
Step 11/11 : RUN bazel build --curses=no --copt='-Wno-sign-compare' //...:all
---> Running in e13ca9fd3e84
Extracting Bazel installation...
Starting local Bazel server and connecting to it...
Loading:
Loading: 0 packages loaded
Loading: 0 packages loaded
Loading: 0 packages loaded
INFO: Call stack for the definition of repository 'com_google_protobuf' which is a git_repository (rule definition at /root/.cache/bazel/_bazel_root/86fee77ec27da0053940f3f327a6fd59/external/bazel_tools/tools/build_defs/repo/git.bzl:195:18):
- /home/lib/WORKSPACE:22:1
ERROR: An error occurred during the fetch of repository 'com_google_protobuf':
java.io.IOException: unlinkat(/root/.cache/bazel/_bazel_root/86fee77ec27da0053940f3f327a6fd59/external/com_google_protobuf/.git/logs/refs/remotes/origin) (Directory not empty)
ERROR: no such package '#com_google_protobuf//': java.io.IOException: unlinkat(/root/.cache/bazel/_bazel_root/86fee77ec27da0053940f3f327a6fd59/external/com_google_protobuf/.git/logs/refs/remotes/origin) (Directory not empty)
ERROR: no such package '#com_google_protobuf//': java.io.IOException: unlinkat(/root/.cache/bazel/_bazel_root/86fee77ec27da0053940f3f327a6fd59/external/com_google_protobuf/.git/logs/refs/remotes/origin) (Directory not empty)
INFO: Elapsed time: 29.713s
INFO: 0 processes.
FAILED: Build did NOT complete successfully (0 packages loaded)
FAILED: Build did NOT complete successfully (0 packages loaded)
The command '/bin/sh -c bazel build --curses=no --copt='-Wno-sign-compare' //...:all' returned a non-zero code: 1
make: *** [Makefile:121: alpine_build] Error 1
I've tried to look at the file /root/.cache/bazel/_bazel_root/86fee77ec27da0053940f3f327a6fd59/external/com_google_protobuf/.git/logs/refs/remotes/origin
using the previous step (alpine_devel) container:
$ make sh_alpine_devel
/home/lib # bazel build --curses=no --copt='-Wno-sign-compare' //...:all
Extracting Bazel installation...
Starting local Bazel server and connecting to it...
Loading:
Loading: 0 packages loaded
Loading: 0 packages loaded
Loading: 0 packages loaded
INFO: Call stack for the definition of repository 'com_google_protobuf' which is a git_repository (rule definition at /root/.cache/bazel/_bazel_root/86fee77ec27da0053940f3f327a6fd59/external/bazel_tools/tools/build_defs/repo/git.bzl:195:18):
- /home/lib/WORKSPACE:22:1
ERROR: An error occurred during the fetch of repository 'com_google_protobuf':
java.io.IOException: unlinkat(/root/.cache/bazel/_bazel_root/86fee77ec27da0053940f3f327a6fd59/external/com_google_protobuf/.git/logs/refs/remotes/origin) (Directory not empty)
ERROR: no such package '#com_google_protobuf//': java.io.IOException: unlinkat(/root/.cache/bazel/_bazel_root/86fee77ec27da0053940f3f327a6fd59/external/com_google_protobuf/.git/logs/refs/remotes/origin) (Directory not empty)
ERROR: no such package '#com_google_protobuf//': java.io.IOException: unlinkat(/root/.cache/bazel/_bazel_root/86fee77ec27da0053940f3f327a6fd59/external/com_google_protobuf/.git/logs/refs/remotes/origin) (Directory not empty)
INFO: Elapsed time: 29.924s
INFO: 0 processes.
FAILED: Build did NOT complete successfully (0 packages loaded)
FAILED: Build did NOT complete successfully (0 packages loaded)
cat /root/.cache/bazel/_bazel_root/86fee77ec27da0053940f3f327a6fd59/external/com_google_protobuf/.git/logs/
refs/remotes/origin/revert-6272-MutableSequence-import
0000000000000000000000000000000000000000 c5fedd61a48a174054f98684d5ddbc2d11530367 root <root#Flex2.home> 1586336706 +0000 fetch origin refs/heads/*:refs/remotes/origin/* refs/tags/*:refs/tags/*: storing head
note Flex2 is my local machine...
So my questions:
Is it a known issue (ed don't find anything on java.io.IOException: unlinkat) ?
Does Bazel deal with the kernel (or uname -a etc...) which could explain why I don't have the same behaviour from one host to an other ?
May I have more trace to debug this issue ?
How can I fix it ?
Thanks,
Basically you need to tell to bazel to use the java locally installed by alpine than downloading one.
this can be done using the option --host_javabase=#local_jdk//:jdk
ref: https://github.com/google/or-tools/blob/2cb85b4eead4c38e1c54b48044f92087cf165bce/bazel/docker/alpine/Dockerfile#L26
Minimal working example:
https://github.com/Mizux/bazel-cpp/blob/main/ci/docker/alpine/Dockerfile
I'm attempting to build a release on Jenkins 2.150.1 and I'm encountering an error with yarn install:
Invariant Violation: should have a resolved reference
The install works fine on my local machine with the same configuration.
Does anybody know how I might resolve this?
verbose 0.446 Checking for configuration file "/usr/.yarnrc".
verbose 0.45 current time: 2019-06-05T03:51:11.266Z
[1/4] Resolving packages...
verbose 1.179 Performing "GET" request to
"https://registry.yarnpkg.com/ember-cli-babel".
verbose 1.286 Request "https://registry.yarnpkg.com/ember-cli-babel"
finished with status code 200.
warning Resolution field "ember-cli-babel#6.12.0" is incompatible with
requested version "ember-cli-babel#^5.1.6"
warning Resolution field "ember-cli-babel#6.12.0" is incompatible with
requested version "ember-cli-babel#^5.1.6"
warning Resolution field "ember-cli-babel#6.12.0" is incompatible with
requested version "ember-cli-babel#^5.1.6"
warning Resolution field "ember-cli-babel#6.12.0" is incompatible with
requested version "ember-cli-babel#^5.1.6"
verbose 1.435 Invariant Violation: should have a resolved reference
at invariant (/opt/yarn/lib/cli.js:1296:15)
at PackageRequest.resolveToExistingVersion (/opt/yarn/lib/cli.js:34819:51)
at PackageResolver.resolvePackagesWithExistingVersions (/opt/yarn/lib/cli.js:60937:11)
at /opt/yarn/lib/cli.js:60869:14
at Generator.next (<anonymous>)
at step (/opt/yarn/lib/cli.js:92:30)
at /opt/yarn/lib/cli.js:103:13
at <anonymous>
at process._tickCallback (internal/process/next_tick.js:188:7)
error An unexpected error occurred: "should have a resolved
reference".
info If you think this is a bug, please open a bug report with the
information provided in "/usr/src/app/yarn-error.log".
info Visit https://yarnpkg.com/en/docs/cli/install for documentation
about this command.
time="2019-06-05T03:51:12Z" level=fatal msg="build failed: building
[myapp-client]: build artifact: running build: The command '/bin/sh
c yarn --ignore-engines install --verbose' returned a non-zero code: 1"
script returned exit code 1
Relevant Dockerfile:
FROM node:8.9.4-stretch as builder
WORKDIR /usr/src/app
COPY package.json .
COPY .npmrc .
COPY yarn.lock .
COPY .bowerrc .
COPY bower.json .
RUN yarn cache clean
RUN yarn --ignore-engines install --verbose
COPY . .
RUN yarn run build:production
Discovered this was due to the CI server's yarn version.
Downgraded to version 1.3.2 locally and was able to replicate the issue.
Upgraded to yarn 1.16 and the issue disappears.
Solution: upgrade yarn:
sh "curl --compressed -o- -L https://yarnpkg.com/install.sh | sh"
As I'm trying to run a sample jenkins project from my machine. However, I it won't build my project locally.
I outline the set up in this jing video
What did I do wrong?
What specific steps should I use to fix it.
Error message from jenkins
Started by user Jacqueline George
Building in workspace /Users/jacquelinegeorge/.jenkins/$(JENKINS_HOME)/LocatorTraining
[LocatorTraining] $ cmd /c call /var/folders/2s/d8lh31wd3_7dx65htqzvpcv80000gn/T/jenkins6260102670441278278.bat
FATAL: command execution failed
java.io.IOException: error=2, No such file or directory
at java.lang.UNIXProcess.forkAndExec(Native Method)
at java.lang.UNIXProcess.<init>(UNIXProcess.java:248)
at java.lang.ProcessImpl.start(ProcessImpl.java:134)
at java.lang.ProcessBuilder.start(ProcessBuilder.java:1029)
Caused: java.io.IOException: Cannot run program "cmd" (in directory "/Users/jacquelinegeorge/.jenkins/$(JENKINS_HOME)/LocatorTraining"): error=2, No such file or directory
at java.lang.ProcessBuilder.start(ProcessBuilder.java:1048)
at hudson.Proc$LocalProc.<init>(Proc.java:249)
at hudson.Proc$LocalProc.<init>(Proc.java:218)
at hudson.Launcher$LocalLauncher.launch(Launcher.java:935)
at hudson.Launcher$ProcStarter.start(Launcher.java:454)
at hudson.tasks.CommandInterpreter.perform(CommandInterpreter.java:109)
at hudson.tasks.CommandInterpreter.perform(CommandInterpreter.java:66)
at hudson.tasks.BuildStepMonitor$1.perform(BuildStepMonitor.java:20)
at hudson.model.AbstractBuild$AbstractBuildExecution.perform(AbstractBuild.java:744)
at hudson.model.Build$BuildExecution.build(Build.java:206)
at hudson.model.Build$BuildExecution.doRun(Build.java:163)
at hudson.model.AbstractBuild$AbstractBuildExecution.run(AbstractBuild.java:504)
at hudson.model.Run.execute(Run.java:1819)
at hudson.model.FreeStyleBuild.run(FreeStyleBuild.java:43)
at hudson.model.ResourceController.execute(ResourceController.java:97)
at hudson.model.Executor.run(Executor.java:429)
Build step 'Execute Windows batch command' marked build as failure
Finished: FAILURE
Build configuration
How I am executing the build
Code after using npm run protractor in shell
Started by user Jacqueline George
Building in workspace /Users/jacquelinegeorge/.jenkins/$(JENKINS_HOME)/LocatorTraining
[LocatorTraining] $ /bin/sh -xe /var/folders/2s/d8lh31wd3_7dx65htqzvpcv80000gn/T/jenkins563599888073808645.sh
+ npm run protractor
npm ERR! path /Users/jacquelinegeorge/.jenkins/$(JENKINS_HOME)/LocatorTraining/package.json
npm ERR! code ENOENT
npm ERR! errno -2
npm ERR! syscall open
npm ERR! enoent ENOENT: no such file or directory, open '/Users/jacquelinegeorge/.jenkins/$(JENKINS_HOME)/LocatorTraining/package.json'
npm ERR! enoent This is related to npm not being able to find a file.
npm ERR! enoent
npm ERR! A complete log of this run can be found in:
npm ERR! /Users/jacquelinegeorge/.npm/_logs/2018-11-13T10_38_04_562Z-debug.log
Build step 'Execute shell' marked build as failure
Finished: FAILURE
I made a modification to the build. I selected 'shell' (as I'm a mac user) not windows batch (as my tutor instructed). I also removed customer workspace from my configuration
Added the following command in 'build'
/Users/JacquelineGeorge/Documents/Jenkins/LocatorTraining&&npm run
protractor
It still failed but this message was at least different.
I also tried this with and without ${JENKINS_HOME} under
General>Advanced>use custom workspace
Building in workspace /Users/jacquelinegeorge/.jenkins/workspace/Protractor
[Protractor] $ /bin/sh -xe /var/folders/2s/d8lh31wd3_7dx65htqzvpcv80000gn/T/jenkins8556486662152409824.sh
+ /Users/jacquelinegeorge/Documents/Jenkins/LocatorTraining
/var/folders/2s/d8lh31wd3_7dx65htqzvpcv80000gn/T/jenkins8556486662152409824.sh: line 2: /Users/jacquelinegeorge/Documents/Jenkins/LocatorTraining: is a directory
Build step 'Execute shell' marked build as failure
Finished: FAILURE
The failure is due to you choose build step of Execute window batch command. But your Jenkins slave machine (where your test script resides) is a linux.
You should choose Execute shell for that build step.
Ok, I'm going to to do a summary of this conversation.
From your project page select configure
Scroll down to build
Under build select shell
enter cd /Users/YourUserNameHere/YourProjectWorkSpace/ProjectFolder/FileName&&npm run protractor
Save
When you click build now. Your project should now build locally from your machine.
I am trying to run a Phoenix server on Windows.
On running mix deps.get the following result is given
`Running dependency resolution
* Getting cmark (Hex package)
Checking package (https://repo.hex.pm/tarballs/cmark-0.6.10.tar)
Using locally cached package`
Then when running mix ecto.create the following error is given
`C:\Users\alex\Documents\Alex Docs\Datamo\githubrepo\datamo>mix ecto.create
===> Compiling idna
==> cmark
could not compile dependency :cmark, "mix compile" failed. You can recompile
this dependency with "mix deps.compile cmark", update it with
"mix deps.update cmark" or clean it with "mix deps.clean cmark"
** (ErlangError) erlang error: :enoent
(elixir) lib/system.ex:544: System.cmd("make", [], [stderr_to_stdout: true])
mix.exs:85: Mix.Tasks.Compile.Cmark.run/1
(mix) lib/mix/task.ex:296: Mix.Task.run_task/3
(elixir) lib/enum.ex:1184: Enum."-map/2-lists^map/1-0-"/2
(mix) lib/mix/tasks/compile.all.ex:19: anonymous fn/1 in
Mix.Tasks.Compile.All.run/1
(mix) lib/mix/tasks/compile.all.ex:37:
Mix.Tasks.Compile.All.with_logger_app/1
(mix) lib/mix/task.ex:296: Mix.Task.run_task/3
(mix) lib/mix/tasks/compile.ex:84: Mix.Tasks.Compile.run/1`
Attempting to run mix deps.compile cmark creates an error
`** (Mix) Cannot compile dependency :cmark because it isn't available, run "mix deps.get" first`
But that was already run in the first stage with the error shown above. It seems to be stuck in a loop.
Is this because it's unable to unpack the tar file on windows?