# NR runs, but not

**URL:** <https://discourse.nodered.org/t/nr-runs-but-not/55393>\
**Category:** General\
**Created:** [18 December 2021 14:32 UTC](https://discourse.nodered.org/t/nr-runs-but-not/55393 "2021-12-18T14:32:08Z")\
**Posts on this page:** 11\
**Page:** 2

<div class="post-metadata">

**Author:** ![StrongTown](https://avatars.discourse-cdn.com/v4/letter/s/4bbf92/32.png) [@StrongTown](https://discourse.nodered.org/u/StrongTown)\
**Post date:** [18 December 2021 15:56 UTC](https://discourse.nodered.org/t/nr-runs-but-not/55393/21 "2021-12-18T15:56:11Z")

</div>

Everything you have done has been and is outstanding. I just misunderstood what I was reading.

Thanks to all for the assistance and getting me clear of this problem.

---

<div class="post-metadata">

**Author:** ![Colin](https://sea2.discourse-cdn.com/flex026/user_avatar/discourse.nodered.org/colin/32/17040_2.png) [@Colin](https://discourse.nodered.org/u/Colin)\
**Post date:** [18 December 2021 15:59 UTC](https://discourse.nodered.org/t/nr-runs-but-not/55393/22 "2021-12-18T15:59:10Z")

</div>

> [@jbudd](#):
>
> tail -f /var/log/node-red.log

node-red does not log there by default. In fact the 'correct' command to use is  
`sudo journalctl -f -u nodered`  
which is what node-red-log uses.

---

<div class="post-metadata">

**Author:** ![jbudd](https://avatars.discourse-cdn.com/v4/letter/j/5f8ce5/32.png) [@jbudd](https://discourse.nodered.org/u/jbudd)\
**Post date:** [18 December 2021 16:12 UTC](https://discourse.nodered.org/t/nr-runs-but-not/55393/23 "2021-12-18T16:12:25Z")

</div>

Yes you are right of course, I'm getting confused with another service which has it's own log.

---

<div class="post-metadata">

**Author:** ![StrongTown](https://avatars.discourse-cdn.com/v4/letter/s/4bbf92/32.png) [@StrongTown](https://discourse.nodered.org/u/StrongTown)\
**Post date:** [19 December 2021 13:16 UTC](https://discourse.nodered.org/t/nr-runs-but-not/55393/24 "2021-12-19T13:16:06Z")

</div>

Hey Colin,  
Just for clarity on the initial post I sent (for future reference), as I was thinking through what I had tried in working to understand what was going on, I realize I failed to indicate that when that strange issue presented

```auto
Starting as a systemd service.
nodered.service: Succeeded.

```

.. I had at that time then exited (ctrl-C) and ran HTOP to view current processes and there was no instance of` node` running.

I thought I'd mention this because your (good) thinking that I might have gotten that result because I instigated `node-red-start` when an instance was already running, I don't think that was the case.

I guess I'm still curious as to how I ended up with such situation (all is fine now).

Again, thank you (and to `dceejay` and `knolleaery`) for your always very useful insights and assistance.

---

<div class="post-metadata">

**Author:** ![Colin](https://sea2.discourse-cdn.com/flex026/user_avatar/discourse.nodered.org/colin/32/17040_2.png) [@Colin](https://discourse.nodered.org/u/Colin)\
**Post date:** [19 December 2021 13:47 UTC](https://discourse.nodered.org/t/nr-runs-but-not/55393/25 "2021-12-19T13:47:20Z")

</div>

> [@StrongTown](#):
>
> I had at that time then exited (ctrl-C)

Exited from what? If you exit from node-red-start then that will have left node-red running.  
Exactly how did you determine in htop that node-red was not running?

---

<div class="post-metadata">

**Author:** ![zenofmud](https://sea2.discourse-cdn.com/flex026/user_avatar/discourse.nodered.org/zenofmud/32/316_2.png) [@zenofmud](https://discourse.nodered.org/u/zenofmud)\
**Post date:** [19 December 2021 14:16 UTC](https://discourse.nodered.org/t/nr-runs-but-not/55393/26 "2021-12-19T14:16:41Z")

</div>

The command `sudo systemctl enable nodered.service` does not start node-red when you run it. It enable the service to autostart. So if you reboot or node-red crashes, the system will restart it.

But you have to run `node-red-start` or reboot in order to start Node-RED running.

---

<div class="post-metadata">

**Author:** ![Colin](https://sea2.discourse-cdn.com/flex026/user_avatar/discourse.nodered.org/colin/32/17040_2.png) [@Colin](https://discourse.nodered.org/u/Colin)\
**Post date:** [19 December 2021 14:43 UTC](https://discourse.nodered.org/t/nr-runs-but-not/55393/27 "2021-12-19T14:43:50Z")

</div>

@StrongTown did use node-red-start, but the output stopped after the starting message, almost certainly because it was already running. See the first post.

---

<div class="post-metadata">

**Author:** ![StrongTown](https://avatars.discourse-cdn.com/v4/letter/s/4bbf92/32.png) [@StrongTown](https://discourse.nodered.org/u/StrongTown)\
**Post date:** [19 December 2021 16:00 UTC](https://discourse.nodered.org/t/nr-runs-but-not/55393/28 "2021-12-19T16:00:31Z")

</div>

I did use `node-red-start` as I had previously stopped NR because I had changed the context directory in `setting.js` and wanted to effect the change (I do have NR set to run at boot, but inconsequential here). Here are the events:

> `> node-red-stop`  
> [Note] NR stopped as expected, normal notification. CLI prompt returned.  
> `> node-red-start`

```auto
Use node-red-stop to stop Node-RED
Use node-red-start to start Node-RED again
Use node-red-log to view the recent log output
Use sudo systemctl enable nodered.service to autostart Node-RED at every boot
Use sudo systemctl disable nodered.service to disable autostart on boot
 
To find more nodes and example flows - go to http://flows.nodered.org
 
Starting as a systemd service.
nodered.service: Succeeded.

```

[Note} At this point I thought it was booting normally and waited. Figuring it was just working on something I went to do something else and 15 mins later the (log) screen (still active in terminal) had not changed. So here is what I typed next (and results):

> `> ctrl-c` (to exit NR log mode)  
> `> node-red-stop`  
> `> HTOP` (there was no node process running anywhere in this output)  
> `> ctrl-c` (to exit HTOP)  
> `> node-red-start`

I ended up back at the same log screen (see above) where NR simply sits idle (forever it seems) at:

```auto
nodered.service: Succeeded.

```

Hope this provides more clarity. Again, not wanting to beat this to death, just curious as to what could have put NR into this mode and to make the point that I don't think a previous instance of NR process was running to cause it.

---

<div class="post-metadata">

**Author:** ![Colin](https://sea2.discourse-cdn.com/flex026/user_avatar/discourse.nodered.org/colin/32/17040_2.png) [@Colin](https://discourse.nodered.org/u/Colin)\
**Post date:** [19 December 2021 16:37 UTC](https://discourse.nodered.org/t/nr-runs-but-not/55393/29 "2021-12-19T16:37:12Z")

</div>

> [@StrongTown](#):
>
> I don't think a previous instance of NR process was running to cause it

It seems you are right. What happens if you stop node red then run  
`node-red`

Did you set the log level to trace? I think I suggested that earlier.

---

<div class="post-metadata">

**Author:** ![StrongTown](https://avatars.discourse-cdn.com/v4/letter/s/4bbf92/32.png) [@StrongTown](https://discourse.nodered.org/u/StrongTown)\
**Post date:** [19 December 2021 16:56 UTC](https://discourse.nodered.org/t/nr-runs-but-not/55393/30 "2021-12-19T16:56:53Z")

</div>

I have yes but I'll have to wait now to see if this re-occurs.

---

<div class="post-metadata">

**Author:** ![system](https://us1.discourse-cdn.com/flex026/uploads/nodered/original/1X/d073cd938eafa2e558d7c2cd59003b3ef4963033.png) [@system](https://discourse.nodered.org/u/system)\
**Post date:** [17 February 2022 16:57 UTC](https://discourse.nodered.org/t/nr-runs-but-not/55393/31 "2022-02-17T16:57:37Z")

</div>

Closed on 17 February 2022 16:57 UTC

This topic was automatically closed 60 days after the last reply. New replies are no longer allowed.

[Previous page](https://discourse.nodered.org/t/nr-runs-but-not/55393.md?page=1)
