Unable to start services running Ubuntu 18.4.3 new install

When starting services at the end of the install, I get this on all services

get the following error:
root@tplink-rm:/# sudo systemctl enable genieacs-cwmp
Failed to enable unit: Unit file genieacs-cwmp.service does not exist.

Definately there:
root@tplink-rm:/# systemctl edit --force genieacs-cwmp

GNU nano 2.9.3 /etc/systemd/system/genieacs-cwmp.service.d/.#override.conf0fb6563cdd89b394

[Unit]
Description=GenieACS CWMP
After=network.target

[Service]
User=genieacs
EnvironmentFile=/opt/genieacs/genieacs.env
ExecStart=/usr/bin/genieacs-cwmp
KillMode=process

[Install]
WantedBy=default.target

I ran into the same issue. The fix is to move the file:

/etc/systemd/system/genieacs-cwmp.service.d/override.conf

To:

/etc/systemd/system/genieacs-cwmp.service

It looks like command ‘systemctl edit --force’ may not be the proper way to create new systemd unit files.

I’ve done it like this:

cat << EOF > /etc/systemd/system/genieacs-cwmp.service
[Unit]
Description=GenieACS CWMP
After=network.target

[Service]
User=genieacs
EnvironmentFile=/opt/genieacs/genieacs.env
ExecStart=/opt/genieacs/dist/bin/genieacs-cwmp
KillMode=process

[Install]
WantedBy=default.target

EOF

cat << EOF > /etc/systemd/system/genieacs-nbi.service
[Unit]
Description=GenieACS NBI
After=network.target

[Service]
User=genieacs
EnvironmentFile=/opt/genieacs/genieacs.env
ExecStart=/opt/genieacs/dist/bin/genieacs-nbi
KillMode=process

[Install]
WantedBy=default.target
EOF

cat << EOF > /etc/systemd/system/genieacs-fs.service
[Unit]
Description=GenieACS FS
After=network.target

[Service]
User=genieacs
EnvironmentFile=/opt/genieacs/genieacs.env
ExecStart=/opt/genieacs/dist/bin/genieacs-fs
KillMode=process

[Install]
WantedBy=default.target
EOF

cat << EOF > /etc/systemd/system/genieacs-ui.service
[Unit]
Description=GenieACS UI
After=network.target

[Service]
User=genieacs
EnvironmentFile=/opt/genieacs/genieacs.env
ExecStart=/opt/genieacs/dist/bin/genieacs-ui --ui-jwt-secret INSERT _YOUR_OWN_SECRET
KillMode=process

[Install]
WantedBy=default.target
EOF

systemctl daemon-reload
systemctl enable genieacs-cwmp
systemctl enable genieacs-nbi
systemctl enable genieacs-fs
systemctl enable genieacs-ui

systemctl start genieacs-cwmp
systemctl start genieacs-nbi
systemctl start genieacs-fs
systemctl start genieacs-ui

1 Like

thanks for this suggestion. I was able to create the files and enable but now they error to start even after a reboot.

genieacs-cwmp.service enabled
genieacs-fs.service enabled
genieacs-nbi.service enabled
genieacs-ui.service enabled

network@tplink-rm:~$ sudo systemctl status genieacs-ui.service
[sudo] password for network:
● genieacs-ui.service - GenieACS UI
Loaded: loaded (/etc/systemd/system/genieacs-ui.service; enabled; vendor preset: enabled)
Active: failed (Result: exit-code) since Fri 2019-09-06 11:26:51 EDT; 1min 33s ago
Process: 1330 ExecStart=/opt/genieacs/dist/bin/genieacs-ui --ui-jwt-secret INSERT _YOUR_OWN_SECRET (code=exited, status=203/EXEC)
Main PID: 1330 (code=exited, status=203/EXEC)

Sep 06 11:26:51 tplink-rm systemd[1]: Started GenieACS UI.
Sep 06 11:26:51 tplink-rm systemd[1]: genieacs-ui.service: Main process exited, code=exited, status=203/EXEC
Sep 06 11:26:51 tplink-rm systemd[1]: genieacs-ui.service: Unit entered failed state.
Sep 06 11:26:51 tplink-rm systemd[1]: genieacs-ui.service: Failed with result ‘exit-code’.

Didnt mean to paste in the INSERT_YOUR_OWN_SECRET but anyway all services come back with same failed error

[Unit]
Description=GenieACS UI
After=network.target

[Service]
User=genieacs
EnvironmentFile=/opt/genieacs/genieacs.env
ExecStart=/usr/bin/genieacs-ui
KillMode=process

[Install]
WantedBy=default.target

root@tplink-rm:/home/network# cd /etc/systemd/system/genieacs-cwmp.service.d
bash: cd: /etc/systemd/system/genieacs-cwmp.service.d: No such file or directory

root@tplink-rm:/home/network# cd /etc/systemd/system/
root@tplink-rm:/etc/systemd/system# ls
cloud-final.service.wants final.target.wants genieacs-nbi graphical.target.wants paths.target.wants sshd.service
cloud-init.target.wants genieacs-cwmp genieacs-nbi.service iscsi.service snap-core-7270.mount sysinit.target.wants
dbus-org.freedesktop.resolve1.service genieacs-cwmp.service genieacs-ui multi-user.target.wants snap-docker-384.mount syslog.service
dbus-org.freedesktop.thermald.service genieacs-fs genieacs-ui.service network-online.target.wants snap.docker.dockerd.service timers.target.wants
default.target.wants genieacs-fs.service getty.target.wants open-vm-tools.service.requires sockets.target.wants

Ok, we need to break this one down a bit.
Process: 1330 ExecStart=/opt/genieacs/dist/bin/genieacs-ui --ui-jwt-secret INSERT _YOUR_OWN_SECRET (code=exited, status=203/EXEC)

I assume you didn’t read the docs here. You need to insert your own secret… This is also referenced in the config file, if I’m not completely mistaken(Zaidka?). You need to get that stuff right for it to start.

cd /etc/systemd/system/genieacs-cwmp.service.d
This will not work, that’s the wrong path. Do this:
cd /etc/systemd/system/
ls
Now you should see the services. However, my service definitions also assume that you have the same path as me. Where did you install Genie? /opt/genieacs or somewhere else? And do you have a “genieacs.env” file with settings? Don’t mean to be annoying, but you have to combine these answers with some RTFM, they don’t always apply without modifications. But verify your paths and we’ll figure it out!

thanks for the reply. i didnt put that secret in i just pasted wrong thing in. anyway the ExecStart path was wrong.
Now i get here. The log directory is there with nothing in it so not sure why the error.

It’s because it can’t find the log directory(no such file…). Create the subdirectory as defined and make sure it has correct permissions. In my config I have /var/log/genieacs/ as a subdir.

Edit: I’m tired and didn’t read your reply properly, sorry… Check permissions! If you run Genie as a separate user, say “genieacs”, you need to give that user access either by group or directly. on the directory.

yeah just did and created file and did a chown.
image

the ui and fs are running but cwmp and nbi give the following:

Could you attach the actual log in a txt file(don’t know if that’l work on this forum?) or paste it here? It is slightly concatenated and hard to read in full context.

root@tplink-rm:/# systemctl status genieacs-cwmp.service
● genieacs-cwmp.service - GenieACS CWMP
Loaded: loaded (/etc/systemd/system/genieacs-cwmp.service; enabled; vendor preset: enabled)
Active: failed (Result: exit-code) since Mon 2019-09-09 20:12:43 UTC; 3s ago
Process: 3515 ExecStart=/usr/local/lib/node_modules/genieacs/bin/genieacs-cwmp (code=exited, status=1/FAILURE)
Main PID: 3515 (code=exited, status=1/FAILURE)

