NodeBB wont start, Windows
-
Hi guys, i installed nodebb on my windows, but after the instalation, the nodebb wont start.
Output
2019-05-10T23:19:31.042Z [4567/11360] - [32minfo[39m: Initializing NodeBB v1.12.1 http://localhost:4567
2019-05-10T23:19:31.270Z [4567/11360] - [33mwarn[39m: You have no mongo username/password setup!
2019-05-10T23:19:31.318Z [4567/11360] - [31merror[39m: uncaughtException: Cannot create property 'host' on string 'C:\Program Files\MongoDB\Server\4.0\bin'I already tried with MongoD running and stopped.
And i checked the password, i open with the mongodbcommunity and did the auth with success...
the data at nodebb config file are right too..
{ "url": "http://localhost:4567", "secret": "7fb60f7f-0586-4114-8f49-3ef55e3c1792", "database": "mongo", "port": "4567", "mongo": { "host": "127.0.0.1", "port": "27017", "username": "nodebb", "password": "SOh3TbY", "database": "nodebb", "uri": "" } }
I dont know more what i can try.
-
Try removing the empty URI property
-
Same, the windows of nodebb starting on node keep closing,
{
"url": "http://localhost:4567",
"secret": "7fb60f7f-0586-4114-8f49-3ef55e3c1792",
"database": "mongo",
"port": "4567",
"mongo": {
"host": "127.0.0.1",
"port": "27017",
"username": "nodebb",
"password": "SOh3TbY",
"database": "nodebb",
}
}tried with only localhost and without PORT at url too.
-
What version of mongo do you have installed?
-
@PitaJ MongoDB server version: 4.0.5
-
I did a test auth with Studio 3D, and worked.. only doenst work with nodebb start.
-
I still with the problem
-
You have no mongo username/password setup!
This means your config doesn't have the username/password, I am guessing there is a problem with reading your config.json since the config.json you showed does have those fields.
NodeBB/src/database/mongo.js at master · NodeBB/NodeBB
Node.js based forum software built for the modern web - NodeBB/src/database/mongo.js at master · NodeBB/NodeBB
GitHub (github.com)
-
Hey @baris thanks for the answer, but idk how i can fix it.
-
@Reinaldo-Borin said in NodeBB wont start, Windows:
Hey @baris thanks for the answer, but idk how i can fix it.
Give us an ls -lah on that directory if you can.
-
@scottalanmiller said in NodeBB wont start, Windows:
ls -lah
Does has a similar command for windows?
EDIT:
dir -
@Reinaldo-Borin said in NodeBB wont start, Windows:
Does has a similar command for windows?
Oh sorry, I think that with powershell it is the same, though.
-
-lah and -la doesnt work on powershell
-
Sorry, Windows throwing me off.
In Windows you need CMD and the DIR command...
dir /q
For some reason, MS broke the DIR command and it doesn't keep working properly in PowerShell. (For future reference, supporting servers in Linux is so much easier than Windows.)
-
-
@Reinaldo-Borin Yup, that's what I suspected. The config.json file and some others have got the wrong file owners. Notice that almost everything in there is owned by ikkyy-p, but the Admin user now owns some of the others. My guess is that you installed as one user and ran an update as the admin by accident and it took ownership.
Just set everything in the folder back to ikkyy-p and I bet you will be all set!
-
but Ikkyy-P is my account administrator, i only have this account on my windows.
trying to get back the permission
-
2019-05-19T20:55:39.244Z [4567/11464] - [32minfo[39m: Initializing NodeBB v1.11.2 http://localhost:4567 2019-05-19T20:55:39.508Z [4567/11464] - [33mwarn[39m: You have no mongo username/password setup! 2019-05-19T20:55:39.561Z [4567/11464] - [31merror[39m: uncaughtException: Cannot create property 'host' on string 'C:\Program Files\MongoDB\Server\4.0\bin' TypeError: Cannot create property 'host' on string 'C:\Program Files\MongoDB\Server\4.0\bin' at Object.mongoModule.getConnectionString (D:\Programacao\nodebb\src\database\mongo.js:77:14) at Object.mongoModule.connect (D:\Programacao\nodebb\src\database\mongo.js:143:31) at Object.mongoModule.init (D:\Programacao\nodebb\src\database\mongo.js:116:14) at D:\Programacao\nodebb\src\start.js:21:7 at nextTask (D:\Programacao\nodebb\node_modules\async\dist\async.js:5324:14) at Object.waterfall (D:\Programacao\nodebb\node_modules\async\dist\async.js:5334:5) at Object.start.start (D:\Programacao\nodebb\src\start.js:19:8) at Object.<anonymous> (D:\Programacao\nodebb\app.js:90:25) at Module._compile (module.js:653:30) at Object.Module._extensions..js (module.js:664:10) {"error":{},"stack":"TypeError: Cannot create property 'host' on string 'C:\\Program Files\\MongoDB\\Server\\4.0\\bin'\n at Object.mongoModule.getConnectionString (D:\\Programacao\\nodebb\\src\\database\\mongo.js:77:14)\n at Object.mongoModule.connect (D:\\Programacao\\nodebb\\src\\database\\mongo.js:143:31)\n at Object.mongoModule.init (D:\\Programacao\\nodebb\\src\\database\\mongo.js:116:14)\n at D:\\Programacao\\nodebb\\src\\start.js:21:7\n at nextTask (D:\\Programacao\\nodebb\\node_modules\\async\\dist\\async.js:5324:14)\n at Object.waterfall (D:\\Programacao\\nodebb\\node_modules\\async\\dist\\async.js:5334:5)\n at Object.start.start (D:\\Programacao\\nodebb\\src\\start.js:19:8)\n at Object.<anonymous> (D:\\Programacao\\nodebb\\app.js:90:25)\n at Module._compile (module.js:653:30)\n at Object.Module._extensions..js (module.js:664:10)","exception":true,"date":"Sun May 19 2019 17:55:39 GMT-0300 (Hora oficial do Brasil)","process":{"pid":11464,"uid":null,"gid":null,"cwd":"D:\\Programacao\\nodebb","execPath":"C:\\Program Files\\nodejs\\node.exe","version":"v8.12.0","argv":["C:\\Program Files\\nodejs\\node.exe","D:\\Programacao\\nodebb\\app.js"],"memoryUsage":{"rss":49537024,"heapTotal":37650432,"heapUsed":20906064,"external":18370865}},"os":{"loadavg":[0,0,0],"uptime":79250.3929993},"trace":[{"column":14,"file":"D:\\Programacao\\nodebb\\src\\database\\mongo.js","function":"Object.mongoModule.getConnectionString","line":77,"method":"getConnectionString","native":false},{"column":31,"file":"D:\\Programacao\\nodebb\\src\\database\\mongo.js","function":"Object.mongoModule.connect","line":143,"method":"connect","native":false},{"column":14,"file":"D:\\Programacao\\nodebb\\src\\database\\mongo.js","function":"Object.mongoModule.init","line":116,"method":"init","native":false},{"column":7,"file":"D:\\Programacao\\nodebb\\src\\start.js","function":null,"line":21,"method":null,"native":false},{"column":14,"file":"D:\\Programacao\\nodebb\\node_modules\\async\\dist\\async.js","function":"nextTask","line":5324,"method":null,"native":false},{"column":5,"file":"D:\\Programacao\\nodebb\\node_modules\\async\\dist\\async.js","function":"Object.waterfall","line":5334,"method":"waterfall","native":false},{"column":8,"file":"D:\\Programacao\\nodebb\\src\\start.js","function":"Object.start.start","line":19,"method":"start","native":false},{"column":25,"file":"D:\\Programacao\\nodebb\\app.js","function":null,"line":90,"method":null,"native":false},{"column":30,"file":"module.js","function":"Module._compile","line":653,"method":"_compile","native":false},{"column":10,"file":"module.js","function":"Module._extensions..js","line":664,"method":".js","native":false}]} 2019-05-19T20:55:39.562Z [4567/11464] - [31merror[39m: Cannot create property 'host' on string 'C:\Program Files\MongoDB\Server\4.0\bin' TypeError: Cannot create property 'host' on string 'C:\Program Files\MongoDB\Server\4.0\bin' at Object.mongoModule.getConnectionString (D:\Programacao\nodebb\src\database\mongo.js:77:14) at Object.mongoModule.connect (D:\Programacao\nodebb\src\database\mongo.js:143:31) at Object.mongoModule.init (D:\Programacao\nodebb\src\database\mongo.js:116:14) at D:\Programacao\nodebb\src\start.js:21:7 at nextTask (D:\Programacao\nodebb\node_modules\async\dist\async.js:5324:14) at Object.waterfall (D:\Programacao\nodebb\node_modules\async\dist\async.js:5334:5) at Object.start.start (D:\Programacao\nodebb\src\start.js:19:8) at Object.<anonymous> (D:\Programacao\nodebb\app.js:90:25) at Module._compile (module.js:653:30) at Object.Module._extensions..js (module.js:664:10) 2019-05-19T20:55:42.684Z [4567/11464] - [32minfo[39m: [app] Shutdown (SIGTERM/SIGINT) Initialised. 3 restarts in 10 seconds, most likely an error on startup. Halting.
-
@Reinaldo-Borin said in NodeBB wont start, Windows:
but Ikkyy-P is my account administrator, i only have this account on my windows.
Well you have two different account owners in there and the local Administrator account seems to be the one causing the problem. Maybe everything should be owned by a third account and we just don't know what that is?
-
@scottalanmiller Hahha Looks like an account created by Mongo i guess.. i really idk what is happening here, going to format my windows, maybe.
Anyway, thanks for your help until now