huly-selfhost icon indicating copy to clipboard operation
huly-selfhost copied to clipboard

Can we not have port mapping?

Open DeepBhat opened this issue 1 year ago • 4 comments

I am hosting on a machine where ports like 9000 and 3000 are already in use and not available. While I modified the compose file generated to change port mapping, the application itself is still making requests to port 3000. I also modified the environment variables to change the port, but that didn't work either.

Would it be a good idea to allow configurable ports instead?

DeepBhat avatar May 13 '24 07:05 DeepBhat

@DeepBhat thanks for the question, we will consider exposing ports mapping configuration.

  • 3000 port is used by accounts service, if you want to change it, you should modify the port number in ACCOUNTS_URL environment variable and set ACCOUNT_PORT env variable to the same value for account service.
  • 9000 port is used by minio, you need to change MINIO_ENDPOINT env variable to minio:9002 for example and update minio container configuration.

aonnikov avatar Jun 06 '24 04:06 aonnikov

  • 9000 port is used by minio, you need to change MINIO_ENDPOINT env variable to minio:9002 for example and update minio container configuration.

sorry but your method didnt work, the adapter still tries to connect to port 9000

{"adapter":"minio","error":{"address":"192.168.112.2","code":"ECONNREFUSED","errno":-111,"message":"connect ECONNREFUSED 192.168.112.2:9000","port":9000,"stack":"Error: connect ECONNREFUSED 192.168.112.2:9000\n    at TCPConnectWrap.afterConnect [as oncomplete] (node:net:1607:16)","syscall":"connect"},"level":"error","message":"failed to init adapter","timestamp":"2024-10-13T08:38:31.928Z","workspaceId":{"name":"w---670b868c-0ebec056e6-43d8e4"}}
{"error":{"address":"192.168.112.2","code":"ECONNREFUSED","errno":-111,"message":"connect ECONNREFUSED 192.168.112.2:9000","port":9000,"stack":"Error: connect ECONNREFUSED 192.168.112.2:9000\n    at TCPConnectWrap.afterConnect [as oncomplete] (node:net:1607:16)","syscall":"connect"},"level":"error","message":"Failed to create workspace","timestamp":"2024-10-13T08:38:31.929Z"}
{"level":"error","message":"Unhandled Rejection at:","promise":{},"reason":{"address":"192.168.112.2","code":"ECONNREFUSED","errno":-111,"message":"connect ECONNREFUSED 192.168.112.2:9000","port":9000,"stack":"Error: connect ECONNREFUSED 192.168.112.2:9000\n    at TCPConnectWrap.afterConnect [as oncomplete] (node:net:1607:16)","syscall":"connect"},"timestamp":"2024-10-13T08:38:31.931Z"}

By the way, the issue of ports is also relevant for me, like the author, 3000 and 9000 are very popular and many applications use them by default. Is it really impossible to select a group of definitely unused ports from ~64000 ports?

v0.6.313

ja49619 avatar Oct 13 '24 08:10 ja49619

@ja49619 it is definitely possible, will do the change

aonnikov avatar Oct 13 '24 16:10 aonnikov

@DeepBhat thanks for the question, we will consider exposing ports mapping configuration.

  • 3000 port is used by accounts service, if you want to change it, you should modify the port number in ACCOUNTS_URL environment variable and set ACCOUNT_PORT env variable to the same value for account service.
  • 9000 port is used by minio, you need to change MINIO_ENDPOINT env variable to minio:9002 for example and update minio container configuration.

I'm having the same issue as @ja49619 . I've changed the ports in config, minio-deployment and minio-service yaml files but still the workspace is trying to connect to port 9000. What am I missing? I've attached the screenshots for reference

config minio-deployment minio-service error

binayab99 avatar Oct 16 '24 06:10 binayab99