Sep 09 20:12:43 tplink-rm genieacs-cwmp[3515]: at Module._compile (module.js:616:28)
Sep 09 20:12:43 tplink-rm genieacs-cwmp[3515]: at Object.Module._extensions…js (module.js:663:10)
Sep 09 20:12:43 tplink-rm genieacs-cwmp[3515]: at Module.load (module.js:565:32)
Sep 09 20:12:43 tplink-rm genieacs-cwmp[3515]: at tryModuleLoad (module.js:505:12)
Sep 09 20:12:43 tplink-rm genieacs-cwmp[3515]: at Function.Module._load (module.js:497:3)
Sep 09 20:12:43 tplink-rm genieacs-cwmp[3515]: at Function.Module.runMain (module.js:693:10)
Sep 09 20:12:43 tplink-rm genieacs-cwmp[3515]: at startup (bootstrap_node.js:188:16)
Sep 09 20:12:43 tplink-rm genieacs-cwmp[3515]: at bootstrap_node.js:609:3
Sep 09 20:12:43 tplink-rm systemd[1]: genieacs-cwmp.service: Main process exited, code=exited, status=1/FAILURE
Sep 09 20:12:43 tplink-rm systemd[1]: genieacs-cwmp.service: Failed with result ‘exit-code’.
root@tplink-rm:/# journalctl _PID=3515
– Logs begin at Fri 2019-09-06 17:23:51 UTC, end at Mon 2019-09-09 20:12:43 UTC. –
Sep 09 20:12:43 tplink-rm genieacs-cwmp[3515]: /usr/local/lib/node_modules/genieacs/bin/genieacs-cwmp:2
Sep 09 20:12:43 tplink-rm genieacs-cwmp[3515]: “use strict”;function _interopDefault(e){return e&&“object”==typeof e&&"default"in e?e.default:e}const path=require(“path”),fs=require(“fs”),os=require(“os”),clu
Sep 09 20:12:43 tplink-rm genieacs-cwmp[3515]: SyntaxError: Unexpected reserved word
Sep 09 20:12:43 tplink-rm genieacs-cwmp[3515]: at createScript (vm.js:80:10)
Sep 09 20:12:43 tplink-rm genieacs-cwmp[3515]: at Object.runInThisContext (vm.js:139:10)
Sep 09 20:12:43 tplink-rm genieacs-cwmp[3515]: at Module._compile (module.js:616:28)
Sep 09 20:12:43 tplink-rm genieacs-cwmp[3515]: at Object.Module._extensions…js (module.js:663:10)
Sep 09 20:12:43 tplink-rm genieacs-cwmp[3515]: at Module.load (module.js:565:32)
Sep 09 20:12:43 tplink-rm genieacs-cwmp[3515]: at tryModuleLoad (module.js:505:12)
Sep 09 20:12:43 tplink-rm genieacs-cwmp[3515]: at Function.Module._load (module.js:497:3)
Sep 09 20:12:43 tplink-rm genieacs-cwmp[3515]: at Function.Module.runMain (module.js:693:10)
Sep 09 20:12:43 tplink-rm genieacs-cwmp[3515]: at startup (bootstrap_node.js:188:16)
Sep 09 20:12:43 tplink-rm genieacs-cwmp[3515]: at bootstrap_node.js:609:3

Is this the correct path?
Process: 3515 ExecStart=/usr/local/lib/node_modules/genieacs/bin/genieacs-cwmp (code=exited, status=1/FAILURE)

Yes
image

I have the same problem.
did you get it resolved?

Just done the install on debian 10 and I had to use ‘systemctl edit --force --full’ instead. Maybe that would also work for Ubuntu.

1 Like

Thanks. Will update the installation guide and add a note suggesting creating the file manually if this command fails.

i have the same problem and i solve it by upgrade the node to v10 as recommended in the document , when u use apt install node , it install v8 which not able to run CWMP service

just got a same issue. genieacs-ui and genieacs-fs are running properly but i still have problems with cwmp and fs

Oct 23 13:47:12 przem systemd[1]: Started GenieACS CWMP.
Oct 23 13:47:13 przem genieacs-cwmp[5497]: /usr/local/lib/node_modules/genieacs/bin/genieacs-cwmp:2
Oct 23 13:47:13 przem genieacs-cwmp[5497]: “use strict”;function _interopDefault(e){return e&&“object”==ty
Oct 23 13:47:13 przem genieacs-cwmp[5497]: SyntaxError: Unexpected reserved word
Oct 23 13:47:13 przem genieacs-cwmp[5497]: at createScript (vm.js:80:10)
Oct 23 13:47:13 przem genieacs-cwmp[5497]: at Object.runInThisContext (vm.js:139:10)
Oct 23 13:47:13 przem genieacs-cwmp[5497]: at Module._compile (module.js:616:28)
Oct 23 13:47:13 przem genieacs-cwmp[5497]: at Object.Module._extensions…js (module.js:663:10)
Oct 23 13:47:13 przem genieacs-cwmp[5497]: at Module.load (module.js:565:32)
Oct 23 13:47:13 przem genieacs-cwmp[5497]: at tryModuleLoad (module.js:505:12)
Oct 23 13:47:13 przem genieacs-cwmp[5497]: at Function.Module._load (module.js:497:3)
Oct 23 13:47:13 przem genieacs-cwmp[5497]: at Function.Module.runMain (module.js:693:10)
Oct 23 13:47:13 przem genieacs-cwmp[5497]: at startup (bootstrap_node.js:188:16)
Oct 23 13:47:13 przem genieacs-cwmp[5497]: at bootstrap_node.js:609:3
Oct 23 13:47:13 przem systemd[1]: genieacs-cwmp.service: Main process exited, code=exited, status=1/FAILUR
Oct 23 13:47:13 przem systemd[1]: genieacs-cwmp.service: Failed with result ‘exit-code’.

i`m stucked here. i tried 3 different versions of nodejs and it didnt change anything. any clues?