"Failed login attempt, please try again. Invalid User Data" when attempting login as admin
-
@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.