never mind been a while since i installed nodedbb, that prompt was for database = redis not the redis db number which came later on 🙂./nodebb setup 1/8 09:58  - info: NodeBB Setup Triggered via Command Line Welcome to NodeBB! This looks like a new installation, so you'll have to answer a few questions about your environment before we can proceed. Press enter to accept the default setting (shown in brackets). URL used to access this NodeBB (http://localhost:4567) Please enter a NodeBB secret (09df113d-0255-48b7-8e21-c2d0eba3be54) Which database to use (redis) 1/8 09:58  - info: Now configuring redis database: Host IP or address of your Redis instance (127.0.0.1) Host port of your Redis instance (6379) Password of your Redis database Which database to use (0..n) (0) 3 Configuration Saved OK firstname.lastname@example.org node_modules/redis email@example.com node_modules/connect-redis └── firstname.lastname@example.org (email@example.com) Populating database with default configs, if not already set... Enabling default theme: Persona No categories found, populating instance with default categories 1/8 09:59  - warn: No administrators have been detected, running initial user setup
NodeBB Startup Error // 502 Bad Gateway
I recently updated a nodebb template file in a theme, and when I restarted NodeBB, it will not start, it keeps crashing.
I am getting 502 Bad Gateway on the website (using nginx proxy)
Here is my log, any ideas?
27/12 05:19  - info: Time: Sun Dec 27 2015 05:19:24 GMT-0500 (EST)
27/12 05:19  - info: Initializing NodeBB v0.8.2
27/12 05:19  - info: [database] Checking database indices.
27/12 05:19  - warn: [socket.io] Clustering detected, you are advised to configure Redis as a websocket store.
27/12 05:19  - info: [plugins/spam-be-gone] Settings loaded
27/12 05:19  - info: NodeBB Ready
27/12 05:19  - info: Enabling 'trust proxy'
27/12 05:19  - info: NodeBB is now listening on: 0.0.0.0:4567
27/12 05:19  - error: undefined
27/12 05:19  - info: [app] Shutdown (SIGTERM/SIGINT) Initialised.
27/12 05:19  - info: [app] Database connection closed.
27/12 05:19  - info: [app] Web server closed to connections.
27/12 05:19  - info: [app] Shutdown complete.
3 restarts in 10 seconds, most likely an error on startup. Halting.
because your nodebb is shutdown and nobody lissten to 4567 port!
I am trying to start it back up again, and it won't start. It just shuts down when I load the page.
run nodebb with
./nodebb devand see errors, fix them, then run it with
Ok, didn't think to use that thanks, this is my error, any idea how to fix it?
error: Error: listen EADDRINUSE
at errnoException (net.js:901:11)
at Server._listen2 (net.js:1039:14)
at listen (net.js:1061:10)
at Server.listen (net.js:1135:5)
at listen (/root/website/nodebb/src/webserver.js:180:17)
at EventEmitter.<anonymous> (/root/website/nodebb/src/emitter.js:17:5)
at EventEmitter.emit (events.js:92:17)
27/12 06:14  - error: NodeBB address in use, exiting...
[cluster] Child Process (20324) has exited (code: 0, signal: null)
./nodebb stopand kill any possess that listen to nodebb Port,
you can change nodebb port in
after that run
27/12 05:19  - error: undefined
This is usually caused by a syntax error in one of the templates. If
templates.jsgoes into a infinite loop while parsing the templates it prints that not so useful error message. Make sure your template has proper t.js syntax, ie follow the whitespace rules to the letter. Check out one the persona templates for reference.
@baris I figured it was a template error since all these problems happened after editing one of the templates, but I reverted the template back to the working version before my edits, and I just can't seem to get NodeBB to start back up. I'll look into the template again and see if there is any issues I can spot.
Alright, problem fixed, thanks guys.
It was because of the template whitespace/indents messing up since I was copying from a file into the terminal.