Error on "./nodebb setup"

Technical Support

Suggested Topics


  • 0 Votes
    1 Posts
    267 Views

    My goal is to connect NodeBB to MongoDB only with unix socket.
    Found here that is possible to use unix socket with mongodb, also this link was helpfull but can't figure out how to solve this error.

    Why "error: failed to connect to server [%2Ftmp%2Fmongodb-1033.sock:27017]" there is default 27017 port, whats missing in this config?

    { "url": "http://www.example.net/forum", "secret": "secret", "database": "mongo", "port": [ "/home/forum/webapps/nodebb.sock" ], "mongo": { "uri": "mongodb://user:pass@%2Ftmp%2Fmongodb-1033.sock/db_name", } } 2019-05-24T20:31:32.180Z [/home/forum/webapps//nodebb.sock/10753] - error: uncaughtException: failed to connect to server [%2Ftmp%2Fmongodb-1033.sock:27017] on first connect [Error: getaddrinfo ENOTFOUND %2Ftmp%2Fmongodb-1033.sock at GetAddrInfoReqWrap.onlookup [as oncomplete] (dns.js:60:26) { name: 'MongoError', message: 'getaddrinfo ENOTFOUND %2Ftmp%2Fmongodb-1033.sock' }] MongoError: failed to connect to server [%2Ftmp%2Fmongodb-1033.sock:27017] on first connect [Error: getaddrinfo ENOTFOUND %2Ftmp%2Fmongodb-1033.sock at GetAddrInfoReqWrap.onlookup [as oncomplete] (dns.js:60:26) { name: 'MongoError', message: 'getaddrinfo ENOTFOUND %2Ftmp%2Fmongodb-1033.sock' }] at Pool.<anonymous> (/home/forum/webapps/nodebb/node_modules/mongodb-core/lib/topologies/server.js:336:35) at Pool.emit (events.js:196:13) at Connection.<anonymous> (/home/forum/webapps/nodebb/node_modules/mongodb-core/lib/connection/pool.js:280:12) at Object.onceWrapper (events.js:284:20) at Connection.emit (events.js:196:13) at Socket.<anonymous> (/home/forum/webapps/nodebb/node_modules/mongodb-core/lib/connection/connection.js:189:49) at Object.onceWrapper (events.js:284:20) at Socket.emit (events.js:196:13) at emitErrorNT (internal/streams/destroy.js:91:8) at emitErrorAndCloseNT (internal/streams/destroy.js:59:3) {"error":{"name":"MongoError","message":"failed to connect to server [%2Ftmp%2Fmongodb-1033.sock:27017] on first connect [Error: getaddrinfo ENOTFOUND %2Ftmp%2Fmongodb-1033.sock\n at GetAddrInfoReqWrap.onlookup [as oncomplete] (dns.js:60:26) {\n name: 'MongoError',\n message: 'getaddrinfo ENOTFOUND %2Ftmp%2Fmongodb-1033.sock'\n}]"},"stack":"MongoError: failed to connect to server [%2Ftmp%2Fmongodb-1033.sock:27017] on first connect [Error: getaddrinfo ENOTFOUND %2Ftmp%2Fmongodb-1033.sock\n at GetAddrInfoReqWrap.onlookup [as oncomplete] (dns.js:60:26) {\n name: 'MongoError',\n message: 'getaddrinfo ENOTFOUND %2Ftmp%2Fmongodb-1033.sock'\n}]\n at Pool.<anonymous> (/home/forum/webapps/nodebb/node_modules/mongodb-core/lib/topologies/server.js:336:35)\n at Pool.emit (events.js:196:13)\n at Connection.<anonymous> (/home/forum/webapps/nodebb/node_modules/mongodb-core/lib/connection/pool.js:280:12)\n at Object.onceWrapper (events.js:284:20)\n at Connection.emit (events.js:196:13)\n at Socket.<anonymous> (/home/forum/webapps/nodebb/node_modules/mongodb-core/lib/connection/connection.js:189:49)\n at Object.onceWrapper (events.js:284:20)\n at Socket.emit (events.js:196:13)\n at emitErrorNT (internal/streams/destroy.js:91:8)\n at emitErrorAndCloseNT (internal/streams/destroy.js:59:3)","exception":true,"date":"Fri May 24 2019 22:31:32 GMT+0200 (Central European Summer Time)","process":{"pid":10753,"uid":1003,"gid":100,"cwd":"/home/forum/webapps/nodebb","execPath":"/usr/local/bin/node","version":"v12.1.0","argv":["/usr/local/bin/node","/home/forum/webapps/nodebb/app.js"],"memoryUsage":{"rss":145326080,"heapTotal":101863424,"heapUsed":67882440,"external":37486265}},"os":{"loadavg":[0.060546875,0.142578125,0.166015625],"uptime":33249},"trace":[{"column":26,"file":"dns.js","function":"GetAddrInfoReqWrap.onlookup [as oncomplete]","line":60,"method":"onlookup [as oncomplete]","native":false},{"column":35,"file":"/home/forum/webapps/nodebb/node_modules/mongodb-core/lib/topologies/server.js","function":null,"line":336,"method":null,"native":false},{"column":13,"file":"events.js","function":"Pool.emit","line":196,"method":"emit","native":false},{"column":12,"file":"/home/forum/webapps/nodebb/node_modules/mongodb-core/lib/connection/pool.js","function":null,"line":280,"method":null,"native":false},{"column":20,"file":"events.js","function":"Object.onceWrapper","line":284,"method":"onceWrapper","native":false},{"column":13,"file":"events.js","function":"Connection.emit","line":196,"method":"emit","native":false},{"column":49,"file":"/home/forum/webapps/nodebb/node_modules/mongodb-core/lib/connection/connection.js","function":null,"line":189,"method":null,"native":false},{"column":20,"file":"events.js","function":"Object.onceWrapper","line":284,"method":"onceWrapper","native":false},{"column":13,"file":"events.js","function":"Socket.emit","line":196,"method":"emit","native":false},{"column":8,"file":"internal/streams/destroy.js","function":"emitErrorNT","line":91,"method":null,"native":false},{"column":3,"file":"internal/streams/destroy.js","function":"emitErrorAndCloseNT","line":59,"method":null,"native":false}]} 2019-05-24T20:31:32.180Z [/home/forum/webapps//nodebb.sock/10753] - error: failed to connect to server [%2Ftmp%2Fmongodb-1033.sock:27017] on first connect [Error: getaddrinfo ENOTFOUND %2Ftmp%2Fmongodb-1033.sock at GetAddrInfoReqWrap.onlookup [as oncomplete] (dns.js:60:26) { name: 'MongoError', message: 'getaddrinfo ENOTFOUND %2Ftmp%2Fmongodb-1033.sock' }] {"name":"MongoError"} 2019-05-24T20:31:32.181Z [/home/forum/webapps//nodebb.sock/10753] - info: [app] Shutdown (SIGTERM/SIGINT) Initialised. 2019-05-24T20:31:32.182Z [/home/forum/webapps//nodebb.sock/10753] - error: Server is not running.
  • 0 Votes
    5 Posts
    2k Views

    Glad to hear it @Jarko

  • 0 Votes
    4 Posts
    2k Views

    @nodebb789 did you work this out?

  • 0 Votes
    3 Posts
    1k Views

    @pichalite Thank you for the response.

    That was most peculiar, but I reset the config.json to be how it was and it stopped having this error.

    Besides I still think it's best to check data.config, before extracting data.config.loggedin anyway.

  • Nodebb dont work

    Technical Support
    0 Votes
    17 Posts
    5k Views

    @PitaJ Yes i wrote in 2 post first of this.

    I installed version 1.1.0 but when im logged , the site was again freezed. For this i deleted dump.rdb from redis folder and i redid "./nodebb setup" to re-create the database. After i tried to re-create the bug, for this i uploaded the same "Image/Logo" and change "Site Title" . But no problems.
    Now seems work all perfecly.

    There is a urgent bug in 1.1.2 . I think that there is a bug in the database.
    I noticed that at the beginning , before of the bug in 1.1.2 , the cover of profile didn't worked, the users upload the image , but was invisible "all white". Worked only the avatar.
    In 1.1.0 this bug there isn't and at the beginning , the cover of profile worked.
    There is something broken in 1.1.2 .....