You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
I'm debugging behavior on my app and can't tell exactly what's happening. I have a code like this:
defself.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|
yieldSFTP.new(sftp)# `SFTP` is a decorator we use to abstract `upload!` and log operations duration. Not really importantendend
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.
The text was updated successfully, but these errors were encountered:
I have seen this before. It could be the server thinks it's an interactive connection, i.e. there's some real human luser doing the upload. Try setting :non_interactive => true.
If that doesn't work add the :logger => Logger.new($stdout), :verbose => :debug options (require "logger" first 😉) and see what extra info it gives you.
Hey 👋🏻
I'm debugging behavior on my app and can't tell exactly what's happening. I have a code like this:
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 thannet-sftp
: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
fromsession.open_channel
would solve the problem but I doubt I should ditchNet::SFTP
and do it all manually since it is a sporadic thing.The text was updated successfully, but these errors were encountered: