Getting 404 upon coder login

Hi all, I've just installed coder on k8s and wanted to create my first template. The server is accessible from an https endpoint but when running coder login https://coder-server.example I get a 404 for the token url. (the internal-auth?show_token=true path) Am I missing something obvious here? Image
No description
25 Replies
Phorcys
Phorcys2y ago
hey, this issue occurs because you are using an outdated CLI, can you post the output of coder version ?
tfishler
tfishler2y ago
# coder --version
coder version v1.36.0 go1.16.7 darwin/amd64 4c585c65b518dd3ad41391360af456fe573d8b1e
# coder --version
coder version v1.36.0 go1.16.7 darwin/amd64 4c585c65b518dd3ad41391360af456fe573d8b1e
Installed with brew.
Phorcys
Phorcys2y ago
yeah, that's the wrong package, this is the CLI for Coder Classic (v1) but your server is using Coder OSS (v2) I don't know if brew has a package for it but here's the right CLI : https://github.com/coder/coder
tfishler
tfishler2y ago
🤦‍♂️ Thanks.
Phorcys
Phorcys2y ago
I was confused too at first since the repo for the Coder v1 CLI is called coder-cli, so this doesn't help lol you can mark this post as resolved by using /resolve when it works for you
tfishler
tfishler2y ago
So I just install coder itself and don't run the server? Or is there a specific cli only installation script? I mean curl -L https://coder.com/install.sh | sh ?
Phorcys
Phorcys2y ago
yes for that first question, the architecture of Coder OSS is that the CLI is also the server and vice-versa, which took me a bit of time to understand yup, that's the one
tfishler
tfishler2y ago
Cool. Thanks. The docs are not clear enough there.. Thanks for the quick response! I'll give it a try.
Phorcys
Phorcys2y ago
I definitely agree, I had the same first-use experience than you :)
tfishler
tfishler2y ago
Something is off.. :/
~ coder login https://coder.example
build info: do: Get "https://coder.example/api/v2/buildinfo": context deadline exceeded
Failed to check server "https://coder.example" for first user, is the URL correct and is coder accessible from your browser? Error - has initial user: do: Get "https://coder.example": dial tcp 75.2.18.233:443: i/o timeout
Run 'coder login --help' for usage.
~ coder login https://coder.example
build info: do: Get "https://coder.example/api/v2/buildinfo": context deadline exceeded
Failed to check server "https://coder.example" for first user, is the URL correct and is coder accessible from your browser? Error - has initial user: do: Get "https://coder.example": dial tcp 75.2.18.233:443: i/o timeout
Run 'coder login --help' for usage.
Running
curl https://coder.example {"external_url":"https://github.com/coder/coder/commit/165b6fbc6a23fd5f58ed459ea50f42e642c2f696","version":"v0.12.5+165b6fb"}
curl https://coder.example {"external_url":"https://github.com/coder/coder/commit/165b6fbc6a23fd5f58ed459ea50f42e642c2f696","version":"v0.12.5+165b6fb"}
Looks fine. Not sure why it resolves to this IP address. My server is on private subnets, custom certificate (CA trusted locally) (Sorry for masking the real url here)
Phorcys
Phorcys2y ago
hmm what does it show if you visit https://coder.example in your browser ?
tfishler
tfishler2y ago
No description
Phorcys
Phorcys2y ago
I posted about it in #feedback, feel free to add anything are you sure this is curl https://coder.example's output ? my server responds with HTML, I'm thinking your reverse-proxy might not be treating the CLI and the browser in the same way.
tfishler
tfishler2y ago
I've copy / pasted the url. It's too long 🙂 hmm..
Phorcys
Phorcys2y ago
oh okay, so you're not requesting the root ?
Want results from more Discord servers?
Add your server