前夜のドキュメントの例を実行しているときに、データベースに関する次のエラーが発生します。誰でも私を助けて知っています。テクノロジーは、前夜のフレームワークとmongodbを使用しています。基本的なエラーなので、誰でも解決できます。
settings.py
MONGO_HOST = 'localhost'
MONGO_PORT = 5000
MONGO_USERNAME = 'user'
MONGO_PASSWORD = 'user'
MONGO_DBNAME = 'apitest'
DOMAIN = {'people': {}}
error
(tornado_weber_env)weber@weber-desktop:~/tornado_weber_env/testing$ python run.py
Traceback (most recent call last):
File "run.py", line 3, in
app = Eve()
File "/home/weber/tornado_weber_env/local/lib/python2.7/site-packages/eve/flaskapp.py",
line 136, in init
self.data = data(self)
File "/home/weber/tornado_weber_env/local/lib/python2.7/site-packages/eve/io/base.py",
line 100, in init
self.init_app(self.app)
File "/home/weber/tornado_weber_env/local/lib/python2.7/site-
packages/eve/io/mongo/mongo.py", line 73, in init_app
raise ConnectionException(e)
eve.io.base.ConnectionException: Error initializing the driver. Make sure the database
server is running. Driver exception: OperationFailure(u"command SON([('authenticate', 1),
('user', u'user'), ('nonce', u'6d4bfd537685c4b4'), ('key',
u'f846d47fa6ee80a42807cc2e7bf8b8cf')]) failed: auth failed",)
(tornado_weber_env)weber@weber-desktop:~/tornado_weber_env/testing$ python run.py
Traceback (most recent call last):
File "run.py", line 3, in
app = Eve()
File "/home/weber/tornado_weber_env/local/lib/python2.7/site-packages/eve/flaskapp.py",
line 136, in init
self.data = data(self)
File "/home/weber/tornado_weber_env/local/lib/python2.7/site-packages/eve/io/base.py",
line 100, in init
self.init_app(self.app)
File "/home/weber/tornado_weber_env/local/lib/python2.7/site-
packages/eve/io/mongo/mongo.py", line 73, in init_app
raise ConnectionException(e)
eve.io.base.ConnectionException: Error initializing the driver. Make sure the database
server is running. Driver exception: Connection Failure('[Err no 111] Connection refused',)