After changed ip get badway 502 error and nodebb does not start

Technical Support
  • hi,
    i installed nodebb on aws ec2 and worked good. and i installed Let’s Encrypt on it. everything was good. then i changed my aws instance ip by elastic ip. after this i get 502 bad gateway error. i already update my new ip in /etc/nginx/sites-enabled/default.
    ssl is active, no problem. when i try ./nodebb start i get no such file or directory error.

    How can i solve this.

    thank you.

    edit:
    root@ip-12-1-3-65:~# node loader.js --no-silent --no-daemon
    module.js:328
    throw err;
    ^

    Error: Cannot find module '/root/loader.js'
    at Function.Module._resolveFilename (module.js:326:15)
    at Function.Module._load (module.js:277:25)
    at Function.Module.runMain (module.js:442:10)
    at startup (node.js:136:18)
    at node.js:966:3

  • ok, fixed problem, reboot again. but i dont know how.

    is this log normal ?

    node_redis: Warning: Redis server does not require a password, but a password was supplied.
    2/5 22:56:17 [1657] - info: [socket.io] Restricting access to origin: http://mydomain.net😘
    node_redis: Warning: Redis server does not require a password, but a password was supplied.
    node_redis: Warning: Redis server does not require a password, but a password was supplied.
    node_redis: Warning: Redis server does not require a password, but a password was supplied.
    node_redis: Warning: Redis server does not require a password, but a password was supplied.
    2/5 22:56:17 [1657] - info: Routes added
    2/5 22:56:17 [1657] - info: NodeBB Ready
    2/5 22:56:17 [1657] - info: Enabling 'trust proxy'
    2/5 22:56:17 [1657] - info: NodeBB is now listening on: 0.0.0.0:4567

    thank you.

  • Your forum may work, but has no security, anyone can login and delete/steal the database. You need to setup your redis so that it has a password, and that it restricts access to localhost.

  • @yariplus said in After changed ip get badway 502 error and nodebb does not start:

    Your forum may work, but has no security, anyone can login and delete/steal the database. You need to setup your redis so that it has a password, and that it restricts access to localhost.

    @yariplus thank you so much.


