Skip to content

coder agent not work, can not connect from websocket or ssh #6554

Closed
@gaoletian

Description

@gaoletian

now

  • coder startup ok
  • create template ok
  • create workspace ok

image

issues

can not open workspace from web

can not connect workspace from ssh

coder ls -a

WORKSPACE  TEMPLATE            STATUS   LAST BUILT  OUTDATED  STARTS AT  STOPS AFTER  
admin/one  docker-code-server  Started  26m         false     -          1d         

coder ping one   #  hang up and nothing response
coder ssh one    #  hang up and nothing response
coder speedtest one    #  hang up and nothing response

please help , some info on below

os

Linux version 3.10.0-1160.49.1.el7.x86_64 (mockbuild@kbuilder.bsys.centos.org) (gcc version 4.8.5 20150623 (Red Hat 4.8.5-44) (GCC) ) #1 SMP Tue Nov 30 15:51:32 UTC 2021

docker

Docker version 23.0.1, build a5ee5b1

coder startup command

export CODER_DATA=$HOME/.config/coderv2-docker
export DOCKER_GROUP=$(getent group docker | cut -d: -f3)
export DEV_GROUP=$(getent group dev | cut -d: -f3)
mkdir -p $CODER_DATA
chmod 777 $CODER_DATA

docker run --rm -it --name="coder" \
		-e CODER_ACCESS_URL="http://172.16.158.240"  \
		-e CODER_HTTP_ADDRESS="0.0.0.0:3000" \
		-p 0.0.0.0:80:3000 \
		-v $CODER_DATA:/home/coder/.config \
		-v /var/run/docker.sock:/var/run/docker.sock \
		--group-add $DOCKER_GROUP \
		--group-add $DEV_GROUP  \
		offline/coder

docker ps

c869e8be764d   codercom/code-server:latest   "sh -c '#!/usr/bin/e…"   9 minutes ago    Up 9 minutes    8080/tcp               coder-admin-one
5ea199138e46   offline/coder                 "/opt/coder server"      10 minutes ago   Up 10 minutes   0.0.0.0:80->3000/tcp   coder

main.tf

terraform {
  required_providers {
    coder = {
      source  = "coder/coder"
      # version = "~> 0.6.16"
    }
    docker = {
      source  = "kreuzwerker/docker"
      #version = "~> 3.0.1"
    }
  }
}

data "coder_provisioner" "me" {
}

provider "docker" {
}

data "coder_workspace" "me" {
}

resource "coder_agent" "main" {
  arch = data.coder_provisioner.me.arch
  os   = "linux"

  login_before_ready     = true
  startup_script_timeout = 180
  startup_script         = <<-EOT
    set -e
    code-server --auth none --bind-addr 0.0.0.0:13337 >/tmp/code-server.log 2>&1 &
  EOT

  # These environment variables allow you to make Git commits right away after creating a
  # workspace. Note that they take precedence over configuration defined in ~/.gitconfig!
  # You can remove this block if you'd prefer to configure Git manually or using
  # dotfiles. (see docs/dotfiles.md)
  env = {
    GIT_AUTHOR_NAME     = "${data.coder_workspace.me.owner}"
    GIT_COMMITTER_NAME  = "${data.coder_workspace.me.owner}"
    GIT_AUTHOR_EMAIL    = "${data.coder_workspace.me.owner_email}"
    GIT_COMMITTER_EMAIL = "${data.coder_workspace.me.owner_email}"
  }
}

resource "coder_app" "code-server" {
  agent_id     = coder_agent.main.id
  slug         = "code-server"
  display_name = "code-server"
  url          = "http://localhost:13337/?folder=/home/coder"
  icon         = "/icon/code.svg"
  subdomain    = false
  share        = "owner"

  healthcheck {
    url       = "http://localhost:13337/healthz"
    interval  = 3
    threshold = 10
  }
}

resource "docker_volume" "home_volume" {
  name = "coder-${data.coder_workspace.me.id}-home"
  # Protect the volume from being deleted due to changes in attributes.
  lifecycle {
    ignore_changes = all
  }
  # Add labels in Docker to keep track of orphan resources.
  labels {
    label = "coder.owner"
    value = data.coder_workspace.me.owner
  }
  labels {
    label = "coder.owner_id"
    value = data.coder_workspace.me.owner_id
  }
  labels {
    label = "coder.workspace_id"
    value = data.coder_workspace.me.id
  }
  # This field becomes outdated if the workspace is renamed but can
  # be useful for debugging or cleaning out dangling volumes.
  labels {
    label = "coder.workspace_name_at_creation"
    value = data.coder_workspace.me.name
  }
}

resource "docker_container" "workspace" {
  count = data.coder_workspace.me.start_count
  image = "codercom/code-server:latest"
  # Uses lower() to avoid Docker restriction on container names.
  name = "coder-${data.coder_workspace.me.owner}-${lower(data.coder_workspace.me.name)}"
  # Hostname makes the shell more user friendly: coder@my-workspace:~$
  hostname = data.coder_workspace.me.name
  # Use the docker gateway if the access URL is 127.0.0.1
  entrypoint = ["sh", "-c", replace(coder_agent.main.init_script, "/localhost|127\\.0\\.0\\.1/", "host.docker.internal")]
  env        = ["CODER_AGENT_TOKEN=${coder_agent.main.token}"]
  host {
    host = "host.docker.internal"
    ip   = "host-gateway"
  }
  volumes {
    container_path = "/home/coder/"
    volume_name    = docker_volume.home_volume.name
    read_only      = false
  }
  # Add labels in Docker to keep track of orphan resources.
  labels {
    label = "coder.owner"
    value = data.coder_workspace.me.owner
  }
  labels {
    label = "coder.owner_id"
    value = data.coder_workspace.me.owner_id
  }
  labels {
    label = "coder.workspace_id"
    value = data.coder_workspace.me.id
  }
  labels {
    label = "coder.workspace_name"
    value = data.coder_workspace.me.name
  }
}

