by

Where communities thrive


  • Join over 1.5M+ people
  • Join over 100K+ communities
  • Free without limits
  • Create your own community
People
Activity
  • 15:12
    stefanbirkner edited #133
  • 15:10
    timja labeled #133
  • 15:04
    stefanbirkner synchronize #133
  • 09:22
    timja commented #115
  • 09:19
    timja commented #115
  • 09:17
    timja commented #115
  • 09:15
    timja commented #115
  • 09:15
    timja commented #115
  • 09:13
    timja commented #115
  • 08:43
    wokinger commented #115
  • Jul 13 21:00
    timja commented #133
  • Jul 13 20:36
    stefanbirkner opened #133
  • Jul 13 20:11

    timja on master

    Use real CacheManager instead o… (compare)

  • Jul 13 20:11
    timja closed #132
  • Jul 13 20:11
    timja labeled #132
  • Jul 13 19:51
    stefanbirkner opened #132
  • Jul 13 19:24

    timja on master

    TemporaryFolder creates parent … (compare)

  • Jul 13 19:24
    timja closed #130
  • Jul 13 19:24
    timja labeled #130
minesskylineGTR
@minesskylineGTR
i saw a post above about having to set it manually
if i remove it i get the same error
Tim Jacomb
@timja
@minesskylineGTR do you have a plugins.txt file or something?
I just downloaded the last release
$ java -jar ~/Downloads/plugin-management-cli-1.1.0.jar -p configuration-as-code -d plugins --war ~/Downloads/jenkins.war
No .txt or .yaml file containing list of plugins to be downloaded entered.
Plugin download location: plugins
No CLI option or environment variable set for update center, using default of https://updates.jenkins.io/update-center.actual.json
No CLI option or environment variable set for experimental update center, using default of https://updates.jenkins.io/experimental/update-center.actual.json
No CLI option or environment variable set for incrementals mirror, using default of https://repo.jenkins-ci.org/incrementals
Will use war file: /Users/timja/Downloads/jenkins.war

Downloading plugin configuration-as-code from url: https://updates.jenkins.io/latest/configuration-as-code.hpi

Downloading plugin snakeyaml-api from url: https://updates.jenkins.io/download/plugins/snakeyaml-api/1.26.1/snakeyaml-api.hpi
configuration-as-code downloaded successfully
snakeyaml-api downloaded successfully
Done
worked fine
minesskylineGTR
@minesskylineGTR
i didn't specify a plugins.txt
let me try quick
Tim Jacomb
@timja
I just downloaded the jenkins.war from https://www.jenkins.io/download
and pointed it at that
minesskylineGTR
@minesskylineGTR
@timja ok, this is weird. i grabbed your command and with edits ran it (also made sure to unset any env vars to be sure) and i am still getting the same json parse error
Tim Jacomb
@timja
output?
minesskylineGTR
@minesskylineGTR
No .txt or .yaml file containing list of plugins to be downloaded entered.
Plugin download location: plugins
No CLI option or environment variable set for update center, using default of https://updates.jenkins.io/update-center.actual.json
No CLI option or environment variable set for experimental update center, using default of https://updates.jenkins.io/experimental/update-center.actual.json
No CLI option or environment variable set for incrementals mirror, using default of https://repo.jenkins-ci.org/incrementals
Will use war file: /usr/share/jenkins/jenkins.war
No version specific update center for Jenkins version 2.235.1
A JSONObject text must begin with '{' at 1 [character 2 line 1]
Alex Earl
@slide
can you wget/curl that same URL and see if there is valid data?
minesskylineGTR
@minesskylineGTR
which url, the update center url? @slide
hmmm... getting a 301 but it should follow redirects for the app i would imagine
let me set that as a option for the UC

doing:

java -jar /plugin-management-cli-*.jar --list --jenkins-update-center https://updates.jenkins.io/current/update-center.actual.json

results in:

No .txt or .yaml file containing list of plugins to be downloaded entered.
No directory to download plugins entered. Will use default of /usr/share/jenkins/ref/plugins
Using update center https://updates.jenkins.io/current/update-center.actual.json specified with CLI option
No CLI option or environment variable set for experimental update center, using default of https://updates.jenkins.io/experimental/update-center.actual.json
No CLI option or environment variable set for incrementals mirror, using default of https://repo.jenkins-ci.org/incrementals
No war entered. Will use default of /usr/share/jenkins/jenkins.war
No version specific update center for Jenkins version 2.235.1
Error getting update center json
Alex Earl
@slide
Yes, I meant the update center URL
I opened https://updates.jenkins.io/update-center.actual.json in my browser and it worked fine for me
minesskylineGTR
@minesskylineGTR
yea, like i said https://updates.jenkins.io/update-center.actual.json redirects to https://updates.jenkins.io/current/update-center.actual.json
i can curl https://updates.jenkins.io/current/update-center.actual.json just fine from the jenkins box
Tim Jacomb
@timja
can you try with --verbose
minesskylineGTR
@minesskylineGTR
big wall of text incoming
Retrieving update center information
Cache entry expired
Cache miss for: update-center
io.jenkins.tools.pluginmanager.impl.UpdateCenterInfoRetrievalException: Error getting update center json
    at io.jenkins.tools.pluginmanager.impl.PluginManager.getJson(PluginManager.java:579)
    at io.jenkins.tools.pluginmanager.impl.PluginManager.getUCJson(PluginManager.java:591)
    at io.jenkins.tools.pluginmanager.impl.PluginManager.start(PluginManager.java:141)
    at io.jenkins.tools.pluginmanager.impl.PluginManager.start(PluginManager.java:112)
    at io.jenkins.tools.pluginmanager.cli.Main.main(Main.java:37)
