Agent stuck at connecting

Hey, I run Coder behind Traefik for SSL. I can reach my Coder instance, but if I click on a running workspace the agent is stuck on Connecting. Another user had a similar issue with HAProxy, but I do not understand how they solved it.
8 Replies
HeNoGaming
HeNoGaming3y ago
Hi, I think I am the other user. I have removed the domain from my config and replaced it with the internal IP of my network. I have also disabled SSL, as this was handled by HAProxy for me.
rdmchr
rdmchrOP3y ago
# Coder must be reachable from an external URL
# for users and workspaces to connect.

# Option 1) Enable CODER_TUNNEL to generate a
# unique *. try.coder.com access URL
#CODER_TUNNEL=false

# Option 2) Set an access URL
# e.g. https://coder.example.com
#CODER_ACCESS_URL=

CODER_ADDRESS=
CODER_PG_CONNECTION_URL=
CODER_TLS_CERT_FILE=
CODER_TLS_ENABLE=
CODER_TLS_KEY_FILE=
# Coder must be reachable from an external URL
# for users and workspaces to connect.

# Option 1) Enable CODER_TUNNEL to generate a
# unique *. try.coder.com access URL
#CODER_TUNNEL=false

# Option 2) Set an access URL
# e.g. https://coder.example.com
#CODER_ACCESS_URL=

CODER_ADDRESS=
CODER_PG_CONNECTION_URL=
CODER_TLS_CERT_FILE=
CODER_TLS_ENABLE=
CODER_TLS_KEY_FILE=
this is my current .env file for coder. did you put 0.0.0.0 or your actual ip at CODER_ADDRESS?
HeNoGaming
HeNoGaming3y ago
the actual ip
rdmchr
rdmchrOP3y ago
did you add the port :7080 behind that?
HeNoGaming
HeNoGaming3y ago
CODER_ACCESS_URL=http://192.168.1.XX:443
CODER_ADDRESS=192.168.1.XX:443
CODER_ACCESS_URL=http://192.168.1.XX:443
CODER_ADDRESS=192.168.1.XX:443
rdmchr
rdmchrOP3y ago
coder-coder-1 | listen "116.203.142.26:443": listen tcp 116.203.142.26:443: bind: cannot assign requested address I think I cant bind to 443 since traefik uses that port already. should I just switch to the default port?
HeNoGaming
HeNoGaming3y ago
As you can see I use port 443, but if I know it correctly it doesn't matter which one you use.
rdmchr
rdmchrOP3y ago
ok hm i also cant bind to 7080 which is the default port which is currently not in use haha i found the problem so CODER_ADDRESS is still 0.0.0.0:7080, but I changed CODER_ACCESS_URL to the domain i configured in traefik. for example https://coder.[XYZ].dev
Want results from more Discord servers?
Add your server