1👍
By default, mongoengine will try to connect to localhost. It is not finding a mongo instance there, which is the source of your error.
The ip-10-141-58-44.ec2.internal
is just the hostname of the server; it is not hardcoded anywhere.
Have a look at your settings.py
file, there should be a line such as:
connect('somenamehere')
Where ‘somenamehere’ is the name of your database; if such a line exists, then it is trying to connect to a mongo on the localhost.
Now you have two choices:
- Setup mongo on your localhost.
- Update
settings.py
and point it to the location of your mongo database installation. You can do this by passing in an extra parameterhost
,connect('somenamehere', host='10.10.10.1')
. See the documentation for more information.
Source:stackexchange.com