-
Improvement
-
Resolution: Unresolved
-
Major
-
None
-
Jenkins: 2.387.2
ec2: 2.0.7
OS: Linux - 4.14.311-233.529.amzn2.x86_64
Java: 11.0.16 - Amazon.com Inc. (OpenJDK 64-Bit Server VM)
Steps to reproduce
- Create a ed25519 key pair in ec2
- Add generated key to Jenkins credentials
- In ec2 cloud configuration set "EC2 Key Pair's Private Key" field to use the 2d25519 key
- Try to run a job using an ec2 agent
Expected result
Agent starts without problems
Actual result
Agent fails to start. Following error can be seen in Jenkins logs:
SlaveTemplate{description='node', labels='ec2'}. Exception during provisioning java.io.IOException: unrecognised object: OPENSSH PRIVATE KEY at org.bouncycastle.openssl.PEMParser.readObject(Unknown Source) at jenkins.bouncycastle.api.PEMEncodable.decode(PEMEncodable.java:170) at jenkins.bouncycastle.api.PEMEncodable.decode(PEMEncodable.java:150) at hudson.plugins.ec2.EC2PrivateKey.getFingerprint(EC2PrivateKey.java:82) at hudson.plugins.ec2.EC2PrivateKey.find(EC2PrivateKey.java:113) at hudson.plugins.ec2.SlaveTemplate.getKeyPair(SlaveTemplate.java:1620) at hudson.plugins.ec2.SlaveTemplate.provisionSpot(SlaveTemplate.java:1379) at hudson.plugins.ec2.SlaveTemplate.provision(SlaveTemplate.java:904) at hudson.plugins.ec2.EC2Cloud.getNewOrExistingAvailableSlave(EC2Cloud.java:718) at hudson.plugins.ec2.EC2Cloud.provision(EC2Cloud.java:744) at hudson.slaves.Cloud.provision(Cloud.java:210) at hudson.slaves.NodeProvisioner$StandardStrategyImpl.apply(NodeProvisioner.java:726) at hudson.slaves.NodeProvisioner.update(NodeProvisioner.java:325) at hudson.slaves.NodeProvisioner$NodeProvisionerInvoker.doRun(NodeProvisioner.java:823) at hudson.triggers.SafeTimerTask.run(SafeTimerTask.java:92) at jenkins.security.ImpersonatingScheduledExecutorService$1.run(ImpersonatingScheduledExecutorService.java:67) at java.base/java.util.concurrent.Executors$RunnableAdapter.call(Executors.java:515) at java.base/java.util.concurrent.FutureTask.runAndReset(FutureTask.java:305) at java.base/java.util.concurrent.ScheduledThreadPoolExecutor$ScheduledFutureTask.run(ScheduledThreadPoolExecutor.java:305) at java.base/java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1128) at java.base/java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:628) at java.base/java.lang.Thread.run(Thread.java:829) Can't raise nodes for SlaveTemplate{description='node', labels='ec2'}