-
Notifications
You must be signed in to change notification settings - Fork 148
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Unable to change UI web port #707
Comments
Does it work for all free ports over 1024, and not work for all free ports under 1024? This may be expected linux behavior for privileged ports and a non-root user. Practically, you could run scanservjs in docker and use that to map port 80 to port 8080, as docker would run as root. For my setup, I use an nginx reverse proxy container to change ports and provide HTTPS to my scanservjs container, which does not have its port 8080 exposed outside a docker network to the nginx container. |
I had the same problem. I solved by running this command and restarting scanservjs service: This allows nodejs to use ports under 1024. More info is here: |
Yes, the cleanest (and better option, in my opinion, in terms of general security concerns) is to setup a little & light reverse proxy like Caddy on your server. The configuration is very simple :
Or if you are comfortable with the notion of local DNS and you need to host several services on the same host but all on the port 80 :
|
After following the copy step to overriding the Server Port to 80 in /etc/scanservjs/config.local.js, scanservjs fails to start
To Reproduce
Steps to reproduce the behavior:
root@scanner:~# systemctl status scanservjs.service x scanservjs.service - scanservjs Loaded: loaded (/lib/systemd/system/scanservjs.service; enabled; preset: enabled) Active: failed (Result: exit-code) since Sun 2023-12-17 22:14:30 UTC; 2s ago Duration: 958ms Process: 678 ExecStart=/usr/lib/scanservjs/server/server.js (code=exited, status=1/FAILURE) Main PID: 678 (code=exited, status=1/FAILURE) CPU: 951ms
Dec 17 22:14:30 scanner systemd[1]: scanservjs.service: Main process exited, code=exited, status=1/FAILURE Dec 17 22:14:30 scanner systemd[1]: scanservjs.service: Failed with result 'exit-code'. Dec 17 22:14:30 scanner systemd[1]: scanservjs.service: Scheduled restart job, restart counter is at 5. Dec 17 22:14:30 scanner systemd[1]: Stopped scanservjs.service - scanservjs. Dec 17 22:14:30 scanner systemd[1]: scanservjs.service: Start request repeated too quickly. Dec 17 22:14:30 scanner systemd[1]: scanservjs.service: Failed with result 'exit-code'. Dec 17 22:14:30 scanner systemd[1]: Failed to start scanservjs.service - scanservjs.
root@scanner:~# netstat -ntlp Active Internet connections (only servers) Proto Recv-Q Send-Q Local Address Foreign Address State PID/Program name tcp 0 0 127.0.0.1:25 0.0.0.0:* LISTEN 443/master tcp 0 0 127.0.0.54:53 0.0.0.0:* LISTEN 104/systemd-resolve tcp 0 0 127.0.0.53:53 0.0.0.0:* LISTEN 104/systemd-resolve tcp6 0 0 :::22 :::* LISTEN 1/init tcp6 0 0 ::1:25 :::* LISTEN 443/master
NOTE:
scanservjs starts normally if config.port is set to 8080 (on /etc/scanservjs/config.local.js) but no network devices are found (scanimage -L is OK)
root@scanner:~# netstat -ntlp Active Internet connections (only servers) Proto Recv-Q Send-Q Local Address Foreign Address State PID/Program name tcp 0 0 127.0.0.1:25 0.0.0.0:* LISTEN 443/master tcp 0 0 127.0.0.54:53 0.0.0.0:* LISTEN 104/systemd-resolve tcp 0 0 127.0.0.53:53 0.0.0.0:* LISTEN 104/systemd-resolve tcp6 0 0 :::22 :::* LISTEN 1/init tcp6 0 0 ::1:25 :::* LISTEN 443/master tcp6 0 0 :::8080 :::* LISTEN 694/node
Expected behavior
scanservjs.service successful start and accessible on port 80.
network devices present on web ui.
Server (please complete the following information):
Logs
This may be useful
The text was updated successfully, but these errors were encountered: