Jenkins error: "ERROR: Unable to install JDK unless a valid username/password is provided." - jenkins

I have added a new slave to my jenkins server, the connection itself seemed to go successfully via ssh, however when I try to build on that server the Job tries to download Java on the slave(even though java is all-ready installed on that server) and im getting the following Error:
Downloading JDK from http://download.oracle.com/otn/java/jdk/8u121-b13/e9e7ea248e2c4826b92b3f075a80e441/jdk-8u121-linux-x64.tar.gz
Your Oracle account doesn't appear valid. Please specify a valid username/password
ERROR: Unable to install JDK unless a valid username/password is provided.
Finished: FAILURE
This is the output of java -version
openjdk version "1.8.0_131"
OpenJDK Runtime Environment (build 1.8.0_131-b12)
OpenJDK 64-Bit Server VM (build 25.131-b12, mixed mode)
what do I need to do here? reinstall java manually?

I was stuck with same error, banged my head for hours but no luck. But finallly the answer was jdk configuration on the master jenkins.
Writing this answer as i couldnt find much on this over internet.
Go to Manage Jenkins -> Global tool configuration
and check the configuration for JDK in JDK installation.
Uncheck the install automatically checkbox as this will be forcing jdk installations on every slave.
If you want this option enabled then you have to give oracle account credentials which to be used by the jenkins to download the jdk.
If you already have java installed on your slaves then you would be better to uncheck the checkbox.

You can set the default credentials for Oracle here:
http://<hostname>/descriptorByName/hudson.tools.JDKInstaller/enterCredential
hostname being your Jenkins URL.
Thanks

Tool Locations
The above two answers didn't work for me. But this did: at the bottom of your node configuration page, set one of your tools to be your JDK:
In fact, I needed to do the same thing with Maven.

Just set the JAVA_HOME in your Jenkins slave so it doesn't try to install another Java.

Related

TFS 2017 + Sonarqube

We have a on prem installation of TFS (TFS 2017) and I am attempting to integrate SonarQube analysis into our build steps. I have installed the SonarQube extension on the TFS server and added a service endpoint to point to a server where I have SonarQube Server installed and configured.
When I attempting to trigger a build, I am getting an error "No agents could be found with the following capabilities: msbuild, java, visualstudio". Does my build server need JRE to be installed to get the SonarQube build steps to work? SonarQube website says this:
**Installation
Make sure the .NET Framework v4.5.2+ is installed
Make sure the Java Runtime Environment 8 is installed
Install the extension from the marketplace**
Both the error message and the documentation told you the same thing: You need Java installed.
I will be the third source of confirmation: You need Java installed.
First, the official document is very clear here: Make sure the Java Runtime Environment 8 is installed
Besides, according to your prompting error message:
No agents could be found with the following capabilities: msbuild,
java, visualstudio
You are also lacking msbuild, visualstudio. Not only need Java installed, but also need Visual Studio installed on your build agent, then restart the build agent. Restarting the build agent will capture the added Capabilities. If this not work, reconfigure the build agent should do the trick.
The build agent will not detect the environment changes after you installed it. It will only detect during the installation. If you are using vNext build agent, also try to manually add some capabilities in Settings- Agent Queues- Agent Pool - Agent- Capabilities. After this trigger the build again.
Note: if you are running on TFS earlier than 2017 Update 2, you will need to download and manually install the latest 3.x version of the VSIX to install SonarQube Extension.

Configure the JDK in Jenkins

I have build in Jenkins, which uses the JDk 1.8. The JDK is of the type "install automatically - install from java.sun.com".
I would like to configure the keystore (add a cert) for this JDK.
Is it possible? Where is the JDK installed?
If you have admin access go to Manage Jenkins > System Information
You should find some useful information there.
In addition:
jdk and jre are installed to /usr/lib/jvm/ directory, where is the actual java installation folder
see Linux jdk/jre setup

Jenkins version doesn't match

I have jenkins installed on an Ubuntu VM.
In the web interface I can see the version is
2.32.3.
However, if I go to /home/bitnami/.jenkins/config.xml I see the version is 1.0 (there is this tag: <version>1.0</version>)
How can it be? am I looking in the wrong place?
Thanks
You may have two versions installed, one in your system and one in your user account.
Did you installed by apt-get or wget?
When you execute the app, you may be running the Jenkins installed in your system and you are looking in your user HOME directory
Try (whereis jenkins and which jenkins) and execute this jenkins in your terminal to see if the version match.

Jenkins find installed plugins

I am new to Jenkins. I have installed some plugins like maven, JDK parameter on my local jenkins server. After installing the same it doesn't appear in the "Configure system" page. I tried to restart my machine, to see if its required but it didn't help. Could someone guide on what are the steps to be followed to use the installed plug in in the configure system page.
Take a look at the official Jenkins wiki: https://wiki.jenkins-ci.org/display/JENKINS/Plugins
Make sure your Jenkins version supports the version of the plugins you want to install.

Jenkins not able to use SVN credentials or download new plugins/new versions

Can anyone suggest how to fix the two issues?
- Can't upgrade Jenkins and SVN plugin
- Can't connect to svn
I am setting up Jenkins on a Windows 64 bit machine. It's configured to run as a windows service.
We are running this on Windows 7 64 bit OS
Jenkins 1.482
I am able to do an SVN update/checkout from my user account on the machine.
When I attempt to set up a job on jenkins I get the following when trying to add svn credentials
FAILED: org.tmatesoft.svn.core.SVNErrorMessage: svn: OPTIONS /svn/client/trunk failed
More details are:
FAILED: org.tmatesoft.svn.core.SVNErrorMessage: svn: OPTIONS /svn/client/trunk failed
org.tmatesoft.svn.core.SVNException: svn: OPTIONS /svn/client/trunk failed
at org.tmatesoft.svn.core.internal.io.dav.http.HTTPConnection.request(HTTPConnection.java:298)
at org.tmatesoft.svn.core.internal.io.dav.http.HTTPConnection.request(HTTPConnection.java:283)
at org.tmatesoft.svn.core.internal.io.dav.http.HTTPConnection.request(HTTPConnection.java:271)
at ...
I stopped the service and ran Jenkins from command line and tried the same thing - with the same result.
I am able to connect to the svn server with a tortoise client and via firefox with the same credentials.
In researching the issue I saw a few posts about similar problems and the only one that seems to claim to fix it is rolling back to Jenkins svn plugin version.
I then tried to install the latest jenkins and Plugin for svn. The downloads failed. Aha, I thought - obviously a firewall issue. So I disable the firewall.
Still no good. I can't automatically download or get the new Jenkins or SVN plugin.
Try starting jenkins with this option:
-Dsvnkit.http.sslProtocols="SSLv3"
Or, if Jenkins is starting svn plugin in a separate JVM, try adding the line to wherever the svn plugin run configuration is.
It's a known problem with svnkit, which is used by Jenkins' svn plugin:
http://issues.tmatesoft.com/issue/SVNKIT-176
Also, this answer can be helpful with regards to upgrading your svn plugin.
To change your Windows service commandline:
open a command line window cmd.exe
sc qc "JenkinsSlave" (if that's what your service name is)
select and copy the BINARY_PATH_NAME value
change it, adding -Dsvnkit.http.sslProtocols=""SSLv3"" after the jar path - mind the double quote
sc config "JenkinsSlave" binPath= <paste the changed value copied earlier>
Replace JenkinsSlave with your service name.
Windows 7 x64 has some automatic firewall settings. You may need to open a firewall port to allow the connection.
You should be able to verify or eliminate this as a cause by trying to run your svn client outside Jenkins.
bit late topic, but did you try the following solution?
http://www.daangemist.nl/2014/03/03/jenkins-reports-sslv3-error-on-svn-update
that one worked out for me, in my case I wanted to use -Dsvnkit.http.sslProtocols="TLSv1"
What about running Jenkins service with your account?

Resources