rundeck-plugins / sshj-plugin

SSH Node Executor and Field Copier using SSHJ
0 stars 3 forks source link

SSHJ-SSH plugin "retry-enable" parameter causing Failed: Unknown: null #14

Open rurobin opened 1 year ago

rurobin commented 1 year ago

After upgrading to Rundeck opensource 4.11 release, the sshj-ssh plugin errors out when having "retry-enable" parameter set to "true". For example:

project.retry-enable=true

This works fine for:

Per description, the parameter should available to provide:

Enable retry on fail? Enable a connection retry when the connection fails Configure Project:project.retry-enable=false Configure Framework:framework.retry-enable=false Default value:false

the job log in debug mode:

[workflow] beginExecuteNodeStep(node1.mytest.com): NodeDispatch: CommandItem{label='Issue Date Command', command=[1 words]} [sshj-ssh] hostname: node1.mytest.com [sshj-ssh] port: null [sshj-ssh] username: rurobin [sshj-ssh] init SSHJDefaultConfig [sshj-ssh] setting timeouts [sshj-ssh] getConnectTimeout timeout: 0 [sshj-ssh] getTimeout timeout: 0 [sshj-ssh] keepAliveInterval: 5 [sshj-ssh] retry: true [sshj-ssh] retryCount: 3 [sshj-ssh] adding loadKnownHosts [sshj-ssh] open connection [net.schmizz.sshj.transport.TransportImpl] Client identity string: SSH-2.0-SSHJ_0.35.0 [net.schmizz.sshj.transport.TransportImpl] Server identity string: SSH-2.0-OpenSSH_7.4 [net.schmizz.sshj.SSHClient] Initiating Key Exchange for new connection [net.schmizz.concurrent.Promise] Setting <> to null [net.schmizz.sshj.transport.KeyExchanger] Sending SSH_MSG_KEXINIT [net.schmizz.concurrent.Promise] Setting <> to SOME [net.schmizz.sshj.transport.KeyExchanger] Received SSH_MSG_KEXINIT [net.schmizz.concurrent.Promise] Awaiting <> [net.schmizz.sshj.transport.KeyExchanger] Negotiated algorithms: [ kex=curve25519-sha256; sig=rsa-sha2-512; c2sCipher=aes128-ctr; s2cCipher=aes128-ctr; c2sMAC=hmac-sha1; s2cMAC=hmac-sha1; c2sComp=none; s2cComp=none; ] [net.schmizz.sshj.transport.KeyExchanger] Received kex followup data [net.schmizz.sshj.transport.KeyExchanger] Trying to verify host key with net.schmizz.sshj.transport.verification.PromiscuousVerifier@5f57b7ff [net.schmizz.sshj.transport.KeyExchanger] Sending SSH_MSG_NEWKEYS [net.schmizz.sshj.transport.KeyExchanger] Received SSH_MSG_NEWKEYS [net.schmizz.concurrent.Promise] Setting <> to null [net.schmizz.concurrent.Promise] Setting <> to SOME [net.schmizz.sshj.transport.TransportImpl] Received SSH_MSG_EXT_INFO [net.schmizz.sshj.SSHClient] Key exchange took 0.016 seconds [sshj-ssh] connection done [net.schmizz.concurrent.Promise] Setting <> to null [net.schmizz.sshj.transport.TransportImpl] Sending SSH_MSG_SERVICE_REQUEST for ssh-userauth [net.schmizz.concurrent.Promise] Awaiting <> [net.schmizz.sshj.transport.TransportImpl] Setting active service to ssh-userauth [net.schmizz.concurrent.Promise] Setting <> to SOME [net.schmizz.concurrent.Promise] Setting <> to null [net.schmizz.sshj.userauth.UserAuthImpl] Trying password auth... [net.schmizz.sshj.userauth.method.AuthPassword] Requesting password for [AccountResource] rur...@node1.mytest.com [net.schmizz.concurrent.Promise] Awaiting <> [net.schmizz.sshj.transport.TransportImpl] Setting active service to ssh-connection [net.schmizz.concurrent.Promise] Setting <> to true [net.schmizz.sshj.userauth.UserAuthImpl] password auth successful [sshj-ssh] authentication set [sshj-ssh] connection done [sshj-ssh] open connection [net.schmizz.sshj.transport.TransportImpl] Client identity string: SSH-2.0-SSHJ_0.35.0 [net.schmizz.sshj.transport.TransportImpl] Server identity string: SSH-2.0-OpenSSH_7.4 SSH command execution error: Unknown: null [net.schmizz.sshj.transport.TransportImpl] Disconnected - BY_APPLICATION [net.schmizz.sshj.connection.ConnectionImpl] Notified of net.schmizz.sshj.transport.TransportException: [BY_APPLICATION] Disconnected [net.schmizz.sshj.transport.TransportImpl] Sending SSH_MSG_DISCONNECT: reason=[BY_APPLICATION], msg=[] [net.schmizz.concurrent.Promise] Setting <> to SOME Failed: Unknown: null [workflow] finishExecuteNodeStep(node1.mytest.com): NodeDispatch: Unknown: null [net.schmizz.sshj.transport.Reader] Stopping

MegaDrive68k commented 1 year ago

Reproduced. Thanks for your feedback @rurobin