C
Coder.com7mo ago
ay0ks

Access URL is not being used while port-forwarding.

echo $CODER_ACCESS_URL
https://code.ay0ks.wtf
echo $CODER_ACCESS_URL
https://code.ay0ks.wtf
coder port-forward Personal --tcp 4321:3000
zsh: correct 'Personal' to 'personal' [nyae]? n
Encountered an error running "coder port-forward", see "coder port-forward --help" for more information
error: Get "http://127.0.0.1:30163/api/v2/users/me/workspace/Personal?include_deleted=false": dial tcp 127.0.0.1:30163: connect: connection refused
coder port-forward Personal --tcp 4321:3000
zsh: correct 'Personal' to 'personal' [nyae]? n
Encountered an error running "coder port-forward", see "coder port-forward --help" for more information
error: Get "http://127.0.0.1:30163/api/v2/users/me/workspace/Personal?include_deleted=false": dial tcp 127.0.0.1:30163: connect: connection refused
Is there any way I can avoid using the localhost IP? (The same problem was with kubernetes templates, it was using localhost as an access url so I had to switch to docker)
13 Replies
Codercord
Codercord7mo ago
<#1235166891589505034>
Category
Help needed
Product
Coder OSS (v2)
Platform
Linux
Logs
Please post any relevant logs/error messages.
ay0ks
ay0ksOP7mo ago
Also the HTTP address is 0.0.0.0:30162 but it is using port 30163 for some reason (I have never specified it)
Phorcys
Phorcys7mo ago
the URL that is used for the CLI is the one you used when doing coder login CODER_ACCESS_URL is only a server side parameter so you should redo coder login <URL> with the proper URL
ay0ks
ay0ksOP7mo ago
that fixed the port-forwarding, but is there a way to change localhost here?
Error: Post "http://localhost/api/v1/namespaces/k8s/persistentvolumeclaims": dial tcp [::1]:80: connect: connection refused
on main.tf line 190, in resource "kubernetes_persistent_volume_claim" "home":
190: resource "kubernetes_persistent_volume_claim" "home" {
Error: Post "http://localhost/api/v1/namespaces/k8s/persistentvolumeclaims": dial tcp [::1]:80: connect: connection refused
on main.tf line 190, in resource "kubernetes_persistent_volume_claim" "home":
190: resource "kubernetes_persistent_volume_claim" "home" {
i get this error while trying to create a workspace with a kubernetes template
Phorcys
Phorcys7mo ago
yes, you have to change that in the template
ay0ks
ay0ksOP7mo ago
okay, thanks for helping me!
Codercord
Codercord7mo ago
@ay0ks closed the thread. @ay0ks reopened the thread.
ay0ks
ay0ksOP7mo ago
@Phorcys where exactly i can change that? searched in the template terraform file and couldn't find it
Phorcys
Phorcys7mo ago
can you send your template over ?
ay0ks
ay0ksOP7mo ago
Phorcys
Phorcys7mo ago
you want to configure the k8s host in the provider "kubernetes" { section or you can set the use_kubeconfig variable to true if kubectl works on that machine and you don't want to use another account for Coder
Codercord
Codercord7mo ago
@ay0ks closed the thread.
Want results from more Discord servers?
Add your server