Comments (3)
Ubuntu 22.04 x64
The default ubuntu images now don't allow certain ssh key types (via /etc/ssh/sshd_config). I eventually regenerated my key with the type of ed25519
Its not really a jenkins bug though.
from digitalocean-plugin.
I'm going to try changing the SSH key type to see if t his solves the issue.
I added a logger for the com.dubture.jenkins.digitalocean package to capture all logs, here's the output of it before I killed the build:
Oct 10, 2022 4:37:36 PM INFO com.dubture.jenkins.digitalocean.SlaveTemplate
Creating SlaveTemplate with imageId = ubuntu-22-04-x64, sizeId = s-1vcpu-2gb, regionId = nyc1
Oct 10, 2022 4:37:36 PM INFO com.dubture.jenkins.digitalocean.DigitalOceanCloud
Constructing new DigitalOceanCloud(name = DigitalOcean, <token>, <privateKey>, <keyId>, instanceCap = 2, ...)
Oct 10, 2022 4:37:36 PM INFO com.dubture.jenkins.digitalocean.DigitalOceanCloud
Creating DigitalOcean cloud with 1 templates
Oct 10, 2022 4:53:58 PM INFO com.dubture.jenkins.digitalocean.DigitalOceanCloud canProvision
canProvision null :: true
Oct 10, 2022 4:53:58 PM INFO com.dubture.jenkins.digitalocean.DigitalOcean getDroplets
Listing all droplets
Oct 10, 2022 4:53:58 PM INFO com.dubture.jenkins.digitalocean.DigitalOceanCloud isInstanceCapReachedLocal
cloud limit check
Oct 10, 2022 4:53:58 PM INFO com.dubture.jenkins.digitalocean.DigitalOceanCloud isInstanceCapReachedRemote
cloud limit check
Oct 10, 2022 4:53:58 PM INFO com.dubture.jenkins.digitalocean.SlaveTemplate isInstanceCapReachedLocal
agent limit check
Oct 10, 2022 4:53:58 PM INFO com.dubture.jenkins.digitalocean.SlaveTemplate isInstanceCapReachedRemote
agent limit check
Oct 10, 2022 4:53:58 PM INFO com.dubture.jenkins.digitalocean.DigitalOceanCloud provision
Provisioning 1 DigitalOcean nodes
Oct 10, 2022 4:53:58 PM INFO com.dubture.jenkins.digitalocean.DigitalOcean getDroplets
Listing all droplets
Oct 10, 2022 4:53:59 PM INFO com.dubture.jenkins.digitalocean.DigitalOceanCloud isInstanceCapReachedLocal
cloud limit check
Oct 10, 2022 4:53:59 PM INFO com.dubture.jenkins.digitalocean.DigitalOceanCloud isInstanceCapReachedRemote
cloud limit check
Oct 10, 2022 4:53:59 PM INFO com.dubture.jenkins.digitalocean.SlaveTemplate provision
Provisioning agent...
Oct 10, 2022 4:53:59 PM INFO com.dubture.jenkins.digitalocean.SlaveTemplate provision
Starting to provision digital ocean droplet using image: ubuntu-22-04-x64, sizeId = s-1vcpu-2gb, regionId = nyc1
Oct 10, 2022 4:53:59 PM INFO com.dubture.jenkins.digitalocean.SlaveTemplate isInstanceCapReachedLocal
agent limit check
Oct 10, 2022 4:53:59 PM INFO com.dubture.jenkins.digitalocean.SlaveTemplate isInstanceCapReachedRemote
agent limit check
Oct 10, 2022 4:53:59 PM INFO com.dubture.jenkins.digitalocean.SlaveTemplate provision
Creating agent with new droplet jenkins-DigitalOcean-jenkins.slave-ee73f52f-5a8e-4460-a37b-b2461b3afb73
Oct 10, 2022 4:53:59 PM INFO com.dubture.jenkins.digitalocean.SlaveTemplate newSlave
Creating new agent...
Oct 10, 2022 4:53:59 PM INFO com.dubture.jenkins.digitalocean.DigitalOcean getDroplet
Fetching droplet 320368885
Oct 10, 2022 4:54:30 PM INFO com.dubture.jenkins.digitalocean.DigitalOcean getDroplet
Fetching droplet 320368885
Oct 10, 2022 4:54:31 PM INFO com.dubture.jenkins.digitalocean.DigitalOceanComputerLauncher getIpAddress
network 157.230.211.60 => public
Oct 10, 2022 4:54:31 PM INFO com.dubture.jenkins.digitalocean.DigitalOceanComputerLauncher getIpAddress
network 10.116.0.3 => private
Oct 10, 2022 4:55:03 PM INFO com.dubture.jenkins.digitalocean.DigitalOcean getDroplet
Fetching droplet 320368885
Oct 10, 2022 4:55:03 PM INFO com.dubture.jenkins.digitalocean.DigitalOceanComputerLauncher getIpAddress
network 157.230.211.60 => public
Oct 10, 2022 4:55:03 PM INFO com.dubture.jenkins.digitalocean.DigitalOceanComputerLauncher getIpAddress
network 10.116.0.3 => private
Oct 10, 2022 4:55:05 PM WARNING com.dubture.jenkins.digitalocean.DigitalOceanComputerLauncher launch
Publickey authentication failed.
java.io.IOException: PEM problem: it is of unknown type. Supported algorithms are :[ssh-ed25519, ecdsa-sha2-nistp521, ecdsa-sha2-nistp384, ecdsa-sha2-nistp256, rsa-sha2-256, rsa-sha2-512, ssh-rsa, ssh-dss]
at com.trilead.ssh2.crypto.PEMDecoder.decodeKeyPair(PEMDecoder.java:482)
at com.trilead.ssh2.auth.AuthenticationManager.authenticatePublicKey(AuthenticationManager.java:290)
Caused: java.io.IOException: Publickey authentication failed.
at com.trilead.ssh2.auth.AuthenticationManager.authenticatePublicKey(AuthenticationManager.java:349)
at com.trilead.ssh2.Connection.authenticateWithPublicKey(Connection.java:472)
at com.dubture.jenkins.digitalocean.DigitalOceanComputerLauncher.launch(DigitalOceanComputerLauncher.java:170)
at hudson.slaves.SlaveComputer.lambda$_connect$0(SlaveComputer.java:298)
at jenkins.util.ContextResettingExecutorService$2.call(ContextResettingExecutorService.java:48)
at jenkins.security.ImpersonatingExecutorService$2.call(ImpersonatingExecutorService.java:82)
at java.base/java.util.concurrent.FutureTask.run(FutureTask.java:264)
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)
Oct 10, 2022 4:55:05 PM INFO com.dubture.jenkins.digitalocean.DigitalOceanComputer onRemoved
Agent removed, deleting droplet 320368885
Oct 10, 2022 4:55:05 PM INFO com.dubture.jenkins.digitalocean.DigitalOcean tryDestroyDropletAsync
Adding droplet to destroy 320368885
Oct 10, 2022 4:55:05 PM INFO com.dubture.jenkins.digitalocean.DigitalOcean lambda$static$0
Trying to destroy droplet 320368885
Oct 10, 2022 4:55:05 PM INFO com.dubture.jenkins.digitalocean.DigitalOceanCloud canProvision
canProvision jenkins-DigitalOcean-jenkins.slave-ee73f52f-5a8e-4460-a37b-b2461b3afb73 :: false
Oct 10, 2022 4:55:05 PM INFO com.dubture.jenkins.digitalocean.DigitalOcean lambda$static$0
Droplet 320368885 is destroyed
Oct 10, 2022 4:55:05 PM INFO com.dubture.jenkins.digitalocean.DigitalOcean lambda$static$0
Waiting on more droplets to destroy
Oct 10, 2022 4:55:08 PM INFO com.dubture.jenkins.digitalocean.DigitalOceanCloud canProvision
canProvision null :: true
Oct 10, 2022 4:55:08 PM INFO com.dubture.jenkins.digitalocean.DigitalOcean getDroplets
Listing all droplets
Oct 10, 2022 4:55:08 PM INFO com.dubture.jenkins.digitalocean.DigitalOceanCloud isInstanceCapReachedLocal
cloud limit check
Oct 10, 2022 4:55:08 PM INFO com.dubture.jenkins.digitalocean.DigitalOceanCloud isInstanceCapReachedRemote
cloud limit check
Oct 10, 2022 4:55:08 PM INFO com.dubture.jenkins.digitalocean.SlaveTemplate isInstanceCapReachedLocal
agent limit check
Oct 10, 2022 4:55:08 PM INFO com.dubture.jenkins.digitalocean.SlaveTemplate isInstanceCapReachedRemote
agent limit check
Oct 10, 2022 4:55:08 PM INFO com.dubture.jenkins.digitalocean.DigitalOceanCloud provision
Provisioning 1 DigitalOcean nodes
Oct 10, 2022 4:55:08 PM INFO com.dubture.jenkins.digitalocean.DigitalOcean getDroplets
Listing all droplets
Oct 10, 2022 4:55:08 PM INFO com.dubture.jenkins.digitalocean.DigitalOceanCloud isInstanceCapReachedLocal
cloud limit check
Oct 10, 2022 4:55:08 PM INFO com.dubture.jenkins.digitalocean.DigitalOceanCloud isInstanceCapReachedRemote
cloud limit check
Oct 10, 2022 4:55:08 PM INFO com.dubture.jenkins.digitalocean.SlaveTemplate provision
Provisioning agent...
Oct 10, 2022 4:55:08 PM INFO com.dubture.jenkins.digitalocean.SlaveTemplate provision
Starting to provision digital ocean droplet using image: ubuntu-22-04-x64, sizeId = s-1vcpu-2gb, regionId = nyc1
Oct 10, 2022 4:55:08 PM INFO com.dubture.jenkins.digitalocean.SlaveTemplate isInstanceCapReachedLocal
agent limit check
Oct 10, 2022 4:55:08 PM INFO com.dubture.jenkins.digitalocean.SlaveTemplate isInstanceCapReachedRemote
agent limit check
Oct 10, 2022 4:55:08 PM INFO com.dubture.jenkins.digitalocean.SlaveTemplate provision
Creating agent with new droplet jenkins-DigitalOcean-jenkins.slave-653aee96-b069-4eab-bf90-81d426f6b6e2
Oct 10, 2022 4:55:09 PM INFO com.dubture.jenkins.digitalocean.SlaveTemplate newSlave
Creating new agent...
Oct 10, 2022 4:55:09 PM INFO com.dubture.jenkins.digitalocean.DigitalOcean getDroplet
Fetching droplet 320369016
from digitalocean-plugin.
Ubuntu 22.04 x64
The default ubuntu images now don't allow certain ssh key types (via /etc/ssh/sshd_config). I eventually regenerated my key with the type of
ed25519
Its not really a jenkins bug though.
You're correct, though I don't know if I would not call it a bug, but it would be something worth documenting somewhere in regards to ED25519 keys.
I removed the passphrase from the key and now it works, as described in the below bug report I just came across:
JENKINS-46754: 2.73 SSH agent sometimes will not start if using passphrase-protected ed25519 key
The Jenkins 2.73.1 LTS release fails to connect my ssh agents which use an ed25519 passphrase protected private key. These agents connected successfully with Jenkins 2.60.3 LTS and earlier.
I've confirmed that dsa passphrase protected private keys work in all cases and that rsa passphrase protected private keys work in all cases. The rsa private keys and ed25519 private keys which are not passphrase protected work in all cases.
It appears to only be ed25519 private keys which are passphrase protected that have a problem in two of my six tested configurations with 2.73.1 LTS. Those same configurations work as expected with 2.60.3 LTS.
Thanks for the quick response and I hope I didn't waste you anyone's time!
from digitalocean-plugin.
Related Issues (1)
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from digitalocean-plugin.