Cant start coder on windows pc
Hello i want to start my coder server but i get this error form postgres:
Encountered an error running "coder server"
Usage: coder server [flags]
Error: Failed to start built-in PostgreSQL. Optionally, specify an external deployment with
--postgres-url
: unable to init database using 'C:\Users\info\AppData\Roaming\coderv2\postgres\bin\bin\initdb.exe -A password -U coder -D C:\Users\info\AppData\Roaming\coderv2\postgres\data --pwfile=C:\Users\info\AppData\Roaming\coderv2\postgres\runtime\pwfile': exit status 0xc0000135Solution:Jump to solution
you will need to log out and login, or run
newgrp docker
before running coder server
40 Replies
<#1230522694655672461>
Category
Help needed
Product
Coder OSS (v2)
Platform
Windows
Logs
Please post any relevant logs/error messages.
welp
Looking up
exit status 0xc0000135
it appears that generally you see that when Windows is missing a library it needs.
I think you have two options here:
1) Set CODER_PG_CONNECTION_URL
to point to an existing PostgreSQL database, or
2) Install the PostgreSQL CLI tools so that you have the required libraries. You can do that by downloading the Windows PostgreSQL installer from https://www.enterprisedb.com/downloads/postgres-postgresql-downloads , launching the MSI, and only selecting "Command Line Tools" when prompted to select components.GitHub
bug: windows:
coder server
fails to start with `exit status 0xc00...Reproduced on Windows 21H2 (OS build 20348.2159) coder server fails to start with the error: Error: Failed to start built-in PostgreSQL. Optionally, specify an external deployment with --postgres-u...
Scratch that, it might just be missing the VC++ runtime
only shows up if you run the initdb cmd in
cmd.exe
and not in PSNo i fixed it
Dw
btw @EB :)
i mean
@Cian I got an other problem
it spams this
:/
someone welp
:(
It looks like it's failing to build the Docker image. Are you using a Docker daemon running on the same Windows host?
I switched over to a vps
ubuntu
Error: Error pinging Docker server: Cannot connect to the Docker daemon at unix:///var/run/docker.sock. Is the docker daemon running?
now i get this error
wlp
Have you checked that the user under which
coder
runs has permissions to access the docker daemon socket?
Is Docker installed and running?I installed docker.io
and its running
how do i add coder to the docker daemon
both are running
and coder has been added to the docker group
@Cian
that appears correct.
so what now?
have you tried to import the example docker template?
like the hello world
how do i run that?
Idk how
Your first template - Coder v2 Docs
A tutorial for creating and editing your first template
Done
I gives me the same error
root@Coder:~# sudo -u coder docker ps Cannot connect to the Docker daemon at unix:///var/run/docker.sock. Is the docker daemon running? root@Coder:~# ^C
Make sure you restarted Coder since installing Docker
then validate that
sudo -u coder docker ps
works and sudo -u coder docker run hello-world
should also workdocker: Cannot connect to the Docker daemon at unix:///var/run/docker.sock. Is the docker daemon running?.
See 'docker run --help'.
Double-check that you followed these steps https://docs.docker.com/engine/install/linux-postinstall/#manage-docker-as-a-non-root-user
Double-check that the
coder
user is a member of the docker
group:
Double-check that the ownership of /var/run/docker.sock
allows the docker
group to both read and write.
Double-check that coder
is running as the coder
user:
Docker Documentation
Linux post-installation steps for Docker Engine
Find the recommended Docker Engine post-installation steps for Linux users, including how to run Docker as a non-root user and more.
It looks like
coder
is running under uid 1001 and the coder
user has uid 998.
How are you running coder
? Via systemd service or manually via coder server
?i used them both
lol
I mostly use coder server
Stick to using systemd.
Why?
@Cian
If you run
coder
as your regular user vivek
then that will store data under a different path than under systemd
.
Also, the whole point of systemd is to keep a service runningwdym
vivek is a non-root user so i can run it
on root
is vivek a member of the docker group?
idk
i dont think so
let me check
Nope
why?
If the
coder
service is running as the user vivek
and attempt to run docker
commands, but the user vivek
does not have permission...oof
The other reason is that coder runs a built-in postgres server if you don't specify otherwise. That's going to be under
/home/vivek/.config/coderv2/postgres/data
if you run as vivek
and if you run as coder
it's going to be under /home/coder/.config/...
. You'll end up with two different coder installs, essentially.so if i add vivek to the docker group
will it work then?
you'll need to stop and start coder after you do that
actually
alrigjt
Solution
you will need to log out and login, or run
newgrp docker
before running coder server
Now it works
wait
docker_image.main: Still creating... [1m0s elapsed]
now it spams this
:(
the same as on windows
that is when im trying to create a code spce
i mean
workspace
it works now