Suggested Topics


  • 0 Votes
    3 Posts
    80 Views

    You can see it working here
    https://aignite.nodebb.com/category/11

    Would be easy to add sort

  • How to get upvoted timestamp?

    Solved Technical Support
    0 Votes
    3 Posts
    122 Views

    @julian thanks!

  • NodeBB shuts down

    Unsolved Technical Support
    0 Votes
    4 Posts
    381 Views

    Worked
    Thanks

  • 0 Votes
    1 Posts
    452 Views

    Hey there!

    I have a nodebb instance i've been customizing through theming and plugins.

    I recently came across an issue that has prevented me from running ./nodebb start

    Clustering enabled: Spinning up 4 process(es).

    2019-07-22T06:23:35.139Z [4567/15633] - info: Initializing NodeBB v1.12.2 https://kratomwatchdog.com 2019-07-22T06:23:35.431Z [4567/15633] - error: NodeBB could not connect to your Mongo database. Mongo returned the following errorconnect ECONNREFUSED 127.0.0.1:27017 {"name":"MongoNetworkError","errorLabels":["TransientTransactionError"],"stack":"MongoNetworkError: connect ECONNREFUSED 127.0.0.1:27017\n at Socket.err (/home/ubuntu/nodebb/node_modules/mongodb/node_modules/mongodb-core/lib/connection/connect.js:287:16)\n at Object.onceWrapper (events.js:315:30)\n at emitOne (events.js:116:13)\n at Socket.emit (events.js:211:7)\n at emitErrorNT (internal/streams/destroy.js:66:8)\n at _combinedTickCallback (internal/process/next_tick.js:139:11)\n at process._tickCallback (internal/process/next_tick.js:181:9)"} 2019-07-22T06:23:35.443Z [4567/15633] - error: connect ECONNREFUSED 127.0.0.1:27017 {"name":"MongoNetworkError","errorLabels":["TransientTransactionError"]} 2019-07-22T06:23:35.446Z [4568/15638] - error: NodeBB could not connect to your Mongo database. Mongo returned the following errorconnect ECONNREFUSED 127.0.0.1:27017 {"name":"MongoNetworkError","errorLabels":["TransientTransactionError"],"stack":"MongoNetworkError: connect ECONNREFUSED 127.0.0.1:27017\n at Socket.err (/home/ubuntu/nodebb/node_modules/mongodb/node_modules/mongodb-core/lib/connection/connect.js:287:16)\n at Object.onceWrapper (events.js:315:30)\n at emitOne (events.js:116:13)\n at Socket.emit (events.js:211:7)\n at emitErrorNT (internal/streams/destroy.js:66:8)\n at _combinedTickCallback (internal/process/next_tick.js:139:11)\n at process._tickCallback (internal/process/next_tick.js:181:9)"} 2019-07-22T06:23:35.448Z [4568/15638] - error: connect ECONNREFUSED 127.0.0.1:27017 {"name":"MongoNetworkError","errorLabels":["TransientTransactionError"]} 2019-07-22T06:23:35.449Z [4569/15640] - error: NodeBB could not connect to your Mongo database. Mongo returned the following errorconnect ECONNREFUSED 127.0.0.1:27017 {"name":"MongoNetworkError","errorLabels":["TransientTransactionError"],"stack":"MongoNetworkError: connect ECONNREFUSED 127.0.0.1:27017\n at Socket.err (/home/ubuntu/nodebb/node_modules/mongodb/node_modules/mongodb-core/lib/connection/connect.js:287:16)\n at Object.onceWrapper (events.js:315:30)\n at emitOne (events.js:116:13)\n at Socket.emit (events.js:211:7)\n at emitErrorNT (internal/streams/destroy.js:66:8)\n at _combinedTickCallback (internal/process/next_tick.js:139:11)\n at process._tickCallback (internal/process/next_tick.js:181:9)"} [cluster] Child Process (15633) has exited (code: 0, signal: null) 2019-07-22T06:23:35.454Z [4569/15640] - error: connect ECONNREFUSED 127.0.0.1:27017 {"name":"MongoNetworkError","errorLabels":["TransientTransactionError"]} [cluster] Child Process (15638) has exited (code: 0, signal: null) [cluster] Child Process (15640) has exited (code: 0, signal: null) 2019-07-22T06:23:35.462Z [4570/15645] - error: NodeBB could not connect to your Mongo database. Mongo returned the following errorconnect ECONNREFUSED 127.0.0.1:27017 {"name":"MongoNetworkError","errorLabels":["TransientTransactionError"],"stack":"MongoNetworkError: connect ECONNREFUSED 127.0.0.1:27017\n at Socket.err (/home/ubuntu/nodebb/node_modules/mongodb/node_modules/mongodb-core/lib/connection/connect.js:287:16)\n at Object.onceWrapper (events.js:315:30)\n at emitOne (events.js:116:13)\n at Socket.emit (events.js:211:7)\n at emitErrorNT (internal/streams/destroy.js:66:8)\n at _combinedTickCallback (internal/process/next_tick.js:139:11)\n at process._tickCallback (internal/process/next_tick.js:181:9)"} 2019-07-22T06:23:35.464Z [4570/15645] - error: connect ECONNREFUSED 127.0.0.1:27017 {"name":"MongoNetworkError","errorLabels":["TransientTransactionError"]} [cluster] Child Process (15645) has exited (code: 0, signal: null)

    I am able to run nodebb in dev mode, and have had to run it in a screens session to keep the forum online until i'm able to resolve the issue.

  • 1 Votes
    6 Posts
    2k Views

    Hi guys, sorry I can't be of any help. I don't have any experience with IIS, but you seem to be on the right track, the client's IP should be forwarded to the node backend by your webserver.