Repository navigation
feat(coderd/healthcheck): add access URL error codes and healthcheck doc - #10915
Conversation
cbb09ea to
8080874
Compare
|
What would be the expected shape here? Something like: {
"warnings": [
"code": "W001",
"message": "This is a warning"
],
"resolutions": {
"W001": "https://docs.coder.com/warning/W001"
}
} |
I had envisioned |
|
@johnstcn sounds good! |
8080874 to
1994ce1
Compare
| // CodeUnknown is a catch-all health code when something unexpected goes wrong (for example, a panic). | ||
| CodeUnknown Code = "EUNKNOWN" | ||
|
|
||
| CodeProxyUpdate Code = "EWP01" | ||
| CodeProxyFetch Code = "EWP02" | ||
| CodeProxyVersionMismatch Code = "EWP03" | ||
| CodeProxyUnhealthy Code = "EWP04" | ||
|
|
||
| CodeDatabasePingFailed Code = "EDB01" | ||
| CodeDatabasePingSlow Code = "EDB02" | ||
|
|
||
| CodeWebsocketDial Code = "EWS01" | ||
| CodeWebsocketEcho Code = "EWS02" | ||
| CodeWebsocketMsg Code = "EWS03" | ||
|
|
||
| CodeAccessURLNotSet Code = "EACS01" | ||
| CodeAccessURLInvalid Code = "EACS02" | ||
| CodeAccessURLFetch Code = "EACS03" | ||
| CodeAccessURLNotOK Code = "EACS04" | ||
|
|
||
| CodeDERPNodeUsesWebsocket Code = `EDERP01` | ||
| CodeDERPOneNodeUnhealthy Code = `EDERP02` |
There was a problem hiding this comment.
review: these all have to go in here to be generated properly
Co-authored-by: Muhammad Atif Ali <atif@coder.com>
Co-authored-by: Muhammad Atif Ali <atif@coder.com>
| > [forced websocket connections for DERP](../cli/server.md#--derp-force-websockets). | ||
|
|
||
| **Solution:** ensure that any configured reverse proxy does not strip the | ||
| `Upgrade: derp` header. |
There was a problem hiding this comment.
ensure that any proxies you use allow connection upgrade with the Upgrade: derp header.
| performance may be impacted for clients closest to the unhealthy DERP server. | ||
|
|
||
| **Solution:** Ensure that the DERP server is available and reachable over the | ||
| network on port 443, for example: |
There was a problem hiding this comment.
Ensure that the DERP server is available and reachable over the network, for example:
| network on port 443, for example: | ||
|
|
||
| ```shell | ||
| curl -v "https://coder.company.com:443/derp" |
There was a problem hiding this comment.
:443 is redundant if you use https://
| running Coder, using standard troubleshooting tools like `curl`: | ||
|
|
||
| ```shell | ||
| curl -v "https://coder.company.com:443/" |
There was a problem hiding this comment.
:443 is redundant with https://
| ``` | ||
|
|
||
| 2. Ensure that any reverse proxy that is sitting in front of Coder's configured | ||
| access URL is not stripping the HTTP header `Upgrade: websocket`. |
There was a problem hiding this comment.
Ensure that any reverse proxy that is serving Coder's configured access URL allows connection upgrade with the header Upgrade: websocket
| **Problem:** One or more workspace proxies are not reachable. | ||
|
|
||
| **Solution:** Ensure that Coder can establish a connection to the configured | ||
| workspace proxies on port 443. |
There was a problem hiding this comment.
Ensure that Coder can establish a connection to the configured
workspace proxies
Relates to #8965
Future work:
site/src/apito create a troubleshooting link from an error that extracts the error code prefix matching^([A-Z0-9]+):..errorand.warnings[]to be a shape of{ message: string, code: string}. I started on this but realised it makes the diff too large, so will do it in a follow-up.