Run Genieacs 1.2 with url port 80

hi

i use v 1.1 before and change the url port for CPE to 80 , but when i fresh install v1.2 , i don’t see the config.json , and search for like this configuration

but i see same in /usr/local/lib/node_modules/genieacs/bin/genieacs-cwmp

however when i change 7547 to 80 , cwmp not work …

● genieacs-cwmp.service - GenieACS CWMP
Loaded: loaded (/etc/systemd/system/genieacs-cwmp.service; enabled; vendor preset: enabled)
Active: active (running) since Sat 2019-10-12 02:32:30 EDT; 12min left
Main PID: 1468 (node)
Tasks: 11 (limit: 4915)
CGroup: /system.slice/genieacs-cwmp.service
└─1468 node /usr/local/lib/node_modules/genieacs/bin/genieacs-cwmp

Oct 12 02:32:59 acs genieacs-cwmp[1468]: 2019-10-12T06:32:59.036Z [ERROR] Uncaught exception; pid=2306 exceptionName=“Error” exceptionMessage=“bind EACCES 0.0.0.0:80” e
Oct 12 02:32:59 acs genieacs-cwmp[1468]: 2019-10-12T06:32:59.047Z [ERROR] Worker died; pid=2306 exitCode=0
Oct 12 01:32:59 acs genieacs-cwmp[1468]: 2019-10-12T05:32:59.112Z [ERROR] Uncaught exception; pid=2370 exceptionName=“Error” exceptionMessage=“bind EACCES 0.0.0.0:80” e
Oct 12 01:32:59 acs genieacs-cwmp[1468]: 2019-10-12T05:32:59.122Z [ERROR] Worker died; pid=2370 exitCode=0
Oct 12 01:33:01 acs genieacs-cwmp[1468]: 2019-10-12T05:33:01.107Z [ERROR] Uncaught exception; pid=2385 exceptionName=“Error” exceptionMessage=“bind EACCES 0.0.0.0:80” e
Oct 12 01:33:01 acs genieacs-cwmp[1468]: 2019-10-12T05:33:01.118Z [ERROR] Worker died; pid=2385 exitCode=0
Oct 12 01:33:03 acs genieacs-cwmp[1468]: 2019-10-12T05:33:03.107Z [ERROR] Uncaught exception; pid=2398 exceptionName=“Error” exceptionMessage=“bind EACCES 0.0.0.0:80” e
Oct 12 01:33:03 acs genieacs-cwmp[1468]: 2019-10-12T05:33:03.118Z [ERROR] Worker died; pid=2398 exitCode=0
Oct 12 01:33:05 acs genieacs-cwmp[1468]: 2019-10-12T05:33:05.108Z [ERROR] Uncaught exception; pid=2411 exceptionName=“Error” exceptionMessage=“bind EACCES 0.0.0.0:80” e
Oct 12 01:33:05 acs genieacs-cwmp[1468]: 2019-10-12T05:33:05.119Z [ERROR] Worker died; pid=2411 exitCode=0

where is the valid file that i can change it

thanks
Husam

also i go to /opt/genieacs/genieacs.env
GENIEACS_CWMP_ACCESS_LOG_FILE=/var/log/genieacs/genieacs-cmwp-access.log
GENIEACS_NBI_ACCESS_LOG_FILE=/var/log/genieacs/genieacs-nbi-access.log
GENIEACS_FS_ACCESS_LOG_FILE=/var/log/genieacs/genieacs-fs-access.log
GENIEACS_UI_ACCESS_LOG_FILE=/var/log/genieacs/genieacs-ui-access.log
GENIEACS_DEBUG_FILE=/var/log/genieacs/genieacs-debug.yaml
GENIEACS_EXT_DIR=/opt/genieacs/ext
GENIEACS_UI_JWT_SECRET=secret
GENIEACS_CWMP_PORT=80

and put it here , same issue

any one can help

thanks
Husam

Normally, you want to bind the GUI to port 80, not the CWMP process.

Anyway, are you running cwmp as root ? Else, the OS won’t grant privilege for port < 1025. Else, you can port forward 7547 to 127.0.0.1 port 80 via iptables or nftables.

1 Like

Hi Mike ,

thanks for reply

kindly i need the GUI interface to be with port 3000

i mean the url that set in the router which called port 7547 and this what i changed in v1.1 to port 80 in config.json and work with me

but here in v1.2 its not work and give errors in binding as i mentioned before

i do iptables , but sometimes the acs not contact the cpe normally , i must push the file for example multiple time to upgrade firmware

thanks
Husam

as mike99 said, you can’t bind as user on ports <1025 by default.
Just remove the “User=genieacs” line from the genieacs-cwmp so the service runs as root, although
the problems you mentioned are not caused by the genieacs-cwmp port for sure, so I recommend you keep the cwmp running as a non privileged user.

Thanks Mike99 , Lavira

i forget user in cwmp service and now its work with me

its work with me . but after few troubleshooting i see that its not work probably so i add a firewall forwarding from cmwp port to 80

i just need to know if its effect to other services like push upgrade , receive request from router

i open ticket for that

I am trying to do exact same thing,
my old tr069 provider gave direct link (acs.abcd.com) without any port as tr069 url.
Now I have shifted to genieacs, everything is going fine with any other port or default port, but not working with 80 port.
will you please tell me where should I edit User=genieacs value ? did not find any such value.

Update : figured this out.
in ubuntu : run as root

iptables -t nat -A PREROUTING -p tcp --dport 80 -j REDIRECT --to-port 7547

this showed me cpes configured as acs.abcd.com as tr069 url.
then I changed the acs url to acs.abcd.com:7547 because this only work till reboot and I dont want to use 80 port, just want to change cpes configured to 80 port to change 7547 port.
This helped lot.