[support] Spants - NodeRed, MQTT, Dashing, couchDB


Recommended Posts

Hi @spants

Im also having the same issues with MQTT and getting the following errors...

 

1664719186: Saving in-memory database to /config/data/mosquitto.db.
1664719186: Error saving in-memory database, unable to open /config/data/mosquitto.db.new for writing.
1664719186: Error: Permission denied.

 

I know that you have provided us a workaround test MQTT but since this was suggested back in July i was wondering if a new updated container was coming out soon. If not and its still a long while away, please could you let me know and then ill continue down the path of the workaround solution.

 

Im really hoping that the new version isnt too far away 🙂

Thanks again for all your containers and support that you give!

Link to comment
  • 5 weeks later...

I just upgraded to Unraid 6.11.1 from 6.9.0 and started having permission issues with Node-RED & MQTT. I ended up fixing it by running these commands:


 

cd /mnt/user/appdata/nodered

chmod -R ug+rw,ug+X,o-rwx ./

chown -R nobody:users ./

 

I then modified the Node-RED docker container from the Unraid GUI and added

--user 99:100

 

And now Node-RED works again

 

Now to fix MQTT I ran those exact same commands above (on the MQTT directory) and instead of changing the user it runs as (as that failed to make it start) I instead just added the users group to the container by putting this in the extra parameters:
 

--group-add 100

 

And now both Node-RED and MQTT are working for me again. Give that a shot @Titan84 and @TDA and hopefully that fixes it for you.

Edited by Skylord123
oops
Link to comment
  • 4 weeks later...
On 11/2/2022 at 5:47 AM, Skylord123 said:

I just upgraded to Unraid 6.11.1 from 6.9.0 and started having permission issues with Node-RED & MQTT. I ended up fixing it by running these commands:


 

cd /mnt/user/appdata/nodered

chmod -R ug+rw,ug+X,o-rwx ./

chown -R nobody:users ./

 

I then modified the Node-RED docker container from the Unraid GUI and added

--user 99:100

 

And now Node-RED works again

 

Now to fix MQTT I ran those exact same commands above (on the MQTT directory) and instead of changing the user it runs as (as that failed to make it start) I instead just added the users group to the container by putting this in the extra parameters:
 

--group-add 100

 

And now both Node-RED and MQTT are working for me again. Give that a shot @Titan84 and @TDA and hopefully that fixes it for you.

Hello,

I've tried to add the --group-add 100, but the error is still there 😞

Link to comment
  • 3 weeks later...
  • 1 month later...

try chmod -R 777 /mnt/appdata/nodered or what every you have called it.....

The more recent versions of unraid restrict the permissions a bit.

 

Note that this is a security gotcha as it enables execute too - you could also just change the r/w for all and leave execute alone

Link to comment
  • 3 months later...
4 hours ago, own_rhino said:

Thanks for the couchdb template! A couple of updates need to applied.

 

1. From version 3.0 admin needs to be set. Otherwise the container doesn't start. Suggest adding variables for COUCHDB_USER and COUCHDB_PASSWORD to the template.

2. More importantly the path to store data needs to be updated to:

/opt/couchdb/data

 

Thanks for the feedback!. I threw this template together in 2017 for a project that needed it at the time.... I havent really looked at it since.

1) This is an easy change to make 

2) I thought that the v2 template already uses this?

 

Let me know!

Link to comment
  • 4 weeks later...
On 6/6/2023 at 9:22 PM, OsoPolar said:

HI @spants

No idea been using for a few years it has just stopped opening what ever i try.
Log as follows https://logs.notifiarr.com/?e7a7cb6ab85955d3#51vrp3HzthYNhqtJUyhTU8qTUVGvJAmzn6za6zxrLj4X

Cannot see anything that would stop it launching

Did you fix it? Looks like a Alexa credentials issue but that shouldnt stop NR from loading.

Depending on the age of your template - do you have the safe mode option? If not, add a variable to the docker tempate

NODE_RED_ENABLE_SAFE_MODE   and set it to true. You can then startup NR without it starting the flows.  

Link to comment
  • 3 weeks later...
On 5/9/2023 at 5:22 AM, spants said:

Thanks for the feedback!. I threw this template together in 2017 for a project that needed it at the time.... I havent really looked at it since.

1) This is an easy change to make 

2) I thought that the v2 template already uses this?

 

Let me know!

  1. Confirming that COUCHDB_USER / COUCHDB_PASSWORD are needed and once added, it works.
  2. I was confused when I saw a v1 and a v2, especially when v1 was listed as official and had the official tag in Community Applications. Then I noticed that @spants makes both of them and figured v2 must be a new version of the template vs the version number of the actual software itself.
  • Like 1
Link to comment
  • 1 month later...

Can someone help me to get Obsidian Livesync running with the CouchDB database on Unraid?

 

I'm trying to follow this guide which requires a "local.ini" with the configuration shown:

https://github.com/vrtmrz/obsidian-livesync/blob/main/docs/setup_own_server.md

 

The issue is, that I don't understand where to place the local.ini inside this CouchDB docker container.

It seems like a local.ini file already exists in this container under /opt/couchdb/etc/

But this directory is not mounted inside my appdata folder.

 

Would be really great to get some help, I'm struggling since hours.

Link to comment

I'm having issues getting Nodered running. Well it basically runs but installing any packe from the pallet manager fails.

 

This is the error

 

31 Aug 14:10:04 - [info] Installing module: node-red-contrib-tesla, version: 2.0.0
31 Aug 14:10:05 - [warn] Installation of module node-red-contrib-tesla failed:
31 Aug 14:10:05 - [warn] ------------------------------------------
31 Aug 14:10:05 - [warn] npm WARN config production Use `--omit=dev` instead.
npm ERR! code FETCH_ERROR
npm ERR! errno FETCH_ERROR
npm ERR! invalid json response body at https://registry.npmjs.org/node-red-contrib-tesla reason: Invalid response body while trying to fetch https://registry.npmjs.org/node-red-contrib-tesla: ENOSYS: function not implemented, link '/data/.npm/_cacache/tmp/3c40871e' -> '/data/.npm/_cacache/content-v2/sha512/1a/74/6e414427fdd48c5bcf4fe17c1fa287ea548296862017d04013ebfd46a72b610955fd5638adf2df725c41129d7de8a3af16e53787a697b8aad20fd7f97e81'

npm ERR! A complete log of this run can be found in:
npm ERR!     /data/.npm/_logs/2023-08-31T12_10_04_289Z-debug-0.log

31 Aug 14:10:05 - [warn] ------------------------------------------
Error: Install failed
    at /usr/src/node-red/node_modules/@node-red/registry/lib/installer.js:285:25
    at processTicksAndRejections (node:internal/process/task_queues:96:5)
31 Aug 14:10:05 - [error] Error: Install failed

 

I double checked disk space, permissions, network coneectivity to npmjs.org (also DNS) - everything looks fine.

 

Any idea what might be going on here?

Link to comment

I've just installed CouchDB with the default settings, and the first thing it does after starting, is stopping itself.

 

The log says:

 

*************************************************************
ERROR: CouchDB 3.0+ will no longer run in "Admin Party"
       mode. You *MUST* specify an admin user and
       password, either via your own .ini file mapped
       into the container at /opt/couchdb/etc/local.ini
       or inside /opt/couchdb/etc/local.d, or with
       "-e COUCHDB_USER=admin -e COUCHDB_PASSWORD=password"
       to set it via "docker run".
*************************************************************

 

I understand what it says, but I don't know how to act upon it. I don't know how to pass commnadline arguments, or where I'm expected to put an ini file, or even what exactly to put there.

 

Dear author, could you please change the docker such that a default setup at least works? And/or add fields in the docker to enter a username/password to use? Much obliged :)

