Every time there's an error! Directory failure, Ubuntu

Hello! I’m here to share my frustration with you regarding my GenieACS installation. Of course, my frustration doesn’t come from the program itself but rather from my own limited experience! I apologize for my ignorance as I’m not familiar with Linux.

Ubuntu 22.04 Last Version
MongoDB Last Version
Node.js Last Version
GenieACS Last Version

Here we go then. I’m trying to install GenieACS, but all four times I’ve installed it, I’ve encountered the same error! Directory error. I swear I follow the exact steps from the documentation, but because I’m a novice, I just copy and paste everything from the website’s prompt into the terminal. Some things result in a lack of permission, so I use the ‘sudo -i’ command and proceed with the process. I believe this might be where my potential mistake lies. However, I don’t see any other way to do it. Sorry for the following flood, but here it is:

fev 02 01:38:35 tr069-Virtual-Machine systemd[1]: Started GenieACS CWMP.
fev 02 01:38:35 tr069-Virtual-Machine systemd[2327]: genieacs-cwmp.service: Failed to locate executable /opt/genieacs/dist/bin/genieacs-cwmp:>
fev 02 01:38:35 tr069-Virtual-Machine systemd[2327]: genieacs-cwmp.service: Failed at step EXEC spawning /opt/genieacs/dist/bin/genieacs-cwmp>
fev 02 01:38:35 tr069-Virtual-Machine systemd[1]: genieacs-cwmp.service: Main process exited, code=exited, status=203/EXEC
fev 02 01:38:35 tr069-Virtual-Machine systemd[1]: genieacs-cwmp.service: Failed with result ‘exit-code’.

genieacs-nbi.service - GenieACS NBI
Loaded: loaded (/etc/systemd/system/genieacs-nbi.service; enabled; vendor preset: enabled)
Active: failed (Result: exit-code) since Fri 2024-02-02 01:39:24 -03; 23ms ago
Process: 2443 ExecStart=/opt/genieacs/dist/bin/genieacs-nbi (code=exited, status=203/EXEC)
Main PID: 2443 (code=exited, status=203/EXEC)
CPU: 2ms

fev 02 01:39:24 tr069-Virtual-Machine systemd[1]: Started GenieACS NBI.
fev 02 01:39:24 tr069-Virtual-Machine systemd[2443]: genieacs-nbi.service: Failed to locate executable /opt/genieacs/dist/bin/genieacs-nbi: N>
fev 02 01:39:24 tr069-Virtual-Machine systemd[2443]: genieacs-nbi.service: Failed at step EXEC spawning /opt/genieacs/dist/bin/genieacs-nbi: >
fev 02 01:39:24 tr069-Virtual-Machine systemd[1]: genieacs-nbi.service: Main process exited, code=exited, status=203/EXEC
fev 02 01:39:24 tr069-Virtual-Machine systemd[1]: genieacs-nbi.service: Failed with result ‘exit-code’.

genieacs-fs.service - GenieACS FS
Loaded: loaded (/etc/systemd/system/genieacs-fs.service; enabled; vendor preset: enabled)
Active: failed (Result: exit-code) since Fri 2024-02-02 01:40:10 -03; 27ms ago
Process: 2481 ExecStart=/opt/genieacs/dist/bin/genieacs-fs (code=exited, status=203/EXEC)
Main PID: 2481 (code=exited, status=203/EXEC)
CPU: 2ms

fev 02 01:40:10 tr069-Virtual-Machine systemd[1]: Started GenieACS FS.
fev 02 01:40:10 tr069-Virtual-Machine systemd[2481]: genieacs-fs.service: Failed to locate executable /opt/genieacs/dist/bin/genieacs-fs: No >
fev 02 01:40:10 tr069-Virtual-Machine systemd[2481]: genieacs-fs.service: Failed at step EXEC spawning /opt/genieacs/dist/bin/genieacs-fs: No>
fev 02 01:40:10 tr069-Virtual-Machine systemd[1]: genieacs-fs.service: Main process exited, code=exited, status=203/EXEC
fev 02 01:40:10 tr069-Virtual-Machine systemd[1]: genieacs-fs.service: Failed with result ‘exit-code’.

genieacs-ui.service - GenieACS UI
Loaded: loaded (/etc/systemd/system/genieacs-ui.service; enabled; vendor preset: enabled)
Active: failed (Result: exit-code) since Fri 2024-02-02 01:41:08 -03; 17ms ago
Process: 2527 ExecStart=/opt/genieacs/dist/bin/genieacs-ui --ui-jwt-secret x2/BIPjJ8UUV+bpmi5N7Yk4fNoyQn6mUIHe3Y1Acj4k= (code=exited, sta>
Main PID: 2527 (code=exited, status=203/EXEC)
CPU: 1ms

fev 02 01:41:08 tr069-Virtual-Machine systemd[1]: Started GenieACS UI.
fev 02 01:41:08 tr069-Virtual-Machine systemd[2527]: genieacs-ui.service: Failed to locate executable /opt/genieacs/dist/bin/genieacs-ui: No >
fev 02 01:41:08 tr069-Virtual-Machine systemd[2527]: genieacs-ui.service: Failed at step EXEC spawning /opt/genieacs/dist/bin/genieacs-ui: No>
fev 02 01:41:08 tr069-Virtual-Machine systemd[1]: genieacs-ui.service: Main process exited, code=exited, status=203/EXEC
fev 02 01:41:08 tr069-Virtual-Machine systemd[1]: genieacs-ui.service: Failed with result ‘exit-code’.

1 Like

Just to give you an idea, I’ve already created a notepad with the step-by-step codes from the website and reinstalled the system three times, but the error persists… I’ve done the installation directly with the ‘sudo -i’ terminal command all the way to the end, without this special permission, trying to merge both approaches… Unfortunately, my ignorance and lack of time have been significant obstacles! Here’s how I try to install it:

Sudo -i

sudo npm install -g genieacs@1.2.9

sudo useradd --system --no-create-home --user-group genieacs

mkdir /opt/genieacs
mkdir /opt/genieacs/ext
chown genieacs:genieacs /opt/genieacs/ext

GENIEACS_CWMP_ACCESS_LOG_FILE=/var/log/genieacs/genieacs-cwmp-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
NODE_OPTIONS=–enable-source-maps
GENIEACS_EXT_DIR=/opt/genieacs/ext

node -e “console.log("GENIEACS_UI_JWT_SECRET=" + require(‘crypto’).randomBytes(128).toString(‘hex’))” >> /opt/genieacs/genieacs.env

sudo chown genieacs:genieacs /opt/genieacs/genieacs.env
sudo chmod 600 /opt/genieacs/genieacs.env

mkdir /var/log/genieacs
chown genieacs:genieacs /var/log/genieacs

sudo systemctl edit --force --full genieacs-cwmp

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

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

[Install]
WantedBy=default.target

sudo systemctl edit --force --full genieacs-nbi

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

[Service]
User=genieacs
EnvironmentFile=/opt/genieacs/genieacs.env
ExecStart=/usr/bin/genieacs-nbi

[Install]
WantedBy=default.target

sudo systemctl edit --force --full genieacs-fs

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

[Service]
User=genieacs
EnvironmentFile=/opt/genieacs/genieacs.env
ExecStart=/usr/bin/genieacs-fs

[Install]
WantedBy=default.target

sudo systemctl edit --force --full genieacs-ui

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

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

[Install]
WantedBy=default.target

echo ‘/var/log/genieacs/.log /var/log/genieacs/.yaml {
daily
rotate 30
compress
delaycompress
dateext
}’ | sudo tee /etc/logrotate.d/genieacs

sudo systemctl enable genieacs-cwmp
sudo systemctl start genieacs-cwmp
sudo systemctl start genieacs-cwmp

At step 18, I always test, and it gives an error…

1 Like

Hello! I managed to solve it. The solution involved changing the directory in the ‘‘ExecStart’’ to the following:

sudo systemctl edit --force --full genieacs-cwmp
ExecStart=/usr/local/lib/node_modules/genieacs/bin/genieacs-cwmp

sudo systemctl edit --force --full genieacs-nbi
ExecStart=/usr/local/lib/node_modules/genieacs/bin/genieacs-nbi

sudo systemctl edit --force --full genieacs-fs
ExecStart=/usr/local/lib/node_modules/genieacs/bin/genieacs-fs

sudo systemctl edit --force --full genieacs-ui
ExecStart=/usr/local/lib/node_modules/genieacs/bin/genieacs-ui

1 Like