https://linen.dev logo
Is there an issue with 0 22 2 that the
# general
h
Is there an issue with 0.22.2 that the workspace never gets ready? I just started one and the startup script finished but it's telling me
Agent is taking too long to start
so I can't port forward.
c
Are you able to access the workspace logs to possibly see why the agent isn't connecting?
h
Yeah, there is no error at all. Last lines are
Copy code
Standalone release has been installed into /tmp/code-server/lib/code-server-4.8.3Extend your path to use code-server:  PATH="/tmp/code-server/bin:$PATH"Then run with:  code-serverDeploy code-server for your team with Coder: https://github.com/coder/coder
And last bit of the Startup Script is the default, I only run stuff before that:
Copy code
# install and start code-server
 curl -fsSL https://code-server.dev/install.sh | sh -s -- --method=standalone --prefix=/tmp/code-server --version 4.8.3
 /tmp/code-server/bin/code-server --auth none --port 13337 >/tmp/code-server.log 2>&1 &
A different Workspace works just fine. Seems to be an issue with the Workspace itself then. But the log output is basically the same in the end so I don't get it what's happening.
Just checked a few more things.
code-server.log
shows no errors as well:
Copy code
[2023-04-25T15:52:16.111Z] info  Wrote default config file to ~/.config/code-server/config.yaml
[2023-04-25T15:52:16.331Z] info  code-server 4.11.0 85e083580dec27ef19827ff42d3c9257d56ea7e3
[2023-04-25T15:52:16.332Z] info  Using user-data-dir ~/.local/share/code-server
[2023-04-25T15:52:16.338Z] info  Using config file ~/.config/code-server/config.yaml
[2023-04-25T15:52:16.338Z] info  HTTP server listening on http://127.0.0.1:13337/
[2023-04-25T15:52:16.338Z] info    - Authentication is disabled
[2023-04-25T15:52:16.338Z] info    - Not serving HTTPS
Code Server is also listening on Port 13337:
Copy code
sudo netstat -tulpn | grep ':13337'
tcp        0      0 127.0.0.1:13337         0.0.0.0:*               LISTEN      -
I really don't get it.
c
there should be a logfile in
/tmp/coder-agent.log
it seems like the agent is starting up but unable to connect back to coder
h
I checked that, it had only one line without an error, will have to check later
c
hmm, very odd
h
Indeed. I did revert the changes to the startup script I made before, but still no luck.
c
what log line do you see in the tmp log?
h
Just got back to my laptop. I checked the other log,
/tmp/coder-agent-init.log
which only had one line. The
/tmp/coder-agent.log
has much more. This is right after the script finished:
Copy code
2023-04-25 16:13:41.328 [DEBUG] (tailnet.wgengine)      <./../../../tailscale.com/wgengine/userspace.go:270>    NewUserspaceEngine      [v1] u
sing fake (no-op) tun device
2023-04-25 16:13:41.328 [DEBUG] (tailnet.wgengine)      <./../../../tailscale.com/wgengine/userspace.go:274>    NewUserspaceEngine      [v1] u
sing fake (no-op) OS network configurator
2023-04-25 16:13:41.328 [DEBUG] (tailnet.wgengine)      <./../../../tailscale.com/wgengine/userspace.go:278>    NewUserspaceEngine      [v1] u
sing fake (no-op) DNS configurator
2023-04-25 16:13:41.328 [DEBUG] (tailnet.wgengine)      <./../../../tailscale.com/net/dns/logger.go:98> NewManager.func1        dns: using dns
.noopManager
2023-04-25 16:13:41.328 [DEBUG] (tailnet.wgengine)      <./../../../tailscale.com/wgengine/userspace.go:334>    NewUserspaceEngine      link s
tate: interfaces.State{defaultRoute=eth0 ifs={eth0:[172.17.0.3/16]} v4=true v6=false}
2023-04-25 16:13:41.328 [DEBUG] (tailnet.wgengine)      <./../../../tailscale.com/wgengine/magicsock/magicsock_linux.go:306>    trySetSocketBu
ffer.func1        magicsock: failed to force-set UDP read buffer size to 7340032: operation not permitted
2023-04-25 16:13:41.328 [DEBUG] (tailnet.wgengine)      <./../../../tailscale.com/wgengine/magicsock/magicsock_linux.go:310>    trySetSocketBu
ffer.func1        magicsock: failed to force-set UDP write buffer size to 7340032: operation not permitted
2023-04-25 16:13:41.328 [DEBUG] (tailnet.wgengine)      <./../../../tailscale.com/wgengine/magicsock/magicsock_linux.go:306>    trySetSocketBu
ffer.func1        magicsock: failed to force-set UDP read buffer size to 7340032: operation not permitted
And:
Copy code
2023-04-25 16:13:41.328 [DEBUG] (tailnet.wgengine)      <./../../../tailscale.com/wgengine/magicsock/magicsock_linux.go:310>    trySetSocketBu
ffer.func1        magicsock: failed to force-set UDP write buffer size to 7340032: operation not permitted
2023-04-25 16:13:41.328 [DEBUG] (tailnet.wgengine)      <./../../../tailscale.com/wgengine/magicsock/magicsock.go:666>  NewConn [v1] couldn't 
create raw v4 disco listener, using regular listener instead: raw disco listening disabled, SO_MARK unavailable
2023-04-25 16:13:41.328 [DEBUG] (tailnet.wgengine)      <./../../../tailscale.com/wgengine/magicsock/magicsock.go:672>  NewConn [v1] couldn't 
create raw v6 disco listener, using regular listener instead: raw disco listening disabled, SO_MARK unavailable
c
those errors are pretty much to be expected depending on the environment
h
There's a lot more going on, anything particular to look for?
Guess this is where it checks the health?
Copy code
2023-04-25 16:14:52.664 [DEBUG] <./codersdk/client.go:259>      (*Client).Request.func2 sdk response    {"method": "PATCH", "url": "https://our.domain/api/v2/workspaceagents/me/startup-logs", "status": 200, "body": "", "trace_id": "8d0875409e8570fee2a61fa3b99f3754", "span_i
d": "9426f8d4071a4db1"}
Oh, checking the URL gives me
Copy code
{
  "message": "Workspace agent token invalid.",
  "detail": "An agent token must be a valid UUIDv4. (len 33)"
}
c
would you mind sending the full log? either via dms or via
colin at coder.com
h
sure
Sent you a DM, thanks a lot!