gjedeer / tuntox

Tunnel TCP connections over the Tox protocol
https://gdr.name/tuntox/
Other
343 stars 57 forks source link

Cann't connect to the server after double ssh connection #17

Closed kurnevsky closed 8 years ago

kurnevsky commented 8 years ago

When I connected to the ssh twice and stopped second connection by ctrl+d the first connection was stuck and I wasn't be able to connect to ssh anymore. Here is server log with debug key:

2015-12-29 09:25:55: [INFO] Tuntox built from git commit 8d4dd7660af8cd3856d0d54d92386ce3ef1bc333
2015-12-29 09:25:55: [DEBUG]    Read 981 bytes (/home/kurnevsky/.tuntox/tox_save)
2015-12-29 09:25:55: [DEBUG]    Saved data
2015-12-29 09:25:55: [INFO] Using Tox ID: [...]
2015-12-29 09:26:04: [INFO] Connection status changed: An UDP connection has been established
2015-12-29 09:26:04: [DEBUG]    Connected to Tox network
2015-12-29 10:43:20: [DEBUG]    Got friend request
2015-12-29 10:43:20: [INFO] Accepted friend request from [...] as 0
2015-12-29 10:43:22: [DEBUG]    Got protocol frame magic 0xa26a type 0x602 from friend 0
2015-12-29 10:43:22: [INFO] Got a request to forward data from 127.0.0.1:22
2015-12-29 10:43:22: [DEBUG]    Tunnel ID: 41490
2015-12-29 10:43:22: [DEBUG]    connecting to 127.0.0.1
2015-12-29 10:43:22: [DEBUG]    Connected to 127.0.0.1:22
2015-12-29 10:43:22: [INFO] Created a new tunnel object connid=41490 sockfd=7
2015-12-29 10:43:22: [DEBUG]    Created tunnel, yay!
2015-12-29 10:43:22: [DEBUG]    Got protocol frame magic 0xa26a type 0x600 from friend 0
2015-12-29 10:43:23: [DEBUG]    Got protocol frame magic 0xa26a type 0x600 from friend 0
2015-12-29 10:43:23: [DEBUG]    Got protocol frame magic 0xa26a type 0x600 from friend 0
2015-12-29 10:43:23: [DEBUG]    Got protocol frame magic 0xa26a type 0x600 from friend 0
2015-12-29 10:43:23: [DEBUG]    Got protocol frame magic 0xa26a type 0x600 from friend 0
2015-12-29 10:43:23: [DEBUG]    Got protocol frame magic 0xa26a type 0x600 from friend 0
2015-12-29 10:43:23: [DEBUG]    Got protocol frame magic 0xa26a type 0x600 from friend 0
2015-12-29 10:45:22: [WARNING]  conn closed!
2015-12-29 10:45:22: [INFO] Deleting tunnel #41490
2015-12-29 10:45:31: [DEBUG]    Got protocol frame magic 0xa26a type 0x602 from friend 0
2015-12-29 10:45:31: [INFO] Got a request to forward data from 127.0.0.1:22
2015-12-29 10:45:31: [DEBUG]    Tunnel ID: 62263
2015-12-29 10:45:31: [DEBUG]    connecting to 127.0.0.1
2015-12-29 10:45:31: [DEBUG]    Connected to 127.0.0.1:22
2015-12-29 10:45:31: [INFO] Created a new tunnel object connid=62263 sockfd=7
2015-12-29 10:45:31: [DEBUG]    Created tunnel, yay!
2015-12-29 10:45:31: [DEBUG]    Got protocol frame magic 0xa26a type 0x600 from friend 0
2015-12-29 10:45:31: [DEBUG]    Got protocol frame magic 0xa26a type 0x600 from friend 0
2015-12-29 10:45:31: [DEBUG]    Got protocol frame magic 0xa26a type 0x600 from friend 0
2015-12-29 10:45:31: [DEBUG]    Got protocol frame magic 0xa26a type 0x600 from friend 0
2015-12-29 10:45:32: [DEBUG]    Got protocol frame magic 0xa26a type 0x600 from friend 0
2015-12-29 10:45:32: [DEBUG]    Got protocol frame magic 0xa26a type 0x600 from friend 0
2015-12-29 10:45:32: [DEBUG]    Got protocol frame magic 0xa26a type 0x600 from friend 0
2015-12-29 10:45:36: [DEBUG]    Got protocol frame magic 0xa26a type 0x600 from friend 0
2015-12-29 10:45:36: [DEBUG]    Got protocol frame magic 0xa26a type 0x600 from friend 0
2015-12-29 10:45:36: [DEBUG]    Got protocol frame magic 0xa26a type 0x600 from friend 0
2015-12-29 10:45:36: [DEBUG]    Got protocol frame magic 0xa26a type 0x600 from friend 0
2015-12-29 10:45:39: [DEBUG]    Got protocol frame magic 0xa26a type 0x600 from friend 0
2015-12-29 10:45:39: [DEBUG]    Got protocol frame magic 0xa26a type 0x600 from friend 0
2015-12-29 10:45:41: [DEBUG]    Got protocol frame magic 0xa26a type 0x600 from friend 0
2015-12-29 10:45:42: [DEBUG]    Got protocol frame magic 0xa26a type 0x600 from friend 0
2015-12-29 10:45:42: [DEBUG]    Got protocol frame magic 0xa26a type 0x600 from friend 0
2015-12-29 10:45:44: [DEBUG]    Got protocol frame magic 0xa26a type 0x600 from friend 0
2015-12-29 10:45:44: [DEBUG]    Got protocol frame magic 0xa26a type 0x600 from friend 0
2015-12-29 10:45:45: [DEBUG]    Got protocol frame magic 0xa26a type 0x600 from friend 0
2015-12-29 10:45:45: [DEBUG]    Got protocol frame magic 0xa26a type 0x600 from friend 0
2015-12-29 10:45:46: [DEBUG]    Got protocol frame magic 0xa26a type 0x600 from friend 0
2015-12-29 10:45:46: [DEBUG]    Got protocol frame magic 0xa26a type 0x600 from friend 0
2015-12-29 10:45:48: [DEBUG]    Got protocol frame magic 0xa26a type 0x600 from friend 0
2015-12-29 10:45:48: [DEBUG]    Got protocol frame magic 0xa26a type 0x600 from friend 0
2015-12-29 10:45:50: [DEBUG]    Got protocol frame magic 0xa26a type 0x600 from friend 0
2015-12-29 10:45:50: [DEBUG]    Got protocol frame magic 0xa26a type 0x600 from friend 0
2015-12-29 10:45:50: [DEBUG]    Got protocol frame magic 0xa26a type 0x600 from friend 0
2015-12-29 10:45:50: [DEBUG]    Got protocol frame magic 0xa26a type 0x600 from friend 0
2015-12-29 10:45:51: [DEBUG]    Got protocol frame magic 0xa26a type 0x600 from friend 0
2015-12-29 10:45:51: [DEBUG]    Got protocol frame magic 0xa26a type 0x600 from friend 0
2015-12-29 10:45:51: [DEBUG]    Got protocol frame magic 0xa26a type 0x600 from friend 0
2015-12-29 10:45:52: [DEBUG]    Got protocol frame magic 0xa26a type 0x600 from friend 0
2015-12-29 10:45:53: [DEBUG]    Got protocol frame magic 0xa26a type 0x600 from friend 0
2015-12-29 10:49:45: [DEBUG]    Got protocol frame magic 0xa26a type 0x600 from friend 0
2015-12-29 10:49:46: [DEBUG]    Got protocol frame magic 0xa26a type 0x600 from friend 0
2015-12-29 10:51:00: [DEBUG]    Got protocol frame magic 0xa26a type 0x600 from friend 0
2015-12-29 10:51:00: [DEBUG]    Got protocol frame magic 0xa26a type 0x600 from friend 0
2015-12-29 10:54:48: [DEBUG]    Got protocol frame magic 0xa26a type 0x600 from friend 0
2015-12-29 10:54:48: [DEBUG]    Got protocol frame magic 0xa26a type 0x600 from friend 0
2015-12-29 10:54:48: [DEBUG]    Got protocol frame magic 0xa26a type 0x600 from friend 0
2015-12-29 10:54:48: [DEBUG]    Got protocol frame magic 0xa26a type 0x600 from friend 0
2015-12-29 10:54:50: [DEBUG]    Got protocol frame magic 0xa26a type 0x600 from friend 0
2015-12-29 10:54:50: [DEBUG]    Got protocol frame magic 0xa26a type 0x600 from friend 0
2015-12-29 10:54:50: [DEBUG]    Got protocol frame magic 0xa26a type 0x600 from friend 0
2015-12-29 10:54:50: [DEBUG]    Got protocol frame magic 0xa26a type 0x600 from friend 0
2015-12-29 10:54:50: [DEBUG]    Got protocol frame magic 0xa26a type 0x600 from friend 0
2015-12-29 10:54:51: [DEBUG]    Got protocol frame magic 0xa26a type 0x600 from friend 0
2015-12-29 10:57:10: [DEBUG]    Got protocol frame magic 0xa26a type 0x600 from friend 0
2015-12-29 10:57:10: [DEBUG]    Got protocol frame magic 0xa26a type 0x600 from friend 0
2015-12-29 10:57:10: [DEBUG]    Got protocol frame magic 0xa26a type 0x600 from friend 0
2015-12-29 10:57:11: [DEBUG]    Got protocol frame magic 0xa26a type 0x600 from friend 0
2015-12-29 10:57:11: [DEBUG]    Got protocol frame magic 0xa26a type 0x600 from friend 0
2015-12-29 10:57:11: [DEBUG]    Got protocol frame magic 0xa26a type 0x600 from friend 0
2015-12-29 10:57:11: [DEBUG]    Got protocol frame magic 0xa26a type 0x600 from friend 0
2015-12-29 10:57:12: [DEBUG]    Got protocol frame magic 0xa26a type 0x600 from friend 0
2015-12-29 10:57:12: [DEBUG]    Got protocol frame magic 0xa26a type 0x600 from friend 0
2015-12-29 10:57:13: [DEBUG]    Got protocol frame magic 0xa26a type 0x600 from friend 0
2015-12-29 10:57:14: [DEBUG]    Got protocol frame magic 0xa26a type 0x600 from friend 0
2015-12-29 10:57:14: [DEBUG]    Got protocol frame magic 0xa26a type 0x600 from friend 0
2015-12-29 10:57:14: [DEBUG]    Got protocol frame magic 0xa26a type 0x600 from friend 0
2015-12-29 10:57:15: [DEBUG]    Got protocol frame magic 0xa26a type 0x600 from friend 0
2015-12-29 10:57:15: [DEBUG]    Got protocol frame magic 0xa26a type 0x600 from friend 0
2015-12-29 10:57:15: [DEBUG]    Got protocol frame magic 0xa26a type 0x600 from friend 0
2015-12-29 10:57:15: [DEBUG]    Got protocol frame magic 0xa26a type 0x600 from friend 0
2015-12-29 10:57:16: [DEBUG]    Got protocol frame magic 0xa26a type 0x600 from friend 0
2015-12-29 10:57:17: [DEBUG]    Got protocol frame magic 0xa26a type 0x600 from friend 0
2015-12-29 10:57:17: [DEBUG]    Got protocol frame magic 0xa26a type 0x600 from friend 0
2015-12-29 10:57:18: [DEBUG]    Got protocol frame magic 0xa26a type 0x600 from friend 0
2015-12-29 10:57:18: [DEBUG]    Got protocol frame magic 0xa26a type 0x600 from friend 0
2015-12-29 10:57:19: [DEBUG]    Got protocol frame magic 0xa26a type 0x600 from friend 0
2015-12-29 10:57:20: [DEBUG]    Got protocol frame magic 0xa26a type 0x600 from friend 0
2015-12-29 10:57:21: [DEBUG]    Got protocol frame magic 0xa26a type 0x600 from friend 0
2015-12-29 10:57:21: [DEBUG]    Got protocol frame magic 0xa26a type 0x600 from friend 0
2015-12-29 10:57:21: [DEBUG]    Got protocol frame magic 0xa26a type 0x600 from friend 0
2015-12-29 10:57:21: [DEBUG]    Got protocol frame magic 0xa26a type 0x600 from friend 0
2015-12-29 10:57:21: [DEBUG]    Got protocol frame magic 0xa26a type 0x600 from friend 0
2015-12-29 10:57:22: [DEBUG]    Got protocol frame magic 0xa26a type 0x600 from friend 0
2015-12-29 10:57:22: [DEBUG]    Got protocol frame magic 0xa26a type 0x600 from friend 0
2015-12-29 10:57:23: [DEBUG]    Got protocol frame magic 0xa26a type 0x600 from friend 0
2015-12-29 10:57:23: [DEBUG]    Got protocol frame magic 0xa26a type 0x600 from friend 0
2015-12-29 10:57:23: [DEBUG]    Got protocol frame magic 0xa26a type 0x600 from friend 0
2015-12-29 10:57:23: [DEBUG]    Got protocol frame magic 0xa26a type 0x600 from friend 0
2015-12-29 10:57:24: [DEBUG]    Got protocol frame magic 0xa26a type 0x600 from friend 0
2015-12-29 10:57:24: [DEBUG]    Got protocol frame magic 0xa26a type 0x600 from friend 0
2015-12-29 10:57:25: [DEBUG]    Got protocol frame magic 0xa26a type 0x600 from friend 0
2015-12-29 10:57:27: [DEBUG]    Got protocol frame magic 0xa26a type 0x600 from friend 0
2015-12-29 10:57:27: [DEBUG]    Got protocol frame magic 0xa26a type 0x600 from friend 0
2015-12-29 10:57:27: [DEBUG]    Got protocol frame magic 0xa26a type 0x600 from friend 0
2015-12-29 10:57:27: [DEBUG]    Got protocol frame magic 0xa26a type 0x600 from friend 0
2015-12-29 10:57:27: [DEBUG]    Got protocol frame magic 0xa26a type 0x600 from friend 0
2015-12-29 10:57:27: [DEBUG]    Got protocol frame magic 0xa26a type 0x600 from friend 0
2015-12-29 10:57:28: [DEBUG]    Got protocol frame magic 0xa26a type 0x600 from friend 0
2015-12-29 10:57:28: [DEBUG]    Got protocol frame magic 0xa26a type 0x600 from friend 0
2015-12-29 10:57:28: [DEBUG]    Got protocol frame magic 0xa26a type 0x600 from friend 0
2015-12-29 10:57:28: [DEBUG]    Got protocol frame magic 0xa26a type 0x600 from friend 0
2015-12-29 10:57:29: [DEBUG]    Got protocol frame magic 0xa26a type 0x600 from friend 0
2015-12-29 10:57:29: [DEBUG]    Got protocol frame magic 0xa26a type 0x600 from friend 0
2015-12-29 10:57:29: [DEBUG]    Got protocol frame magic 0xa26a type 0x600 from friend 0
2015-12-29 10:57:46: [DEBUG]    Got protocol frame magic 0xa26a type 0x600 from friend 0
2015-12-29 10:57:46: [DEBUG]    Got protocol frame magic 0xa26a type 0x600 from friend 0
2015-12-29 10:57:47: [DEBUG]    Got protocol frame magic 0xa26a type 0x600 from friend 0
2015-12-29 10:57:47: [DEBUG]    Got protocol frame magic 0xa26a type 0x600 from friend 0
2015-12-29 10:57:47: [DEBUG]    Got protocol frame magic 0xa26a type 0x600 from friend 0
2015-12-29 10:57:47: [DEBUG]    Got protocol frame magic 0xa26a type 0x600 from friend 0
2015-12-29 10:57:48: [DEBUG]    Got protocol frame magic 0xa26a type 0x600 from friend 0
2015-12-29 10:57:48: [DEBUG]    Got protocol frame magic 0xa26a type 0x600 from friend 0
2015-12-29 10:57:48: [DEBUG]    Got protocol frame magic 0xa26a type 0x600 from friend 0
2015-12-29 10:57:48: [DEBUG]    Got protocol frame magic 0xa26a type 0x600 from friend 0
2015-12-29 10:57:48: [DEBUG]    Got protocol frame magic 0xa26a type 0x600 from friend 0
2015-12-29 10:57:48: [DEBUG]    Got protocol frame magic 0xa26a type 0x600 from friend 0
2015-12-29 10:57:49: [DEBUG]    Got protocol frame magic 0xa26a type 0x600 from friend 0
2015-12-29 10:57:49: [DEBUG]    Got protocol frame magic 0xa26a type 0x600 from friend 0
2015-12-29 10:57:49: [DEBUG]    Got protocol frame magic 0xa26a type 0x600 from friend 0
2015-12-29 10:57:49: [DEBUG]    Got protocol frame magic 0xa26a type 0x600 from friend 0
2015-12-29 10:57:49: [DEBUG]    Got protocol frame magic 0xa26a type 0x600 from friend 0
2015-12-29 10:57:49: [DEBUG]    Got protocol frame magic 0xa26a type 0x600 from friend 0
2015-12-29 10:57:50: [DEBUG]    Got protocol frame magic 0xa26a type 0x600 from friend 0
2015-12-29 11:08:50: [INFO] Connection status changed: There is no connection
2015-12-29 11:08:54: [DEBUG]    Disconnected from Tox network
2015-12-29 11:08:57: [INFO] Connection status changed: An UDP connection has been established
2015-12-29 11:08:57: [DEBUG]    Connected to Tox network
2015-12-29 11:11:52: [DEBUG]    Got protocol frame magic 0xa26a type 0x602 from friend 0
2015-12-29 11:11:52: [INFO] Got a request to forward data from 127.0.0.1:22
2015-12-29 11:11:52: [DEBUG]    Tunnel ID: 1326
2015-12-29 11:11:52: [DEBUG]    connecting to 127.0.0.1
2015-12-29 11:11:52: [DEBUG]    Connected to 127.0.0.1:22
2015-12-29 11:11:52: [INFO] Created a new tunnel object connid=1326 sockfd=8
2015-12-29 11:11:52: [DEBUG]    Created tunnel, yay!
2015-12-29 11:11:52: [DEBUG]    Got protocol frame magic 0xa26a type 0x600 from friend 0
2015-12-29 11:11:54: [DEBUG]    Got protocol frame magic 0xa26a type 0x600 from friend 0
2015-12-29 11:11:54: [DEBUG]    Got protocol frame magic 0xa26a type 0x600 from friend 0
2015-12-29 11:11:54: [DEBUG]    Got protocol frame magic 0xa26a type 0x600 from friend 0
2015-12-29 11:11:54: [DEBUG]    Got protocol frame magic 0xa26a type 0x600 from friend 0
2015-12-29 11:11:54: [DEBUG]    Got protocol frame magic 0xa26a type 0x600 from friend 0
2015-12-29 11:11:54: [DEBUG]    Got protocol frame magic 0xa26a type 0x600 from friend 0
2015-12-29 11:11:55: [DEBUG]    Got protocol frame magic 0xa26a type 0x600 from friend 0
2015-12-29 11:11:59: [DEBUG]    Got protocol frame magic 0xa26a type 0x600 from friend 0
2015-12-29 11:12:00: [DEBUG]    Got protocol frame magic 0xa26a type 0x600 from friend 0
2015-12-29 11:12:00: [DEBUG]    Got protocol frame magic 0xa26a type 0x600 from friend 0
2015-12-29 11:12:01: [DEBUG]    Got protocol frame magic 0xa26a type 0x600 from friend 0
2015-12-29 11:12:04: [DEBUG]    Got protocol frame magic 0xa26a type 0x600 from friend 0
2015-12-29 11:12:04: [DEBUG]    Got protocol frame magic 0xa26a type 0x600 from friend 0
2015-12-29 11:12:04: [DEBUG]    Got protocol frame magic 0xa26a type 0x600 from friend 0
2015-12-29 11:12:04: [WARNING]  conn closed!
2015-12-29 11:12:04: [INFO] Deleting tunnel #1326
gjedeer commented 8 years ago

Could you try the latest master?

gjedeer commented 8 years ago

I've tested that with ab (the Apache Benchmark): before the change, even with 2 concurrent connections tuntox locked quickly. After the fix, I tested with 10 concurrent connections and it was OK.

Please confirm that the problem is fixed for you, if possible.

kurnevsky commented 8 years ago

@gjedeer I can't connect with latest master - it writes "Rejected friend request from non-whitelisted friend", but I don't specify key "-i" key...

gjedeer commented 8 years ago

Whoops, try now. Accidentially I left whitelisting enabled by default, where it should have been disabled

kurnevsky commented 8 years ago

@gjedeer you are right - I can't reproduce this issue anymore.

gjedeer commented 8 years ago

I'm going to close it for now, but @milisarge your results are welcome too.