- Notifications
You must be signed in to change notification settings - Fork1k
Commit4a08082
authored
fix: ensure wsproxy
The `SingleTailnet` behavior only checked to see if the `MultiAgent` wasclosed, but the websocket error was not being propogated into the`MultiAgent`, causing it to never be swapped for a new working one.Fixes#11401Before:```Coder Workspace Proxy v0.0.0-devel+85ff030 - Your Self-Hosted Remote Development PlatformStarted HTTP listener athttp://0.0.0.0:3001View the Web UI:http://127.0.0.1:3001==> Logs will stream in below (press ctrl+c to gracefully exit):2024-01-04 20:11:56.376 [warn] net.workspace-proxy.servertailnet: broadcast server node to agents ... error= write message: github.com/coder/coder/v2/enterprise/wsproxy/wsproxysdk.(*remoteMultiAgentHandler).writeJSON /home/coder/coder/enterprise/wsproxy/wsproxysdk/wsproxysdk.go:524 - failed to write msg: WebSocket closed: failed to read frame header: EOF```After:```Coder Workspace Proxy v0.0.0-devel+12f1878 - Your Self-Hosted Remote Development PlatformStarted HTTP listener athttp://0.0.0.0:3001View the Web UI:http://127.0.0.1:3001==> Logs will stream in below (press ctrl+c to gracefully exit):2024-01-04 20:26:38.545 [warn] net.workspace-proxy.servertailnet: multiagent closed, reinitializing2024-01-04 20:26:38.546 [erro] net.workspace-proxy.servertailnet: reinit multi agent ... error= dial coordinate websocket: github.com/coder/coder/v2/enterprise/wsproxy/wsproxysdk.(*Client).DialCoordinator /home/coder/coder/enterprise/wsproxy/wsproxysdk/wsproxysdk.go:454 - failed to WebSocket dial: failed to send handshake request: Get "http://127.0.0.1:3000/api/v2/workspaceproxies/me/coordinate": dial tcp 127.0.0.1:3000: connect: connection refused2024-01-04 20:26:38.587 [erro] net.workspace-proxy.servertailnet: reinit multi agent ... error= dial coordinate websocket: github.com/coder/coder/v2/enterprise/wsproxy/wsproxysdk.(*Client).DialCoordinator /home/coder/coder/enterprise/wsproxy/wsproxysdk/wsproxysdk.go:454 - failed to WebSocket dial: failed to send handshake request: Get "http://127.0.0.1:3000/api/v2/workspaceproxies/me/coordinate": dial tcp 127.0.0.1:3000: connect: connection refusedhandshake request: Get "http://127.0.0.1:3000/api/v2/workspaceproxies/me/coordinate": dial tcp 127.0.0.1:3000: connect: connection refused2024-01-04 20:26:40.446 [info] net.workspace-proxy.servertailnet: successfully reinitialized multiagent agents=0 took=1.900892615s```MultiAgent
is closed when websocket dies (#11414)1 parentd708ac7 commit4a08082
File tree
3 files changed
+31
-10
lines changed- coderd
- httpapi
- enterprise/wsproxy/wsproxysdk
3 files changed
+31
-10
lines changedOriginal file line number | Diff line number | Diff line change | |
---|---|---|---|
| |||
4 | 4 |
| |
5 | 5 |
| |
6 | 6 |
| |
| 7 | + | |
7 | 8 |
| |
8 | 9 |
| |
9 | 10 |
| |
| |||
26 | 27 |
| |
27 | 28 |
| |
28 | 29 |
| |
29 |
| - | |
30 |
| - | |
31 |
| - | |
32 |
| - | |
| 30 | + | |
| 31 | + | |
| 32 | + | |
| 33 | + | |
33 | 34 |
| |
34 | 35 |
| |
35 | 36 |
| |
| |||
41 | 42 |
| |
42 | 43 |
| |
43 | 44 |
| |
| 45 | + | |
44 | 46 |
| |
45 | 47 |
| |
46 | 48 |
| |
|
Original file line number | Diff line number | Diff line change | |
---|---|---|---|
| |||
224 | 224 |
| |
225 | 225 |
| |
226 | 226 |
| |
| 227 | + | |
227 | 228 |
| |
228 | 229 |
| |
229 | 230 |
| |
| |||
247 | 248 |
| |
248 | 249 |
| |
249 | 250 |
| |
| 251 | + | |
250 | 252 |
| |
251 | 253 |
| |
252 | 254 |
| |
| |||
264 | 266 |
| |
265 | 267 |
| |
266 | 268 |
| |
| 269 | + | |
| 270 | + | |
| 271 | + | |
| 272 | + | |
| 273 | + | |
267 | 274 |
| |
268 | 275 |
| |
269 | 276 |
| |
|
Original file line number | Diff line number | Diff line change | |
---|---|---|---|
| |||
431 | 431 |
| |
432 | 432 |
| |
433 | 433 |
| |
| 434 | + | |
434 | 435 |
| |
435 | 436 |
| |
436 | 437 |
| |
| |||
454 | 455 |
| |
455 | 456 |
| |
456 | 457 |
| |
457 |
| - | |
| 458 | + | |
458 | 459 |
| |
459 | 460 |
| |
460 | 461 |
| |
461 | 462 |
| |
462 | 463 |
| |
| 464 | + | |
463 | 465 |
| |
464 | 466 |
| |
465 | 467 |
| |
| |||
472 | 474 |
| |
473 | 475 |
| |
474 | 476 |
| |
| 477 | + | |
| 478 | + | |
| 479 | + | |
| 480 | + | |
| 481 | + | |
475 | 482 |
| |
476 | 483 |
| |
477 | 484 |
| |
| |||
480 | 487 |
| |
481 | 488 |
| |
482 | 489 |
| |
| 490 | + | |
483 | 491 |
| |
484 | 492 |
| |
485 | 493 |
| |
486 |
| - | |
| 494 | + | |
487 | 495 |
| |
488 | 496 |
| |
489 | 497 |
| |
490 | 498 |
| |
491 | 499 |
| |
492 |
| - | |
| 500 | + | |
493 | 501 |
| |
494 | 502 |
| |
495 | 503 |
| |
| |||
499 | 507 |
| |
500 | 508 |
| |
501 | 509 |
| |
502 |
| - | |
503 |
| - | |
| 510 | + | |
| 511 | + | |
| 512 | + | |
504 | 513 |
| |
505 | 514 |
| |
506 | 515 |
| |
| |||
517 | 526 |
| |
518 | 527 |
| |
519 | 528 |
| |
| 529 | + | |
520 | 530 |
| |
521 | 531 |
| |
522 | 532 |
| |
523 | 533 |
| |
| 534 | + | |
524 | 535 |
| |
525 | 536 |
| |
526 | 537 |
| |
| |||
531 | 542 |
| |
532 | 543 |
| |
533 | 544 |
| |
| 545 | + | |
534 | 546 |
| |
535 | 547 |
| |
536 | 548 |
| |
| |||
573 | 585 |
| |
574 | 586 |
| |
575 | 587 |
| |
576 |
| - | |
| 588 | + | |
577 | 589 |
| |
578 | 590 |
| |
579 | 591 |
| |
|
0 commit comments
Comments
(0)