Redis connection error in basic nodeBB setup.
-
This started with a package.json error when I ran ./nodebb setup - I hit this error 3 times and then on the 4th try I realised a chown to the sudo user "node" was required on the nodebb folder, but that didn't end the problems, redis failed connection was next up.
I've run this setup a few times before in the recent past and it worked fine - I don't understand fully grasp what has changed in that time.
Setups run:
ubuntu 18.04
nodejs 10/11
nodebb 1.11/1.12
(digitalicean droplet)Here is a dump of the chaos and again I'm assuming there is a provledges issue here.
node@nodebb:/home$ sudo chown -R node:node nodebb node@nodebb:/home$ cd nodebb node@nodebb:/home/nodebb$ ./nodebb setup package.json not found. Populating package.json... OK Dependencies outdated or not yet installed. Installing them now... npm WARN deprecated [email protected]: This module moved to @hapi/hawk. Please make sure to switch over as this distribution is no longer supported and may contain bugs and critical security issues. npm WARN deprecated [email protected]: This version has been deprecated in accordance with the hapi support policy (hapi.im/support). Please upgrade to the latest version to get the best features, bug fixes, and security patches. If you are unable to upgrade at this time, paid support is available for older versions (hapi.im/commercial). npm WARN deprecated [email protected]: This module moved to @hapi/sntp. Please make sure to switch over as this distribution is no longer supported and may contain bugs and critical security issues. npm WARN deprecated [email protected]: This version has been deprecated in accordance with the hapi support policy (hapi.im/support). Please upgrade to the latest version to get the best features, bug fixes, and security patches. If you are unable to upgrade at this time, paid support is available for older versions (hapi.im/commercial). npm WARN deprecated [email protected]: This version has been deprecated in accordance with the hapi support policy (hapi.im/support). Please upgrade to the latest version to get the best features, bug fixes, and security patches. If you are unable to upgrade at this time, paid support is available for older versions (hapi.im/commercial). > [email protected] install /home/nodebb/node_modules/benchpressjs > cd rust/benchpress-rs && npm install > [email protected] install /home/nodebb/node_modules/benchpressjs/rust/benchpress-rs > neon build >> build.log 2>&1 || exit 0 npm notice created a lockfile as package-lock.json. You should commit this file. added 87 packages from 83 contributors in 14.791s > [email protected] install /home/nodebb/node_modules/sharp > (node install/libvips && node install/dll-copy && prebuild-install) || (node-gyp rebuild && node install/dll-copy) info sharp Downloading https://github.com/lovell/sharp-libvips/releases/download/v8.7.4/libvips-8.7.4-linux-x64.tar.gz > [email protected] postinstall /home/nodebb/node_modules/preact > node -e "console.log('\u001b[35m\u001b[1mLove Preact? You can now donate to our open collective:\u001b[22m\u001b[39m\n > \u001b[34mhttps://opencollective.com/preact/donate\u001b[0m')" Love Preact? You can now donate to our open collective: > https://opencollective.com/preact/donate npm notice created a lockfile as package-lock.json. You should commit this file. npm WARN [email protected] requires a peer of textcomplete@^0.14.2 but none is installed. You must install peer dependencies yourself. added 659 packages from 766 contributors in 64.793s OK [benchpressjs] Unable to build or find a suitable native module, falling back to JS version 2019-04-24T12:30:08.498Z [17067] - info: NodeBB Setup Triggered via Command Line Welcome to NodeBB v1.12.1! 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 (cefac59b-6b61-4212-8721-af21187951c5) Which database to use (mongo) redis 2019-04-24T12:30:50.993Z [17067] - 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) 2019-04-24T12:30:57.722Z [17067] - error: Error: Redis connection to 127.0.0.1:6379 failed - connect ECONNREFUSED 127.0.0.1:6379 at TCPConnectWrap.afterConnect [as oncomplete] (net.js:1088:14) 2019-04-24T12:30:57.723Z [17067] - error: NodeBB could not connect to your Redis database. Redis returned the following errorRedis connection to 127.0.0.1:6379 failed - connect ECONNREFUSED 127.0.0.1:6379 {"errno":"ECONNREFUSED","code":"ECONNREFUSED","syscall":"connect","address":"127.0.0.1","port":6379,"stack":"Error: Redis connection to 127.0.0.1:6379 failed - connect ECONNREFUSED 127.0.0.1:6379\n at TCPConnectWrap.afterConnect [as oncomplete] (net.js:1088:14)"} 2019-04-24T12:30:57.723Z [17067] - warn: NodeBB Setup Aborted. Error: Redis connection to 127.0.0.1:6379 failed - connect ECONNREFUSED 127.0.0.1:6379 at TCPConnectWrap.afterConnect [as oncomplete] (net.js:1088:14)
@ this point I'm snow-blind so need to get some coffee!
-
OMG - Redis didn't setup properly all along!
I was using make and make install cmd that no longer worked.
Copyright © 2024 NodeBB | Contributors