docker inspect container

[
    {
        "Id": "c869e8be764df121da4e01b8193af9da7fcafd5194c1aa34ce173e6884aae8f5",
        "Created": "2023-03-10T11:06:20.504103157Z",
        "Path": "sh",
        "Args": [
            "-c",
            "#!/usr/bin/env sh\nset -eux\n# Sleep for a good long while before exiting.\n# This is to allow folks to exec into a failed workspace and poke around to\n# troubleshoot.\nwaitonexit() {\n\techo \"=== Agent script exited with non-zero code. Sleeping 24h to preserve logs...\"\n\tsleep 86400\n}\ntrap waitonexit EXIT\nBINARY_DIR=$(mktemp -d -t coder.XXXXXX)\nBINARY_NAME=coder\nBINARY_URL=http://172.16.158.240/bin/coder-linux-amd64\ncd \"$BINARY_DIR\"\n# Attempt to download the coder agent.\n# This could fail for a number of reasons, many of which are likely transient.\n# So just keep trying!\nwhile :; do\n\t# Try a number of different download tools, as we don not know what we\n\t# will have available.\n\tstatus=\"\"\n\tif command -v curl >/dev/null 2>&1; then\n\t\tcurl -fsSL --compressed \"${BINARY_URL}\" -o \"${BINARY_NAME}\" && break\n\t\tstatus=$?\n\telif command -v wget >/dev/null 2>&1; then\n\t\twget -q \"${BINARY_URL}\" -O \"${BINARY_NAME}\" && break\n\t\tstatus=$?\n\telif command -v busybox >/dev/null 2>&1; then\n\t\tbusybox wget -q \"${BINARY_URL}\" -O \"${BINARY_NAME}\" && break\n\t\tstatus=$?\n\telse\n\t\techo \"error: no download tool found, please install curl, wget or busybox wget\"\n\t\texit 127\n\tfi\n\techo \"error: failed to download coder agent\"\n\techo \"       command returned: ${status}\"\n\techo \"Trying again in 30 seconds...\"\n\tsleep 30\ndone\n\nif ! chmod +x $BINARY_NAME; then\n\techo \"Failed to make $BINARY_NAME executable\"\n\texit 1\nfi\n\nexport CODER_AGENT_AUTH=\"token\"\nexport CODER_AGENT_URL=\"http://172.16.158.240/\"\nexec ./$BINARY_NAME agent\n"
        ],
        "State": {
            "Status": "running",
            "Running": true,
            "Paused": false,
            "Restarting": false,
            "OOMKilled": false,
            "Dead": false,
            "Pid": 16273,
            "ExitCode": 0,
            "Error": "",
            "StartedAt": "2023-03-10T11:06:20.79892689Z",
            "FinishedAt": "0001-01-01T00:00:00Z"
        },
        "Image": "sha256:3a8b3a983aaccaf4e914bbb2c0b73c0abe53329952e2d608576d0b7007f0d5bb",
        "ResolvConfPath": "/var/lib/docker/containers/c869e8be764df121da4e01b8193af9da7fcafd5194c1aa34ce173e6884aae8f5/resolv.conf",
        "HostnamePath": "/var/lib/docker/containers/c869e8be764df121da4e01b8193af9da7fcafd5194c1aa34ce173e6884aae8f5/hostname",
        "HostsPath": "/var/lib/docker/containers/c869e8be764df121da4e01b8193af9da7fcafd5194c1aa34ce173e6884aae8f5/hosts",
        "LogPath": "/var/lib/docker/containers/c869e8be764df121da4e01b8193af9da7fcafd5194c1aa34ce173e6884aae8f5/c869e8be764df121da4e01b8193af9da7fcafd5194c1aa34ce173e6884aae8f5-json.log",
        "Name": "/coder-admin-one",
        "RestartCount": 0,
        "Driver": "overlay2",
        "Platform": "linux",
        "MountLabel": "",
        "ProcessLabel": "",
        "AppArmorProfile": "",
        "ExecIDs": null,
        "HostConfig": {
            "Binds": [
                "coder-4a0b8ea1-009c-4178-8bf1-ba67e8e97754-home:/home/coder/:rw"
            ],
            "ContainerIDFile": "",
            "LogConfig": {
                "Type": "json-file",
                "Config": {
                    "max-file": "10",
                    "max-size": "100m"
                }
            },
            "NetworkMode": "default",
            "PortBindings": null,
            "RestartPolicy": {
                "Name": "no",
                "MaximumRetryCount": 0
            },
            "AutoRemove": false,
            "VolumeDriver": "",
            "VolumesFrom": null,
            "ConsoleSize": [
                0,
                0
            ],
            "CapAdd": null,
            "CapDrop": null,
            "CgroupnsMode": "host",
            "Dns": null,
            "DnsOptions": null,
            "DnsSearch": null,
            "ExtraHosts": [
                "host.docker.internal:169.254.123.1",
                "code.example.com:172.16.153.78"
            ],
            "GroupAdd": null,
            "IpcMode": "private",
            "Cgroup": "",
            "Links": null,
            "OomScoreAdj": 0,
            "PidMode": "",
            "Privileged": false,
            "PublishAllPorts": false,
            "ReadonlyRootfs": false,
            "SecurityOpt": null,
            "UTSMode": "",
            "UsernsMode": "",
            "ShmSize": 67108864,
            "Runtime": "runc",
            "Isolation": "",
            "CpuShares": 0,
            "Memory": 0,
            "NanoCpus": 0,
            "CgroupParent": "",
            "BlkioWeight": 0,
            "BlkioWeightDevice": null,
            "BlkioDeviceReadBps": null,
            "BlkioDeviceWriteBps": null,
            "BlkioDeviceReadIOps": null,
            "BlkioDeviceWriteIOps": null,
            "CpuPeriod": 0,
            "CpuQuota": 0,
            "CpuRealtimePeriod": 0,
            "CpuRealtimeRuntime": 0,
            "CpusetCpus": "",
            "CpusetMems": "",
            "Devices": null,
            "DeviceCgroupRules": null,
            "DeviceRequests": null,
            "MemoryReservation": 0,
            "MemorySwap": 0,
            "MemorySwappiness": null,
            "OomKillDisable": false,
            "PidsLimit": null,
            "Ulimits": null,
            "CpuCount": 0,
            "CpuPercent": 0,
            "IOMaximumIOps": 0,
            "IOMaximumBandwidth": 0,
            "MaskedPaths": [
                "/proc/asound",
                "/proc/acpi",
                "/proc/kcore",
                "/proc/keys",
                "/proc/latency_stats",
                "/proc/timer_list",
                "/proc/timer_stats",
                "/proc/sched_debug",
                "/proc/scsi",
                "/sys/firmware"
            ],
            "ReadonlyPaths": [
                "/proc/bus",
                "/proc/fs",
                "/proc/irq",
                "/proc/sys",
                "/proc/sysrq-trigger"
            ],
            "Init": false
        },
        "GraphDriver": {
            "Data": {
                "LowerDir": "/var/lib/docker/overlay2/0a57c78b39a698e41818e32c7e9ccbcf13b5bb0595490dc3d91f64e622fe8211-init/diff:/var/lib/docker/overlay2/fd5b794642adb4a5041c6d056d26887dbe6141db95fb7c497af6ac7cf6bd2dcc/diff:/var/lib/docker/overlay2/7186489c3468c46b33b8d3b7d0169d7f5691b48b641311a7b60d9b0bee591307/diff:/var/lib/docker/overlay2/bf4f671d4e3fb5ac5a845bc029229d50d8449d1ce80b0f375b1a0b561ea7ef1e/diff:/var/lib/docker/overlay2/3b3d3605f2d76403d211654d4b37e4cf40724c846d6aa7aafce4c16f6def99c1/diff:/var/lib/docker/overlay2/34031bcc4e6a9e8be583f09aa8a2efc9bda87d7ab6fd69a2c518cc948d050177/diff:/var/lib/docker/overlay2/cbf5b5cf57b370766f4942d7ef4593fe2ee80f78f5e2c0a60533bf21a5ff5b30/diff:/var/lib/docker/overlay2/78f381cd3f280fddfd97bcb18ca1755d3f7ee790a664af21cced55cb7d8cb469/diff:/var/lib/docker/overlay2/3680b9afb351aa452c975f929d6108fdeba2e2271e893ab52724bd549126bde6/diff",
                "MergedDir": "/var/lib/docker/overlay2/0a57c78b39a698e41818e32c7e9ccbcf13b5bb0595490dc3d91f64e622fe8211/merged",
                "UpperDir": "/var/lib/docker/overlay2/0a57c78b39a698e41818e32c7e9ccbcf13b5bb0595490dc3d91f64e622fe8211/diff",
                "WorkDir": "/var/lib/docker/overlay2/0a57c78b39a698e41818e32c7e9ccbcf13b5bb0595490dc3d91f64e622fe8211/work"
            },
            "Name": "overlay2"
        },
        "Mounts": [
            {
                "Type": "volume",
                "Name": "coder-4a0b8ea1-009c-4178-8bf1-ba67e8e97754-home",
                "Source": "/var/lib/docker/volumes/coder-4a0b8ea1-009c-4178-8bf1-ba67e8e97754-home/_data",
                "Destination": "/home/coder",
                "Driver": "local",
                "Mode": "rw",
                "RW": true,
                "Propagation": ""
            }
        ],
        "Config": {
            "Hostname": "one",
            "Domainname": "",
            "User": "1000",
            "AttachStdin": false,
            "AttachStdout": false,
            "AttachStderr": false,
            "ExposedPorts": {
                "8080/tcp": {}
            },
            "Tty": false,
            "OpenStdin": false,
            "StdinOnce": false,
            "Env": [
                "CODER_AGENT_TOKEN=9a597d54-cd38-4962-9654-621d446f2199",
                "PATH=/usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin:/sbin:/bin",
                "LANG=en_US.UTF-8",
                "ENTRYPOINTD=/entrypoint.d",
                "USER=coder"
            ],
            "Cmd": null,
            "Image": "codercom/code-server:latest",
            "Volumes": {
                "/home/coder/": {}
            },
            "WorkingDir": "/home/coder",
            "Entrypoint": [
                "sh",
                "-c",
                "#!/usr/bin/env sh\nset -eux\n# Sleep for a good long while before exiting.\n# This is to allow folks to exec into a failed workspace and poke around to\n# troubleshoot.\nwaitonexit() {\n\techo \"=== Agent script exited with non-zero code. Sleeping 24h to preserve logs...\"\n\tsleep 86400\n}\ntrap waitonexit EXIT\nBINARY_DIR=$(mktemp -d -t coder.XXXXXX)\nBINARY_NAME=coder\nBINARY_URL=http://172.16.158.240/bin/coder-linux-amd64\ncd \"$BINARY_DIR\"\n# Attempt to download the coder agent.\n# This could fail for a number of reasons, many of which are likely transient.\n# So just keep trying!\nwhile :; do\n\t# Try a number of different download tools, as we don not know what we\n\t# will have available.\n\tstatus=\"\"\n\tif command -v curl >/dev/null 2>&1; then\n\t\tcurl -fsSL --compressed \"${BINARY_URL}\" -o \"${BINARY_NAME}\" && break\n\t\tstatus=$?\n\telif command -v wget >/dev/null 2>&1; then\n\t\twget -q \"${BINARY_URL}\" -O \"${BINARY_NAME}\" && break\n\t\tstatus=$?\n\telif command -v busybox >/dev/null 2>&1; then\n\t\tbusybox wget -q \"${BINARY_URL}\" -O \"${BINARY_NAME}\" && break\n\t\tstatus=$?\n\telse\n\t\techo \"error: no download tool found, please install curl, wget or busybox wget\"\n\t\texit 127\n\tfi\n\techo \"error: failed to download coder agent\"\n\techo \"       command returned: ${status}\"\n\techo \"Trying again in 30 seconds...\"\n\tsleep 30\ndone\n\nif ! chmod +x $BINARY_NAME; then\n\techo \"Failed to make $BINARY_NAME executable\"\n\texit 1\nfi\n\nexport CODER_AGENT_AUTH=\"token\"\nexport CODER_AGENT_URL=\"http://172.16.158.240/\"\nexec ./$BINARY_NAME agent\n"
            ],
            "OnBuild": null,
            "Labels": {
                "coder.owner": "admin",
                "coder.owner_id": "1f5837cc-dd4b-467d-886a-61c8c5913605",
                "coder.workspace_id": "4a0b8ea1-009c-4178-8bf1-ba67e8e97754",
                "coder.workspace_name": "one"
            }
        },
        "NetworkSettings": {
            "Bridge": "",
            "SandboxID": "5da811033ad1160efa7ef243fe6841b3c8d60fc4927ef6ba8b30e0b2bb10ae81",
            "HairpinMode": false,
            "LinkLocalIPv6Address": "",
            "LinkLocalIPv6PrefixLen": 0,
            "Ports": {
                "8080/tcp": null
            },
            "SandboxKey": "/var/run/docker/netns/5da811033ad1",
            "SecondaryIPAddresses": null,
            "SecondaryIPv6Addresses": null,
            "EndpointID": "91f2d0c8cd902df614a1b362c8a3ac3729e40b1aee228bc26f72f867708f4263",
            "Gateway": "172.17.0.1",
            "GlobalIPv6Address": "",
            "GlobalIPv6PrefixLen": 0,
            "IPAddress": "172.17.0.3",
            "IPPrefixLen": 16,
            "IPv6Gateway": "",
            "MacAddress": "02:42:ac:11:00:03",
            "Networks": {
                "bridge": {
                    "IPAMConfig": null,
                    "Links": null,
                    "Aliases": null,
                    "NetworkID": "78da07fa7261473ae005379e4702e7cce327bab101cf6735541988b46555cc67",
                    "EndpointID": "91f2d0c8cd902df614a1b362c8a3ac3729e40b1aee228bc26f72f867708f4263",
                    "Gateway": "172.17.0.1",
                    "IPAddress": "172.17.0.3",
                    "IPPrefixLen": 16,
                    "IPv6Gateway": "",
                    "GlobalIPv6Address": "",
                    "GlobalIPv6PrefixLen": 0,
                    "MacAddress": "02:42:ac:11:00:03",
                    "DriverOpts": null
                }
            }
        }
    }
]

