Upgrade to 1.17.2 and cluster configurtaion

Solved Technical Support
  • Hello Everyone,

    I finally migrated my code from 1.14.x baseline to work on 1.17.x on my windows development environment and trying to push changes to ubuntu-based production. After several failed attempt to upgrade from 1.14.x to 1.17.x on my ubuntu staging box, I started off fresh from 1.17.x and was able to build and run without my code. After linking my code and config, it stops loading with this error ONLY in clustered config:

    ./nodebb dev
    
    NodeBB v1.17.2 Copyright (C) 2013-2014 NodeBB Inc.
    This program comes with ABSOLUTELY NO WARRANTY.
    This is free software, and you are welcome to redistribute it under certain conditions.
    For the full license, please visit: http://www.gnu.org/copyleft/gpl.html
    
    Clustering enabled: Spinning up 8 process(es).
    
    2021-09-19T19:30:26.667Z [4561/13673] - verbose: * using configuration stored in: /home/project/dt5.1/config.json
    2021-09-19T19:30:26.671Z [4561/13673] - info: Initializing NodeBB v1.17.2 https://esfandiar.com
    2021-09-19T19:30:26.672Z [4561/13673] - verbose: * using mongo store at xxx.xxx.xxx.xxx:pppppp
    2021-09-19T19:30:26.672Z [4561/13673] - verbose: * using themes stored in: /home/project/dt5.1/node_modules
    2021-09-19T19:30:26.679Z [4562/13674] - verbose: * using configuration stored in: /home/project/dt5.1/config.json
    2021-09-19T19:30:26.691Z [4569/13714] - verbose: * using configuration stored in: /home/project/dt5.1/config.json
    2021-09-19T19:30:26.710Z [4568/13707] - verbose: * using configuration stored in: /home/project/dt5.1/config.json
    2021-09-19T19:30:26.730Z [4561/13673] - error: Error: [[error:redis-required-for-pubsub]]
        at get (/home/project/dt5.1/src/pubsub.js:51:9)
        at Object.on (/home/project/dt5.1/src/pubsub.js:63:3)
        at module.exports (/home/project/dt5.1/src/cacheCreate.js:58:9)
        at Object.module.exports.create (/home/project/dt5.1/src/database/cache.js:5:9)
        at module.exports (/home/project/dt5.1/src/database/mongo/hash.js:6:36)
        at Object.<anonymous> (/home/project/dt5.1/src/database/mongo.js:182:24)
        at Module._compile (internal/modules/cjs/loader.js:999:30)
        at Object.Module._extensions..js (internal/modules/cjs/loader.js:1027:10)
        at Module.load (internal/modules/cjs/loader.js:863:32)
        at Function.Module._load (internal/modules/cjs/loader.js:708:14)
    [cluster] Child Process (13673) has exited (code: 0, signal: null)
    2021-09-19T19:30:26.742Z [4562/13674] - error: Error: [[error:redis-required-for-pubsub]]
        at get (/home/project/dt5.1/src/pubsub.js:51:9)
        at Object.on (/home/project/dt5.1/src/pubsub.js:63:3)
        at module.exports (/home/project/dt5.1/src/cacheCreate.js:58:9)
        at Object.module.exports.create (/home/project/dt5.1/src/database/cache.js:5:9)
        at module.exports (/home/project/dt5.1/src/database/mongo/hash.js:6:36)
        at Object.<anonymous> (/home/project/dt5.1/src/database/mongo.js:182:24)
        at Module._compile (internal/modules/cjs/loader.js:999:30)
        at Object.Module._extensions..js (internal/modules/cjs/loader.js:1027:10)
        at Module.load (internal/modules/cjs/loader.js:863:32)
        at Function.Module._load (internal/modules/cjs/loader.js:708:14)
    [cluster] Child Process (13674) has exited (code: 0, signal: null)
    2021-09-19T19:30:26.753Z [4569/13714] - error: Error: [[error:redis-required-for-pubsub]]
        at get (/home/project/dt5.1/src/pubsub.js:51:9)
        at Object.on (/home/project/dt5.1/src/pubsub.js:63:3)
        at module.exports (/home/project/dt5.1/src/cacheCreate.js:58:9)
        at Object.module.exports.create (/home/project/dt5.1/src/database/cache.js:5:9)
        at module.exports (/home/project/dt5.1/src/database/mongo/hash.js:6:36)
        at Object.<anonymous> (/home/project/dt5.1/src/database/mongo.js:182:24)
        at Module._compile (internal/modules/cjs/loader.js:999:30)
        at Object.Module._extensions..js (internal/modules/cjs/loader.js:1027:10)
        at Module.load (internal/modules/cjs/loader.js:863:32)
        at Function.Module._load (internal/modules/cjs/loader.js:708:14)
    [cluster] Child Process (13714) has exited (code: 0, signal: null)
    2021-09-19T19:30:26.758Z [4566/13700] - verbose: * using configuration stored in: /home/project/dt5.1/config.json
    2021-09-19T19:30:26.765Z [4563/13678] - verbose: * using configuration stored in: /home/project/dt5.1/config.json
    2021-09-19T19:30:26.780Z [4564/13686] - verbose: * using configuration stored in: /home/project/dt5.1/config.json
    2021-09-19T19:30:26.781Z [4565/13694] - verbose: * using configuration stored in: /home/project/dt5.1/config.json
    2021-09-19T19:30:26.802Z [4568/13707] - error: Error: [[error:redis-required-for-pubsub]]
        at get (/home/project/dt5.1/src/pubsub.js:51:9)
        at Object.on (/home/project/dt5.1/src/pubsub.js:63:3)
        at module.exports (/home/project/dt5.1/src/cacheCreate.js:58:9)
        at Object.module.exports.create (/home/project/dt5.1/src/database/cache.js:5:9)
        at module.exports (/home/project/dt5.1/src/database/mongo/hash.js:6:36)
        at Object.<anonymous> (/home/project/dt5.1/src/database/mongo.js:182:24)
        at Module._compile (internal/modules/cjs/loader.js:999:30)
        at Object.Module._extensions..js (internal/modules/cjs/loader.js:1027:10)
        at Module.load (internal/modules/cjs/loader.js:863:32)
        at Function.Module._load (internal/modules/cjs/loader.js:708:14)
    [cluster] Child Process (13707) has exited (code: 0, signal: null)
    2021-09-19T19:30:26.829Z [4566/13700] - error: Error: [[error:redis-required-for-pubsub]]
        at get (/home/project/dt5.1/src/pubsub.js:51:9)
        at Object.on (/home/project/dt5.1/src/pubsub.js:63:3)
        at module.exports (/home/project/dt5.1/src/cacheCreate.js:58:9)
        at Object.module.exports.create (/home/project/dt5.1/src/database/cache.js:5:9)
        at module.exports (/home/project/dt5.1/src/database/mongo/hash.js:6:36)
        at Object.<anonymous> (/home/project/dt5.1/src/database/mongo.js:182:24)
        at Module._compile (internal/modules/cjs/loader.js:999:30)
        at Object.Module._extensions..js (internal/modules/cjs/loader.js:1027:10)
        at Module.load (internal/modules/cjs/loader.js:863:32)
        at Function.Module._load (internal/modules/cjs/loader.js:708:14)
    [cluster] Child Process (13700) has exited (code: 0, signal: null)
    [... repeats once for each port]
    

    Do I need to install Redis manually? My server is ubuntu 19.10 and running node v16.

    Thanks for your support.

  • Yes install redis and add a redis block in your config.json like below

    "redis": {
            "host": "127.0.0.1",
            "port": "6379",
            "password": "xxx",
            "database": "0"
        },
    
  • @baris said in Upgrade to 1.17.2 and cluster configurtaion:

    "redis": {
    "host": "127.0.0.1",
    "port": "6379",
    "password": "xxx",
    "database": "0"
    },

    Thank you, will do as you instructed and report back.

  • @esfandiar
    I ended up installing the latest OS and all required tool chain since support for ubuntu 19.10 has ended and repos are archived. Nodebb had no issues with Redis once the redis-server was started.
    I still have unrelated issue with NPM not creating global links of my plugin folders and linking to the nodebb instance like it did before. My script creates links for each plugin project but only the last link is accessible and the rest disappearing. Possibly NPM and dependency issues but I am still investigating.

    Thank you very much for your support.

  • E esfandiar has marked this topic as solved on
  • @baris

    Hi,

    Do we need to make any changes to nginx configuration? I am having problem to connect to production server using my previously working nginx/network settings. Newly installed Nginx version is 1.18.0 and loads without error. Could you please advise if any additional Redis related changes is required.

    Thank you in advance.

  • E esfandiar has marked this topic as unsolved on
  • @esfandiar No upgrading to 1.18.0 from 1.17.x should not require any changes to the nginx configuration. Can you share the nginx config that doesn't work? What errors are you getting or is it not loading at all?

  • @baris

    Thank you so much for confirming this. Since my config was working before, I changed my focus only to network and found the issue.

    In my nginx config I had:

    listen 80
    listen 443 default ssl
    

    Miraculously this had worked for last four years without issue. My server has 4 nic cards and nginx was listening to the wrong interface.
    Modified nginx config to bound it to the right ip:port to solve the issue.

    Happy to be back on-line and thanks for your support.

  • E esfandiar has marked this topic as solved on

