Skip to content
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

Auto-reconnect does not work in 0.71.0.2 #23

Closed
pszlazak opened this issue Jun 6, 2019 · 26 comments
Closed

Auto-reconnect does not work in 0.71.0.2 #23

pszlazak opened this issue Jun 6, 2019 · 26 comments

Comments

@pszlazak
Copy link

pszlazak commented Jun 6, 2019

Hello,
There is a problem with auto-reconnect function in 0.71.0.2.

If I put my PC to sleep and it wakes up, connection is broken, but looks like it's not detected, as in menu I can only see option to duplicate session, but not to restart session.
Hence clicking or pressing keyboard button does not restart the session.

Strangely, if option to reconnect on system wakeup is enabled, it works.

Previously auto-reconnect was working even without reconnect on system wakeup enabled.

Problem is also mentioned here #22 and here #15 (comment).

@lars18th
Copy link
Contributor

lars18th commented Jun 7, 2019

Yes, I have the same problem!
At time the only solution it's "Duplicate Session", but this is a pain.

So, I suggest to add the option to enforce a reconnection, even if the client doesn't see that the connection is closed (that's quite easy: the client disconnects and reconnects... the disconnect action never fails even when it's really disconnected).

Regards.

@cyd01
Copy link
Owner

cyd01 commented Jun 10, 2019

Unfortunately I was not able to reproduce your issue, with or without "reconnect on system wakeup enabled".

@lars18th
Copy link
Contributor

Hi @cyd01 ,

I'm using the Portable binary with certificates and with passwords. I'm not sure, but the problem seems to appears only using one of the two modes. I'll try to provide a more detailed description.

Regards.

@pszlazak
Copy link
Author

HI @cyd01,

I'm on Windows 10 1903. And, same as @lars18th, I'm using portable version. Although for me, it does not matter if I'm using ssh key or password based login. In both cases connection is not auto-reconnected after I put my PC to sleep.

Regards!

@cyd01
Copy link
Owner

cyd01 commented Jun 10, 2019 via email

@bobvandevijver
Copy link

bobvandevijver commented Jun 10, 2019

Hi!

The beta doesn't solve it for me. I currently test it by disabling the network interface shortly.

0.70.0.9: Works as expected.
0.71.0.2: No reconnect
0.71.0.3 (beta): No reconnect (no settings stored at all in this one)

All versions do seem to detect the network loss directly (icon directly changes to the disconnect variant), but only the 0.70 version actually displays "(inactive)" as title, while the 0.71 variants still display the shell title.

Edit: I'm using the classic variant btw, happens with both key and password authentication.

@pszlazak
Copy link
Author

Also no luck here (with beta).

@pszlazak
Copy link
Author

Event logs for 0.70.0.10:
...
2019-06-10 22:32:28 Started a shell/command
2019-06-10 22:32:53 Connection closed by remote host
2019-06-10 22:32:53 Network error: Software caused connection abort
2019-06-10 22:32:53 KiTTY Fatal Error: Network error: Software caused connection abort
2019-06-10 22:33:11 No connection on key pressed, trying to reconnect...
2019-06-10 22:33:11 ----- Session restarted -----
2019-06-10 22:33:11 Connecting to 192.168.2.214 port 22
...

For 0.71.0.3:
...
2019-06-10 22:32:33 Started a shell/command
2019-06-10 22:32:53 Network error: Network error: Software caused connection abort
<nothing more>

And for 0.71.0.3.beta:
...
2019-06-10 22:32:38 Started a shell/command
2019-06-10 22:32:53 Network error: Network error: Software caused connection abort
<nothing more>

I can provide full event logs, if needed.

@cyd01
Copy link
Owner

cyd01 commented Jun 10, 2019 via email

@pszlazak
Copy link
Author

Can you test this new build: https://www.9bis.net/kitty/data/beta/kitty.exe ?

Works like a charm!

@bobvandevijver
Copy link

