Trouble shooting - New Plugins installed, not working. What gives?



  • Re: [nodebb-plugin-ns-embed] NS Embed

    @The-Worms said in [nodebb-plugin-ns-embed] NS Embed:

    commands like git and ./nodebb should not be used with root access (sudo or elevated privileges). It will cause problems with different ownership of files NodeBB needs access to

    Ok thank you - I'll create a sudo user and then re-run the installation from scratch.

    Ok I tried that but same problem. I used sudo where applicable but was logged in as root, is that ok? I'm not so familiar with privileges in Linux and wasn't thinking about implications of not using sudo.

    Therefore I may have missed sudo in previous in re-builds and re-install but this time I was very careful to apply it as outlined as per advice and also the documentation for installing nodebb. I read a little harder.

    Right now, I'm starting to wonder if this is a versioning issue - my original but separate nodebb installations (each stack was not exactly the same) had no issues with plugins.

    Therefore I've been trying to think what did I do differently other than forgetting to use sudo when I re-installed or rebuilt the stacks.

    The only thing I can think of right now is I might have used older versions of maybe redis, but more so and older versions of node.js but I think I always used the latest nodebb (1.11.x)

    I might try to re-create the setups dropping back versions of the various components but keeping it at nodeBB 1.11x .

    • I decided to fork this topic as I don't want to crowd out useful ns-embed-plugins specific information as my issue is wider as it affects any new plugin installed! ☂

  • Global Moderator

    @omega what commands did you use sudo on?

    What tutorial are you following?

    You shouldn't use sudo or be logged in as root for any command involving git or ./nodebb



  • This post is deleted!


  • @PitaJ said in Trouble shooting - New Plugins installed, not working. What gives?:

    @omega what commands did you use sudo on?

    What tutorial are you following?

    You shouldn't use sudo or be logged in as root for any command involving git or ./nodebb

    Ok. So must I install - redis, node.js, and nodebb as a Sudo user?

    nginx is setup under root.

    Point of info: I have made at least 2 installs as root and they worked. Maybe it was beginners luck.

    Re - tutorials: A mix, basic vanilla setup as per docs.nodebb guide(sudo is specified in a few of the commands) and other stack setups with one built with nginx_pagespeed.


  • Global Moderator

    @omega you must install redis, nodejs, and nginx as sudo/root. Anything requiring apt-get needs root

    NodeBB you shouldn't need to install with any elevated privileges. git should be run unprivileged, as should ./nodebb



  • @PitaJ said in Trouble shooting - New Plugins installed, not working. What gives?:

    @omega you must install redis, nodejs, and nginx as sudo/root. Anything requiring apt-get needs root

    NodeBB you shouldn't need to install with any elevated privileges. git should be run unprivileged, as should ./nodebb

    Ok thanks for that clarification. 👍

    One last clarification for my own low-fi brain here - To install nodeBB I only need to create a normal user with no usermod applied - True or False ?


  • Global Moderator

    @omega said in Trouble shooting - New Plugins installed, not working. What gives?:

    One last clarification for my own low-fi brain here - To install nodeBB I only need to create a normal user with no usermod applied - True or False ?

    True. The NodeBB user should not need any privileged access.

    I recommend you create a new user, nodebb, with its own home directory. su as that user and install nodebb in its home directory (/home/nodebb) accordingly.



  • @PitaJ said in Trouble shooting - New Plugins installed, not working. What gives?:

    @omega said in Trouble shooting - New Plugins installed, not working. What gives?:

    One last clarification for my own low-fi brain here - To install nodeBB I only need to create a normal user with no usermod applied - True or False ?

    True. The NodeBB user should not need any privileged access.

    I recommend you create a new user, nodebb, with its own home directory. su as that user and install nodebb in its home directory (/home/nodebb) accordingly.

    Ok I found what was tripping me up for so long I was logining in as root with SSH key, this was screwing up the privileges and I think was not part of the original stack step that worked first time.

    I was able to user none root/sudo user to setup nodeBB itself.

    However, I installed the plugin ns-embed and well still the same problem - hangs on the admin panel when trying to access it.


  • Global Moderator

    @omega how did you install the plugin? Did you rebuild and restart after doing so?



  • @PitaJ said in Trouble shooting - New Plugins installed, not working. What gives?:

    @omega how did you install the plugin? Did you rebuild and restart after doing so?

    BINGO! It works

    AAahhhhhhh........... stoopid me, I was only reseting not re-building & reseting.

    Glourious!

    • Thank you for all the help and patience.


  • Re: [Trouble shooting - New Plugins installed](not working. What gives?)

    Ok rather than start a new thread. Seetgin up a nodeBB on a new install, hitting similar-ish privilege issues.

    I don't know what's going on as it's a simple enough setup. I can get nodeBB to work but there is some underlying issue, as in part documented in this thread - https://community.nodebb.org/topic/13882/redis-connection-error-in-basic-nodebb-setup

    I'm assuming there is a flaw in my setup but I'm following setups that worked in the recent past to solved the above plugin issue.

    It all seems to centre around recurring package.json found, I tried npm audit, but that failed. I've never had that happen in previous installs. Hmmm....



  • Ok I managed to get further, ran the entire setup as a Sudo user and that seemed to work but I had to change ownership of the nodebb folder to the sudo user

    Now the Rebuild & Restart seems to hang, which means then the plugin does not install fully.

    2019-04-25T10:32:29.169Z [4567/1234] - info: [build]         plugin static dirs  build completed in 0.861sec
    2019-04-25T10:32:31.103Z [4567/1234] - error: [build]         client side styles  build failed
    2019-04-25T10:32:31.104Z [4567/1234] - error: [build] Encountered error during build step
    undefined
    2019-04-25T10:32:47.407Z [4567/1234] - info: [build]           client js bundle  build completed in 19.095sec
    2019-04-25T10:32:47.407Z [4567/1234] - info: [build]            admin js bundle  build completed in 19.095sec
    2019-04-25T10:32:55.296Z [4567/1234] - info: [build]                  languages  build completed in 26.982sec
    2019-04-25T10:33:02.013Z [4567/1234] - error: [build] admin control panel styles  build failed
    2019-04-25T10:33:03.771Z [4567/1234] - info: [build]                  templates  build completed in 35.458sec
    2019-04-25T10:33:04.390Z [4567/1234] - info: [build]          requirejs modules  build completed in 36.079sec
    

    I also got three errors in the log during Rebuild & Restart.

    ubuntu 18.04 / nodejs 11 / redis / nodebb 1.11.2



  • I figured it out - user malfunction on my part, I wasn't cloning nodebb into the correct "node" user home folder properly! 🙄 Stooopid I know...

    Extra to note - I also ran into failed setup when using nodejs 12 and nodeBB 1.12 (think hey lets go with the latest of everything!) and this was after correcting my user folder error, so decided to revert to a nodejs 11 and nodebb 1.11 stack.

    The forum has successfully rebuilt and restarted, no errors and the plugin is doing it's thing!


Log in to reply
 

Suggested Topics

| |