Hi
I'm using exec node to check the status of services running on my Ubuntu machine.

For example, when a qbittorrent service is up and running and I execute the following command through exec node:
sudo systemctl is-active qbittorrent
I get the following output in debug - which is totally fine:

and its corresponding syslog:
Jul 18 14:31:07 home-server node-red[21890]: 18 Jul 14:31:07 - [info] [exec:Service Status] sudo systemctl is-active qbittorrent
Jul 18 14:31:07 home-server sudo[23897]: yolo : TTY=unknown ; PWD=/home/yolo ; USER=root ; COMMAND=/bin/systemctl is-active qbittorrent
Jul 18 14:31:07 home-server sudo[23897]: pam_unix(sudo:session): session opened for user root by (uid=0)
Jul 18 14:31:07 home-server sudo[23897]: pam_unix(sudo:session): session closed for user root
However, when I manually stop the service from terminal and run the exact same flow then I get the following output:

with syslog:
Jul 18 14:35:30 home-server node-red[21890]: 18 Jul 14:35:30 - [info] [exec:Service Status] sudo systemctl is-active qbittorrent
Jul 18 14:35:30 home-server sudo[24320]: yolo : TTY=unknown ; PWD=/home/yolo ; USER=root ; COMMAND=/bin/systemctl is-active qbittorrent
Jul 18 14:35:30 home-server sudo[24320]: pam_unix(sudo:session): session opened for user root by (uid=0)
Jul 18 14:35:30 home-server node-red[21890]: 18 Jul 14:35:30 - [info] [exec:Service Status] error:Error: Command failed: sudo systemctl is-active qbittorrent
I don't understand why is it failing to read the service status when it is stopped?
Everything used to work fine when I was running Node v4.2.6.
The problem started to appear when I updated to v8.0.0 in order to use Node-Red v0.17.4 as mentioned
here. I even downgraded to Node v6.11.0 but no luck.
Node-red startup syslog:
Jul 18 14:44:18 home-server node-red[25198]: 18 Jul 14:44:18 - [info] Node-RED version: v0.17.4
Jul 18 14:44:18 home-server node-red[25198]: 18 Jul 14:44:18 - [info] Node.js version: v8.0.0
Jul 18 14:44:18 home-server node-red[25198]: 18 Jul 14:44:18 - [info] Linux 4.4.0-71-generic ia32 LE
Jul 18 14:44:19 home-server node-red[25198]: 18 Jul 14:44:19 - [info] Loading palette nodes
Jul 18 14:44:22 home-server node-red[25198]: 18 Jul 14:44:22 - [info] Dashboard version 2.4.2 started at /ui
FYI, I have added NOPASSWD rights to systemctl command in sudoers.
Also, when I run the command in terminal, they work just fine in both start/stop cases.
Regards