Movatterモバイル変換


[0]ホーム

URL:


Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Sign up
Appearance settings
This repository was archived by the owner on Aug 30, 2024. It is now read-only.
/coder-v1-cliPublic archive

Dial logs#398

Merged
deansheather merged 3 commits intomasterfromdial-logs
Jul 26, 2021
Merged

Dial logs#398

deansheather merged 3 commits intomasterfromdial-logs
Jul 26, 2021

Conversation

deansheather
Copy link
Member

@deansheatherdeansheather commentedJul 24, 2021
edited
Loading

Adds optional debug logging to Dial

$ CODER_TUNNEL_DEBUG=true go run ./cmd/coder tunnel dean-c 8081 80812021-07-24 06:34:31.617 [INFO]  <tunnel.go:39>  debug logging enabled2021-07-24 06:34:34.346 [DEBUG] <tunnel.go:110> Connecting to workspace...2021-07-24 06:34:34.346 [DEBUG] (wsnet) <dial.go:57>    connecting to broker    {"broker": "wss://master.cdr.dev/api/private/envagent/xxx/connect?session_token=xxx"}2021-07-24 06:34:34.927 [DEBUG] (wsnet) <dial.go:68>    connected to broker2021-07-24 06:34:34.927 [DEBUG] (wsnet) <dial.go:101>   creating peer connection        {"options": "\u0026{Log:0xc0003c22a0 ICEServers:[{URLs:[turn:127.0.0.1:3478?transport=tcp] Username:~magicalusername~ Credential:~magicalusername~ CredentialType:password}] TURNProxyAuthToken:xxx TURNProxyURL:https://master.cdr.dev}", "turn_proxy": "\u0026{baseURL:xxx token:xxx}"}2021-07-24 06:34:34.929 [DEBUG] (wsnet) <dial.go:106>   created peer connection2021-07-24 06:34:34.929 [DEBUG] (wsnet) <dial.go:113>   creating control channel        {"proto": "control"}2021-07-24 06:34:34.930 [DEBUG] (wsnet) <dial.go:126>   created offer   {"offer": {"type": "offer", "sdp": "xxx"}}2021-07-24 06:34:34.930 [DEBUG] (wsnet) <dial.go:142>   sending offer message   {"msg": {"offer": {"type": "offer", "sdp": "xxx"}, "servers": [{"urls": ["turn:127.0.0.1:3478?transport=tcp"], "username": "~magicalusername~", "credential": "~magicalusername~"}], "turn_proxy_url": "https://master.cdr.dev", "ports": null, "error": "", "answer": null, "candidate": ""}}2021-07-24 06:34:34.932 [DEBUG] (wsnet) <dial.go:221>   beginning negotiation2021-07-24 06:34:35.308 [DEBUG] (wsnet) <dial.go:231>   got message from handshake conn {"msg": {"offer": null, "servers": null, "turn_proxy_url": "", "ports": null, "error": "", "answer": {"type": "answer", "sdp": "xxx"}, "candidate": ""}}2021-07-24 06:34:35.308 [DEBUG] (wsnet) <dial.go:251>   received answer {"a": {"type": "answer", "sdp": "xxx"}}2021-07-24 06:34:36.261 [DEBUG] (wsnet) <dial.go:231>   got message from handshake conn {"msg": {"offer": null, "servers": null, "turn_proxy_url": "", "ports": null, "error": "", "answer": null, "candidate": "xxx"}}2021-07-24 06:34:36.262 [DEBUG] (wsnet) <dial.go:242>   adding remote ICE candidate     {"c": {"candidate": "xxx", "sdpMid": null, "sdpMLineIndex": null, "usernameFragment": null}}2021-07-24 06:34:38.121 [DEBUG] (wsnet) <dial.go:344>   opening data channel    {"proto": "tcp:localhost:8081"}2021-07-24 06:34:38.678 [DEBUG] (wsnet) <dial.go:363>   data channel opened     {"proto": "tcp:localhost:8081", "dc_id": 3}2021-07-24 06:34:38.678 [DEBUG] (wsnet) <dial.go:369>   data channel detached   {"proto": "tcp:localhost:8081", "dc_id": 3}2021-07-24 06:34:39.050 [DEBUG] (wsnet) <dial.go:382>   dial response   {"proto": "tcp:localhost:8081", "dc_id": 3, "res": "{Code:dial_error Err:dial tcp 127.0.0.1:8081: connect: connection refused Net:tcp Op:dial}"}fatal: running tunnel: dial tcp: dial tcp 127.0.0.1:8081: connect: connection refusedexit status 1

[CH-15414]

@shortcut-integration
Copy link

This pull request has been linked toClubhouse Story #15414: Add logging to wsnet dial.

@deansheatherdeansheatherenabled auto-merge (squash)July 24, 2021 06:52
@@ -34,6 +34,10 @@ coder tunnel my-dev 3000 3000
RunE: func(cmd *cobra.Command, args []string) error {
ctx := context.Background()
log := slog.Make(sloghuman.Sink(os.Stderr))
if os.Getenv("CODER_TUNNEL_DEBUG") != "" {
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others.Learn more.

I'm good with this being internal, but I'd prefer if we implemented aLOG_LEVEL environment variable in slog longer-term.

@deansheatherdeansheather merged commite641ac5 intomasterJul 26, 2021
@deansheatherdeansheather deleted the dial-logs branchJuly 26, 2021 16:21
Sign up for freeto subscribe to this conversation on GitHub. Already have an account?Sign in.
Reviewers

@kylecarbskylecarbskylecarbs approved these changes

Assignees
No one assigned
Labels
None yet
Projects
None yet
Milestone
No milestone
Development

Successfully merging this pull request may close these issues.

2 participants
@deansheather@kylecarbs

[8]ページ先頭

©2009-2025 Movatter.jp