Suggested Topics


  • 0 Votes
    4 Posts
    419 Views

    success!
    thanks 🙂

  • 0 Votes
    6 Posts
    459 Views

    @MJ said in ./nodebb upgrade not works:

    @creatxr

    cd nodebb (or path to where nodebb is installed)
    ./nodebb stop
    git fetch
    git checkout v1.12.x
    git merge origin/v1.12.x
    ./nodebb upgrade

    after upgrade

    ./nodebb start

    I have a "one liner" that I use like this. This is what I do...

    git fetch && git checkout v1.12.x && git pull && ./nodebb stop && npm i && ./nodebb upgrade && npm i && ./nodebb start && ./nodebb log

    I put the version right at the beginning so there is just one place to change it (a script and variable would be better, but I'm lazy.) I do the NPM install manually because it used to fail. Been using the same command since the 0.6.0 days, I'd guess. And I add the log at the end so that if I look away, I always see the log scrolling to know that things are okay.

  • 0 Votes
    15 Posts
    3k Views

    Thank you @PitaJ and @julian for your support! Everything works fine now.

    The error was because of a wrong security option in the settings and the speed of sendmail increased by itself. Probably there was a problem on the shared server during my first test.

    Keep up the great work! 🙇 NodeBB is really great!

  • 0 Votes
    1 Posts
    745 Views

    Hey,
    I have a problem after updating my forum to version 1.4.5 (from 1.4.2)
    The Problem is user cant login to there account.

    nodebb LOG:
    17/3 12:47:48 [21825] - warn: [deprecated] Accessing stylesheet.css from / is deprecated. Use /assets/stylesheet.css to access this file.
    17/3 12:47:48 [21825] - warn: [deprecated] Accessing nodebb.min.js from / is deprecated. Use /assets/nodebb.min.js to access this file.
    17/3 16:22:13 [21825] - warn: [deprecated] Accessing stylesheet.css from / is deprecated. Use /assets/stylesheet.css to access this file.
    17/3 16:22:13 [21825] - warn: [deprecated] Accessing nodebb.min.js from / is deprecated. Use /assets/nodebb.min.js to access this file.
    17/3 16:24:33 [21825] - warn: [deprecated] Accessing vendor/fontawesome/fonts/fontawesome-webfont.woff2 from / is deprecated. Use /assets/vendor/fontawesome/fonts/fontawesome-webfont.woff2 to access this file.
    17/3 16:24:58 [21825] - error: /login
    invalid csrf token

    Chrome DEV Log: WebSocket connection to 'wss://showgaming.de/socket.io/?EIO=3&transport=websocket&sid=theid....' failed: Error during WebSocket handshake: Unexpected response code: 404

    When you are already logged in evrything works fine, else comes a session expired invalide csrf token by login.
    I hope someone can help me with that problem,
    Have a nice day,
    Ezamik

  • 0 Votes
    3 Posts
    1k Views

    Problems in the permission of the files.
    chown -R [nodebbUser] [nodebbFolder]
    solved it 🙂