I can also confirm that this build fixes the reconnection problem 😃

@cyd01
Copy link
Owner

cyd01 commented Jun 11, 2019 via email

@hnz101
Copy link

hnz101 commented Jun 12, 2019

Is there also a way to reconnect manually with 0.71?
I am asking because the "restart session" option is gone in the new version and I don't know if this bug here is the issue to not reconnecting when hitting enter in an disconnected session.

In the past restart session helped in this case, really liked the option :-)

@pszlazak
Copy link
Author

Hi @hnz101,

If I put my PC to sleep and it wakes up, connection is broken, but looks like it's not detected, as in menu I can only see option to duplicate session, but not to restart session.

Yes, this is a bug. Please try beta version provided by cyd01:

Can you test this new build: https://www.9bis.net/kitty/data/beta/kitty.exe ?

@hnz101
Copy link

hnz101 commented Jun 12, 2019

Oh you're right, didn't see this part. @pszlazak
Tested the beta before but didn't recognized that the restart session option just appears when the session is disconnected and not before. Beta works fine and the option appears when needed 👍

thank you guys!

@lars18th
Copy link
Contributor

Hi @cyd01 ,

Thank you! In version 0.71.0.4 it works. 👍

However, I detected that in some cases when reconnecting the old password is not used
Someone has experienced this too?

Regards.

@lars18th
Copy link
Contributor

Hi @cyd01 ,

Before close this issue, I have a related trouble (but not directly the same): When connecting over a Socks Proxy (created with a Dynamic forwarding of another KiTTY session), when the Proxy fails KiTTY doesn't detects that the session is closed. So, we can't reconnect.

Please, can you review the code when connecting over a Socks Proxy?
Or almost add one "close-and-reconnect" command (for forcing to close the connection)?
This will increment the usability.

Thank you!

@lars18th
Copy link
Contributor

Hi,

When connecting over a Socks Proxy (created with a Dynamic forwarding of another KiTTY session), when the Proxy fails KiTTY doesn't detects that the session is closed. So, we can't reconnect.

I'm the only one experimenting this issue?

@cyd01
Copy link
Owner

cyd01 commented Jun 25, 2019

I've started to fix it by adding a new menu item "Restart session".
Here the beta build.

@lars18th
Copy link
Contributor

lars18th commented Jun 26, 2019

I've started to fix it by adding a new menu item "Restart session".
Here the beta build.

Thank you! Now testing it...

Comments:

  1. Instead on put the new menu item "Restart Session" after the "Full Screen", I feel it's preferable to insert it after "Duplicate Session" and before "Saved Sessions..." so it will be more easy to fount it!

@lars18th
Copy link
Contributor

Hi @cyd01 ,

From my point of view this new beta with "Restart session" works wihtout troubles. My suggestion is to release a new version v0.71.0.5 with this change (and perhaps others).

You agree?

@cyd01
Copy link
Owner

cyd01 commented Jun 27, 2019 via email

@lars18th
Copy link
Contributor

lars18th commented Jul 1, 2019

Hi,

Perhaps the version 0.71.0.5 not fixes the problem entirely. But I suggest to close this issue, and reopen another if the problem continues but using this new version. As the code handle has changed it's possible that the behaviour has changed too.

You agree?

@pszlazak
Copy link
Author

pszlazak commented Jul 1, 2019

To be closed IMHO. Original problem solved in 0.71.0.4.

@lars18th
Copy link
Contributor

lars18th commented Jul 1, 2019

To be closed IMHO. Original problem solved in 0.71.0.4.

Then, please @pszlazak select "CLOSE", as only you (and the main developer) can close the issue. 😉

@pszlazak
Copy link
Author

pszlazak commented Jul 1, 2019

Initial problem with auto-reconnect solved in 0.71.0.4.

Additional functionality requested by @lars18th to add 'Close+Restart' option in menu delivered in 0.71.0.5.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

5 participants