Jenkins Plugin Manager downloads one fails the rest - windows

Jenkins 2.346.2
java.runtime.version 11+28
Plugin Manager Update Site URL: https://updates.jenkins.io/update-center.json
Since a couple of weeks ago, on Jenkins (running on windows), when trying to update the plug-ins, it always downloads the first one but fails the rest. If I restart Jenkins and try again, the first one that failed before downloads OK; the rest fail.
un.security.provider.certpath.SunCertPathBuilderException: unable to find valid certification path to requested target
at java.base/sun.security.provider.certpath.SunCertPathBuilder.build(SunCertPathBuilder.java:141)
at java.base/sun.security.provider.certpath.SunCertPathBuilder.engineBuild(SunCertPathBuilder.java:126)
at java.base/java.security.cert.CertPathBuilder.build(CertPathBuilder.java:297)
at java.base/sun.security.validator.PKIXValidator.doBuild(PKIXValidator.java:380)
From the picture below, JWT for Blue Ocean would download fine after I reboot, and the rest would fail... and so and so...

What is your jenkins version? what is your java version? what url is in Plugin Manager -> advanced -> update site?

Welp, updating Java did the trick... I switched to Amazon Corretto 11.

Related

Why is Artifactory returning a 403 for all users when called from gradle artifactory plugin?

Relevant setup information: gradle 4+, relatively new installation of Artifactory (Pro 6+), artifactory gradle plugin version 4+
When attempting to run the build command on a local development environment in both Eclipse Photon and IntelliJ (late 2017 version), I run into dozens and dozens of 403 errors when making a HEAD request for dependencies. But, if I login to Artifactory through a web browser as the user that gradle is using and go to the exact same URL, it has no problem reaching the resource that gradle failed to reach. The problem occurs with every user on Artifactory, even one with admin privileges. The jars I'm looking for are part of a virtual repository with dependencies both internal to the artifactory installation and external. Finally, the build used to work just fine a month ago, and nothing I can think of has changed to permissions.
tl;dr only when logging in from gradle and using Artifactory plugin, a virtual Artifactory repo returns 403 errors on nearly every dependency for every user
This question: Docker pull from artifactory fails with credentials issue seemed close, but is using docker+jenkins (I'm not) and has no answers.
When I finally dug into the system logs, I found many lines like this one: "Rejected artifact download request: User XYZ is not permitted to deploy 'SOME JAR' into 'SOME CACHE JAR'"
It appears that users must have DEPLOY permissions in order to download an artifact that will be cached (behavior of virtuals/remotes.) This may also explain why the build used to work - the cached jars wouldn't have needed updates a month ago when I'd just added the remote and downloaded everything.
Adding deploy permissions to my user for the relevant repositories fixed the issue.

How to pull artifact version in udeploy from a custom url

I am very new to udeploy and looking for a feature to pull latest version of artifacts from one of our build tool using simple http download from a given url.
I can see that "Source Configuration Type" has many option available like filesystem, teamcity, git repo etc, but no option is available for a simple url download.
I am actually using teamcity build and teamcity provides GET API to download artifacts, I understand that uDeoploy is also using this teamcity feature but the url it is constructing is not correct and throwing 401 exception (unauthorized) when not auth information is not provided, it should be using teamcity guest access to download the artifacts.
Please Note: when login information is provided it is working fine
any thoughts.
You can adjust the guest account privileges inside the Administration Panel, then inside the Users management, there is a link to setuo the guest account privileges.

Maven build uses an HTTP proxy.. that I haven't configured

I was able to build Maven projects from command line with no issue for as long as I can remember.. But this morning, I am getting some error like it's trying to use the company HTTP proxy to fetch dependencies and it requires authentication.
We have internal Nexus repositories, so I reallyt don't get why all of a sudden, it tries to go outside.
I checked my M2_HOM/conf/settings.xml, and no proxy is defined there. I checked my env variables, and I don't see anything declaring a proxy either.
Where can it possibly get configured then ?
Thanks
OK, after couple of hours of struggle, I found the problem.
2 weeks back, I needed to install locally a Logstash plugin that wasn't available internally. This required me to fiddle here and there with my config, to allow Logstash to actually go through the proxy and fetch the required dependency - and it involved Maven, as I used the ugly workaround given here : https://github.com/elastic/logstash/issues/2851
As explained in the link, I defined the proxy for logstash plugin in $HOME/.m2/settings.xml .. and forgot to remove it after ;-/
I found this by running the build in debug mode (-X option) and this file was referenced at the beginning.

Using Jenkins plugin for SonarQube with two different installs and getting unexpected url for the new one

Got two SonarQube install behind a Nginx proxy, slowly upgrading.
Old 4.1 one and a new 4.5 LTS one.
For the 4.1 the url returned is the public facing url in the build result.
For the 4.5 the url is the internal url for the build result.
The Jenkins plugin seems to be configured the same so not sure why the new one is giving the internal url.
In both cases the Jenkins plugin is using the URL that is printed at the end of analysis logs.
Have you properly defined "sonar.core.serverBaseURL" in SQ Server settings?

sonar not working with maven-2.0.9. is there a workaround for /batch_bootstrap error?

I installed sonar-3.7.2 without issue. I have it working properly with oracle. I can analyze maven-3 projects from a client machine on the same network as the sonarqube server.
The docs says it supports maven-3.x and maven-2.2.x. We are in the process of upgrading projects to maven-3 but many of our projects still use maven-2.0.9. I was hoping that the 2.2.x condition was merely due to what people were testing with and not a real limitation but some newly downloaded poms in my artifactory contain the property maven.min.version set to 2.2.1.
I need a version that will work with maven-2.0.9.
I saw a log from one of my coworkers also trying out sonar and it showed maven-2.0.9 was being used successfully. He is using defaults. I am setting up for production.
The error that I get (cleaned up of course):
Caused by: org.sonar.api.utils.HttpDownloader$HttpException: Fail to download [http://myhost:myport/batch_bootstrap/properties?project=mygroupid:myartifactid]. Response code: 400
I have tried sonar 3.7.2, 3.6.3 and 3.5.1 and get the same error in each case. In each case
analyzing a maven-3 project works (to prove everything else is ok)
I have tried adding the webcontext /sonar instead of just /.
I have tried setting the Server base url in the sonarqube server even though I have not tested anything yet related to sending emails.
I saw something about corruption in the local .m2 on another thread. Removing it did not help either.
Any and all suggestions appreciated.
Best Regards, Gord Cody
I think the documentation is quite clear : http://docs.codehaus.org/display/SONAR/Installing+and+Configuring+Maven
SonarQube supports only Maven 2.2.x and 3.x
But my question is : What's the problem to upgrade from maven 2.0.9 to 2.2.x?

Resources