Cant reconnect after server reboot
Nobody has claimed this yet.
- Dominant language
- Go
- Stars
- 16.6k
- Forks
- 1.6k
- PR merge metrics
- No merged PRs in 30d
Description
Hello, I am using chisel in docker containers, here are the configurations
Home server:
version: "3.8"
services:
tunnel:
container_name: tunnel_to_server
image: jpillora/chisel:latest
restart: always
network_mode: host
command:
- "server"
- "--port"
- "2000"
- "--reverse"
- "--auth"
- "user:password"
Public server
server_tunnel:
container_name: server_tunnel
image: jpillora/chisel:latest
restart: always
network_mode: host
command:
- "client"
- "--auth"
- "user:password"
- "xx.xx.xx.xx:2000"
- "R:9800:localhost:9800" # website
- "R:55432:localhost:55432" # postgres
When I reboot the home server the container starts but cannot reconnect, what is the problem?
2026/02/28 08:40:13 client: Connecting to ws://xx.xx.xx.xx:2000
2026/02/28 08:40:16 client: Connected (Latency 204.880527ms)
2026/02/28 08:40:41 client: Disconnected
2026/02/28 08:40:41 client: Connection error: read tcp 192.168.1.116:57230->xx.xx.xx.xx:2000: read: connection reset by peer
2026/02/28 08:40:41 client: Retrying in 100ms...
2026/02/28 08:40:43 client: Connection error: server: Server cannot listen on R:9800=>localhost:9800 (Attempt: 1/unlimited)
2026/02/28 08:40:43 client: Retrying in 200ms...
2026/02/28 08:40:45 client: Connection error: server: Server cannot listen on R:9800=>localhost:9800 (Attempt: 2/unlimited)
2026/02/28 08:40:45 client: Retrying in 400ms...
2026/02/28 08:40:47 client: Connection error: server: Server cannot listen on R:9800=>localhost:9800 (Attempt: 3/unlimited)
2026/02/28 08:40:47 client: Retrying in 800ms...
2026/02/28 08:40:49 client: Connection error: server: Server cannot listen on R:9800=>localhost:9800 (Attempt: 4/unlimited)
2026/02/28 08:40:49 client: Retrying in 1.6s...
2026/02/28 08:40:53 client: Connection error: server: Server cannot listen on R:9800=>localhost:9800 (Attempt: 5/unlimited)
2026/02/28 08:40:53 client: Retrying in 3.2s...
2026/02/28 08:40:57 client: Connection error: server: Server cannot listen on R:9800=>localhost:9800 (Attempt: 6/unlimited)
2026/02/28 08:40:57 client: Retrying in 6.4s...
2026/02/28 08:41:05 client: Connection error: server: Server cannot listen on R:9800=>localhost:9800 (Attempt: 7/unlimited)
2026/02/28 08:41:05 client: Retrying in 12.8s...
2026/02/28 08:41:20 client: Connection error: server: Server cannot listen on R:9800=>localhost:9800 (Attempt: 8/unlimited)
2026/02/28 08:41:20 client: Retrying in 25.6s...
2026/02/28 08:41:47 client: Connection error: server: Server cannot listen on R:9800=>localhost:9800 (Attempt: 9/unlimited)
2026/02/28 08:41:47 client: Retrying in 51.2s...
2026/02/28 08:42:39 client: Connection error: server: Server cannot listen on R:9800=>localhost:9800 (Attempt: 10/unlimited)
2026/02/28 08:42:39 client: Retrying in 1m42.4s...
2026/02/28 08:44:23 client: Connection error: server: Server cannot listen on R:9800=>localhost:9800 (Attempt: 11/unlimited)
2026/02/28 08:44:23 client: Retrying in 3m24.8s...
2026/02/28 08:47:49 client: Connection error: server: Server cannot listen on R:9800=>localhost:9800 (Attempt: 12/unlimited)
2026/02/28 08:47:49 client: Retrying in 5m0s...
Contributor guide
No contributing guide indexed for this repository
First steps
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up — it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- Open a pull request that references the issue number.
Research direction
Start by reproducing the Docker client/server setup and follow the reconnect logs around the reverse mapping R:9800:localhost:9800. Check why the reverse listener cannot be established after the home server reboots; done means the client reconnects and both reverse mappings become usable again.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- docker, go
- Domain
- networking
- Issue type
- Bug
- Difficulty
- 4/5
- Estimated time
- 3-5 days
- Activity status
- Quiet
- Clarity
- Needs clarification
- Newbie friendliness
- 35/100