Jenkins: Maven release plugin giving "undefined symbol: apr_crypto_block_cleanup" when trying to dry run using SVN - jenkins

We're using Jenkins 2.138.1 on Amazon Linux. We're trying to use the Maven Release plugin to build from our SVN repository. Although we can build snapshots fine, when we attempt to do a dry run of the Maven release plugin using the goals
-Dresume=false -DdryRun=true release:prepare
we run into this error
Waiting for Jenkins to finish collecting data[ERROR] Failed to execute goal org.apache.maven.plugins:maven-release-plugin:2.5.3:prepare (default-cli) on project springboard: Unable to check for local modifications
[ERROR] Provider message:
[ERROR] The svn command failed.
[ERROR] Command output:
[ERROR] svn: /opt/bitnami/common/lib/libsasl2.so.2: no version information available (required by /usr/lib/x86_64-linux-gnu/libsvn_ra_svn-1.so.1)
[ERROR] svn: /opt/bitnami/common/lib/libssl.so.1.0.0: no version information available (required by /usr/lib/x86_64-linux-gnu/libserf-1.so.1)
[ERROR] svn: /opt/bitnami/common/lib/libcrypto.so.1.0.0: no version information available (required by /usr/lib/x86_64-linux-gnu/libserf-1.so.1)
[ERROR] svn: symbol lookup error: /usr/lib/x86_64-linux-gnu/libsvn_subr-1.so.1: undefined symbol: apr_crypto_block_cleanup
[ERROR] -> [Help 1]
org.apache.maven.lifecycle.LifecycleExecutionException: Failed to execute goal org.apache.maven.plugins:maven-release-plugin:2.5.3:prepare (default-cli) on project springboard: Unable to check for local modifications
Provider message:
The svn command failed.
Command output:
svn: /opt/bitnami/common/lib/libsasl2.so.2: no version information available (required by /usr/lib/x86_64-linux-gnu/libsvn_ra_svn-1.so.1)
svn: /opt/bitnami/common/lib/libssl.so.1.0.0: no version information available (required by /usr/lib/x86_64-linux-gnu/libserf-1.so.1)
svn: /opt/bitnami/common/lib/libcrypto.so.1.0.0: no version information available (required by /usr/lib/x86_64-linux-gnu/libserf-1.so.1)
svn: symbol lookup error: /usr/lib/x86_64-linux-gnu/libsvn_subr-1.so.1: undefined symbol: apr_crypto_block_cleanup
Prior to this, we got "[ERROR] /bin/sh: 1: svn: not found" so we installed svn on the Linux machine using yum. Anyway, what can we do to overcome the problem above?

So the issue is because you have multiple version of the same library, specifically the following
libsasl2.so.2
libssl.so.1.0.0
libcrypto.so.1.0.0
Do a locate libxml2.so.2 to confirm and remove the old versions and create a symbolic link using ln -s
Repeat for the others.
https://github.com/sitespeedio/sitespeed.io/issues/220
Talks about a similar issue
Hope it helps :)

You seem to have issue between 32bits and 64bits packages mixing.
The first libraries in messages are about 32 bits, and information about SVN are about 64 bits (x86_64).
First, you should check your architecture, either with:
uname -r
or, if available with:
arch
You may get something like:
i686
Then you can install the good version of subversion corresponding to your OS.
Using apt-get like specified in one of your comment (adapt architecture):
sudo apt-get install subversion:i686
Or using yum, like specified in your original question (adapt architecture):
sudo yum install subversion.i686
Let me know if you need further help.

Related

Create a Bazel archives tar for an airgapped environment

