modrin
modrin
CCoder.com
Created by modrin on 4/22/2024 in #help
Internal error checking workspace agent authorization (after db reinit from dump)
Hi. Today we tried to update Coder from v2.9.1 to v2.9.3 but the DB got corrupted (probably because of 2 pgsql instances running at the same time, rookie mistake). We have PG dumps each day, so I tried to run v2.9.3 version and import the backup dump (schema + data) from last known working version; the Coder works, I can access the dashboard, the data is there, but now all workspaces created show me the following error: Agent side:
2024-04-22 09:33:49.911 [info] connecting to coderd
2024-04-22 09:33:49.934 [warn] run exited with error ...
error= GET https://coder.company.com/api/v2/workspaceagents/me/rpc?version=2.0: unexpected status code 500: Internal error checking workspace agent authorization.
Error: pq: column "workspace_agents.created_at" must appear in the GROUP BY clause or be used in an aggregate function
2024-04-22 09:33:49.911 [info] connecting to coderd
2024-04-22 09:33:49.934 [warn] run exited with error ...
error= GET https://coder.company.com/api/v2/workspaceagents/me/rpc?version=2.0: unexpected status code 500: Internal error checking workspace agent authorization.
Error: pq: column "workspace_agents.created_at" must appear in the GROUP BY clause or be used in an aggregate function
Coder side:
2024-04-22 09:34:10.007 [warn] coderd: GET host=coder.company.com path=/api/v2/workspaceagents/me/rpc proto=HTTP/1.1 remote_addr=10.128.1.7 start="2024-04-22T09:34:10.006571993Z" took=883.371µs status_code=500 latency_ms=0 response_body="{\"message\":\"Internal error checking workspace agent authorization.\",\"detail\":\"pq: column \\\"workspace_agents.created_at\\\" must appear in the GROUP BY clause or be used in an aggregate function\"}\n" request_id=d9c36ff4-82a1-4a67-ae6a-c18ce26ddab5
2024-04-22 09:34:10.007 [warn] coderd: GET host=coder.company.com path=/api/v2/workspaceagents/me/rpc proto=HTTP/1.1 remote_addr=10.128.1.7 start="2024-04-22T09:34:10.006571993Z" took=883.371µs status_code=500 latency_ms=0 response_body="{\"message\":\"Internal error checking workspace agent authorization.\",\"detail\":\"pq: column \\\"workspace_agents.created_at\\\" must appear in the GROUP BY clause or be used in an aggregate function\"}\n" request_id=d9c36ff4-82a1-4a67-ae6a-c18ce26ddab5
I have tried investigating if the problem lies in some schema change, but that didn't help. I have also tried running v2.9.0, no change. If anybody has any idea, it would be very appreciated!
11 replies
CCoder.com
Created by modrin on 1/18/2023 in #help
Question/clarification about codercom/enterprise-base image
I'm trying to build my own base image for Coder, and I've been researching various Ubuntu base images, but since I need docker-in-docker, my main reference is the following Dockerfiles from Sysbox: https://github.com/nestybox/dockerfiles/blob/master/ubuntu-jammy-systemd/Dockerfile https://github.com/nestybox/dockerfiles/blob/master/ubuntu-jammy-docker/Dockerfile compared with this https://github.com/coder/enterprise-images/blob/main/images/base/Dockerfile.ubuntu 1. Is there a specific reason why containerd-io is downgraded, when compared to sysbox image, which installs it from apt-get? 2. Why does sysbox install libsystemd0, dbus, iptables, iproute2, kmod, udev, but it's missing from Coder? 3. In sysbox image, some services are disabled, but not in Coder? (might be related to #2) 4. Sysbox makes use of STOPSIGNAL and ENTRYPOINT for systemd, but Coder doesn't? Maybe I'm missing some inside-image processing details (like Coders init.sh script?) Unrelated, but - about Homebrew, if I understand correctly, it's a package manager with broad OS support which can run without user privileges. Assuming a user runs a workspace instance with /home attached as a volume, would brew installed packages persist container destructions? Because that could solve user personalization problems a lot of people are having 😁 I apologize for these wildly technical questions, but I'd love to learn the process of Coder and better understand it 😅 Thank you!
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
Hi everyone. I'm trying to test an instance of Coder on Docker Swarm, but the Docker daemon socket is not connecting, because "coder" user is not in the docker group - this is while trying to run coder templates create for swarm
#group_add:
# - "998" # docker group on host
#group_add:
# - "998" # docker group on host
this will not work (because it's not applicable to Swarm instances). I'm thinking if I need to write a custom Dockerfile and add the user there, or should I use a docker socket proxy image for this? I'm not sure which is a more secure solution - ideally I thought it'd be possible to separate our main Docker containers and Coder containers from each other via host user separation or so, but I'm not sure if that's possible. Appreciate any help 🙂 Docs reference - https://coder.com/docs/coder-oss/latest/install/docker#run-coder-with-docker-compose
3 replies