{"record":{"id":"5d6e3b8d4e02152b","repo":"cloudflare/cloudflared","slug":"received-unknown-connection-type-s","errorCode":null,"errorMessage":"Received unknown connection type: %s","messagePattern":"Received unknown connection type: (.+?)","errorType":"validation","errorClass":null,"httpStatus":null,"severity":"error","filePath":"connection/http2.go","lineNumber":154,"sourceCode":"\n\tcase TypeTCP:\n\t\thost, err := getRequestHost(r)\n\t\tif err != nil {\n\t\t\trequestErr = fmt.Errorf(`cloudflared received a warp-routing request with an empty host value: %w`, err)\n\t\t\tbreak\n\t\t}\n\n\t\trws := NewHTTPResponseReadWriterAcker(respWriter, respWriter, r)\n\t\trequestErr = originProxy.ProxyTCP(r.Context(), rws, &TCPRequest{\n\t\t\tDest:      host,\n\t\t\tCFRay:     FindCfRayHeader(r),\n\t\t\tLBProbe:   IsLBProbeRequest(r),\n\t\t\tCfTraceID: r.Header.Get(tracing.TracerContextName),\n\t\t\tConnIndex: c.connIndex,\n\t\t})\n\n\tdefault:\n\t\trequestErr = fmt.Errorf(\"Received unknown connection type: %s\", connType)\n\t}\n\n\tif requestErr != nil {\n\t\tc.log.Error().Err(requestErr).Msg(\"failed to serve incoming request\")\n\n\t\t// WriteErrorResponse will return false if status was already written. we need to abort handler.\n\t\tif !respWriter.WriteErrorResponse(requestErr) {\n\t\t\tc.log.Debug().Msg(\"Handler aborted due to failure to write error response after status already sent\")\n\t\t\tpanic(http.ErrAbortHandler)\n\t\t}\n\t}\n}\n\n// ConfigurationUpdateBody is the representation followed by the edge to send updates to cloudflared.\ntype ConfigurationUpdateBody struct {\n\tVersion int32             `json:\"version\"`\n\tConfig  gojson.RawMessage `json:\"config\"`\n}","sourceCodeStart":136,"sourceCodeEnd":172,"githubUrl":"https://github.com/cloudflare/cloudflared/blob/2253eeeb25a44a713a4b60b8ba1e1b3f377d1a0f/connection/http2.go#L136-L172","documentation":"ServeHTTP switches on the connection type (TypeHTTP, TypeWebsocket, TypeTCP). If connType matches none of the known types, it falls to the default branch and returns `Received unknown connection type: %s`. This indicates the edge sent a connection type this cloudflared version does not understand.","triggerScenarios":"The edge delivers a request whose connType value (derived from the request metadata/cf-cloudflared-connection-type style header) is not one of the Type* constants compiled into this binary.","commonSituations":"Running an outdated cloudflared against a newer edge that routes new connection types, corrupted/absent connection-type metadata on the request, or testing edge request handling with hand-crafted requests.","solutions":["Upgrade cloudflared to the latest release so it recognizes newer connection types","Check the logged connType value to identify what the edge sent","If it persists on the latest version, report the edge protocol mismatch to Cloudflare","Restart the tunnel to re-establish edge connections after upgrading"],"exampleFix":null,"handlingStrategy":"fallback","validationCode":null,"typeGuard":null,"tryCatchPattern":"if err != nil && strings.HasPrefix(err.Error(), \"Received unknown connection type:\") {\n    log.Warn().Err(err).Msg(\"edge sent unrecognized connection type; consider upgrading cloudflared\")\n}","preventionTips":["Keep cloudflared updated to the latest release","Monitor release notes for new connection types","Restart tunnels after upgrading so edge connections use the new binary"],"tags":["protocol","version-mismatch","edge"],"backgroundTag":"invalid-enum-value","analyzedSha":"2253eeeb25a44a713a4b60b8ba1e1b3f377d1a0f","analyzedAt":"2026-09-06T04:14:33.757Z","contentChangedAt":"2026-09-06T04:14:33.757Z","schemaVersion":2},"datasetVersion":"2026-09-14T00:17:10.932Z"}