coder-agent.log

2023-03-10 11:06:24.860 [INFO]  <./cli/agent.go:110>    workspaceAgent.func1    starting agent  {"url": "http://172.16.158.240/", "auth": "token", "version": "v0.18.1+e3a4861"}
2023-03-10 11:06:24.860 [DEBUG] <./cli/agent.go:219>    serveHandler    http server listening   {"addr": "127.0.0.1:6060", "name": "pprof"}
2023-03-10 11:06:24.994 [INFO]  <./agent/agent.go:177>  (*agent).runLoop        connecting to coderd
2023-03-10 11:06:24.994 [DEBUG] <./codersdk/client.go:170>      (*Client).Request.func1 sdk request     {"method": "GET", "url": "http://172.16.158.240/api/v2/workspaceagents/me/metadata", "body": ""}
2023-03-10 11:06:25.000 [DEBUG] <./codersdk/client.go:200>      (*Client).Request.func2 sdk response    {"method": "GET", "url": "http://172.16.158.240/api/v2/workspaceagents/me/metadata", "status": 200, "body": "", "trace_id": "92140d2241df155d0db6ec519bda7aa5", "span_id": "5a0d54a44cbfae69"}
2023-03-10 11:06:25.000 [INFO]  <./agent/agent.go:263>  (*agent).run    fetched metadata        {"metadata": {"git_auth_configs": 0, "vscode_port_proxy_uri": "", "apps": [{"id": "54c07d2c-d7a2-480e-ae4d-a858e6f8849c", "url": "http://localhost:13337/?folder=/home/coder", "external": false, "slug": "code-server", "display_name": "code-server", "icon": "/icon/code.svg", "subdomain": false, "sharing_level": "owner", "healthcheck": {"url": "http://localhost:13337/healthz", "interval": 3, "threshold": 10}, "health": "initializing"}], "derpmap": {"Regions": {"999": {"EmbeddedRelay": true, "RegionID": 999, "RegionCode": "coder", "RegionName": "Coder Embedded Relay", "Nodes": [{"Name": "999stun0", "RegionID": 999, "HostName": "stun.l.google.com", "STUNPort": 19302, "STUNOnly": true}, {"Name": "999b", "RegionID": 999, "HostName": "172.16.158.240", "STUNPort": -1, "DERPPort": 80, "ForceHTTP": true}]}}}, "environment_variables": {"GIT_AUTHOR_EMAIL": "admin@coder.com", "GIT_AUTHOR_NAME": "admin", "GIT_COMMITTER_EMAIL": "admin@coder.com", "GIT_COMMITTER_NAME": "admin"}, "startup_script": "set -e\ncode-server --auth none --bind-addr 0.0.0.0:13337 \u003e/tmp/code-server.log 2\u003e\u00261 \u0026\n", "startup_script_timeout": 180000000000, "directory": "", "motd_file": ""}}
2023-03-10 11:06:25.001 [DEBUG] <./codersdk/client.go:170>      (*Client).Request.func1 sdk request     {"method": "POST", "url": "http://172.16.158.240/api/v2/workspaceagents/me/startup", "body": ""}
2023-03-10 11:06:25.005 [DEBUG] <./codersdk/client.go:200>      (*Client).Request.func2 sdk response    {"method": "POST", "url": "http://172.16.158.240/api/v2/workspaceagents/me/startup", "status": 200, "body": "", "trace_id": "52bf047f369c6d9f7a163d203fd3b279", "span_id": "41ba53601b2e9740"}
2023-03-10 11:06:25.005 [DEBUG] <./agent/agent.go:240>  (*agent).setLifecycle   set lifecycle state     {"state": "starting", "previous": ""}
2023-03-10 11:06:25.005 [INFO]  <./agent/agent.go:613>  (*agent).runStartupScript       running startup script ...
  "script": set -e
            code-server --auth none --bind-addr 0.0.0.0:13337 >/tmp/code-server.log 2>&1 &
