https://www.growthbook.io/ logo
#announcements
Title
# announcements
b

brief-traffic-36675

05/18/2023, 9:59 PM
if there is an env var named
PORT
, this is automatically used by both the
front-end
and
backend
and there is a conflict?
f

fresh-football-47124

05/18/2023, 10:01 PM
the PORT is only used for the API
b

brief-traffic-36675

05/18/2023, 10:02 PM
does the
front-end
listen/expect for another env var?
f

fresh-football-47124

05/18/2023, 10:04 PM
it uses the port from the APP_ORIGIN (eg: http://localhost:3000)
b

brief-traffic-36675

05/18/2023, 10:11 PM
I am trying to deploy it on
kubernetes
with these env vars
Copy code
NODE_ENV: production
        PORT: 20000
        APP_ORIGIN: <https://localhost:3000>
        APP_HOST: <http://localhost:20000>
it fails with
Copy code
"err":{"type":"Error","message":"listen EADDRINUSE: address already in use :::20000",
f

fresh-football-47124

05/18/2023, 10:11 PM
its API_HOST
b

brief-traffic-36675

05/18/2023, 10:11 PM
🤦‍♂️
switched to this
Copy code
NODE_ENV: production
        PORT: 3100
        APP_ORIGIN: <https://localhost:3000>
        API_HOST: <http://localhost:3100>
but getting the same...
Copy code
"err":{"type":"Error","message":"listen EADDRINUSE: address already in use :::3100"
f

fresh-football-47124

05/18/2023, 10:16 PM
not sure you have access, but can you check what is running?
Copy code
sudo lsof -i :3100
b

brief-traffic-36675

05/18/2023, 10:18 PM
not able to do much now....
Copy code
k exec -it growthbook-api-web-65cc97ccd4-q2gv2 -- "bash -c 'lsof -i :3100'"
E0519 01:18:08.430815   82577 v3.go:79] EOF
                                           error: Internal error occurred: error executing command in container: failed to exec in container: container is in CONTAINER_EXITED state
anyway will try to reproduce this 2morrow, thanks for the feedback so far
9 Views