Caused by: javax.net.ssl.SSLHandshakeException: sun.security.validator.ValidatorException: PKIX path building failed: sun.security.provider.certpath.SunCertPathBuilderException: unable to find valid certification path to requested target
    at sun.security.ssl.Alerts.getSSLException(Alerts.java:192)
    at sun.security.ssl.SSLSocketImpl.fatal(SSLSocketImpl.java:1949)
    at sun.security.ssl.Handshaker.fatalSE(Handshaker.java:302)
    at sun.security.ssl.Handshaker.fatalSE(Handshaker.java:296)
    at sun.security.ssl.ClientHandshaker.serverCertificate(ClientHandshaker.java:1509)
    at sun.security.ssl.ClientHandshaker.processMessage(ClientHandshaker.java:216)
    at sun.security.ssl.Handshaker.processLoop(Handshaker.java:979)
    at sun.security.ssl.Handshaker.process_record(Handshaker.java:914)
    at sun.security.ssl.SSLSocketImpl.readRecord(SSLSocketImpl.java:1062)
    at sun.security.ssl.SSLSocketImpl.performInitialHandshake(SSLSocketImpl.java:1375)
    at sun.security.ssl.SSLSocketImpl.startHandshake(SSLSocketImpl.java:1403)
    at sun.security.ssl.SSLSocketImpl.startHandshake(SSLSocketImpl.java:1387)
    at sun.net.www.protocol.https.HttpsClient.afterConnect(HttpsClient.java:559)
    at sun.net.www.protocol.https.AbstractDelegateHttpsURLConnection.connect(AbstractDelegateHttpsURLConnection.java:185)
    at sun.net.www.protocol.http.HttpURLConnection.getInputStream0(HttpURLConnection.java:1513)
    at sun.net.www.protocol.http.HttpURLConnection.getInputStream(HttpURLConnection.java:1441)
    at sun.net.www.protocol.https.HttpsURLConnectionImpl.getInputStream(HttpsURLConnectionImpl.java:254)
    at java.net.URL.openStream(URL.java:1038)
    at org.apache.commons.io.IOUtils.toString(IOUtils.java:1198)
    at io.jenkins.tools.pluginmanager.impl.PluginManager.getJson(PluginManager.java:574)
    ... 4 more
Caused by: sun.security.validator.ValidatorException: PKIX path building failed: sun.security.provider.certpath.SunCertPathBuilderException: unable to find valid certification path to requested target
    at sun.security.validator.PKIXValidator.doBuild(PKIXValidator.java:387)
    at sun.security.validator.PKIXValidator.engineValidate(PKIXValidator.java:292)
    at sun.security.validator.Validator.validate(Validator.java:260)
    at sun.security.ssl.X509TrustManagerImpl.validate(X509TrustManagerImpl.java:324)
    at sun.security.ssl.X509TrustManagerImpl.checkTrusted(X509TrustManagerImpl.java:229)
    at sun.security.ssl.X509TrustManagerImpl.checkServerTrusted(X509TrustManagerImpl.java:124)
    at sun.security.ssl.ClientHandshaker.serverCertificate(ClientHandshaker.java:1491)
    ... 19 more
