zwave-js / zwave-js-ui

Full featured Z-Wave Control Panel UI and MQTT gateway. Built using Nodejs, and Vue/Vuetify
https://zwave-js.github.io/zwave-js-ui
MIT License
984 stars 201 forks source link

Documentation PM2 ecosystem file. #3918

Open jbob762 opened 1 month ago

jbob762 commented 1 month ago

Checklist

Deploy method

NPM

Z-Wave JS UI version

9.21.0

ZwaveJS version

13.4.0

Describe the bug

zwavejsui shows up in 'pm2 list' as a running service, but it is not running and not accessible via the web UI. There are errors in the logs about invalid PID.

To Reproduce

Hardware config: a Debian VM in Proxmox with USB passthrough of a Zooz ZST10 USB stick (/dev/ttyACM0) Software config: installed in the VM using NPM method with PM2 to run as a service per "other-methods" in the docs, including copy->paste the ecosystem config

Expected behavior

zwave-js-ui running and accessible from the web UI

Additional context

It appears PM2 is unhappy with the relative paths (tilde) in ecosystem.config.js When converted to direct paths it works as expected, the web UI comes up, and the service survives reboot.

Thanks and really appreciate zwave-js-ui! I'm (finally) migrating from zwave2mqtt and doing some testing with it running in a VM. Hopefully helps someone else if they run into the same thing.

robertsLando commented 1 month ago

Hi @jbob762 and thanks for your issue. Generally ~ is used to refer to the user home directory path, I tried it on my side and it's working, could it be that the user you are using doesn't have one?

jbob762 commented 1 month ago

Thanks for the fast answer. Agreed it’s odd which made it difficult to troubleshoot. I am using the root user in the VM, the output of echo $HOME is /root and ls -l ~/.ssh shows the expected authorized_keys file. Anything else I can check?

On Mon, Sep 30, 2024 at 05:14, Daniel Lando @.***(mailto:On Mon, Sep 30, 2024 at 05:14, Daniel Lando < wrote:

Hi @.***(https://github.com/jbob762) and thanks for your issue. Generally ~ is used to refer to the user home directory path, I tried it on my side and it's working, could it be that the user you are using doesn't have one?

— Reply to this email directly, view it on GitHub, or unsubscribe. You are receiving this because you were mentioned.Message ID: @.***>

robertsLando commented 1 month ago

@jbob762 using the root user isn't unsafe?

jbob762 commented 1 month ago

Do you believe root could be causing the difference in operation? I appreciate the concern. It’s in a VM on an isolated subnet, I’ll let you know if it gets up to any mischief. Rootless is the goal. It’s not obvious to me why that should make a difference with the tilde.

On Mon, Sep 30, 2024 at 11:00, Daniel Lando < @.***(mailto:On Mon, Sep 30, 2024 at 11:00, Daniel Lando < wrote:

@.***(https://github.com/jbob762) using the root user isn't unsafe?

— Reply to this email directly, view it on GitHub, or unsubscribe. You are receiving this because you were mentioned.Message ID: @.***>

robertsLando commented 1 month ago

It’s not obvious to me why that should make a difference with the tilde.

It doesn't make sense to me nwighter but it's the only thing that's "unusual" in your setup