2023-03-10 11:06:25.005 [DEBUG] (tailnet.wgengine)      <./../../../tailscale.com/wgengine/userspace.go:270>    NewUserspaceEngine      [v1] using fake (no-op) tun device
2023-03-10 11:06:25.005 [DEBUG] (tailnet.wgengine)      <./../../../tailscale.com/wgengine/userspace.go:274>    NewUserspaceEngine      [v1] using fake (no-op) OS network configurator
2023-03-10 11:06:25.005 [DEBUG] (tailnet.wgengine)      <./../../../tailscale.com/wgengine/userspace.go:278>    NewUserspaceEngine      [v1] using fake (no-op) DNS configurator
2023-03-10 11:06:25.006 [DEBUG] (tailnet.wgengine)      <./../../../tailscale.com/net/dns/logger.go:98> NewManager.func1        dns: using dns.noopManager
2023-03-10 11:06:25.006 [DEBUG] (tailnet.wgengine)      <./../../../tailscale.com/wgengine/userspace.go:334>    NewUserspaceEngine      link state: interfaces.State{defaultRoute=eth0 ifs={eth0:[172.17.0.3/16]} v4=true v6=false}
2023-03-10 11:06:25.006 [DEBUG] (tailnet.wgengine)      <./../../../tailscale.com/wgengine/magicsock/magicsock_linux.go:306>    trySetSocketBuffer.func1        magicsock: failed to force-set UDP read buffer size to 7340032: operation not permitted
2023-03-10 11:06:25.006 [DEBUG] (tailnet.wgengine)      <./../../../tailscale.com/wgengine/magicsock/magicsock_linux.go:310>    trySetSocketBuffer.func1        magicsock: failed to force-set UDP write buffer size to 7340032: operation not permitted
2023-03-10 11:06:25.006 [DEBUG] (tailnet.wgengine)      <./../../../tailscale.com/wgengine/magicsock/magicsock_linux.go:306>    trySetSocketBuffer.func1        magicsock: failed to force-set UDP read buffer size to 7340032: operation not permitted
2023-03-10 11:06:25.006 [DEBUG] (tailnet.wgengine)      <./../../../tailscale.com/wgengine/magicsock/magicsock_linux.go:310>    trySetSocketBuffer.func1        magicsock: failed to force-set UDP write buffer size to 7340032: operation not permitted
2023-03-10 11:06:25.006 [DEBUG] (tailnet.wgengine)      <./../../../tailscale.com/wgengine/magicsock/magicsock.go:659>  NewConn [v1] couldn't create raw v4 disco listener, using regular listener instead: raw disco listening disabled, SO_MARK unavailable
2023-03-10 11:06:25.006 [DEBUG] (tailnet.wgengine)      <./../../../tailscale.com/wgengine/magicsock/magicsock.go:665>  NewConn [v1] couldn't create raw v6 disco listener, using regular listener instead: raw disco listening disabled, SO_MARK unavailable
2023-03-10 11:06:25.006 [DEBUG] (tailnet.wgengine)      <./../../../tailscale.com/wgengine/magicsock/magicsock.go:1049> (*Conn).DiscoPublicKey  magicsock: disco key = d:898fc976c743bda6
2023-03-10 11:06:25.006 [DEBUG] (tailnet.wgengine)      <./../../../tailscale.com/wgengine/userspace.go:412>    NewUserspaceEngine      Creating WireGuard device...
2023-03-10 11:06:25.007 [DEBUG] (tailnet.wgengine)      <./../../../tailscale.com/wgengine/userspace.go:437>    NewUserspaceEngine      Bringing WireGuard device up...
2023-03-10 11:06:25.007 [DEBUG] (tailnet.wgengine)      <./../../../tailscale.com/wgengine/wglog/wglog.go:58>   NewLogger.func1 wg: [v2] UDP bind has been updated
2023-03-10 11:06:25.007 [DEBUG] (tailnet.wgengine)      <./../../../tailscale.com/wgengine/wglog/wglog.go:58>   NewLogger.func1 wg: [v2] Interface state was Down, requested Up, now Up
2023-03-10 11:06:25.007 [DEBUG] (tailnet.wgengine)      <./../../../tailscale.com/wgengine/userspace.go:441>    NewUserspaceEngine      Bringing router up...
2023-03-10 11:06:25.007 [DEBUG] (tailnet.wgengine)      <./../../../tailscale.com/wgengine/router/router_fake.go:21>    fakeRouter.Up   [v1] warning: fakeRouter.Up: not implemented.
2023-03-10 11:06:25.007 [DEBUG] (tailnet.wgengine)      <./../../../tailscale.com/wgengine/userspace.go:449>    NewUserspaceEngine      Clearing router settings...
2023-03-10 11:06:25.007 [DEBUG] (tailnet.wgengine)      <./../../../tailscale.com/wgengine/router/router_fake.go:26>    fakeRouter.Set  [v1] warning: fakeRouter.Set: not implemented.
2023-03-10 11:06:25.007 [DEBUG] (tailnet.wgengine)      <./../../../tailscale.com/wgengine/userspace.go:453>    NewUserspaceEngine      Starting link monitor...
2023-03-10 11:06:25.007 [DEBUG] (tailnet.wgengine)      <./../../../tailscale.com/wgengine/userspace.go:456>    NewUserspaceEngine      Engine created.
2023-03-10 11:06:25.007 [DEBUG] (tailnet.wgengine)      <./../../../tailscale.com/wgengine/magicsock/magicsock.go:2417> (*Conn).SetPrivateKey   magicsock: SetPrivateKey called (init)
2023-03-10 11:06:25.008 [DEBUG] (tailnet)       <./tailnet/conn.go:182> NewConn updating network map
2023-03-10 11:06:25.008 [DEBUG] (tailnet.wgengine)      <./../../../tailscale.com/wgengine/magicsock/magicsock.go:2551> (*Conn).SetNetworkMap   [v1] magicsock: got updated network map; 0 peers
2023-03-10 11:06:25.008 [DEBUG] <./codersdk/client.go:170>      (*Client).Request.func1 sdk request     {"method": "POST", "url": "http://172.16.158.240/api/v2/workspaceagents/me/report-stats", "body": ""}
2023-03-10 11:06:25.010 [DEBUG] (tailnet.wgengine)      <./../../../tailscale.com/wgengine/wglog/wglog.go:58>   NewLogger.func1 wg: [v2] Routine: receive incoming v4 - started
2023-03-10 11:06:25.011 [DEBUG] (tailnet.wgengine)      <./../../../tailscale.com/wgengine/wglog/wglog.go:58>   NewLogger.func1 wg: [v2] Routine: receive incoming receiveDERP - started
2023-03-10 11:06:25.011 [INFO]  <./agent/agent.go:338>  (*agent).run.func2      startup script completed        {"execution_time": "6.461371ms"}
2023-03-10 11:06:25.011 [DEBUG] <./agent/agent.go:240>  (*agent).setLifecycle   set lifecycle state     {"state": "ready", "previous": "starting"}
2023-03-10 11:06:25.013 [DEBUG] (tailnet.wgengine)      <./../../../tailscale.com/wgengine/wglog/wglog.go:58>   NewLogger.func1 wg: [v2] Routine: receive incoming v6 - started
2023-03-10 11:06:25.013 [DEBUG] <./agent/agent.go:218>  (*agent).reportLifecycleLoop    reporting lifecycle state       {"state": "ready"}
2023-03-10 11:06:25.014 [DEBUG] <./codersdk/client.go:170>      (*Client).Request.func1 sdk request     {"method": "POST", "url": "http://172.16.158.240/api/v2/workspaceagents/me/report-lifecycle", "body": ""}
2023-03-10 11:06:25.021 [DEBUG] <./codersdk/client.go:200>      (*Client).Request.func2 sdk response    {"method": "POST", "url": "http://172.16.158.240/api/v2/workspaceagents/me/report-stats", "status": 200, "body": "", "trace_id": "8ceb3c8a57afe99b26688a10492519b6", "span_id": "eb93c3ff0cffc63f"}
2023-03-10 11:06:25.021 [DEBUG] <./agent/agent.go:377>  (*agent).run    running tailnet connection coordinator
2023-03-10 11:06:25.026 [DEBUG] <./codersdk/client.go:200>      (*Client).Request.func2 sdk response    {"method": "POST", "url": "http://172.16.158.240/api/v2/workspaceagents/me/report-lifecycle", "status": 204, "body": "", "trace_id": "1c76c4f65c4535299ffe6f44ca478131", "span_id": "6c164b11e9972982"}
2023-03-10 11:06:25.029 [INFO]  <./agent/agent.go:595>  (*agent).runCoordinator connected to coordination endpoint
2023-03-10 11:06:25.029 [DEBUG] (tailnet)       <./tailnet/conn.go:632> (*Conn).sendNode.func1  sending node    {"node": {"id": 6360083939399579565, "as_of": "2023-03-10T11:06:25.029629Z", "key": "nodekey:0f028a1bcd211c5b4b5127b83f0b2b8641a13cdc4f65d7cc30b7dbc3772c2716", "disco": "discokey:898fc976c743bda60851bf6feb8f6616fa13791aeda008472252a5d899c6090b", "preferred_derp": 0, "derp_latency": null, "derp_forced_websockets": null, "addresses": ["fd7a:115c:a1e0:49d6:b259:b7ac:b1b2:48f4/128"], "allowed_ips": ["fd7a:115c:a1e0:49d6:b259:b7ac:b1b2:48f4/128"], "endpoints": []}}
2023-03-10 11:06:25.076 [DEBUG] (tailnet.wgengine)      <./../../../tailscale.com/wgengine/magicsock/logger.go:98>      NewConn.func6   netcheck: netcheck: UDP is blocked, trying HTTPS
2023-03-10 11:06:25.076 [DEBUG] (tailnet.wgengine)      <./../../../tailscale.com/wgengine/magicsock/logger.go:98>      NewConn.func6   netcheck: [v1] measureAllICMPLatency: listen ip4:icmp 0.0.0.0: socket: operation not permitted
2023-03-10 11:06:25.077 [DEBUG] (tailnet.wgengine)      <./../../../tailscale.com/wgengine/magicsock/logger.go:98>      NewConn.func6   netcheck: [v1] netcheck: measuring HTTPS latency of coder (999): tls: first record does not look like a TLS handshake
2023-03-10 11:06:25.077 [DEBUG] (tailnet.wgengine)      <./../../../tailscale.com/wgengine/magicsock/logger.go:98>      NewConn.func6   netcheck: [v1] report: udp=false v4=false icmpv4=false v6=false v6os=false mapvarydest= hair= portmap= derp=0
2023-03-10 11:06:25.077 [DEBUG] (tailnet.wgengine)      <./../../../tailscale.com/wgengine/magicsock/magicsock.go:1085> (*Conn).setNearestDERP  magicsock: home is now derp-999 (coder)
2023-03-10 11:06:25.077 [DEBUG] (tailnet.wgengine)      <./../../../tailscale.com/wgengine/magicsock/magicsock.go:2732> (*Conn).logEndpointChange       magicsock: endpoints changed: 172.17.0.3:54012 (local)
2023-03-10 11:06:25.078 [DEBUG] (tailnet)       <./tailnet/conn.go:220> NewConn.func6   wireguard status        {"status": "\u0026{AsOf:2023-03-10 11:06:25.078052631 +0000 UTC m=+0.323891697 Peers:[] LocalAddrs:[{Addr:172.17.0.3:54012 Type:local}] DERPs:0}", "err": null}
2023-03-10 11:06:25.078 [DEBUG] (tailnet.wgengine)      <./../../../tailscale.com/wgengine/magicsock/magicsock.go:1473> (*Conn).derpWriteChanOfAddr     magicsock: adding connection to derp-999 for home-keep-alive
2023-03-10 11:06:25.078 [DEBUG] (tailnet.wgengine)      <./../../../tailscale.com/wgengine/magicsock/magicsock.go:2720> (*Conn).logActiveDerpLocked     magicsock: 1 active derp conns: derp-999=cr0s,wr0s
2023-03-10 11:06:25.078 [DEBUG] (tailnet)       <./tailnet/conn.go:220> NewConn.func6   wireguard status        {"status": "\u0026{AsOf:2023-03-10 11:06:25.078878128 +0000 UTC m=+0.324717184 Peers:[] LocalAddrs:[{Addr:172.17.0.3:54012 Type:local}] DERPs:1}", "err": null}
2023-03-10 11:06:25.079 [DEBUG] (tailnet)       <./tailnet/conn.go:241> NewConn.func7   netinfo callback        {"netinfo": {"MappingVariesByDestIP": null, "HairPinning": null, "WorkingIPv6": false, "OSHasIPv6": false, "WorkingUDP": false, "WorkingICMPv4": false, "UPnP": false, "PMP": false, "PCP": false, "PreferredDERP": 999}}
2023-03-10 11:06:25.079 [DEBUG] (tailnet)       <./tailnet/conn.go:632> (*Conn).sendNode.func1  sending node    {"node": {"id": 6360083939399579565, "as_of": "2023-03-10T11:06:25.078205Z", "key": "nodekey:0f028a1bcd211c5b4b5127b83f0b2b8641a13cdc4f65d7cc30b7dbc3772c2716", "disco": "discokey:898fc976c743bda60851bf6feb8f6616fa13791aeda008472252a5d899c6090b", "preferred_derp": 0, "derp_latency": null, "derp_forced_websockets": null, "addresses": ["fd7a:115c:a1e0:49d6:b259:b7ac:b1b2:48f4/128"], "allowed_ips": ["fd7a:115c:a1e0:49d6:b259:b7ac:b1b2:48f4/128"], "endpoints": ["172.17.0.3:54012"]}}
2023-03-10 11:06:25.079 [DEBUG] (tailnet)       <./tailnet/conn.go:632> (*Conn).sendNode.func1  sending node    {"node": {"id": 6360083939399579565, "as_of": "2023-03-10T11:06:25.079419Z", "key": "nodekey:0f028a1bcd211c5b4b5127b83f0b2b8641a13cdc4f65d7cc30b7dbc3772c2716", "disco": "discokey:898fc976c743bda60851bf6feb8f6616fa13791aeda008472252a5d899c6090b", "preferred_derp": 999, "derp_latency": {}, "derp_forced_websockets": {}, "addresses": ["fd7a:115c:a1e0:49d6:b259:b7ac:b1b2:48f4/128"], "allowed_ips": ["fd7a:115c:a1e0:49d6:b259:b7ac:b1b2:48f4/128"], "endpoints": ["172.17.0.3:54012"]}}
2023-03-10 11:06:25.079 [DEBUG] (tailnet.wgengine)      <./../../../tailscale.com/derp/derphttp/derphttp_client.go:357> (*Client).connect       derphttp.Client.Connect: connecting to derp-999 (coder)
2023-03-10 11:06:25.081 [DEBUG] (tailnet.wgengine)      <./../../../tailscale.com/wgengine/magicsock/magicsock.go:1691> (*Conn).runDerpReader   magicsock: derp-999 connected; connGen=1
2023-03-10 11:06:25.130 [DEBUG] (tailnet.wgengine)      <./../../../tailscale.com/wgengine/magicsock/logger.go:98>      NewConn.func6   netcheck: netcheck: UDP is blocked, trying HTTPS
2023-03-10 11:06:25.130 [DEBUG] (tailnet.wgengine)      <./../../../tailscale.com/wgengine/magicsock/logger.go:98>      NewConn.func6   netcheck: [v1] measureAllICMPLatency: listen ip4:icmp 0.0.0.0: socket: operation not permitted
2023-03-10 11:06:25.130 [DEBUG] (tailnet.wgengine)      <./../../../tailscale.com/wgengine/magicsock/logger.go:98>      NewConn.func6   netcheck: [v1] netcheck: measuring HTTPS latency of coder (999): tls: first record does not look like a TLS handshake
2023-03-10 11:06:25.130 [DEBUG] (tailnet.wgengine)      <./../../../tailscale.com/wgengine/magicsock/logger.go:98>      NewConn.func6   netcheck: [v1] report: udp=false v4=false icmpv4=false v6=false v6os=false mapvarydest= hair= portmap= derp=0
2023-03-10 11:06:29.008 [DEBUG] <./codersdk/client.go:170>      (*Client).Request.func1 sdk request     {"method": "POST", "url": "http://172.16.158.240/api/v2/workspaceagents/me/app-health", "body": ""}
2023-03-10 11:06:29.014 [DEBUG] <./codersdk/client.go:200>      (*Client).Request.func2 sdk response    {"method": "POST", "url": "http://172.16.158.240/api/v2/workspaceagents/me/app-health", "status": 200, "body": "", "trace_id": "1e9622213b6678499041d3c56ca5c8ee", "span_id": "d37ba74cd054a6d9"}
2023-03-10 11:06:55.030 [DEBUG] <./codersdk/agentsdk/agentsdk.go:194>   (*Client).Listen.func1  got coordinate pong     {"took": "269.649µs"}
2023-03-10 11:07:25.030 [DEBUG] <./codersdk/agentsdk/agentsdk.go:194>   (*Client).Listen.func1  got coordinate pong     {"took": "196.412µs"}
2023-03-10 11:07:55.030 [DEBUG] <./codersdk/agentsdk/agentsdk.go:194>   (*Client).Listen.func1  got coordinate pong     {"took": "219.877µs"}
2023-03-10 11:08:25.030 [DEBUG] <./codersdk/agentsdk/agentsdk.go:194>   (*Client).Listen.func1  got coordinate pong     {"took": "498.265µs"}

code-server.log

[2023-03-10T11:06:25.384Z] info  Wrote default config file to ~/.config/code-server/config.yaml
[2023-03-10T11:06:25.740Z] info  code-server 4.10.1 d477972c68fc8c8e8d610aa7287db87ba90e55c7
[2023-03-10T11:06:25.741Z] info  Using user-data-dir ~/.local/share/code-server
[2023-03-10T11:06:25.750Z] info  Using config file ~/.config/code-server/config.yaml
[2023-03-10T11:06:25.750Z] info  HTTP server listening on http://0.0.0.0:13337/
[2023-03-10T11:06:25.750Z] info    - Authentication is disabled
[2023-03-10T11:06:25.751Z] info    - Not serving HTTPS

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions