How to update to lastest fixes branch?

Hello

I had installed the1.2.0 with “sudo npm install -g --unsafe-perm genieacs@1.2.0-beta.0” and had on “/usr/local/lib/node_modules/genieacs” (it go automatically there, i had debian 10) .

My question is how to update with the lastest fixes using git clone command? i see that many fixes are on .ts files that i no had… (one is to change session.ts, i can not find this file in my instalation… to fix too many rpc, per example)

Thanks you in advance, sorry my english.

Hi.
First of all, copy the configuration of the npm version (genieacs.env) then uninstall the npm version and download the latest version from git and build it, something like:

# clone github project
cd /usr/src
git clone https://github.com/genieacs/genieacs

# build the project from the sources
npm run build

mv dist /opt/genieacs
mkdir /var/log/genieacs

# install npm dependencies
cd /opt/genieacs
npm install --unsafe-perm

In order to update, you need to do:

cd /usr/src
git fetch
git pull

and then continue with the build and install process

Install the systemd services as described here:
http://docs.genieacs.com/en/latest/installation-guide.html#configure-systemd

Then you will be able to start the services:

service genieacs-cwmp start
service genieacs-fs start
service genieacs-nbi start
service genieacs-ui start

Regards.

Hello and thanks for the help!!

i was do all the step but the services does not works:

root@GenieACS2:~# sudo systemctl status genieacs-cwmp
● genieacs-cwmp.service - GenieACS CWMP
Loaded: loaded (/etc/systemd/system/genieacs-cwmp.service; enabled; vendor preset: enabled)
Active: failed (Result: exit-code) since Wed 2020-04-01 15:29:55 -03; 819ms ago
Process: 751 ExecStart=/usr/src/genieacs/bin/genieacs-cwmp (code=exited, status=1/FAILURE)
Main PID: 751 (code=exited, status=1/FAILURE)

abr 01 15:29:55 GenieACS2 genieacs-cwmp[751]: at Module.require (internal/modules/cjs/loader.js:1044:19)
abr 01 15:29:55 GenieACS2 genieacs-cwmp[751]: at Module._preloadModules (internal/modules/cjs/loader.js:1298:12)
abr 01 15:29:55 GenieACS2 genieacs-cwmp[751]: at loadPreloadModules (internal/bootstrap/pre_execution.js:444:5)
abr 01 15:29:55 GenieACS2 genieacs-cwmp[751]: at prepareMainThreadExecution (internal/bootstrap/pre_execution.js:68:3)
abr 01 15:29:55 GenieACS2 genieacs-cwmp[751]: at internal/main/run_main_module.js:7:1 {
abr 01 15:29:55 GenieACS2 genieacs-cwmp[751]: code: ‘MODULE_NOT_FOUND’,
abr 01 15:29:55 GenieACS2 genieacs-cwmp[751]: requireStack: [ ‘internal/preload’ ]
abr 01 15:29:55 GenieACS2 genieacs-cwmp[751]: }
abr 01 15:29:55 GenieACS2 systemd[1]: genieacs-cwmp.service: Main process exited, code=exited, status=1/FAILURE
abr 01 15:29:55 GenieACS2 systemd[1]: genieacs-cwmp.service: Failed with result ‘exit-code’.

i dont know if is missing something else

also when i run without a service like “./genieacs-cwmp … etc” it opens a blank webpage, like http server is listening but does not get any of the UI

Can you see anything in the logs or when running the ./genieacs-cwmp and other binaries? Did you place your genieacs.env in /opt/genieacs folder?

Yes i have the genieacs.env in the folder.

All log that i have are when i run as serivice and try to check the status:

root@GenieACS2:~# sudo systemctl status genieacs-cwmp
sudo systemctl status genieacs-nbi
sudo systemctl status genieacs-fs
● genieacs-cwmp.service - GenieACS CWMP
Loaded: loaded (/etc/systemd/system/genieacs-cwmp.service; enabled; vendor preset: enabled)
Active: failed (Result: exit-code) since Wed 2020-04-01 17:20:56 -03; 41s ago
Process: 800 ExecStart=/usr/src/genieacs/bin/genieacs-cwmp (code=exited, status=1/FAILURE)
Main PID: 800 (code=exited, status=1/FAILURE)

abr 01 17:20:54 GenieACS2 genieacs-cwmp[800]: Error: Cannot find module ‘esm’
abr 01 17:20:54 GenieACS2 genieacs-cwmp[800]: at Function.Module._resolveFilename (internal/modules/cjs/loader.js:636:15)
abr 01 17:20:54 GenieACS2 genieacs-cwmp[800]: at Function.Module._load (internal/modules/cjs/loader.js:562:25)
abr 01 17:20:54 GenieACS2 genieacs-cwmp[800]: at Module.require (internal/modules/cjs/loader.js:692:17)
abr 01 17:20:54 GenieACS2 genieacs-cwmp[800]: at Module._preloadModules (internal/modules/cjs/loader.js:901:12)
abr 01 17:20:54 GenieACS2 genieacs-cwmp[800]: at preloadModules (internal/bootstrap/node.js:602:7)
abr 01 17:20:54 GenieACS2 genieacs-cwmp[800]: at startup (internal/bootstrap/node.js:273:9)
abr 01 17:20:54 GenieACS2 genieacs-cwmp[800]: at bootstrapNodeJSCore (internal/bootstrap/node.js:623:3)
abr 01 17:20:56 GenieACS2 systemd[1]: genieacs-cwmp.service: Main process exited, code=exited, status=1/FAILURE
abr 01 17:20:56 GenieACS2 systemd[1]: genieacs-cwmp.service: Failed with result ‘exit-code’.
root@GenieACS2:~# sudo systemctl status genieacs-nbi
● genieacs-nbi.service - GenieACS NBI
Loaded: loaded (/etc/systemd/system/genieacs-nbi.service; enabled; vendor preset: enabled)
Active: failed (Result: exit-code) since Wed 2020-04-01 17:20:59 -03; 38s ago
Process: 860 ExecStart=/usr/src/genieacs/bin/genieacs-nbi (code=exited, status=1/FAILURE)
Main PID: 860 (code=exited, status=1/FAILURE)

abr 01 17:20:58 GenieACS2 genieacs-nbi[860]: Error: Cannot find module ‘esm’
abr 01 17:20:58 GenieACS2 genieacs-nbi[860]: at Function.Module._resolveFilename (internal/modules/cjs/loader.js:636:15)
abr 01 17:20:58 GenieACS2 genieacs-nbi[860]: at Function.Module._load (internal/modules/cjs/loader.js:562:25)
abr 01 17:20:58 GenieACS2 genieacs-nbi[860]: at Module.require (internal/modules/cjs/loader.js:692:17)
abr 01 17:20:58 GenieACS2 genieacs-nbi[860]: at Module._preloadModules (internal/modules/cjs/loader.js:901:12)
abr 01 17:20:58 GenieACS2 genieacs-nbi[860]: at preloadModules (internal/bootstrap/node.js:602:7)
abr 01 17:20:58 GenieACS2 genieacs-nbi[860]: at startup (internal/bootstrap/node.js:273:9)
abr 01 17:20:58 GenieACS2 genieacs-nbi[860]: at bootstrapNodeJSCore (internal/bootstrap/node.js:623:3)
abr 01 17:20:59 GenieACS2 systemd[1]: genieacs-nbi.service: Main process exited, code=exited, status=1/FAILURE
abr 01 17:20:59 GenieACS2 systemd[1]: genieacs-nbi.service: Failed with result ‘exit-code’.
root@GenieACS2:~# sudo systemctl status genieacs-fs
● genieacs-fs.service - GenieACS FS
Loaded: loaded (/etc/systemd/system/genieacs-fs.service; enabled; vendor preset: enabled)
Active: failed (Result: exit-code) since Wed 2020-04-01 17:20:57 -03; 39s ago
Process: 830 ExecStart=/usr/src/genieacs/bin/genieacs-fs (code=exited, status=1/FAILURE)
Main PID: 830 (code=exited, status=1/FAILURE)

abr 01 17:20:56 GenieACS2 genieacs-fs[830]: Error: Cannot find module ‘esm’
abr 01 17:20:56 GenieACS2 genieacs-fs[830]: at Function.Module._resolveFilename (internal/modules/cjs/loader.js:636:15)
abr 01 17:20:56 GenieACS2 genieacs-fs[830]: at Function.Module._load (internal/modules/cjs/loader.js:562:25)
abr 01 17:20:56 GenieACS2 genieacs-fs[830]: at Module.require (internal/modules/cjs/loader.js:692:17)
abr 01 17:20:56 GenieACS2 genieacs-fs[830]: at Module._preloadModules (internal/modules/cjs/loader.js:901:12)
abr 01 17:20:56 GenieACS2 genieacs-fs[830]: at preloadModules (internal/bootstrap/node.js:602:7)
abr 01 17:20:56 GenieACS2 genieacs-fs[830]: at startup (internal/bootstrap/node.js:273:9)
abr 01 17:20:56 GenieACS2 genieacs-fs[830]: at bootstrapNodeJSCore (internal/bootstrap/node.js:623:3)
abr 01 17:20:57 GenieACS2 systemd[1]: genieacs-fs.service: Main process exited, code=exited, status=1/FAILURE
abr 01 17:20:57 GenieACS2 systemd[1]: genieacs-fs.service: Failed with result ‘exit-code’.
root@GenieACS2:~# sudo systemctl status genieacs-ui
● genieacs-ui.service - GenieACS UI
Loaded: loaded (/etc/systemd/system/genieacs-ui.service; enabled; vendor preset: enabled)
Active: failed (Result: exit-code) since Wed 2020-04-01 17:20:59 -03; 38s ago
Process: 890 ExecStart=/usr/src/genieacs/bin/genieacs-ui (code=exited, status=1/FAILURE)
Main PID: 890 (code=exited, status=1/FAILURE)

