temboard icon indicating copy to clipboard operation
temboard copied to clipboard

Listen on port below 1000

Open vidierr opened this issue 2 years ago • 6 comments

Hello,

I would like to change de temboard UI port from 8888 to 80. When i change the port in the config file (/etc/temboard/temboard.conf) and start it i have an issue :

Sep 28 13:41:31 env[35394]: Starting scheduler. Sep 28 13:41:31 env[35389]: FATAL: [Errno 13] Permission denied. Quit Sep 28 13:41:31 env[35393]: worker pool terminated. Sep 28 13:41:31 systemd[1]: temboard.service: Main process exited, code=exited, status=3/NOTIMPLEMENTED Sep 28 13:41:31 systemd[1]: temboard.service: Failed with result 'exit-code'.

When i try to start temboard without the service : temboard -c /etc/temboard/temboard.conf -d INFO: Starting temboard 7.11. INFO: Running on Red Hat Enterprise Linux 8.6 (Ootpa). INFO: Using Python 3.6.8 (/usr/libexec/platform-python) and Tornado 6.0.2 . INFO: Using libpq 13.7, Psycopg2 2.8.6 (dt dec pq3 ext lo64) and SQLAlchemy 1.3.2 . FATAL: can't write pidfile /run/temboard.pid.

When i try with any port whit 4 digits it starts, but never with port with 2 or 3 digits.

The version of Temboard is 7.11 on RHEL 8.

Have you a solution ?

vidierr avatar Sep 28 '22 11:09 vidierr

Hi @vidierr , You must be root to bind a port below 1000. I strongly discourage you to run temBoard as root. Also, you should use 443 port since temBoard serves HTTPS. But port 443 is also reserved to root.

You can request (here) the feature of listening port 443 in temBoard UI.

bersace avatar Sep 28 '22 13:09 bersace

I think it could be a good feature.

vidierr avatar Sep 28 '22 14:09 vidierr

As workaround i use an iptable's rule to redirect the port 8888 to 443

vidierr avatar Sep 28 '22 14:09 vidierr

Thanks for sharing the workaround. A good solution would be for temBoard to integrate with systemd socket activation.

bersace avatar Sep 29 '22 07:09 bersace

Is that need some developpements or only to modify the systemd service ?

vidierr avatar Sep 29 '22 08:09 vidierr

This requires development to reuse systemd file descriptor to setup Tornado HTTPS socket. This should add a new dependency to python-systemd.

bersace avatar Sep 29 '22 09:09 bersace