I try to install ruby runtime, rvm, cucumber plugins in Jenkins,
When I am installing ruby runtime plugin, I meet this error:
java.io.IOException: Failed to dynamically deploy this plugin
at hudson.model.UpdateCenter$InstallationJob._run(UpdateCenter.java:1328)
at hudson.model.UpdateCenter$DownloadJob.run(UpdateCenter.java:1126)
at java.util.concurrent.Executors$RunnableAdapter.call(Unknown Source)
at java.util.concurrent.FutureTask.run(Unknown Source)
at hudson.remoting.AtmostOneThreadExecutor$Worker.run(AtmostOneThreadExecutor.java:110)
at java.lang.Thread.run(Unknown Source)
Caused by: java.io.IOException: Failed to install ruby-runtime plugin
at hudson.PluginManager.dynamicLoad(PluginManager.java:487)
at hudson.model.UpdateCenter$InstallationJob._run(UpdateCenter.java:1324)
... 5 more
Caused by: java.io.IOException: Failed to initialize
at hudson.ClassicPluginStrategy.load(ClassicPluginStrategy.java:441)
at hudson.PluginManager.dynamicLoad(PluginManager.java:478)
... 6 more
Caused by: java.lang.ClassCircularityError: org/jruby/RubyClass
at java.lang.Class.forName0(Native Method)
...
How to fix it? Thanks in advance
It's a known bug. There is a workaround:
in /etc/default/jenkins
-Dhudson.ClassicPluginStrategy.noBytecodeTransformer=true
JAVA_ARGS="$JAVA_ARGS -Dhudson.ClassicPluginStrategy.noBytecodeTransformer=true"
At the moment there is no definitive solution as you can see.
On Windows, Adding argument
-Dhudson.ClassicPluginStrategy.noBytecodeTransformer=true
in jenkins.xml file worked for me as @lvthillo stated.
<arguments>-Xrs -Xmx256m -Dhudson.lifecycle=hudson.lifecycle.WindowsServiceLifecycle -Dhudson.ClassicPluginStrategy.noBytecodeTransformer=true -jar "%BASE%\jenkins.war" --httpPort=8081 --webroot="%BASE%\war"</arguments>
On OSX I had to edit /Library/Application Support/Jenkins/jenkins-runner.sh
to add these lines at a point after javaArgs
was defined
# workaround for ruby runtime install issue
# per http://stackoverflow.com/questions/33883551/error-installing-ruby-runtime-in-jenkins
javaArgs="$javaArgs -Dhudson.ClassicPluginStrategy.noBytecodeTransformer=true"
There is probably a more mac-ish way to do this.
Upon rebooting Jenkins, the ruby runtime plugin, which was already downloaded, started working, as did the also-downloaded rvm plugin, which is the one I was after.
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With