Caused by: sun.security.provider.certpath.SunCertPathBuilderException: unable to find valid certification path to requested target
    at sun.security.provider.certpath.SunCertPathBuilder.build(SunCertPath
minesskylineGTR
@minesskylineGTR
ok, i ran apt install openjdk-8-jdk and now i am getting this:
No .txt or .yaml file containing list of plugins to be downloaded entered.
No directory to download plugins entered. Will use default of /usr/share/jenkins/ref/plugins
No CLI option or environment variable set for update center, using default of https://updates.jenkins.io/update-center.actual.json
No CLI option or environment variable set for experimental update center, using default of https://updates.jenkins.io/experimental/update-center.actual.json
No CLI option or environment variable set for incrementals mirror, using default of https://repo.jenkins-ci.org/incrementals
No war entered. Will use default of /usr/share/jenkins/jenkins.war
Jenkins version: 2.235.1

Retrieving update center information
Cache entry expired
Cache miss for: update-center
Cache miss for: experimental-update-center
Cache miss for: plugin-versions

Installed plugins:

Bundled plugins:

Set of all requested plugins:

Set of all requested plugins that will be downloaded:

Set of all existing plugins and plugins that will be downloaded:
Done
so this looks better. but weird it's not listing anything that i have installed
(didn't have security certs installed for java to handle tls connection it seems)
minesskylineGTR
@minesskylineGTR
ah, i should have read the README better. using -d flag will overwrite the folder completely, even if there are plugins/files there. now jenkins wants to uninstall everything i have because set the -d flag to my plugins location.
Alex Earl
@slide
:+1:
minesskylineGTR
@minesskylineGTR
actually, the README does not say this about -d:
--plugin-download-directory or -d: (optional) Path to the directory in which to install plugins, which can also be set via the PLUGIN_DIR environment 
variable. Directory will be created if it does not exist. If no directory is entered, directory will default to C:\ProgramData\Jenkins\Reference\Plugins if 
detected OS is Windows, or /usr/share/jenkins/ref/plugins otherwise.
it should not delete if something already exists
Alex Earl
@slide
There was a discussion about that a long while ago, I think there was a conscious choice to do it that way, but I don't recall the full discussions
Tim Jacomb
@timja
good to see you got it working, it's expecting that you're listing all of your plugins, but that can be improved, I replied on the issue you raised
minesskylineGTR
@minesskylineGTR
@timja yea, took some time but i thought i had it mostly resolved. for whatever reason --list does not work as expected. after reading the README i am not sure why it won't list the plugins i have installed. supplying -d with any other option just removes the contents of that directory so not sure what to do about that. i also seem to have continuous issues with the jar not following redirects for the update center. see below again
java -jar /plugin-management-cli-*.jar -f /plugins.txt --latest
File containing list of plugins to be downloaded: /plugins.txt
Reading in plugins from /plugins.txt

No directory to download plugins entered. Will use default of /usr/share/jenkins/ref/plugins
No CLI option or environment variable set for update center, using default of https://updates.jenkins.io/update-center.actual.json
No CLI option or environment variable set for experimental update center, using default of https://updates.jenkins.io/experimental/update-center.actual.json
No CLI option or environment variable set for incrementals mirror, using default of https://repo.jenkins-ci.org/incrementals
No war entered. Will use default of /usr/share/jenkins/jenkins.war
A JSONObject text must begin with '{' at 1 [character 2 line 1]
curl https://updates.jenkins.io/update-center.actual.json
<!DOCTYPE HTML PUBLIC "-//IETF//DTD HTML 2.0//EN">
<html><head>
<title>301 Moved Permanently</title>
</head><body>
<h1>Moved Permanently</h1>
<p>The document has moved <a href="https://updates.jenkins.io/current/update-center.actual.json">here</a>.</p>
</body></html>
minesskylineGTR
@minesskylineGTR
providing the full update center url gives the same error:
java -jar /jenkins-plugin-manager-*.jar -f /plugins.txt --latest --jenkins-update-center https://updates.jenkins.io/current/update-center.actual.json
File containing list of plugins to be downloaded: /plugins.txt
Reading in plugins from /plugins.txt

No directory to download plugins entered. Will use default of /usr/share/jenkins/ref/plugins
Using update center https://updates.jenkins.io/current/update-center.actual.json specified with CLI option
No CLI option or environment variable set for experimental update center, using default of https://updates.jenkins.io/experimental/update-center.actual.json
No CLI option or environment variable set for incrementals mirror, using default of https://repo.jenkins-ci.org/incrementals
No CLI option or environment variable set for plugin info, using default of https://updates.jenkins.io/current/plugin-versions.json
No war entered. Will use default of /usr/share/jenkins/jenkins.war
A JSONObject text must begin with '{' at 1 [character 2 line 1]
minesskylineGTR
@minesskylineGTR
ok, i don't know what happened but it magically started working again
didn't even do anything. must be something on my system.
minesskylineGTR
@minesskylineGTR
@timja am i missing something when using --list? by default it does not list any plugins or bundles.
No .txt or .yaml file containing list of plugins to be downloaded entered.
No directory to download plugins entered. Will use default of /usr/share/jenkins/ref/plugins
No CLI option or environment variable set for update center, using default of https://updates.jenkins.io/update-center.actual.json
No CLI option or environment variable set for experimental update center, using default of https://updates.jenkins.io/experimental/update-center.actual.json
No CLI option or environment variable set for incrementals mirror, using default of https://repo.jenkins-ci.org/incrementals
No war entered. Will use default of /usr/share/jenkins/jenkins.war
Jenkins version: 2.235.1

Retrieving update center information
Cache entry expired
Cache miss for: update-center
Cache miss for: experimental-update-center
Cache miss for: plugin-versions

Installed plugins:

Bundled plugins:

Set of all requested plugins:

Set of all requested plugins that will be downloaded:

Set of all existing plugins and plugins that will be downloaded:
Done
Tim Jacomb
@timja
not sure, I've never used list
minesskylineGTR
@minesskylineGTR
i can not get that flag to work under any circumstance
Oleg Nenashev
@oleg-nenashev
@timja w.r.t plugin installation manager, do we want to follow semver there?
https://github.com/jenkinsci/plugin-installation-manager-tool/releases/tag/plugin-management-parent-pom-1.1.2 could have been 1.2.0. Not a big deal, just wondering about the versioning schema for the future
Tim Jacomb
@timja
Yes that would be good
I think that was me using mvn -B :p