NodeBB Fresh install - Several Issues ( Upload/Dev Mode/Rebuild-Restart Disabled)



  • Hello everyone,

    I am having a couple issues after installing nodebb which I do not know how to fix. I dont particulary like asking help on forums as the hard lesson is usually the best lesson. This time however I have no clue how to fix the below issues. At first I thought about privileges, couldnt upload and development mode because admin.js was missing from the re-captcha plugin but after trying all sorts of things I still am unable to resolve the issue.

    So, in the meanwhile I will await any responce so I can start digging again and hopefully fix these issues. Thanks a lot in advance!

    Issues

    • Dashboard says: "Rebuilding and
      Restarting your NodeBB has been disabled as you do not seem to be running it via the appropriate daemon."
    • Notices: Forum is running in development mode. The forum may be open to potential vulnerabilities; please contact your system administrator. ( FIXED - Read Bottom page )
    • Uploading Profile Picture: Looks like your connection to Forum has been lost, please wait while we try to reconnect.

    General Information:

    location ~ / {
        proxy_set_header X-Real-IP       $remote_addr;
        proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for;
        proxy_set_header Host            $http_host;
        proxy_set_header X-NginX-Proxy   true;
        proxy_set_header Upgrade         $http_upgrade;
        proxy_set_header Connection      "upgrade";
        proxy_redirect                   off;
        proxy_http_version               1.1;
        proxy_pass                       http://127.0.0.1:4567;
    }
    
    • Config.json:
    {
        "url": "https://forum.dregora.com",
        "port": "4567",
        "secret": "xxx-xxx-xxx-xxx-xxx",
        "database": "mongo",
        "mongo": {
            "host": "127.0.0.1",
            "port": "27017",
            "username": "nodebb",
            "password": "xxx",
            "database": "nodebb",
            "uri": ""
        }
    }
    

    Attempts to Resolve

    • Clearing Buffered Webcontent & Cookies after each attempt + Trying to upload profile picture & checking issues. Each issue confirmed present after each attempt
    • npm update
    • Reinstall Monodb-org
    • Reinstall nodebb
    • chown 777 test on /uploads
    • ./nodebb upgrade
    • ./nodebb build + restart
    5. Rebuilding assets...  started
    2018-10-23T11:14:21.073Z [8729] - warn: [plugins] File not found: /var/www/vhosts/dregora.com/forum.dregora.com/node_modules/nodebb-plugin-math-captcha/public/js/admin.js (Ignoring)
    2018-10-23T11:14:21.117Z [8729] - info: [build] Building in parallel mode
    2018-10-23T11:14:21.121Z [8729] - info: [build]         plugin static dirs  build started
    2018-10-23T11:14:21.133Z [8729] - info: [build]          requirejs modules  build started
    2018-10-23T11:14:21.139Z [8729] - info: [build]           client js bundle  build started
    2018-10-23T11:14:21.146Z [8729] - info: [build]            admin js bundle  build started
    2018-10-23T11:14:21.148Z [8729] - info: [build]         client side styles  build started
    2018-10-23T11:14:21.152Z [8729] - info: [build] admin control panel styles  build started
    2018-10-23T11:14:21.157Z [8729] - info: [build]                  templates  build started
    2018-10-23T11:14:21.160Z [8729] - info: [build]                  languages  build started
    2018-10-23T11:14:21.162Z [8729] - info: [build]                     sounds  build started
    2018-10-23T11:14:51.121Z [8729] - info: [build]         plugin static dirs  build completed in 30.001sec
    2018-10-23T11:14:51.683Z [8729] - info: [build]           client js bundle  build completed in 30.544sec
    2018-10-23T11:14:51.826Z [8729] - info: [build]            admin js bundle  build completed in 30.68sec
    2018-10-23T11:14:52.063Z [8729] - info: [build] admin control panel styles  build completed in 30.911sec
    2018-10-23T11:14:52.094Z [8729] - info: [build]                     sounds  build completed in 30.932sec
    2018-10-23T11:15:05.624Z [8729] - info: [build]         client side styles  build completed in 44.476sec
    2018-10-23T11:15:48.524Z [8729] - info: [build]          requirejs modules  build completed in 87.391sec
    2018-10-23T11:17:07.543Z [8729] - info: [build]                  languages  build completed in 166.384sec
    2018-10-23T11:17:49.202Z [8729] - info: [build]                  templates  build completed in 208.045sec
    2018-10-23T11:17:49.205Z [8729] - info: [build] Asset compilation successful. Completed in 208.086sec.
    
    • Remove plugin re-captcha ( admin.js missing )
    • Nodebb install ( I found myself doing random things at this point ) which gives the following error ( probably since the nodebb already has been configured? + Google Search "[bench press js] Unable to build or find a suitable native module" Didnt gave much information on how to fix this)
    [root@dregora forum.dregora.com]# ./nodebb stop
    Stopping NodeBB. Goodbye!
    [root@dregora forum.dregora.com]# ./nodebb install
    [benchpressjs] Unable to build or find a suitable native module, falling back to JS version
    2018-10-23T12:26:46.613Z [18606] - info: Launching web installer on port 4567
    events.js:160
          throw er; // Unhandled 'error' event
          ^
    
    Error: listen EADDRINUSE :::4567
        at Object.exports._errnoException (util.js:1020:11)
        at exports._exceptionWithHostPort (util.js:1043:20)
        at Server._listen2 (net.js:1271:14)
        at listen (net.js:1307:10)
        at Server.listen (net.js:1403:5)
        at EventEmitter.listen (/var/www/vhosts/dregora.com/forum.dregora.com/node_modules/express/lib/application.js:618:24)
        at launchExpress (/var/www/vhosts/dregora.com/forum.dregora.com/install/web.js:75:15)
        at /var/www/vhosts/dregora.com/forum.dregora.com/install/web.js:69:3
        at /var/www/vhosts/dregora.com/forum.dregora.com/node_modules/async/dist/async.js:3888:9
        at /var/www/vhosts/dregora.com/forum.dregora.com/node_modules/async/dist/async.js:473:16
    [root@dregora forum.dregora.com]#
    /
    

    I hope I gave enough information to give an idea of what is going on, if not please let me know.

    Update/current state

    • After trying different websockets nginx configurations I couldnt log in anymore until I completely erased the websocket directives.
    • Development mode was changed to production through the node.js in plesk.
    • Trying to add websockets causes session issue: ( With or Without passing proxy to apache through plesk )
    location ~ / {
    	proxy_set_header X-Real-IP       $remote_addr;
    	proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for;
    	proxy_set_header Host            $http_host;
    	proxy_set_header X-NginX-Proxy   true;
    	proxy_set_header Upgrade         $http_upgrade;
    	proxy_set_header Connection      "upgrade";
    	proxy_redirect                   off;
    	proxy_http_version               1.1;
    	proxy_pass                       http://127.0.0.1:4567;
    }
    

  • Global Moderator

    You need to kill all NodeBB processes, then start it with ./nodebb start. You need to make sure the URL value in config.json is equal to the url at which you access your site. You need to look at docs.nodebb.org for nginx instructions. I don't think anybody here knows anything about plex, I suggest avoiding it until you get things working manually.



  • It feels like there are several things going on. I would at least check the following two things:

    1. Is there perhaps still a rogue process running of NodeBB? This might explain the EADDRINUSE. And probably why it says it is running in dev mode, since it might be a dev process running in the background from earlier testing?
    2. You can find up-to-date Nginx configurations in the documentation: https://docs.nodebb.org/installing/os/ubuntu/#configuring-nginx
    location / {
        proxy_set_header X-Real-IP $remote_addr;
        proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for;
        proxy_set_header X-Forwarded-Proto $scheme;
        proxy_set_header Host $http_host;
        proxy_set_header X-NginX-Proxy true;
    
        proxy_pass http://127.0.0.1:4567;
        proxy_redirect off;
    
        # Socket.IO Support
        proxy_http_version 1.1;
        proxy_set_header Upgrade $http_upgrade;
        proxy_set_header Connection "upgrade";
    }
    

    Take also note of the different location configuration. You're doing an unnecessary regular expression check, which might actually break in some circumstances.

    You can ignore the warning for the missing admin.js. But that isn't the re-captcha plugin. That is the math-captcha plugin. An update should be out soonish that will fix this warning.


 

Suggested Topics

| |