-
-
Notifications
You must be signed in to change notification settings - Fork 25
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
No response from server #78
Comments
@flyfishMT can you please enable debug log, by passing debug function to SSH configuration. Most probably ssh server is getting disconnected. |
@sanketbajoria thanks I will work on this and report back. It's a little difficult as we are only encountering this error in production |
@sanketbajoria I was able to reproduce but don't want to post everything up, any advice on what I'm looking for? The first error I see is on connect:
|
@flyfishMT |
@sanketbajoria the code in my original post is basically exactly how I'm using, that is a "helper" module, and is used by an express endpoint. So the the SSH2Promise object is declare at the module level, and used in the the exported function. It looked to me like your
|
@flyfishMT
Or for every request. you can create new ssh connection... exec... and close... But, if the number of request are high... go with above method |
Hi @sanketbajoria any luck debugging? I thought I had success with with keepaliveCountMax but it cropped up again. However, I don't remember keepaliveInterval being suggested so I haven't tried that. I also tried to just connect and close every time but am now seeing "Error: No Connection" for a time, and then it will work intermittently. For option 2 of re-creating the connection every time, do you recommend instantiating at the module level as in my first comment, or perhaps re-instantiate every time in the exported function that does the work? |
I consistently get the error
The first few times I call a function that uses your library. Eventually it works. I know that this is an error from ssh2, but thought that it might be cause be the usage of ssh2 in ssh2-promise, or how I'm using ssh2-promise?
Psuedo-code:
I appreciate any help pointing me in the right direction.
The text was updated successfully, but these errors were encountered: