# Dashboard (DB1)- Not working when run as windows Service

**URL:** https://discourse.nodered.org/t/dashboard-db1-not-working-when-run-as-windows-service/93819
**Category:** Dashboard
**Created:** [10 December 2024 07:32 UTC](https://discourse.nodered.org/t/dashboard-db1-not-working-when-run-as-windows-service/93819 "2024-12-10T07:32:44Z")
**Posts on this page:** 20
**Page:** 1

<div class="post-metadata">

### Author: ![smanjunath211](https://sea2.discourse-cdn.com/flex026/user_avatar/discourse.nodered.org/smanjunath211/32/95742_2.png) [@smanjunath211](https://discourse.nodered.org/u/smanjunath211)
#### Post date: [10 December 2024 07:32 UTC](https://discourse.nodered.org/t/dashboard-db1-not-working-when-run-as-windows-service/93819/1 "2024-12-10T07:32:44Z")

</div>

Continuing the discussion from [Dasboard does not display correctly when node-red is started as a windows service](https://discourse.nodered.org/t/dasboard-does-not-display-correctly-when-node-red-is-started-as-a-windows-service/77599):

I have exactly similar issue. when run at command prompt works OK. when run as a service only part of the dashboard is seen. no major errors shown in console.

I copied a working flow from one pc to another and when the flow is run through service (nssm) part of dashboard (only ui-table) is shown and in light mode, where as the setting is dark mode and have few other simple dashboard widgets which are not shown.

---

<div class="post-metadata">

### Author: ![smanjunath211](https://sea2.discourse-cdn.com/flex026/user_avatar/discourse.nodered.org/smanjunath211/32/95742_2.png) [@smanjunath211](https://discourse.nodered.org/u/smanjunath211)
#### Post date: [10 December 2024 09:36 UTC](https://discourse.nodered.org/t/dashboard-db1-not-working-when-run-as-windows-service/93819/2 "2024-12-10T09:36:14Z")

</div>

> [@smanjunath211](#):
>
> part of dashboard (only ui-table) is shown and in light mode

considering the above information,

I did some elimination process and found that the instant I add

`node-red-node-ui-table`

the dashboard starts behaving erratic. i.e,

_all the other dashboard widgets vanish, theme becomes light, and i can see only the ui-table widget in the dashboard._

![image](https://us1.discourse-cdn.com/flex026/uploads/nodered/original/3X/2/b/2b154f627f42c3bc046892c9d91afe18f1a65c90.png)

when i uninstall this and restart node-red it is all ok. version 0.4.3 also has same effect and 0.4.4 is the latest version available)

while i understand DB-1 is not supported anymore, i just want to understand what is happening here.

---

<div class="post-metadata">

### Author: ![TotallyInformation](https://sea2.discourse-cdn.com/flex026/user_avatar/discourse.nodered.org/totallyinformation/32/31_2.png) [@TotallyInformation](https://discourse.nodered.org/u/TotallyInformation)
#### Post date: [10 December 2024 11:54 UTC](https://discourse.nodered.org/t/dashboard-db1-not-working-when-run-as-windows-service/93819/3 "2024-12-10T11:54:02Z")

</div>

Can you check for errors and warnings when viewing the db1 page in your browser's dev tools please. It will hopefully give some clues as to what is happening.

---

<div class="post-metadata">

### Author: ![smanjunath211](https://sea2.discourse-cdn.com/flex026/user_avatar/discourse.nodered.org/smanjunath211/32/95742_2.png) [@smanjunath211](https://discourse.nodered.org/u/smanjunath211)
#### Post date: [10 December 2024 11:59 UTC](https://discourse.nodered.org/t/dashboard-db1-not-working-when-run-as-windows-service/93819/4 "2024-12-10T11:59:34Z")

</div>

I am not sure, if this is what you want. I also opened the page with 10.xx.xx.xx/ui but the result is same.

 ![image](https://us1.discourse-cdn.com/flex026/uploads/nodered/original/3X/e/1/e15cba8f7be89abc04d6437494bf66e298790d2a.png)

 ![image](https://us1.discourse-cdn.com/flex026/uploads/nodered/original/3X/d/b/db44ac448156f80ab402506b922bb06a27565b17.png)

---

<div class="post-metadata">

### Author: ![smanjunath211](https://sea2.discourse-cdn.com/flex026/user_avatar/discourse.nodered.org/smanjunath211/32/95742_2.png) [@smanjunath211](https://discourse.nodered.org/u/smanjunath211)
#### Post date: [10 December 2024 12:01 UTC](https://discourse.nodered.org/t/dashboard-db1-not-working-when-run-as-windows-service/93819/5 "2024-12-10T12:01:37Z")

</div>

![image](https://us1.discourse-cdn.com/flex026/uploads/nodered/original/3X/f/a/fabe8d1ee9dd5d70999497116afc9d2d686de7ac.png)

---

<div class="post-metadata">

### Author: ![TotallyInformation](https://sea2.discourse-cdn.com/flex026/user_avatar/discourse.nodered.org/totallyinformation/32/31_2.png) [@TotallyInformation](https://discourse.nodered.org/u/TotallyInformation)
#### Post date: [10 December 2024 12:02 UTC](https://discourse.nodered.org/t/dashboard-db1-not-working-when-run-as-windows-service/93819/6 "2024-12-10T12:02:04Z")

</div>

Hmm, websocket connection failed looks bad. Not clear what has caused it though.

---

<div class="post-metadata">

### Author: ![smanjunath211](https://sea2.discourse-cdn.com/flex026/user_avatar/discourse.nodered.org/smanjunath211/32/95742_2.png) [@smanjunath211](https://discourse.nodered.org/u/smanjunath211)
#### Post date: [10 December 2024 12:03 UTC](https://discourse.nodered.org/t/dashboard-db1-not-working-when-run-as-windows-service/93819/7 "2024-12-10T12:03:11Z")

</div>

I am fairly confident it is when i use ui-table node, if i remove that widget and restart, everything looks fine.

---

<div class="post-metadata">

### Author: ![smanjunath211](https://sea2.discourse-cdn.com/flex026/user_avatar/discourse.nodered.org/smanjunath211/32/95742_2.png) [@smanjunath211](https://discourse.nodered.org/u/smanjunath211)
#### Post date: [10 December 2024 12:04 UTC](https://discourse.nodered.org/t/dashboard-db1-not-working-when-run-as-windows-service/93819/8 "2024-12-10T12:04:54Z")

</div>

when i click on the websocket error link, it takes me here

 ![image](https://us1.discourse-cdn.com/flex026/uploads/nodered/original/3X/6/1/612317d79aa47117f002412e48ee12152e76e977.png)

---

<div class="post-metadata">

### Author: ![TotallyInformation](https://sea2.discourse-cdn.com/flex026/user_avatar/discourse.nodered.org/totallyinformation/32/31_2.png) [@TotallyInformation](https://discourse.nodered.org/u/TotallyInformation)
#### Post date: [10 December 2024 12:11 UTC](https://discourse.nodered.org/t/dashboard-db1-not-working-when-run-as-windows-service/93819/9 "2024-12-10T12:11:32Z")

</div>

Raw websockets are hard to debug. What is providing the websocket.js file? You may get clues from the folder structure that you haven't shown - to the left

---

<div class="post-metadata">

### Author: ![smanjunath211](https://sea2.discourse-cdn.com/flex026/user_avatar/discourse.nodered.org/smanjunath211/32/95742_2.png) [@smanjunath211](https://discourse.nodered.org/u/smanjunath211)
#### Post date: [10 December 2024 12:13 UTC](https://discourse.nodered.org/t/dashboard-db1-not-working-when-run-as-windows-service/93819/10 "2024-12-10T12:13:27Z")

</div>

this ?

 ![image](https://us1.discourse-cdn.com/flex026/uploads/nodered/original/3X/7/6/7645b8740df4368982c5ed8ec1da59a4adbd9715.png)

---

<div class="post-metadata">

### Author: ![TotallyInformation](https://sea2.discourse-cdn.com/flex026/user_avatar/discourse.nodered.org/totallyinformation/32/31_2.png) [@TotallyInformation](https://discourse.nodered.org/u/TotallyInformation)
#### Post date: [10 December 2024 12:16 UTC](https://discourse.nodered.org/t/dashboard-db1-not-working-when-run-as-windows-service/93819/11 "2024-12-10T12:16:01Z")

</div>

Ah, right - it comes from [Socket.IO](http://Socket.IO) as expected. Odd, I'm quite familiar with [Socket.IO](http://Socket.IO).

In the console error message, can you expand that error and share the trace so we can see where it originates?

Also, what version of node.js & node-red & dashboard 1 is this? Also, what browser and version?

---

<div class="post-metadata">

### Author: ![smanjunath211](https://sea2.discourse-cdn.com/flex026/user_avatar/discourse.nodered.org/smanjunath211/32/95742_2.png) [@smanjunath211](https://discourse.nodered.org/u/smanjunath211)
#### Post date: [10 December 2024 12:38 UTC](https://discourse.nodered.org/t/dashboard-db1-not-working-when-run-as-windows-service/93819/12 "2024-12-10T12:38:12Z")

</div>

![image](https://us1.discourse-cdn.com/flex026/uploads/nodered/original/3X/5/d/5d58f0a0acde1963e0b64636470c540e57125aac.png)

```auto
C:\Users\oee.ldh>node --version && npm --version
v20.18.1
10.8.2

```

```auto
Welcome to Node-RED
===================

10 Dec 13:21:23 - [info] Node-RED version: v4.0.5
10 Dec 13:21:23 - [info] Node.js version: v20.18.1
10 Dec 13:21:23 - [info] Windows_NT 10.0.26100 x64 LE
10 Dec 13:21:23 - [info] Loading palette nodes
10 Dec 13:21:24 - [info] Dashboard version 3.6.5 started at /ui
10 Dec 13:21:28 - [info] Settings file : c:\users\oee.ldh\nr-dt\settings.js
10 Dec 13:21:28 - [info] Context store : 'default' [module=memory]
10 Dec 13:21:28 - [info] User directory : c:\users\oee.ldh\nr-dt
10 Dec 13:21:28 - [warn] Projects disabled : editorTheme.projects.enabled=false
10 Dec 13:21:28 - [info] Flows file : c:/users/oee.ldh/nr-dt/flows.json
10 Dec 13:21:28 - [info] Server now running at http://127.0.0.1:1882/
10 Dec 13:21:28 - [warn] 

```

---

<div class="post-metadata">

### Author: ![TotallyInformation](https://sea2.discourse-cdn.com/flex026/user_avatar/discourse.nodered.org/totallyinformation/32/31_2.png) [@TotallyInformation](https://discourse.nodered.org/u/TotallyInformation)
#### Post date: [10 December 2024 13:31 UTC](https://discourse.nodered.org/t/dashboard-db1-not-working-when-run-as-windows-service/93819/13 "2024-12-10T13:31:04Z")

</div>

Sorry, out of ideas. Everything seems OK to me but I don't really use Dashboard,

---

<div class="post-metadata">

### Author: ![smanjunath211](https://sea2.discourse-cdn.com/flex026/user_avatar/discourse.nodered.org/smanjunath211/32/95742_2.png) [@smanjunath211](https://discourse.nodered.org/u/smanjunath211)
#### Post date: [10 December 2024 14:32 UTC](https://discourse.nodered.org/t/dashboard-db1-not-working-when-run-as-windows-service/93819/14 "2024-12-10T14:32:00Z")

</div>

ts alright. This now forces me to permanently move to DB2 (or Uibuilder 🙂 )  
Only sad thing is that i couldn't still find a replacement for ui-statetrail by @hotNipi

---

<div class="post-metadata">

### Author: ![TotallyInformation](https://sea2.discourse-cdn.com/flex026/user_avatar/discourse.nodered.org/totallyinformation/32/31_2.png) [@TotallyInformation](https://discourse.nodered.org/u/TotallyInformation)
#### Post date: [10 December 2024 15:23 UTC](https://discourse.nodered.org/t/dashboard-db1-not-working-when-run-as-windows-service/93819/15 "2024-12-10T15:23:22Z")

</div>

> [@smanjunath211](#):
>
> or Uibuilder

I couldn't possibly reasonably say that this will be your best approach - even if it is. 😄

> [@smanjunath211](#):
>
> Only sad thing is that i couldn't still find a replacement for ui-statetrail

I have looked into this several times now and even started to try and create a web-component version that would be useable by both Dashboards, UIBUILDER and other frameworks and tools as well. Sadly, it is just a bit too complex for me to work on right now.

I do sincerely wish that more people would work on web component solutions that work universally rather than solutions that only work in the current generation of a single framework.

---

<div class="post-metadata">

### Author: ![hotNipi](https://sea2.discourse-cdn.com/flex026/user_avatar/discourse.nodered.org/hotnipi/32/383_2.png) [@hotNipi](https://discourse.nodered.org/u/hotNipi)
#### Post date: [10 December 2024 15:24 UTC](https://discourse.nodered.org/t/dashboard-db1-not-working-when-run-as-windows-service/93819/16 "2024-12-10T15:24:35Z")

</div>

I do still think that using the chartjs (with ui\_template so it can be configured to do so) it is possible to create something close enough to the state-trail. It of course depends what are the features you are definitely need from that widget ...

---

<div class="post-metadata">

### Author: ![smanjunath211](https://sea2.discourse-cdn.com/flex026/user_avatar/discourse.nodered.org/smanjunath211/32/95742_2.png) [@smanjunath211](https://discourse.nodered.org/u/smanjunath211)
#### Post date: [10 December 2024 15:24 UTC](https://discourse.nodered.org/t/dashboard-db1-not-working-when-run-as-windows-service/93819/17 "2024-12-10T15:24:39Z")

</div>

> [@smanjunath211](#):
>
> ![image](https://us1.discourse-cdn.com/flex026/uploads/nodered/original/3X/6/1/612317d79aa47117f002412e48ee12152e76e977.png)

When I run the same flow from command-prompt (as against from windows-service)  
this error doesn't show up.

 ![image](https://us1.discourse-cdn.com/flex026/uploads/nodered/original/3X/9/4/940626a6dfddbf3e2825effa8b602bd6550257b7.png)

---

<div class="post-metadata">

### Author: ![TotallyInformation](https://sea2.discourse-cdn.com/flex026/user_avatar/discourse.nodered.org/totallyinformation/32/31_2.png) [@TotallyInformation](https://discourse.nodered.org/u/TotallyInformation)
#### Post date: [10 December 2024 15:28 UTC](https://discourse.nodered.org/t/dashboard-db1-not-working-when-run-as-windows-service/93819/18 "2024-12-10T15:28:50Z")

</div>

Yes, it is clearly some kind of hidden permissions issue I think. I just can't work out what.

Something you could try though. Change your service start-up to use your user account instead of the SYSTEM account. Better still, install Node.js as a user install under a new users then install Node-red locally rather than globally to the same user. Then you can run everything under that user. This is much more like the standard way of running under LINUX.

---

<div class="post-metadata">

### Author: ![smanjunath211](https://sea2.discourse-cdn.com/flex026/user_avatar/discourse.nodered.org/smanjunath211/32/95742_2.png) [@smanjunath211](https://discourse.nodered.org/u/smanjunath211)
#### Post date: [10 December 2024 15:29 UTC](https://discourse.nodered.org/t/dashboard-db1-not-working-when-run-as-windows-service/93819/19 "2024-12-10T15:29:18Z")

</div>

> [@hotNipi](#):
>
> It of course depends what are the features you are definitely need from that widget .

with ui-template node, i was able to generate a 'state-trail' look alike, but i get stuck at the 'on click' portion. (to do with javascript ?)  
what i am using this is basically to get the user click on the 'red' part of the bar and record the downtime reason. the clicking triggers a dropdown allowing user to choose the 'downtime' reason.

---

<div class="post-metadata">

### Author: ![smanjunath211](https://sea2.discourse-cdn.com/flex026/user_avatar/discourse.nodered.org/smanjunath211/32/95742_2.png) [@smanjunath211](https://discourse.nodered.org/u/smanjunath211)
#### Post date: [10 December 2024 15:33 UTC](https://discourse.nodered.org/t/dashboard-db1-not-working-when-run-as-windows-service/93819/20 "2024-12-10T15:33:24Z")

</div>

will put this on backburner right now, I need to fix the broken dashboard and quickly get the site up and running, since i postponed the migration for quite long now, i will need more time on understanding. thanks to you, part of my dashboard is already on ui-builder the live display part (it was easy as you told me my input was already pure html/css, so was easy to switch)  
the next part is trickier as this involves user interaction (javascript!)

[Next page](https://discourse.nodered.org/t/dashboard-db1-not-working-when-run-as-windows-service/93819.md?page=2)
