modrin
modrin
CCoder.com
Created by coder_pie on 2/13/2024 in #help
code-server stopped loading after upgrading coder to 2.8.1
I've stumbled upon this as well and I think I found the solution. We're using Microsoft VSCode (not code-server by Coder) - currently Visual Studio Code 1.87.0 The VSCode web button stopped working:
2024-04-22 16:08:52.629 [debu] net.tailnet.net.netstack: netstack: could not connect to local server at 127.0.0.1:8000: dial tcp 127.0.0.1:8000: connect: connection refused
2024-04-22 16:08:52.629 [debu] net.tailnet.net.netstack: netstack: could not connect to local server at 127.0.0.1:8000: dial tcp 127.0.0.1:8000: connect: connection refused
not sure when this started happening but I was updating Coder and noticed the web IDE was no longer opening. I'm sure it was some VSCode update. This is the command we were running:
code-server serve-local --accept-server-license-terms --without-connection-token &>/tmp/code-server.log 2>&1 &
code-server serve-local --accept-server-license-terms --without-connection-token &>/tmp/code-server.log 2>&1 &
I checked the ports exposed inside the container using sudo netstat -tulp and found that VSCode was binding to ::1 which is the localhost for IPv6. As mentioned before, at the agent log above, Coder tries to use 127.0.0.1, which is localhost for IPv4. The solution is telling code-server to bind to specific interface/ip like so:
code-server serve-local --accept-server-license-terms --without-connection-token --host 127.0.0.1 &>/tmp/code-server.log 2>&1 &
code-server serve-local --accept-server-license-terms --without-connection-token --host 127.0.0.1 &>/tmp/code-server.log 2>&1 &
And now it should be working as before 🙂 p.s. I'm not entirely sure why localhost in .tf file resolves to 127.0.0.1 via Coder
34 replies
CCoder.com
Created by modrin on 4/22/2024 in #help
Internal error checking workspace agent authorization (after db reinit from dump)
Can't exactly share the dump with company data 😅 Would love to cleanup the dump (about 65 MB) sometime as well, some old remnants (after v0 to v2 migration) might be interfering with updates 🤔
11 replies
CCoder.com
Created by modrin on 4/22/2024 in #help
Internal error checking workspace agent authorization (after db reinit from dump)
Maybe it's random 🤷‍♂️ idk if it happens again I'll report with more info 😄
11 replies
CCoder.com
Created by modrin on 4/22/2024 in #help
Internal error checking workspace agent authorization (after db reinit from dump)
We're running coder from the start of v2 and it sounds like it might have something to do with existing PG dump data not importing correctly on a fresh v2.9 install. But for now the issue is fine on v2.10
11 replies
CCoder.com
Created by modrin on 4/22/2024 in #help
Internal error checking workspace agent authorization (after db reinit from dump)
Seems like v2.10.1 fixed our problems; there might be some internal schema problem between v2.9 and v2.10, or just a coincidence 🤷‍♂️
11 replies
CCoder.com
Created by modrin on 4/22/2024 in #help
Internal error checking workspace agent authorization (after db reinit from dump)
More detailed query:
2024-04-22 09:54:00.818 GMT [183] ERROR: column "workspace_agents.created_at" must appear in the GROUP BY clause or be used in an aggregate function at character 81

2024-04-22 09:54:00.818 GMT [183] STATEMENT: -- name: GetWorkspaceAgentAndOwnerByAuthToken :one

SELECT

workspace_agents.id, workspace_agents.created_at, workspace_agents.updated_at, workspace_agents.name, workspace_agents.first_connected_at, workspace_agents.last_connected_at, workspace_agents.disconnected_at, workspace_agents.resource_id, workspace_agents.auth_token, workspace_agents.auth_instance_id, workspace_agents.architecture, workspace_agents.environment_variables, workspace_agents.operating_system, workspace_agents.instance_metadata, workspace_agents.resource_metadata, workspace_agents.directory, workspace_agents.version, workspace_agents.last_connected_replica_id, workspace_agents.connection_timeout_seconds, workspace_agents.troubleshooting_url, workspace_agents.motd_file, workspace_agents.lifecycle_state, workspace_agents.expanded_directory, workspace_agents.logs_length, workspace_agents.logs_overflowed, workspace_agents.started_at, workspace_agents.ready_at, workspace_agents.subsystems, workspace_agents.display_apps, workspace_agents.api_version, workspace_agents.display_order,

workspaces.id AS workspace_id,

users.id AS owner_id,

users.username AS owner_name,

users.status AS owner_status,

workspaces.template_id AS template_id,

workspace_builds.template_version_id AS template_version_id,
2024-04-22 09:54:00.818 GMT [183] ERROR: column "workspace_agents.created_at" must appear in the GROUP BY clause or be used in an aggregate function at character 81

2024-04-22 09:54:00.818 GMT [183] STATEMENT: -- name: GetWorkspaceAgentAndOwnerByAuthToken :one

SELECT

workspace_agents.id, workspace_agents.created_at, workspace_agents.updated_at, workspace_agents.name, workspace_agents.first_connected_at, workspace_agents.last_connected_at, workspace_agents.disconnected_at, workspace_agents.resource_id, workspace_agents.auth_token, workspace_agents.auth_instance_id, workspace_agents.architecture, workspace_agents.environment_variables, workspace_agents.operating_system, workspace_agents.instance_metadata, workspace_agents.resource_metadata, workspace_agents.directory, workspace_agents.version, workspace_agents.last_connected_replica_id, workspace_agents.connection_timeout_seconds, workspace_agents.troubleshooting_url, workspace_agents.motd_file, workspace_agents.lifecycle_state, workspace_agents.expanded_directory, workspace_agents.logs_length, workspace_agents.logs_overflowed, workspace_agents.started_at, workspace_agents.ready_at, workspace_agents.subsystems, workspace_agents.display_apps, workspace_agents.api_version, workspace_agents.display_order,

workspaces.id AS workspace_id,

users.id AS owner_id,

users.username AS owner_name,

users.status AS owner_status,

workspaces.template_id AS template_id,

workspace_builds.template_version_id AS template_version_id,
11 replies
CCoder.com
Created by modrin on 1/18/2023 in #help
Question/clarification about codercom/enterprise-base image
Thanks Colin, it's clearer now
3 replies
CCoder.com
Created by modrin on 1/6/2023 in #help
Got permission denied while trying to connect to the Docker daemon socket
Solved using tecnativa/docker-socket-proxy Would be great to know which permissions Coder needs though
3 replies