"Failed login attempt, please try again. Invalid User Data" when attempting login as admin
-
@MarximusMG could be.
Therefore I would run the following commands:
apt-get remove redis*
apt-get purge redis*Lets move to the latest Redis:
apt-get install software-properties-common python-software-properties
sudo add-apt-repository ppa:chris-lea/redis-server
sudo apt-get update
sudo apt-get install redis-serverYou now can try to redo the installation and see if the error still occurs.
-
@AOKP Ran those commands, then used
cd mynodebb
as non-root user, thennode app
and I get the following output:23/1 02:19 [4918] - info: NodeBB v0.9.3 Copyright (C) 2013-2014 NodeBB Inc. 23/1 02:19 [4918] - info: This program comes with ABSOLUTELY NO WARRANTY. 23/1 02:19 [4918] - info: This is free software, and you are welcome to redistribute it under certain conditions. 23/1 02:19 [4918] - info: 23/1 02:19 [4918] - info: Time: Sat Jan 23 2016 02:19:54 GMT-0500 (EST) 23/1 02:19 [4918] - info: Initializing NodeBB v0.9.3 23/1 02:19 [4918] - error: Error: EACCES, permission denied '/home/mark/mynodebb/public/templates/403.tpl' at Object.fs.unlinkSync (fs.js:772:18) at rimrafSync (/home/mark/mynodebb/node_modules/rimraf/rimraf.js:297:17) at /home/mark/mynodebb/node_modules/rimraf/rimraf.js:332:5 at Array.forEach (native) at rmkidsSync (/home/mark/mynodebb/node_modules/rimraf/rimraf.js:331:26) at rmdirSync (/home/mark/mynodebb/node_modules/rimraf/rimraf.js:324:7) at Function.rimrafSync [as sync] (/home/mark/mynodebb/node_modules/rimraf/rimraf.js:295:9) at /home/mark/mynodebb/src/meta/templates.js:50:10 at /home/mark/mynodebb/src/plugins.js:176:5 at /home/mark/mynodebb/node_modules/async/lib/async.js:52:16 Error: EACCES, permission denied '/home/mark/mynodebb/public/templates/403.tpl' at Object.fs.unlinkSync (fs.js:772:18) at rimrafSync (/home/mark/mynodebb/node_modules/rimraf/rimraf.js:297:17) at /home/mark/mynodebb/node_modules/rimraf/rimraf.js:332:5 at Array.forEach (native) at rmkidsSync (/home/mark/mynodebb/node_modules/rimraf/rimraf.js:331:26) at rmdirSync (/home/mark/mynodebb/node_modules/rimraf/rimraf.js:324:7) at Function.rimrafSync [as sync] (/home/mark/mynodebb/node_modules/rimraf/rimraf.js:295:9) at /home/mark/mynodebb/src/meta/templates.js:50:10 at /home/mark/mynodebb/src/plugins.js:176:5 at /home/mark/mynodebb/node_modules/async/lib/async.js:52:16 23/1 02:19 [4918] - info: [app] Shutdown (SIGTERM/SIGINT) Initialised. 23/1 02:19 [4918] - info: [app] Database connection closed. net.js:1237 throw new Error('Not running'); ^ Error: Not running at Server.close (net.js:1237:11) at shutdown (/home/mark/mynodebb/app.js:307:36) at process.<anonymous> (/home/mark/mynodebb/app.js:176:3) at process.emit (events.js:95:17) at process._fatalException (node.js:301:26) mark@luusid:~/mynodebb$ events.js:72 throw er; // Unhandled 'error' event ^ Error: channel closed at process.target.send (child_process.js:406:26) at minifyScripts (/home/mark/mynodebb/minifier.js:55:11) at /home/mark/mynodebb/minifier.js:23:4 at /home/mark/mynodebb/node_modules/async/lib/async.js:414:13 at /home/mark/mynodebb/node_modules/async/lib/async.js:52:16 at done (/home/mark/mynodebb/node_modules/async/lib/async.js:246:17) at /home/mark/mynodebb/node_modules/async/lib/async.js:44:16 at /home/mark/mynodebb/node_modules/async/lib/async.js:411:17 at /home/mark/mynodebb/src/file.js:72:3 at Object.oncomplete (fs.js:108:15)
I then changed permissions by running
sudo chown -R mark:mark .
, and then rannode app
and got it to run:23/1 02:24 [4934] - info: NodeBB v0.9.3 Copyright (C) 2013-2014 NodeBB Inc. 23/1 02:24 [4934] - info: This program comes with ABSOLUTELY NO WARRANTY. 23/1 02:24 [4934] - info: This is free software, and you are welcome to redistribute it under certain conditions. 23/1 02:24 [4934] - info: 23/1 02:24 [4934] - info: Time: Sat Jan 23 2016 02:24:30 GMT-0500 (EST) 23/1 02:24 [4934] - info: Initializing NodeBB v0.9.3 23/1 02:24 [4934] - info: NodeBB Ready 23/1 02:24 [4934] - info: Enabling 'trust proxy' 23/1 02:24 [4934] - info: NodeBB is now listening on: 0.0.0.0:4567
HOWEVER... when I visit the subdomain that should display the NodeBB installation, I see that it's broken:
At this point, as this is a newer install, I'm not sure if I should just cut my losses and start fresh. That being said, it seems that something is going wrong during the standard (though as far as I can tell I'm following the official tutorial religiously) so I'm unsure if I'll just continue to run into this issue.
-
@MarximusMG re run ./nodebb setup and then ./nodebb start.
-
@AOKP just did that. Ran
./nodebb setup
and configured a new admin account. Once I confirmed password, I got this error:/home/mark/mynodebb/node_modules/redis/index.js:611 command_obj.callback(err); ^ TypeError: command_obj.callback is not a function at RedisClient.return_error (/home/mark/mynodebb/node_modules/redis/index.js:611:21) at JavascriptReplyParser.reply_parser.send_error (/home/mark/mynodebb/node_modules/redis/index.js:329:14) at JavascriptReplyParser.run (/home/mark/mynodebb/node_modules/redis/lib/parsers/javascript.js:130:18) at JavascriptReplyParser.execute (/home/mark/mynodebb/node_modules/redis/lib/parsers/javascript.js:107:10) at Socket.<anonymous> (/home/mark/mynodebb/node_modules/redis/index.js:131:27) at emitOne (events.js:77:13) at Socket.emit (events.js:169:7) at readableAddChunk (_stream_readable.js:146:16) at Socket.Readable.push (_stream_readable.js:110:10) at TCP.onread (net.js:523:20)
I then ran
./nodebb start
, which seemed successful, but when visiting the subdomain in my browser I saw the 502 Bad Gateway page, so I rannode app
and got this:23/1 14:49 [1714] - info: NodeBB v0.9.3 Copyright (C) 2013-2014 NodeBB Inc. 23/1 14:49 [1714] - info: This program comes with ABSOLUTELY NO WARRANTY. 23/1 14:49 [1714] - info: This is free software, and you are welcome to redistribute it under certain conditions. 23/1 14:49 [1714] - info: 23/1 14:49 [1714] - info: Time: Sat Jan 23 2016 14:49:39 GMT-0500 (EST) 23/1 14:49 [1714] - info: Initializing NodeBB v0.9.3 <--- Last few GCs ---> 10532 ms: Scavenge 93.6 (117.0) -> 83.1 (121.0) MB, 42.8 / 0 ms [allocation failure]. 10734 ms: Scavenge 97.3 (121.0) -> 83.5 (122.0) MB, 20.9 / 0 ms (+ 70.7 ms in 211 steps since last GC) [allocation failure]. 10912 ms: Scavenge 99.2 (122.0) -> 83.6 (123.0) MB, 1.7 / 0 ms (+ 60.4 ms in 239 steps since last GC) [allocation failure]. 11095 ms: Scavenge 99.3 (123.0) -> 83.6 (123.0) MB, 5.5 / 0 ms (+ 67.2 ms in 240 steps since last GC) [allocation failure]. <--- JS stacktrace ---> ==== JS stack trace ========================================= Security context: 0x1baa998b4629 <JS Object> 2: genCSS [/home/mark/mynodebb/node_modules/less/lib/less/tree/ruleset.js:~311] [pc=0x36ee8e56d9ed] (this=0x380666ac94d1 <JS Object>,context=0x813fad1f939 <an Object with map 0x3e3e40924d39>,output=0x813fad1fa39 <an Object with map 0x388e9e84d6e9>) 3: toCSS [/home/mark/mynodebb/node_modules/less/lib/less/tree/node.js:5] [pc=0x36ee8e478255] (this=0x380666ac94d1 <JS Object>,context=0x813f... FATAL ERROR: Malloced operator new Allocation failed - process out of memory
The app is installed on a 512MB Ram 20GB SSD Disk Digital Ocean droplet. I hadn't thought I would need to, but do I have to upgrade it in order for it to handle this?
Regardless, I power cycled the droplet from the DO console, and cd'd back to the root directory of the NodeBB install. I had read on another thread here that someone received a similar error upon running ./nodebb setup, so I used what seemed to be their solution by running
npm install
to make sure everything was up-to-date. I then rannode app
, and got a successful output:23/1 15:06 [1110] - info: NodeBB v0.9.3 Copyright (C) 2013-2014 NodeBB Inc. 23/1 15:06 [1110] - info: This program comes with ABSOLUTELY NO WARRANTY. 23/1 15:06 [1110] - info: This is free software, and you are welcome to redistribute it under certain conditions. 23/1 15:06 [1110] - info: 23/1 15:06 [1110] - info: Time: Sat Jan 23 2016 15:06:03 GMT-0500 (EST) 23/1 15:06 [1110] - info: Initializing NodeBB v0.9.3 23/1 15:06 [1110] - info: NodeBB Ready 23/1 15:06 [1110] - info: Enabling 'trust proxy' 23/1 15:06 [1110] - info: NodeBB is now listening on: 0.0.0.0:4567
Visited the subdomain, all looks to be in working order, but went to login with the new admin account I just set up, and got the same "Invalid User Data" error. Don't know where things are going wrong here.
-
@MarximusMG try running "npm i" and see if it works flawlessly. If it does, run ./nodebb setup and then run ./nodebb start again.
However, be sure that there are no errors when running npm i and ./nodebb setup.
-
@AOKP removed Redis, then reinstalled it. Ran npm install without issue, but when I ran ./nodebb setup I got this same error:
/home/mark/mynodebb/node_modules/redis/index.js:611 command_obj.callback(err); ^ TypeError: command_obj.callback is not a function at RedisClient.return_error (/home/mark/mynodebb/node_modules/redis/index.js:611:21) at JavascriptReplyParser.reply_parser.send_error (/home/mark/mynodebb/node_modules/redis/index.js:329:14) at JavascriptReplyParser.run (/home/mark/mynodebb/node_modules/redis/lib/parsers/javascript.js:130:18) at JavascriptReplyParser.execute (/home/mark/mynodebb/node_modules/redis/lib/parsers/javascript.js:107:10) at Socket.<anonymous> (/home/mark/mynodebb/node_modules/redis/index.js:131:27) at emitOne (events.js:77:13) at Socket.emit (events.js:169:7) at readableAddChunk (_stream_readable.js:146:16) at Socket.Readable.push (_stream_readable.js:110:10) at TCP.onread (net.js:523:20)
-
@MarximusMG are you on latest master?
Run git pull maybe to verify.Additionally lets mark @administrators so we are sure it is not a code related issue.
-
mark@lifesweetened:~/mynodebb$ git pull remote: Counting objects: 38, done. remote: Compressing objects: 100% (38/38), done. remote: Total 38 (delta 10), reused 0 (delta 0), pack-reused 0 Unpacking objects: 100% (38/38), done. From git://github.com/designcreateplay/NodeBB cedda11..32466d8 master -> origin/master Updating cedda11..32466d8 Fast-forward package.json | 4 +-- public/less/admin/general/navigation.less | 4 +++ public/src/modules/navigator.js | 5 ++-- src/privileges/helpers.js | 8 ++---- src/topics/follow.js | 42 ++++++++++++++++++------------- src/user/create.js | 2 +- src/user/settings.js | 6 ++--- src/views/admin/general/navigation.tpl | 5 ---- 8 files changed, 39 insertions(+), 37 deletions(-)
-
@MarximusMG seems like you weren't. Run npm i again and repeat all the commands (./nodebb setup).
-
@AOKP before running that again, is there anything I may be missing in terms of where that should be run? Is it ok that I'm running it in the NodeBB root directory as a non root user?
-
@MarximusMG basically it should work as non-root, however I would try running it as root, just to be sure.
Use sudo su, to gain root privileges.
-
@AOKP said:
@MarximusMG basically it should work as non-root, however I would try running it as root, just to be sure.
Use sudo su, to gain root privileges.
Ahhhhhhh! Teaching kids bad manners, you should setup a new user, and load it from under that user. Only need to install redis/mongo/node/npm etc from root. Rest of the users added to the system should be able to use it without issue as long as they have it within their own file structure/ownership.
As to the Error obviously this is still an issue in redis. Is redis working?
Try this in SSH: redis-cli pingIt should return with a pong if its up. Otherwise check error logs to find out why redis isn't running properly systemctl etc.
What version of redis is installed? -
@Joykiller there is no issue setting NodeBB up as root. I always do it like that and later chown the installation to another user. Then I start NodeBB over Supervisoe from that non-root user.
Update:
All issues resolved.
Re-setup everything.