`databricks apps logs` fails with `websocket: bad handshake (HTTP 302 Found)` on an OAuth U2M (`databricks-cli`) profile
Maintainer antworten meist innerhalb von 1 Tag
Dieses Issue hat noch niemand übernommen.
Bewertung
- Schwierigkeit
- 3/5
- Geschätzter Aufwand
- 1-2 Tage
- Anfängerfreundlichkeit
- 68/100
- Issue-Typ
- Bug
- Klarheit
- Größtenteils klar
- Aktivitätsstatus
- Aktiv
- Tech-Stack
- go
- Bereich
- authentication, cli
Rechercherichtung
Beginne mit dem Befehl databricks apps logs und verfolge die WebSocket-Verbindung zu /logz/stream, wobei du dessen Credentials und Header mit dem Token aus databricks auth token vergleichst. Überprüfe den Fix anhand des gemeldeten OAuth-U2M-Profils: Das WebSocket-Upgrade sollte erfolgreich sein und JSON-Logdatensätze streamen, anstatt HTTP 302 zu empfangen.
Vom Indexierungsmodell aus dem Issue-Text verfasst.
Beschreibung
Versions: Databricks CLI v1.16.0 (Windows, winget) · Azure Databricks workspace · profile auth_type = databricks-cli (U2M, token in the OS keyring)
Repro
databricks apps logs <app-name> --tail-lines 20
Actual: --debug shows the CLI resolving the app and dialing wss://<app>.azure.databricksapps.com/logz/stream, then:
Error: websocket: bad handshake (HTTP 302 Found)
The 302 is the app domain redirecting to /oidc/oauth2/v2.0/authorize, so the credential on the request wasn't accepted.
Expected: the log stream.
Evidence that the app and permissions are fine (same user, same moment):
| Request | Result |
|---|---|
GET https://<app>/logz with Authorization: Bearer $(databricks auth token) |
200 |
GET https://<app>/logz without a token |
302 to authorize |
websocket upgrade wss://<app>/logz/stream with that bearer + Origin: https://<app> |
101; after sending one empty text message, JSON log records stream normally |
Forcing the CLI onto the same token as a PAT (DATABRICKS_AUTH_TYPE=pat, DATABRICKS_TOKEN=...) fails differently: Error: OAuth Token not supported for current auth type pat.
So the app domain accepts the workspace token from databricks auth token, but it rejects whatever credential apps logs attaches to its websocket dial.
Workaround: connect to /logz/stream directly with the bearer from databricks auth token, an Origin header, and an initial empty message.
- Vorherrschende Sprache
- Go
- Sterne
- 427
- Forks
- 267
- Ø Merge
- 2 T. 1 Std.
- Gemergte PRs (30 T.)
- 233
Entwicklungsumgebung
- Enthält ein Dockerfile oder eine Docker-Compose-Datei
- Hat eine Pull-Request-Vorlage
- Kein Beitragsleitfaden
Erste Schritte
- Lesen Sie das ganze Issue und danach den Beitragsleitfaden des Projekts.
- Schreiben Sie ins Issue, dass Sie es übernehmen — das erspart doppelte Arbeit.
- Forken Sie das Repository und arbeiten Sie in einem Branch.
- Öffnen Sie einen Pull Request, der die Issue-Nummer nennt.
Mehr aus databricks/cli
-
Apps commands only accept relative path to app.ymlEvtl. vergeben @yuri-rod hat das vor 38 Tagen übernommen. OffenCLI
Schwierigkeit 2/5 1-3 Stunden Anfängerfreundlichkeit 82/100
databricks/cli#6910 ·
Maintainer antworten meist innerhalb von 1 Tag
-
DABs
Schwierigkeit 2/5 1-3 Stunden Anfängerfreundlichkeit 68/100
databricks/cli#6670 · 1 Reaktion ·
Maintainer antworten meist innerhalb von 1 Tag
-
Bump vulnerable dependencies workflow is failingEvtl. vergeben @shreyas-goenka hat das heute übernommen. Offenbump-vuln-deps-failure
databricks/cli#7531 · 1 Kommentar · 7 zugewiesene Personen ·
Maintainer antworten meist innerhalb von 1 Tag
-
bundle run on an app fails with "not in RUNNING state" when the app's compute is UPDATINGEvtl. vergeben @andrewnester hat das vor 1 Tag übernommen. OffenBug DABs
Schwierigkeit 3/5 1-2 Tage Anfängerfreundlichkeit 76/100
databricks/cli#7451 · 1 zugewiesene Person ·
Maintainer antworten meist innerhalb von 1 Tag
-
Bundle deploy of an AI/BI dashboard breaks viewers' private bookmarks (UI save + publish does not)Offen
Schwierigkeit 4/5 3-5 Tage Anfängerfreundlichkeit 45/100
databricks/cli#7419 ·
Maintainer antworten meist innerhalb von 1 Tag
Ähnliche Issues
-
Schwierigkeit 2/5 1-3 Stunden Anfängerfreundlichkeit 70/100
prime-radiant-inc/evener#6241 ·
Maintainer antworten meist innerhalb von 1 Tag
-
Schwierigkeit 2/5 1-3 Stunden Anfängerfreundlichkeit 72/100
coder/openstorage#807 ·
Maintainer antworten meist innerhalb von 1 Tag
-
Schwierigkeit 2/5 1-3 Stunden Anfängerfreundlichkeit 84/100
NVIDIA/kubectl-nv#100 ·
Maintainer antworten meist innerhalb von 1 Tag
-
TestNoEagerPackageRegexps red on main: internal/gui/feedback.go:19 compiles a package-level regexpOffen
Schwierigkeit 2/5 1-3 Stunden Anfängerfreundlichkeit 76/100
-
Schwierigkeit 2/5 1-3 Stunden Anfängerfreundlichkeit 86/100
Maintainer antworten meist innerhalb von 1 Tag