-
Notifications
You must be signed in to change notification settings - Fork 130
Open
Description
Hey ππ»
I'm debugging behavior on my app and can't tell exactly what's happening. I have a code like this:
def self.connect_to_dhl_de_tracking!
credentials = {password: CREDENTIALS.dhl_de_sftp_tracking.password, port: CREDENTIALS.dhl_de_sftp_tracking.port}
Net::SFTP.start(CREDENTIALS.dhl_de_sftp_tracking.host, CREDENTIALS.dhl_de_sftp_tracking.user, credentials) do |sftp|
yield SFTP.new(sftp) # `SFTP` is a decorator we use to abstract `upload!` and log operations duration. Not really important
end
end
This code is executed asynchronously and every now and then, it triggers Errno::ENOTTY
. When the job and rescued and re-executed, it works fine. The latest backtrace points even deeper than net-sftp
:
lib/net/ssh/prompt.rb:44 noecho
lib/net/ssh/prompt.rb:44 ask
lib/net/ssh/authentication/methods/keyboard_interactive.rb:53 block (2 levels) in authenticate
<internal:numeric>:237:in `times'
lib/net/ssh/authentication/methods/keyboard_interactive.rb:50 block in authenticate
<internal:kernel>:187:in `loop'
lib/net/ssh/authentication/methods/keyboard_interactive.rb:19 authenticate
lib/net/ssh/authentication/session.rb:88 block in authenticate
lib/net/ssh/authentication/session.rb:72 each
lib/net/ssh/authentication/session.rb:72 authenticate
I can't understand if this is some misconfiguration on our end or a hiccup on the server we connect to. Some people said that using request_pty
from session.open_channel
would solve the problem but I doubt I should ditch Net::SFTP
and do it all manually since it is a sporadic thing.
fatkodima, agrieser-healthie, mpalenciano and J-Swift
Metadata
Metadata
Assignees
Labels
No labels