Jump to content

Skylord123

Members
  • Posts

    38
  • Joined

  • Last visited

Posts posted by Skylord123

  1. 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.

  2. 11 minutes ago, live4soccer7 said:

    I think we went through all of that earlier in this thread. It yielded no successful results in changing permissions.

    *shrug* It is definitely a permission issue based on the error you are getting. There is a possibility that the MQTT container is changing the permissions in it's startup script. It's also a possibility that code-server is having an issue. I've never used code-server and just modify my files over SFTP/NFS as the root user. That prevents me from dealing with any permission issues.

     

    On 6/13/2022 at 6:58 PM, Sim1 said:

    Hey so I have an issue right  now where I am trying to upgrade my nodered docker container, but when I try to do so within the container (manage palette), I get the following error: 

     

      
    2022-06-12T19:40:17.485Z [err] npm ERR! Your cache folder contains root-owned files, due to a bug in
    2022-06-12T19:40:17.485Z [err] npm ERR!
    2022-06-12T19:40:17.485Z [err]  previous versions of npm which has since been addressed.
    2022-06-12T19:40:17.485Z [err] npm ERR! 
    2022-06-12T19:40:17.485Z [err] npm 
    2022-06-12T19:40:17.485Z [err] ERR! To permanently fix this problem, please run:
    2022-06-12T19:40:17.485Z [err] npm ERR!   sudo chown -R 1000:1000 "/data/.npm"
    2022-06-12T19:40:17.496Z [err] 
    2022-06-12T19:40:17.496Z [err] npm ERR! A complete log of this run can be found in:
    2022-06-12T19:40:17.496Z [err] npm ERR!
    2022-06-12T19:40:17.496Z [err]      /data/.npm/_logs/2022-06-12T19_40_17_488Z-debug.log

     

    When I go into the command line, I can see the files within the appdata folder for the docker are owned by multiple different users, including "root" , "nobody", and my personal username. 

     

    My question is, which user is the best-practice owner for these files in node red? I'm having some difficulties figuring out how to order the item that they said was the error in bash, so I was also wondering if it is ok to just do chown -R within the command line for the folders within the appdata folder?


    Set all the files to be owned by user nobody and group users. I had this issue with my Node-RED container as well and that fixed it for me. None of those files should be owned by root (which is why you got that error telling you that). Most containers for Unraid use nobody:users.

     

    chown -R nobody:users /mnt/user/appdata/node-red

     

  3. On 2/7/2021 at 12:28 PM, gulo said:

    Hello

     

    I would like to use Watch Node / File In Node in Node Red to read files, but I am not sure how I can access my Unraid shared folders? I tried "\\192.168.1.10\ShareName" but Node Red doesn't see it / can't access. Do I need to somehow map those share folders in the Node Red docker configuration?

     

    Thanks!

    When you create or edit docker containers you can mount folders and files on the host to locations inside the container.

     

    Example: I mount my /mnt/user/share/media directory to /media_share in the container for storing timelapse photos.

    • Like 1
  4. 1 hour ago, wdenny said:

    Should it be pulling from: 

    https://hub.docker.com/r/nodered/node-red

     

    I was actually wrong in my previous post. The Docker Hub URL is actually used in Unraid to check for updates. So keeping this up-to-date is handy if you like to see new versions that are released and update via the Unraid GUI. So yes, do update the Docker Hub URL to point to the new non-deprecated URL.

     

  5. 59 minutes ago, wdenny said:

    So I went in and deleted the modules, one at a time backwards from when they were added.

     

    Removing these two modules allowed it to start and run as is did before:

    node-red-contrib-amazon-echo

    node-red-contrib-hue

     

    As for the current repo, i am a bit confused.  I am using the official node red docker from CA...  but, it seems to be pulling from the depreciated repo?

    image.thumb.png.22dfe9be8748bc4721e9927c01ed315d.png

     

    Should it be pulling from: 

    https://hub.docker.com/r/nodered/node-red

     

    Looks like your repository actually is updated. The old one had -docker on the end of it (so it was nodered/node-red-docker). The docker hub URL doesn't get updated when you change the repo and has to be updated manually (and is really just there so you have a link to where the docker container came from.. It auto fills from the CA but if you ever change the repository you need to manually update the Docker Hub URL if you want it to be correct).

     

    I recommend using a version tag from Node-RED as breaking changes can occur between major versions (i.e. 12.0.0 to 13.0.0) that can require changes to be made before updating (or some of your modules aren't updated to run on the new version which may be why you had to remove those modules.. you may now be able to reinstall them via node-red and it will pull the updated version for the latest NR release). It is generally bad practice to use no tag as it will always pull the latest tag which can sometimes be development (or whatever was built last on dockerhub for this repo). This is why I am using nodered/node-red:latest-12 instead of nodered/node-red (which is the same as nodered/node-red:latest) so I always have the latest version of Node-RED 12. I actually recommend going through all your containers and making this update as it can prevent issues with updating down the road (each container has their own tags though so you will need to look those up yourself on their respective hub pages).

     

    19 minutes ago, jbuszkie said:

    Thanks for the info.  so it was really just as easy as purging the log!  I wanted to make sure.  Thanks!  I'll have to look into the log rotate if I want to do that.

     

    You're welcome! I ran into the same issue quite a while back so glad I was able to help you out.

  6. 1 hour ago, wdenny said:

    As of today, I am having the exact same issue.

     

    Did you guys update to the new repository? The repo changed a while back and I noticed when I tried to upgrade the image off the old repo it failed with a similar error (it was actually launching and running node-red for me but all NPM commands failed so I was in a broken state so none of my flows were running).

     

    I'm running with this currently:

    nodered/node-red:latest-12

     

    Also if you started over by re-installing did you nuke the previous folder or choose a new location in appdata to install to? If you are using the same folder as before that's most likely why things are broke. Whenever you start over it's a good idea to either nuke your appdata folder or choose a new one to install to.

     

    On 10/30/2020 at 7:22 AM, jbuszkie said:

    Another question..  My MQTT log file is > 4GB!  how do I get rid of it?

    image.png.c8c62cb4eb7a96819d4a2435860a3d01.png

    Run this command to see what log files are using space on your system (If you install the User Scripts plugin this is one of their scripts):

    du -ah /var/lib/docker/containers/ | grep -v "/$" | sort -rh | head -60 | grep .log

     

    Now run this command to truncate the log files that are too big:

    echo "" > <log file path from previous command>

    Example:

    echo "" > /var/lib/docker/containers/d6f6b5093722d4f93589e3f4e9211b9720b28568f924b4fe4edd9634cfb728df/d6f6b5093722d4f93589e3f4e9211b9720b28568f924b4fe4edd9634cfb728df-json.log

     

    Now run the du command again to list out log file sizes and it should be empty.

     

    On 10/31/2020 at 8:18 AM, jbuszkie said:

    I was logging the default which was everything, I believe..  I've recently changed it to just errors and warnings.  But I can't figure out how to purge it..  Or, potentially, how to use log rotate to keep it manageable.   How do other folks handle the mqtt logging?  Do they log everything but put it in appdata area?

     

    What are best practices?

     

    Jim

    There aren't really "Best Practices" as it all depends on what you need logged and your use case. I'm using MQTT for my home automation so I really only care about logging what devices connect and error messages. This is what I have my log options in mosquitto.conf set to:

    log_dest stderr
    log_type error
    connection_messages true
    log_timestamp true

    If you really want to add log rotating it is an option you can pass to the container. Here is a post that describes it very well:
    https://medium.com/@Quigley_Ja/rotating-docker-logs-keeping-your-overlay-folder-small-40cfa2155412

     

     

    • Thanks 2
  7. 2 hours ago, H2O_King89 said:

    I don't see anything in the blog about using the let's encrypt docker to reverse proxy MQTT?

    Sent from my Pixel 4 XL using Tapatalk
     

    Ah sorry I thought I had a section about proxying with NGINX.

     

    So Lets Encrypt is just used to give the NGINX instance an SSL certificate. What is actually doing the fun proxy stuff is NGINX. A quick google search of "Proxy MQTT websocket with NGINX" reveals this helpful link:
    https://community.openhab.org/t/reverse-proxy-mqtt-through-nginx/36026/2

     

    I actually didn't like the idea of exposing my MQTT instance over the internet so I instead setup a VPN on my network that I set devices outside my network to connect to. This gives them secure access to my network from outside without the worry of securing my MQTT instance for the public internet.

  8. So I was trying to start an ark server last night and was having issues getting it to run on ports other than the default ones. Come to find out it's because the SERVER_NAME env variable gets inserted into the startup params for the server and if the SERVER_NAME contains a space it will break all server params passed after the SERVER_NAME declaration in the params (so in my case I was passing the Port and QueryPort in the Game Parameters which gets appended to the end of the params string which then gets ignored).

     

    I don't think you can actually specify a server name with spaces on the server params. The correct way to set SessionName so it can have spaces is to do it within GameUserSettings.ini for the server. Can we get an update that instead places the SessionName into this file instead of using the launch options? That or make it so SessionName only gets applied to the server params if it is actually set and place a note in the Unraid template explaining that server name defined via ENV variables cannot contain spaces (I prefer the first option but honestly either one will get it so I can have spaces in my SessionName/Server Name).

     

    And lastly.. Can we get a version of the ark server with arkmanager? I really like how easy arkmanager makes managing servers (such as handling mod installing/updates automatically for you).

     

    Thanks for the great containers btw :)

     

     

  9. 22 hours ago, chazzerb314 said:

    @Skylord123

    I ran that command and this is what I got. It doesn't look too promising.

    What did you set nodered's appdata path to? Is it the same path you ran that ls command on?

     

    If you changed what the default install directory is you will need to LS that directory instead of the one I mentioned. /mnt/user/appdata/nodered is the default only if you didn't change it.

     

    If you didn't change the default path and it is missing now that is pretty alarming and points to either corruption or something deleted it. I actually use CrashPlan for backing up my entire appdata folder because I have had drives fail & accidents happen.

  10. 20 hours ago, chazzerb314 said:

    I  recently setup HomeAssistant Core, MQTT, and NodeRed in Docker and everything was going well, then I rebooted my computer and now NodeRed won't open. The log gives me the following error, but I have no idea what it's talking about.

     

    If anyone can walk me through what went wrong that'd be great. I have no expertise in this. I saw other comment with similar problems elsewhere, but they talked about multiple users and a bunch of terminal commands. I set this up without through the Community Applications menu without any commands. Also, I'm not running multiple users. All I have is root.
     

    I also tried navigating to that file, but I couldn't find it. /usr/src/ doesn't contain node-red it only has linux-4.19-98-Unraid folder

    Sounds like there is some sort of permission issue with your mounted /data volume. 

     

    The /usr/src/node-red/node_modules/node-red/settings.js path is inside the container and wont exist on the host (which is why you probably didn't find it). This doesn't matter though because this is just copying the default config file if one doesn't exist. The real problem lies within your mounted appdata volume for node-red (default path on unraid host is /mnt/user/appdata/nodered (unless you specified some other path). I would run this command to see what the permissions are for this directory:
     

    ls -all /mnt/user/appdata/nodered

    My guess is it is a permission issue but it could be something else. This command should give you all the information you need to fix the problem. If you can't figure it out feel free to post the output here and I can help you out some more.

  11. On 2/12/2020 at 7:47 AM, skank said:

    I need to connect the unraid API to this broker, but how?

    This support thread is for the MQTT container (and Spants other containers). I would recommend you head over to whichever project you are referring to and post on their thread. I haven't configured the unraid API to use MQTT myself so I wouldn't know.

     

    Good luck!

  12. 16 minutes ago, skank said:

    HI,

    So i've read too, but i cant find where that config is?

    on the cache drive, the usb stick? where do i find it?

    When you installed the container you chose your appdata location. It is wherever you selected for that. You can always edit your containers to see what paths you used (it should also display this from the docker list in Unraid).

  13. 16 hours ago, skank said:

    i tried to install mqtt

     

    I need this for mqttt broker

    https://github.com/ElectricBrainUK/UnraidAPI

     

     

    But when trying to start mqtt, i get this error

    Warning: store_clean_interval is no longer needed.
    Error: Duplicate user value in configuration.
    Error found at /config/mosquitto.conf:21.
    Error: Unable to open configuration file.

     

    anyone can help pls

     

    After that , i need to connect both home assistant and the unraid API to it.

    I don't know about the UnraidAPI stuff but the error you are getting indicates you have the same user defined twice in your config. I actually helped someone out that was having this same issue on my blog (scroll down to the comments): https://skylar.tech/installing-mqtt-under-docker/

  14. On 1/10/2020 at 2:16 PM, spants said:

    My MQTT one is mosquitto but has a nifty way of adding users and passwords. I have been using it for ages with thousands of connections a day and it has never let me down. (Thats why I haven't updated it!).

    It's easy to try stuff with unraid, so try them both!

    Can we get updated versions based on tags? This way we can keep this stable version under one tag but also be able to try out the newer versions.

     

    As nice as it is staying on one version the updates can be really important for security and performance.

  15. 18 hours ago, blaine07 said:

     


    Poster above mentioned setting up Redis as well; appears he went at it a entirely different direction.

    Which way is right/ wrong here? Or is it both accomplishing same thing? One using app on CA and Nextcloud using something built in?

    https://forums.unraid.net/topic/48383-support-linuxserverio-nextcloud/?do=findComment&comment=807040

     

    I don't know exactly which post you are referring to but as far as I can tell everyone is doing it the same way as me. You need a Redis instance running as the Nextcloud container doesn't come with one.

    EDIT: oops missed your link. That user just says he installed it by modifying the config but doesn't really go into detail about all the steps. You need a Redis instance running which you install via community applications.

    • Like 1
  16. On 2/26/2017 at 11:55 AM, alturismo said:

     

    well, my mount points are physically on the same drive, as example, a cut and paste from a 50 gig file takes 1 second in file explorer, a move here takes a little until its copied and then deleted ... i agree when its physically different drives, but i assume thats how filebot works ;) nvm, just would be alot nicer ...

    If you mount the same parent directory that both input and output directories share you can get near instant file moves. An example is me using /mnt/user/media/filebot_process for input and /mnt/user/media/Videos for output and then mounting /mnt/user/media as /media instead of mounting the input and output separately. You then need to point filebot to the input and output directories and you are good to go.

     

    Now all my files are available within a second of being moved.

     

    I hope I explained this well. Let me know if not. I just moved to the other filebot container and got this same setup working with it (had to open a github issue to get it added but the guy got it done).

×
×
  • Create New...