Connecting the Jenkins controller with the nodes on different clouds

Viewed 13

We have our Jenkins controller on GCP and the Jenkins Node on AWS (Auto Scaling Groups). Initially, We had the controller on AWS (Ubuntu 18) with openjdk11. We used the ec2-fleet jenkins plugin to spin-up and destroy instances based on usage.

The setup was working fine but we wanted to have the controller (Ubuntu 18) in GCP (Our existing jenkins system is in GCP). I used the same ec2-fleet plugin. The Jenking controller in GCP was able to spin up instances but I kept getting the error - java.io.FileNotFoundException: /usr/lib/jvm/java-1.8.0-openjdk-1.8.0.332.b09-1.amzn2.0.2.x86_64/jre/lib/currency.data (No such file or directory)

The nodes in AWS use Amazon Linux AIM images. So I thought I have to downgrade the JVM in controller to openjdk8 and did downgraded from openjdk11 to openjdk8. I still keep getting the same error. We then checked the openjdk version in AWS controller and it had openjdk11. The setup is working fine in AWS but doesn't work with GCP.

java.io.FileNotFoundException: /usr/lib/jvm/java-1.8.0-openjdk-1.8.0.332.b09-1.amzn2.0.2.x86_64/jre/lib/currency.data (No such file or directory)
    at java.io.FileInputStream.open0(Native Method)
    at java.io.FileInputStream.open(FileInputStream.java:195)
    at java.io.FileInputStream.<init>(FileInputStream.java:138)
    at java.io.FileInputStream.<init>(FileInputStream.java:93)
    at java.util.Currency$1.run(Currency.java:221)
Also:   hudson.remoting.Channel$CallSiteStackTrace: Remote call to i-09b4990d879f5e7e4
        at hudson.remoting.Channel.attachCallSiteStackTrace(Channel.java:1784)
        at hudson.remoting.UserRequest$ExceptionResponse.retrieve(UserRequest.java:356)
        at hudson.remoting.Channel.call(Channel.java:1000)
        at hudson.FilePath.act(FilePath.java:1194)
        at hudson.FilePath.act(FilePath.java:1183)
        at org.jenkinsci.plugins.gitclient.Git.getClient(Git.java:140)
        at hudson.plugins.git.GitSCM.createClient(GitSCM.java:916)
        at hudson.plugins.git.GitSCM.createClient(GitSCM.java:847)
        at hudson.plugins.git.GitSCM.checkout(GitSCM.java:1297)
        at org.jenkinsci.plugins.workflow.steps.scm.SCMStep.checkout(SCMStep.java:129)
        at org.jenkinsci.plugins.workflow.steps.scm.SCMStep$StepExecutionImpl.run(SCMStep.java:97)
        at org.jenkinsci.plugins.workflow.steps.scm.SCMStep$StepExecutionImpl.run(SCMStep.java:84)
        at org.jenkinsci.plugins.workflow.steps.SynchronousNonBlockingStepExecution.lambda$start$0(SynchronousNonBlockingStepExecution.java:47)
        at java.util.concurrent.Executors$RunnableAdapter.call(Executors.java:511)
1 Answers

Upgrading both the controller and node to JDK11 solved the issue.

Related