abr 01 17:20:59 GenieACS2 genieacs-ui[890]: Error: Cannot find module ‘esm’
abr 01 17:20:59 GenieACS2 genieacs-ui[890]: at Function.Module._resolveFilename (internal/modules/cjs/loader.js:636:15)
abr 01 17:20:59 GenieACS2 genieacs-ui[890]: at Function.Module._load (internal/modules/cjs/loader.js:562:25)
abr 01 17:20:59 GenieACS2 genieacs-ui[890]: at Module.require (internal/modules/cjs/loader.js:692:17)
abr 01 17:20:59 GenieACS2 genieacs-ui[890]: at Module._preloadModules (internal/modules/cjs/loader.js:901:12)
abr 01 17:20:59 GenieACS2 genieacs-ui[890]: at preloadModules (internal/bootstrap/node.js:602:7)
abr 01 17:20:59 GenieACS2 genieacs-ui[890]: at startup (internal/bootstrap/node.js:273:9)
abr 01 17:20:59 GenieACS2 genieacs-ui[890]: at bootstrapNodeJSCore (internal/bootstrap/node.js:623:3)
abr 01 17:20:59 GenieACS2 systemd[1]: genieacs-ui.service: Main process exited, code=exited, status=1/FAILURE
abr 01 17:20:59 GenieACS2 systemd[1]: genieacs-ui.service: Failed with result ‘exit-code’.

Looks like you are missing some modules, did you install them inside of /opt/genieacs?

cd /opt/genieacs
npm install --unsafe-perm

yes, i do.

May be you can help me with the part of uninstall npm version…

Currently i have a working instalation of 1.2.0, but this is only happen when i try to install the git version, that have some fixes. I don know what is happen, with that version services does not run an got always modules not found. I dont know wich modules need this version.

Well, to uninstall, just run

sudo npm uniinstall -g --unsafe-perm genieacs@1.2.0-beta.0

Anyway, if you still having problems, send me a PM and I could SSH into your server and set it up tomorrow.

thanks i was able to install!. I was not understand the part that the dist has the “compiled” genieacs to move on opt and then do the install.

But this version wont fix the rpc issue, only hide, by modify the value on session.ts (first at all). Still not having all the tree from my ONT

Oh, good to hear that you finaly got it. I think that you need to do something like

GENIEACS_MAX_COMMIT_ITERATIONS=128

The RPC sounds familiar to me, but I can’t remember if I had this problem.

Yes thanks! i add for 1.2 on config: cwmp.maxCommitIterations “32768”, seems to be a bigger number but i dont know wich is big or small value.

Why are you trying to get the full tree?

BTW, are you Spanish? I’m from Spain.

Hope you and your family are ok! I am from Argentina, here we was on quarentine from mid of march to until mid of april…
( I dont know if is ok to write in spanish here, so im stick on english.)

I begining to do some test with TR069, and try to see how it works. I always work with snmp for Docsis modems (im from a ISP for QA team). We are also testing Axiros, but for my side im try to learn with this software and try to do some test.
For SNMP we normally do some walk but here seems to be quite different.
On version 1.1.3, i don have this problem with the “tree scan” of all “Device.”

Yes, we are fine for now but still on quarantine for the next few weeks.

I think that you are using TR069 in a way that it was not designed to be used. The main approach is to set/get the necesary settings, not to do a walk on a whole tree. So you should have a provision script which goes step by step, get an interesting wifi part, change wifi name, encryption, etc… Then get the interfaces and add the necesary wan configuration. I don’t think that you need to get the whole information tree with one request. Try going step by step. Here you have an example of provisioning script:

https://github.com/genieacs/genieacs/wiki/Example-of-a-Provisioning-Flow

1 Like