Closed bewczardski closed 12 months ago
+1 for this issue when we setup gcp credentials with Jenkins Configuration As Code Plugin.
However, our case is a bit different, in fact, the credentials were created successfully, but the credential IDs were all changed to random uuid (which should be the same as the project id / name), so some of our jenkins jobs can't be executed properly.
PS : we've workaround with rollback to 1.0.11
I'm assuming this is the same problem reported in https://github.com/jenkinsci/google-oauth-plugin/issues/198
I'm experiencing similar warnings guessing the root cause is the same.
OS: Amazon Linux
jenkins_master | 2023-10-18 06:35:29.120+0000 [id=30] WARNING hudson.ExtensionFinder$Sezpoz#scout: Failed to scout com.google.jenkins.plugins.credentials.oauth.OAuth2Credentials$DescriptorImpl
jenkins_master | java.lang.ClassNotFoundException: com.google.jenkins.plugins.credentials.oauth.OAuth2Credentials$DescriptorImpl
jenkins_master | at hudson.PluginManager$UberClassLoader.lambda$findClass$0(PluginManager.java:2343)
jenkins_master | at java.base/java.util.Optional.orElseThrow(Optional.java:403)
jenkins_master | at hudson.PluginManager$UberClassLoader.findClass(PluginManager.java:2343)
jenkins_master | at java.base/java.lang.ClassLoader.loadClass(ClassLoader.java:592)
jenkins_master | at java.base/java.lang.ClassLoader.loadClass(ClassLoader.java:525)
jenkins_master | at net.java.sezpoz.IndexItem.element(IndexItem.java:134)
jenkins_master | Caused: java.lang.InstantiationException: /var/jenkins_home/plugins/google-oauth-plugin/WEB-INF/lib/google-oauth-plugin.jar might need to be rebuilt
jenkins_master | at net.java.sezpoz.IndexItem.element(IndexItem.java:144)
jenkins_master | at hudson.ExtensionFinder.getClassFromIndex(ExtensionFinder.java:785)
jenkins_master | at hudson.ExtensionFinder$Sezpoz.scout(ExtensionFinder.java:770)
jenkins_master | at hudson.ClassicPluginStrategy.findComponents(ClassicPluginStrategy.java:338)
jenkins_master | at hudson.ExtensionList.load(ExtensionList.java:384)
jenkins_master | at hudson.ExtensionList.ensureLoaded(ExtensionList.java:320)
jenkins_master | at hudson.ExtensionList.getComponents(ExtensionList.java:184)
jenkins_master | at jenkins.model.Jenkins$6.onInitMilestoneAttained(Jenkins.java:1202)
jenkins_master | at jenkins.InitReactorRunner$1.onAttained(InitReactorRunner.java:88)
jenkins_master | at org.jvnet.hudson.reactor.ReactorListener$Aggregator.lambda$onAttained$3(ReactorListener.java:108)
jenkins_master | at org.jvnet.hudson.reactor.ReactorListener$Aggregator.run(ReactorListener.java:116)
jenkins_master | at org.jvnet.hudson.reactor.ReactorListener$Aggregator.onAttained(ReactorListener.java:108)
jenkins_master | at org.jvnet.hudson.reactor.Reactor$1.run(Reactor.java:182)
jenkins_master | at org.jvnet.hudson.reactor.Reactor$Node.run(Reactor.java:120)
jenkins_master | at jenkins.security.ImpersonatingExecutorService$1.run(ImpersonatingExecutorService.java:68)
jenkins_master | at java.base/java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1136)
jenkins_master | at java.base/java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:635)
jenkins_master | at java.base/java.lang.Thread.run(Thread.java:833)
jenkins_master | 2023-10-18 06:35:30.517+0000 [id=30] WARNING hudson.ExtensionFinder$Sezpoz#_find: Failed to load com.google.jenkins.plugins.credentials.oauth.OAuth2Credentials$DescriptorImpl
jenkins_master | java.lang.ClassNotFoundException: com.google.jenkins.plugins.credentials.oauth.OAuth2Credentials$DescriptorImpl
jenkins_master | at hudson.PluginManager$UberClassLoader.lambda$findClass$0(PluginManager.java:2343)
jenkins_master | at java.base/java.util.Optional.orElseThrow(Optional.java:403)
jenkins_master | at hudson.PluginManager$UberClassLoader.findClass(PluginManager.java:2343)
jenkins_master | at java.base/java.lang.ClassLoader.loadClass(ClassLoader.java:592)
jenkins_master | at java.base/java.lang.ClassLoader.loadClass(ClassLoader.java:525)
jenkins_master | at net.java.sezpoz.IndexItem.element(IndexItem.java:134)
jenkins_master | Caused: java.lang.InstantiationException: /var/jenkins_home/plugins/google-oauth-plugin/WEB-INF/lib/google-oauth-plugin.jar might need to be rebuilt
jenkins_master | at net.java.sezpoz.IndexItem.element(IndexItem.java:144)
jenkins_master | at hudson.ExtensionFinder.getClassFromIndex(ExtensionFinder.java:785)
jenkins_master | at hudson.ExtensionFinder$Sezpoz._find(ExtensionFinder.java:745)
jenkins_master | at hudson.ExtensionFinder$Sezpoz.find(ExtensionFinder.java:734)
jenkins_master | at hudson.ExtensionFinder$GuiceFinder.refreshExtensionAnnotations(ExtensionFinder.java:301)
jenkins_master | at hudson.ExtensionFinder$GuiceFinder.<init>(ExtensionFinder.java:262)
jenkins_master | at java.base/jdk.internal.reflect.NativeConstructorAccessorImpl.newInstance0(Native Method)
jenkins_master | at java.base/jdk.internal.reflect.NativeConstructorAccessorImpl.newInstance(NativeConstructorAccessorImpl.java:77)
jenkins_master | at java.base/jdk.internal.reflect.DelegatingConstructorAccessorImpl.newInstance(DelegatingConstructorAccessorImpl.java:45)
jenkins_master | at java.base/java.lang.reflect.Constructor.newInstanceWithCaller(Constructor.java:499)
jenkins_master | at java.base/java.lang.reflect.ReflectAccess.newInstance(ReflectAccess.java:128)
jenkins_master | at java.base/jdk.internal.reflect.ReflectionFactory.newInstance(ReflectionFactory.java:347)
jenkins_master | at java.base/java.lang.Class.newInstance(Class.java:645)
jenkins_master | at net.java.sezpoz.IndexItem.instance(IndexItem.java:181)
jenkins_master | at hudson.ExtensionFinder$Sezpoz._find(ExtensionFinder.java:748)
jenkins_master | at hudson.ExtensionFinder$Sezpoz.find(ExtensionFinder.java:734)
jenkins_master | at hudson.ClassicPluginStrategy.findComponents(ClassicPluginStrategy.java:344)
jenkins_master | at hudson.ExtensionList.load(ExtensionList.java:384)
jenkins_master | at hudson.ExtensionList.ensureLoaded(ExtensionList.java:320)
jenkins_master | at hudson.ExtensionList.getComponents(ExtensionList.java:184)
jenkins_master | at jenkins.model.Jenkins$6.onInitMilestoneAttained(Jenkins.java:1202)
jenkins_master | at jenkins.InitReactorRunner$1.onAttained(InitReactorRunner.java:88)
jenkins_master | at org.jvnet.hudson.reactor.ReactorListener$Aggregator.lambda$onAttained$3(ReactorListener.java:108)
jenkins_master | at org.jvnet.hudson.reactor.ReactorListener$Aggregator.run(ReactorListener.java:116)
jenkins_master | at org.jvnet.hudson.reactor.ReactorListener$Aggregator.onAttained(ReactorListener.java:108)
jenkins_master | at org.jvnet.hudson.reactor.Reactor$1.run(Reactor.java:182)
jenkins_master | at org.jvnet.hudson.reactor.Reactor$Node.run(Reactor.java:120)
jenkins_master | at jenkins.security.ImpersonatingExecutorService$1.run(ImpersonatingExecutorService.java:68)
jenkins_master | at java.base/java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1136)
jenkins_master | at java.base/java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:635)
jenkins_master | at java.base/java.lang.Thread.run(Thread.java:833)
jenkins_master | 2023-10-18 06:35:30.655+0000 [id=30] WARNING hudson.ExtensionFinder$Sezpoz#_find: Failed to load com.google.jenkins.plugins.credentials.oauth.OAuth2Credentials$DescriptorImpl
jenkins_master | java.lang.ClassNotFoundException: com.google.jenkins.plugins.credentials.oauth.OAuth2Credentials$DescriptorImpl
jenkins_master | at hudson.PluginManager$UberClassLoader.lambda$findClass$0(PluginManager.java:2343)
jenkins_master | at java.base/java.util.Optional.orElseThrow(Optional.java:403)
jenkins_master | at hudson.PluginManager$UberClassLoader.findClass(PluginManager.java:2343)
jenkins_master | at java.base/java.lang.ClassLoader.loadClass(ClassLoader.java:592)
jenkins_master | at java.base/java.lang.ClassLoader.loadClass(ClassLoader.java:525)
jenkins_master | at net.java.sezpoz.IndexItem.element(IndexItem.java:134)
jenkins_master | Caused: java.lang.InstantiationException: /var/jenkins_home/plugins/google-oauth-plugin/WEB-INF/lib/google-oauth-plugin.jar might need to be rebuilt
jenkins_master | at net.java.sezpoz.IndexItem.element(IndexItem.java:144)
jenkins_master | at hudson.ExtensionFinder.getClassFromIndex(ExtensionFinder.java:785)
jenkins_master | at hudson.ExtensionFinder$Sezpoz._find(ExtensionFinder.java:745)
jenkins_master | at hudson.ExtensionFinder$Sezpoz.find(ExtensionFinder.java:734)
jenkins_master | at hudson.ExtensionFinder$GuiceFinder.<init>(ExtensionFinder.java:277)
jenkins_master | at java.base/jdk.internal.reflect.NativeConstructorAccessorImpl.newInstance0(Native Method)
jenkins_master | at java.base/jdk.internal.reflect.NativeConstructorAccessorImpl.newInstance(NativeConstructorAccessorImpl.java:77)
jenkins_master | at java.base/jdk.internal.reflect.DelegatingConstructorAccessorImpl.newInstance(DelegatingConstructorAccessorImpl.java:45)
jenkins_master | at java.base/java.lang.reflect.Constructor.newInstanceWithCaller(Constructor.java:499)
jenkins_master | at java.base/java.lang.reflect.ReflectAccess.newInstance(ReflectAccess.java:128)
jenkins_master | at java.base/jdk.internal.reflect.ReflectionFactory.newInstance(ReflectionFactory.java:347)
jenkins_master | at java.base/java.lang.Class.newInstance(Class.java:645)
jenkins_master | at net.java.sezpoz.IndexItem.instance(IndexItem.java:181)
jenkins_master | at hudson.ExtensionFinder$Sezpoz._find(ExtensionFinder.java:748)
jenkins_master | at hudson.ExtensionFinder$Sezpoz.find(ExtensionFinder.java:734)
jenkins_master | at hudson.ClassicPluginStrategy.findComponents(ClassicPluginStrategy.java:344)
jenkins_master | at hudson.ExtensionList.load(ExtensionList.java:384)
jenkins_master | at hudson.ExtensionList.ensureLoaded(ExtensionList.java:320)
jenkins_master | at hudson.ExtensionList.getComponents(ExtensionList.java:184)
jenkins_master | at jenkins.model.Jenkins$6.onInitMilestoneAttained(Jenkins.java:1202)
jenkins_master | at jenkins.InitReactorRunner$1.onAttained(InitReactorRunner.java:88)
jenkins_master | at org.jvnet.hudson.reactor.ReactorListener$Aggregator.lambda$onAttained$3(ReactorListener.java:108)
jenkins_master | at org.jvnet.hudson.reactor.ReactorListener$Aggregator.run(ReactorListener.java:116)
jenkins_master | at org.jvnet.hudson.reactor.ReactorListener$Aggregator.onAttained(ReactorListener.java:108)
jenkins_master | at org.jvnet.hudson.reactor.Reactor$1.run(Reactor.java:182)
jenkins_master | at org.jvnet.hudson.reactor.Reactor$Node.run(Reactor.java:120)
jenkins_master | at jenkins.security.ImpersonatingExecutorService$1.run(ImpersonatingExecutorService.java:68)
jenkins_master | at java.base/java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1136)
jenkins_master | at java.base/java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:635)
jenkins_master | at java.base/java.lang.Thread.run(Thread.java:833)
jenkins_master | 2023-10-18 06:35:32.340+0000 [id=30] WARNING h.ExtensionFinder$GuiceFinder$SezpozModule#configure: Failed to load com.google.jenkins.plugins.credentials.oauth.OAuth2Credentials$DescriptorImpl
jenkins_master | java.lang.ClassNotFoundException: com.google.jenkins.plugins.credentials.oauth.OAuth2Credentials$DescriptorImpl
jenkins_master | at hudson.PluginManager$UberClassLoader.lambda$findClass$0(PluginManager.java:2343)
jenkins_master | at java.base/java.util.Optional.orElseThrow(Optional.java:403)
jenkins_master | at hudson.PluginManager$UberClassLoader.findClass(PluginManager.java:2343)
jenkins_master | at java.base/java.lang.ClassLoader.loadClass(ClassLoader.java:592)
jenkins_master | at java.base/java.lang.ClassLoader.loadClass(ClassLoader.java:525)
jenkins_master | at net.java.sezpoz.IndexItem.element(IndexItem.java:134)
jenkins_master | Caused: java.lang.InstantiationException: /var/jenkins_home/plugins/google-oauth-plugin/WEB-INF/lib/google-oauth-plugin.jar might need to be rebuilt
jenkins_master | at net.java.sezpoz.IndexItem.element(IndexItem.java:144)
jenkins_master | at hudson.ExtensionFinder$GuiceFinder$SezpozModule.configure(ExtensionFinder.java:566)
jenkins_master | at com.google.inject.AbstractModule.configure(AbstractModule.java:64)
jenkins_master | at com.google.inject.spi.Elements$RecordingBinder.install(Elements.java:426)
jenkins_master | at com.google.inject.spi.Elements.getElements(Elements.java:113)
jenkins_master | at com.google.inject.internal.InjectorShell$Builder.build(InjectorShell.java:160)
jenkins_master | at com.google.inject.internal.InternalInjectorCreator.build(InternalInjectorCreator.java:107)
jenkins_master | at com.google.inject.Guice.createInjector(Guice.java:87)
jenkins_master | at com.google.inject.Guice.createInjector(Guice.java:69)
jenkins_master | at hudson.ExtensionFinder$GuiceFinder.<init>(ExtensionFinder.java:282)
jenkins_master | at java.base/jdk.internal.reflect.NativeConstructorAccessorImpl.newInstance0(Native Method)
jenkins_master | at java.base/jdk.internal.reflect.NativeConstructorAccessorImpl.newInstance(NativeConstructorAccessorImpl.java:77)
jenkins_master | at java.base/jdk.internal.reflect.DelegatingConstructorAccessorImpl.newInstance(DelegatingConstructorAccessorImpl.java:45)
jenkins_master | at java.base/java.lang.reflect.Constructor.newInstanceWithCaller(Constructor.java:499)
jenkins_master | at java.base/java.lang.reflect.ReflectAccess.newInstance(ReflectAccess.java:128)
jenkins_master | at java.base/jdk.internal.reflect.ReflectionFactory.newInstance(ReflectionFactory.java:347)
jenkins_master | at java.base/java.lang.Class.newInstance(Class.java:645)
jenkins_master | at net.java.sezpoz.IndexItem.instance(IndexItem.java:181)
jenkins_master | at hudson.ExtensionFinder$Sezpoz._find(ExtensionFinder.java:748)
jenkins_master | at hudson.ExtensionFinder$Sezpoz.find(ExtensionFinder.java:734)
jenkins_master | at hudson.ClassicPluginStrategy.findComponents(ClassicPluginStrategy.java:344)
jenkins_master | at hudson.ExtensionList.load(ExtensionList.java:384)
jenkins_master | at hudson.ExtensionList.ensureLoaded(ExtensionList.java:320)
jenkins_master | at hudson.ExtensionList.getComponents(ExtensionList.java:184)
jenkins_master | at jenkins.model.Jenkins$6.onInitMilestoneAttained(Jenkins.java:1202)
jenkins_master | at jenkins.InitReactorRunner$1.onAttained(InitReactorRunner.java:88)
jenkins_master | at org.jvnet.hudson.reactor.ReactorListener$Aggregator.lambda$onAttained$3(ReactorListener.java:108)
jenkins_master | at org.jvnet.hudson.reactor.ReactorListener$Aggregator.run(ReactorListener.java:116)
jenkins_master | at org.jvnet.hudson.reactor.ReactorListener$Aggregator.onAttained(ReactorListener.java:108)
jenkins_master | at org.jvnet.hudson.reactor.Reactor$1.run(Reactor.java:182)
jenkins_master | at org.jvnet.hudson.reactor.Reactor$Node.run(Reactor.java:120)
jenkins_master | at jenkins.security.ImpersonatingExecutorService$1.run(ImpersonatingExecutorService.java:68)
jenkins_master | at java.base/java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1136)
jenkins_master | at java.base/java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:635)
jenkins_master | at java.base/java.lang.Thread.run(Thread.java:833)
jenkins_master | 2023-10-18 06:35:34.594+0000 [id=30] WARNING hudson.ExtensionFinder$Sezpoz#_find: Failed to load com.google.jenkins.plugins.credentials.oauth.OAuth2Credentials$DescriptorImpl
jenkins_master | java.lang.ClassNotFoundException: com.google.jenkins.plugins.credentials.oauth.OAuth2Credentials$DescriptorImpl
jenkins_master | at hudson.PluginManager$UberClassLoader.lambda$findClass$0(PluginManager.java:2343)
jenkins_master | at java.base/java.util.Optional.orElseThrow(Optional.java:403)
jenkins_master | at hudson.PluginManager$UberClassLoader.findClass(PluginManager.java:2343)
jenkins_master | at java.base/java.lang.ClassLoader.loadClass(ClassLoader.java:592)
jenkins_master | at java.base/java.lang.ClassLoader.loadClass(ClassLoader.java:525)
jenkins_master | at net.java.sezpoz.IndexItem.element(IndexItem.java:134)
jenkins_master | Caused: java.lang.InstantiationException: /var/jenkins_home/plugins/google-oauth-plugin/WEB-INF/lib/google-oauth-plugin.jar might need to be rebuilt
jenkins_master | at net.java.sezpoz.IndexItem.element(IndexItem.java:144)
jenkins_master | at hudson.ExtensionFinder.getClassFromIndex(ExtensionFinder.java:785)
jenkins_master | at hudson.ExtensionFinder$Sezpoz._find(ExtensionFinder.java:745)
jenkins_master | at hudson.ExtensionFinder$Sezpoz.find(ExtensionFinder.java:734)
jenkins_master | at hudson.ClassicPluginStrategy.findComponents(ClassicPluginStrategy.java:344)
jenkins_master | at hudson.ExtensionList.load(ExtensionList.java:384)
jenkins_master | at hudson.ExtensionList.ensureLoaded(ExtensionList.java:320)
jenkins_master | at hudson.ExtensionList.getComponents(ExtensionList.java:184)
jenkins_master | at jenkins.model.Jenkins$6.onInitMilestoneAttained(Jenkins.java:1202)
jenkins_master | at jenkins.InitReactorRunner$1.onAttained(InitReactorRunner.java:88)
jenkins_master | at org.jvnet.hudson.reactor.ReactorListener$Aggregator.lambda$onAttained$3(ReactorListener.java:108)
jenkins_master | at org.jvnet.hudson.reactor.ReactorListener$Aggregator.run(ReactorListener.java:116)
jenkins_master | at org.jvnet.hudson.reactor.ReactorListener$Aggregator.onAttained(ReactorListener.java:108)
jenkins_master | at org.jvnet.hudson.reactor.Reactor$1.run(Reactor.java:182)
jenkins_master | at org.jvnet.hudson.reactor.Reactor$Node.run(Reactor.java:120)
jenkins_master | at jenkins.security.ImpersonatingExecutorService$1.run(ImpersonatingExecutorService.java:68)
jenkins_master | at java.base/java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1136)
jenkins_master | at java.base/java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:635)
jenkins_master | at java.base/java.lang.Thread.run(Thread.java:833)
jenkins_master | 2023-10-18 06:35:34.625+0000 [id=30] INFO jenkins.InitReactorRunner$1#onAttained: Prepared all plugins
jenkin
We have the same issue :(
Mileage may vary depending on the plugin dependency tree on the controller, but if possible, downgrade OAuth Credentials to 0.645.ve666a_c332668, and Google OAuth Credentials to 1.0.11.
I have a 2.414.3 controller running without any errors at startup using those versions. All other plugins are up to date.
Just for the reference, using Docker and jenkins/jenkins:lts
leads to the same issue. Downgrading to OAuth Credentials to 0.645.ve666a_c332668, and Google OAuth Credentials to 1.0.11 do not resolve the issue :(
Fixed in #205
Jenkins and plugins versions report
Environment
```Jenkins: 2.414.2 OS: Linux - 5.10.102.1-microsoft-standard-WSL2 Java: 11.0.20.1 - Eclipse Adoptium (OpenJDK 64-Bit Server VM) --- apache-httpcomponents-client-4-api:4.5.14-208.v438351942757 credentials:1293.vff276f713473 google-oauth-plugin:1.318.vb_39c5db_e3041 jackson2-api:2.15.2-350.v0c2f3f8fc595 javax-activation-api:1.2.0-6 jaxb:2.3.8-1 oauth-credentials:0.646.v02b_66dc03d2e snakeyaml-api:2.2-111.vc6598e30cc65 structs:325.vcb_307d2a_2782 ```After installing Google OAuth Credentials plugin, the following warnings can be found in the Jenkins log.