Bind address already in use

Hello everyone,

I’m facing an issue while trying to setup an openBalena server for some experiments. I just cloned the remote repository and set it up, but haproxy can’t start since it expects to have ports 443 and 80 free, while I’m using them for other services.
Is it possible to change its configuration so to redirect it to another port range (say 4443 and 8080)?

Hi @tampe125 – thanks for your post. Currently, port 443 is core and fundamental to the operation of openBalena, and we do not support changing this. (You can read more about this in an earlier forum post here.)

I tried some quick experiments on my own installation of openBalena (starting with the instructions here, and here’s what I found:

  • I was able to modify ./compose/services.yml to use port 4430 and port 8080. Restarting the haproxy service showed that it was now using those ports.
  • I was able to modify my ~/.balenarc to point at this new port: balenaUrl: "openbalena.example.com:4430". After that, balena login and balena apps worked.
  • I had to manually modify the config.json file on a device to set the port. After that, the device was able to register with the API, and showed up with balena devices.
  • However, attempting to deploy an application did not work: the CLI was attempting to connect to port 443, not port 4430.

As you can see, this is not a simple procedure. (And just one more time, we don’t support this. :grinning: ) It’s probably easiest to run this on a separate instance.

If you’d like to dig further into this, or submit a feature request, you can find the repo at https://github.com/balena-io/open-balena.

Thanks for your question. If you manage to make further progress on this, let us know!

All the best,
Hugh

Thank you for your detailed answer and tests!
It seems that everything is hardcoded with those ports, and I think image update for devices will try to connect to those ports as well…
I think it’s way easier to spin a micro instance and desk with it.

Thanks for your time!