I created a Bazel archive tar using the steps provides in the Bazel docs. Most of the packages are being loaded locally except for this one. Please see error below.
C:\Developers\examples-master\java-tutorial>bazel build --distdir=C:\Developers\bazel-tar //:ProjectRunner Starting local Bazel server and connecting to it... INFO: Repository remotejdk11_win instantiated at: no stack (--record_rule_instantiation_callstack not enabled) Repository rule http_archive defined at: C:/users/syuopm/_bazel_syuopm/v5bxa2ms/external/bazel_tools/tools/build_defs/repo/http.bzl:336:31: in WARNING: Download from https://mirror.bazel.build/openjdk/azul-zulu11.37.17-ca-jdk11.0.6/zulu11.37.17-ca-jdk11.0.6-win_x64.zip failed: class java.io.IOException connect timed out ERROR: An error occurred during the fetch of repository 'remotejdk11_win': java.io.IOException: Error downloading [https://mirror.bazel.build/openjdk/azul-zulu11.37.17-ca-jdk11.0.6/zulu11.37.17-ca-jdk11.0.6-win_x64.zip] to C:/users/syuopm/_bazel_syuopm/v5bxa2ms/external/remotejdk11_win/zulu11.37.17-ca-jdk11.0.6-win_x64.zip: connect timed out INFO: Repository remote_java_tools_windows instantiated at: no stack (--record_rule_instantiation_callstack not enabled) Repository rule http_archive defined at: C:/users/syuopm/_bazel_syuopm/v5bxa2ms/external/bazel_tools/tools/build_defs/repo/http.bzl:336:31: in ERROR: C:/users/syuopm/_bazel_syuopm/v5bxa2ms/external/bazel_tools/tools/jdk/BUILD:492:6: #bazel_tools//tools/jdk:remote_jdk11 depends on #remotejdk11_win//:jdk in repository #remotejdk11_win which failed to fetch. no such package '#remotejdk11_win//': java.io.IOException: Error downloading [https://mirror.bazel.build/openjdk/azul-zulu11.37.17-ca-jdk11.0.6/zulu11.37.17-ca-jdk11.0.6-win_x64.zip] to C:/users/syuopm/_bazel_syuopm/v5bxa2ms/external/remotejdk11_win/zulu11.37.17-ca-jdk11.0.6-win_x64.zip: connect timed out ERROR: Analysis of target '//:ProjectRunner' failed; build aborted: Analysis failed INFO: Elapsed time: 68.089s INFO: 0 processes. FAILED: Build did NOT complete successfully (16 packages loaded, 305 targets configured)
It seems to be a network issue most likely due to some firewall or proxy server sitting between your computer and the Bazel repo. The following download failed:
Download from https://mirror.bazel.build/openjdk/azul-zulu11.37.17-ca-jdk11.0.6/zulu11.37.17-ca-jdk11.0.6-win_x64.zip failed
I suggest you download the file manually and follow the guidance here:
A work around is to fetch the files manually and put them in a directory specified via the --distdir option.
Those are mirror artifacts which are updated by the bazel team here. I think the archive URL which you mentioned above is mirrored and updated with latest files. If you see such observations may be you can raise the issues in that specific templates.

Newer version Artifactory is having problems with Jenkins Artifactory plugin

