getsandbox / worker-cli

Sandbox Worker is the core processing component of the Sandbox product
https://getsandbox.com
230 stars 62 forks source link

Worker-cli is running on 2 ports #49

Open lqnhat97 opened 3 years ago

lqnhat97 commented 3 years ago

My issue is when I ran the worker with the command java -jar <worker>.jar --port=<customPort> , the sandbox will listen on customPort and port 8080 (default). I have checked the cli and found that the listener port use RequestServer(@Value("${app.worker.port:8080}"), so I fixed the command like java -Dapp.worker.port:<customPort> -jar <worker>.jar --port=<customPort> to let the sandbox run on my customPort. It's quite inconvenience. Can you fix it ?

nhoughto commented 3 years ago

Seems simple enough, could a workaround be java -Dapp.worker.port:<customPort> -jar <worker>.jar without the --port?

lqnhat97 commented 3 years ago

In this case, it will take 2 ports: port 8080 as default and customPort

nhoughto commented 3 years ago

i'm confused, do you want it to run on 1 port or 2? if you override the default port with the desired value what do you need custom port for?