chisel icon indicating copy to clipboard operation
chisel copied to clipboard

client: Connection error: read tcp 192.168.124.4:44058->106.9.xxx.xxx:8000: read: connection reset by peer

Open hongyi-zhao opened this issue 2 years ago • 2 comments

I have two machines, both running Ubuntu 20.04 LTS. Machine A have a PPPoE assigned dynamic public IP address 106.9.xxx.xxx, machine B resides on an intranet with the IP address 192.168.124.4. I installed the latest git master version of chisel on both machines and then do the following test:

On machine A:

$ chisel server -p 8000 --reverse
2021/10/31 14:34:37 server: Reverse tunnelling enabled
2021/10/31 14:34:37 server: Fingerprint ZlIz4ytGpRXNjd7OdOkkbJ/k13Zh2D4lZ534BhVZK2E=
2021/10/31 14:34:37 server: Listening on http://0.0.0.0:8000

On machine B:

$ chisel client 106.9.177.233:8000 R:socks
2021/10/31 14:36:38 client: Connecting to ws://106.9.xxx.xxx:8000
2021/10/31 14:36:38 client: Connection error: read tcp 192.168.124.4:44058->106.9.xxx.xxx:8000: read: connection reset by peer
[...]
^C2021/10/31 14:36:40 client: Cancelled

Any hints for this problem?

Regards, HZ

hongyi-zhao avatar Oct 31 '21 06:10 hongyi-zhao

This often occurs when my router is having problems. I think this happens when unable to reconnect 🤔 Maybe issue #213 also related

chisel client --max-retry-interval 1m --fingerprint $(cat chisel.id-01.fingerprint)  xxx.xxx.xxx.xxx:6001 R:pve-01:8006:8006/tcp
2021/11/12 23:24:16 client: Connecting to ws://xxx.xxx.xxx.xxx:6001
2021/11/12 23:24:16 client: Fingerprint xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx
2021/11/12 23:24:16 client: Connected (Latency 18.398779ms)
2021/11/12 23:33:51 client: Disconnected
2021/11/12 23:33:51 client: Connection error: websocket: close 1006 (abnormal closure): unexpected EOF
2021/11/12 23:33:51 client: Retrying in 100ms...
2021/11/12 23:33:51 client: Connection error: dial tcp xxx.xxx.xxx.xxx:6001: connect: connection refused (Attempt: 1)
2021/11/12 23:33:51 client: Retrying in 200ms...
2021/11/12 23:33:52 client: Connection error: dial tcp xxx.xxx.xxx.xxx:6001: connect: connection refused (Attempt: 2)
2021/11/12 23:33:52 client: Retrying in 400ms...
2021/11/12 23:33:52 client: Connection error: dial tcp xxx.xxx.xxx.xxx:6001: connect: connection refused (Attempt: 3)
2021/11/12 23:33:52 client: Retrying in 800ms...
2021/11/12 23:33:53 client: Connection error: dial tcp xxx.xxx.xxx.xxx:6001: connect: connection refused (Attempt: 4)
2021/11/12 23:33:53 client: Retrying in 1.6s...
2021/11/12 23:33:55 client: Connection error: dial tcp xxx.xxx.xxx.xxx:6001: connect: connection refused (Attempt: 5)
2021/11/12 23:33:55 client: Retrying in 3.2s...
2021/11/12 23:33:58 client: Connection error: dial tcp xxx.xxx.xxx.xxx:6001: connect: connection refused (Attempt: 6)
2021/11/12 23:33:58 client: Retrying in 6.4s...
2021/11/12 23:34:04 client: Connection error: dial tcp xxx.xxx.xxx.xxx:6001: connect: connection refused (Attempt: 7)
2021/11/12 23:34:04 client: Retrying in 12.8s...
2021/11/12 23:34:17 client: Connection error: dial tcp xxx.xxx.xxx.xxx:6001: connect: connection refused (Attempt: 8)
2021/11/12 23:34:17 client: Retrying in 25.6s...
2021/11/12 23:34:43 client: Fingerprint xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx
2021/11/12 23:34:43 client: Connected (Latency 17.408855ms)
2021/11/13 06:43:40 client: Disconnected
2021/11/13 06:43:40 client: Connection error: read tcp xxx.xxx.xxx.xxx:36548->xxx.xxx.xxx.xxx:6001: read: connection reset by peer
2021/11/13 06:43:40 client: Give up

FahriDevZ avatar Nov 13 '21 06:11 FahriDevZ

I eventually switched to frp, which doesn't have this problem.

hongyi-zhao avatar Nov 13 '21 06:11 hongyi-zhao