NodeBB not couldn't start without sudo!?
-
When I am trying to start NodeBB without
sudo
it gives the following error:2018-08-26T06:14:14.539Z [29887] - info: Initializing NodeBB v1.10.1 https://forum.my-nodebb-forum.com 2018-08-26T06:14:15.792Z [29887] - error: NodeBB could not connect to your Mongo database. Mongo returned the following error message=connect ECONNREFUSED 127.0.0.1:27017, name=MongoNetworkError, stack=Error: connect ECONNREFUSED 127.0.0.1:27017 at Object._errnoException (util.js:992:11) at _exceptionWithHostPort (util.js:1014:20) at TCPConnectWrap.afterConnect [as oncomplete] (net.js:1186:14) 2018-08-26T06:14:15.799Z [29887] - error: message=connect ECONNREFUSED 127.0.0.1:27017, name=MongoNetworkError, stack=Error: connect ECONNREFUSED 127.0.0.1:27017 at Object._errnoException (util.js:992:11) at _exceptionWithHostPort (util.js:1014:20) at TCPConnectWrap.afterConnect [as oncomplete] (net.js:1186:14) [cluster] Child Process (29887) has exited (code: 0, signal: null)
What could be the possible issue? The site is behind Nginx and Cloudflare.
When I use
sudo
it works fineThanks in advance!
-
Look strange, there should be no problem running nodebb as standard user. The app tells you that its unable to connect to Mongodb (127.0.0.1:27017)
Correct perms in the tree ? Try to set the computers ip and not 127.0.0.1. Do you run mongodb on the same host?
-
@Jenkler Hi, Why it needs
sudo
to connect with db server? shouldn't there be also error. I will try replacing the ip. Let's see what happens. -
What are the permissions on your config file? You might have created it as the sudo user and now non-privileged users can't read it.
-
It does not need sudo to connect to a db server. But the error says that it cant connet too the db Something else must be wrong here!