I have two Artifactory servers, one is a version 3.4.1 and the other is 6.0.2
The Jenkins is configured to push to two Artifactories with different Ids as shown below
The old Artifactory is working fine and Jenkins is able to connect to it but, the new Artifactory is throwing an exception and is not able to connect to it.
Here is an excerpt from the log:
[INFO] ------------------------------------------------------------------------
[ERROR] Failed to execute goal on project JavaApplications: Could not resolve dependencies for project JavaApplications:JavaApplications:jar:1.0.0: Failed to collect dependencies at net.sf.jt400:jt400-full:jar:5.4: Failed to read artifact descriptor for net.sf.jt400:jt400-full:jar:5.4: Could not transfer artifact net.sf.jt400:jt400-full:pom:5.4 from/to central (http://artifactory/artifactory/libs-release): sun.security.validator.ValidatorException: PKIX path building failed: sun.security.provider.certpath.SunCertPathBuilderException: unable to find valid certification path to requested target -> [Help 1]
[ERROR]
[ERROR] To see the full stack trace of the errors, re-run Maven with the -e switch.
[ERROR] Re-run Maven using the -X switch to enable full debug logging.
[ERROR]
Clearly, something to do with the certificates? please help
You need to add Jenkis *.crt file into cacerts. There is simple guild on Artifactory page.

maven clean install Failed to execute goal org.apache.maven.plugins

From Eclipse mars version, pom.xml - Run As - maven clean and i got the following error message with Build Failure.
[ERROR] Failed to execute goal org.apache.maven.plugins:maven-clean-plugin:2.5:clean (default-clean) on project testing-framework:
Execution default-clean of goal org.apache.maven.plugins:maven-clean-plugin:2.5:clean failed: Plugin org.apache.maven.plugins:maven-clean-plugin:2.5 or one of its dependencies could not be resolved:
Failed to collect dependencies at org.apache.maven.plugins:maven-clean-plugin:jar:2.5 -> org.apache.maven:maven-plugin-api:jar:2.0.6:
Failed to read artifact descriptor for org.apache.maven:maven-plugin-api:jar:2.0.6:
Could not transfer artifact org.apache.maven:maven-plugin-api:pom:2.0.6 from/to central (https://repo.maven.apache.org/maven2): repo.maven.apache.org: Unknown host repo.maven.apache.org -> [Help 1]
I had the same problem. I solved it by killing java.exe process in Task Manager and re-excuting maven clean install.
Unknown host repo.maven.apache.org
sounds like a networking issue. Maybe check wether you need to supply proxy information within your settings.xml. Here's the documentation on how to supply one.
Alternativly, Eclipse might expose its own proxy settings to its Maven integration, but I'm not sure about that, I only use Maven from console. Still, its worth the check and maybe the config.

Jenkins2 installer in macOS change home directory

I am new to Jenkins, and I have the following problem
just installed Jenkins2 on MacOS Sierra (10.12.6)
and a new user has been created under /Users/Shared/Jenkins/,
but when I try to run a maven compile command, through a new Job
I have the following error:
[atmosphere] $ mvn -f spring-boot-samples/spring-boot-sample-atmosphere/pom.xml compile
FATAL: command execution failed
java.io.IOException: error=2, No such file or directory
I try to run the command manually and got the following:
Caused by: org.apache.maven.shared.filtering.MavenFilteringException:
Cannot create resource output directory:
/Users/Shared/Jenkins/Home/workspace/atmosphere/spring-boot-samples/spring-boot-sample-atmosphere/target/classes
How could I solve this ?
I guess I have to change the workspace permissions, but I don't know how to do that.
Please help !
It was really a newbie mistake.
I didn't have installed the maven plugin.
This post helped me to solve the problem.

Jenkins and CMake: permission errors

I installed Jenkins, I'm new to it. Made a user, installed the CMake plugin. I'm trying to compile a simple project just to get started but I cannot even do that.
After complaining of not being able to open some files (like build/CMakeFiles/CMakeOutput.log), at the end of the output it says:
-- Configuring incomplete, errors occurred!
CMake Error: Cannot open file for write: /home/username/development/csa/build/CMakeCache.txt.tmp
CMake Error: : System Error: Permission denied
CMake Error: Unable to open cache file for save. /home/username/development/csa/build/CMakeCache.txt
CMake Error: : System Error: Permission denied
Build step 'CMake Build' marked build as failure
Finished: FAILURE
To me this is clearly a permissions issue. The build directory is empty, it has not done anything. I created a user, started jenkins and either of the following had no effect on the output:
sudo /etc/init.d/jenkins start --user jenkins
sudo /etc/init.d/jenkins start --user username
sudo /etc/init.d/jenkins start
I'm not even trying to compile the code, just trying to build the cmake files... my configuration is like this: (as simple as possible)
I did add a working directory which is in my home folder so I do have permissions for it.
EDIT: I changed the ownership of the build folder to jenkins, created a user group called jenkinsusers, added myself and jenkins to the group, and gave the group read/write permissions. It appears to work now. But I'm not sure this is the standard way to do this...
So I'm not sure this is the right way but this is how I did it: I changed the owner of the directory to jenkins.
The workspace folder is under my home directory (~/myproject/build). That's probably the issue. The compiling gets done using catkin_make, a tool from ROS.

Resources