Link to comment
  • 1 month later...
On 9/7/2023 at 4:20 AM, thany said:

I've just installed CouchDB with the default settings, and the first thing it does after starting, is stopping itself.

 

The log says:

 

*************************************************************
ERROR: CouchDB 3.0+ will no longer run in "Admin Party"
       mode. You *MUST* specify an admin user and
       password, either via your own .ini file mapped
       into the container at /opt/couchdb/etc/local.ini
       or inside /opt/couchdb/etc/local.d, or with
       "-e COUCHDB_USER=admin -e COUCHDB_PASSWORD=password"
       to set it via "docker run".
*************************************************************

 

I understand what it says, but I don't know how to act upon it. I don't know how to pass commnadline arguments, or where I'm expected to put an ini file, or even what exactly to put there.

 

Dear author, could you please change the docker such that a default setup at least works? And/or add fields in the docker to enter a username/password to use? Much obliged :)

 

You just have to add COUCHDB_USER= and COUCHDB_PASSWORD= as variables in the docker setup.

 

 

Link to comment

Has anyone come up with a fix for the MQTT permissions error? I keep getting this over and over again:

 

Saving in-memory database to /config/data/mosquitto.db.
Error saving in-memory database, unable to open /config/data/mosquitto.db.new for writing.
Error: Permission denied.

 

I have checked the permissions and they are set to 666, so anyone should be able to write to mosquitto.db.new

Link to comment

Is this from inside the docker (I assume it is)? Can you from inside the docker "touch" something. From within the docker my configs are root:root and 0644. From outside (/mnt/user/appdata/mosquitto) they are also root:root and 0644 but I got a very simple setup and dont even have a /config inside the docker

 

.
└── mosquitto
    ├── config
    │   └── mosquitto.conf
    ├── data
    ├── log
    ├── mosquitto-unraid-default.conf
    ├── mosquitto.conf
    └── passw

 

This is my directory structure - is root from with docker and appdata. I dont think config/mosquitto.conf is being used but mosquitto-unraid-default and the mosquitto.conf on same level are!

 

Just question: What's the benefit of storing the in-memory db - afterall its a msg broker.

 

 

Link to comment
  • 2 weeks later...

I installed this docker and I keep getting permission errors:

Error saving in-memory database, unable to open /config/data/mosquitto.db.new for writing.

 

The appdata folder seems to have different permissions than most of my other appdata folders:

drw-rw-rw- 1 nobody users      177 Nov  6 08:28 MQTT/

 

And here is what is inside of appdata/MQTT:
 

drw-rw-rw- 1 root root  20 Nov  6 08:28 ca_certificates/
-rw-rw-rw- 1 root root 793 Nov  6 08:28 passwords.README
-rw-rw-rw- 1 root root 794 Nov  6 08:28 mosquitto.conf
drw-rw-rw- 1 root root  20 Nov  6 08:28 conf.d/
drw-rw-rw- 1 root root  20 Nov  6 08:28 certs/
drw-rw-rw- 1 root root  27 Nov  6 08:28 log/
drw-rw-rw- 1 root root   6 Nov  6 08:28 data/
-rw-rw-rw- 1 root root   0 Nov  6 08:28 passwords.mqtt
-rw-rw-rw- 1 root root 794 Nov  6 08:28 mosquitto.conf.example

 

Should root be the owner of all of these?

 

How do I fix these?  Do I need to change the permissions?

 

Link to comment
  • 2 weeks later...

Also having the same error.   Is this present in earlier versions?  I've tried fixing permissions but nothing works.

 

700570059: Saving in-memory database to /config/data/mosquitto.db.
1700570059: Error saving in-memory database, unable to open /config/data/mosquitto.db.new for writing.

Link to comment

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.
Note: Your post will require moderator approval before it will be visible.

Guest
Reply to this topic...

×   Pasted as rich text.   Restore formatting

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.