Django syncdb引发MySQL socket.error:[Errno 111]连接被拒绝

时间:2013-02-05 00:22:31

标签: python mysql django sockets syncdb

我已经配置了很多服务器并多次部署了这个项目,但这是我第一次遇到这个问题。

我可以通过命令行和Sequel Pro连接到MySQL,只是Django特定的命令会产生这个错误。

(Staging)optimal@Simon:/var/virtualenvs/Staging/app$ python manage.py syncdb
Traceback (most recent call last):
  File "manage.py", line 11, in <module>
    execute_manager(settings)
  File "/var/virtualenvs/Staging/lib/python2.7/site-packages/django/core/management/__init__.py", line 438, in execute_manager
    utility.execute()
  File "/var/virtualenvs/Staging/lib/python2.7/site-packages/django/core/management/__init__.py", line 379, in execute
    self.fetch_command(subcommand).run_from_argv(self.argv)
  File "/var/virtualenvs/Staging/lib/python2.7/site-packages/django/core/management/base.py", line 191, in run_from_argv
    self.execute(*args, **options.__dict__)
  File "/var/virtualenvs/Staging/lib/python2.7/site-packages/django/core/management/base.py", line 219, in execute
    self.validate()
  File "/var/virtualenvs/Staging/lib/python2.7/site-packages/django/core/management/base.py", line 249, in validate
    num_errors = get_validation_errors(s, app)
  File "/var/virtualenvs/Staging/lib/python2.7/site-packages/django/core/management/validation.py", line 36, in get_validation_errors
    for (app_name, error) in get_app_errors().items():
  File "/var/virtualenvs/Staging/lib/python2.7/site-packages/django/db/models/loading.py", line 146, in get_app_errors
    self._populate()
  File "/var/virtualenvs/Staging/lib/python2.7/site-packages/django/db/models/loading.py", line 61, in _populate
    self.load_app(app_name, True)
  File "/var/virtualenvs/Staging/lib/python2.7/site-packages/django/db/models/loading.py", line 78, in load_app
    models = import_module('.models', app_name)
  File "/var/virtualenvs/Staging/lib/python2.7/site-packages/django/utils/importlib.py", line 35, in import_module
    __import__(name)
  File "/var/virtualenvs/Staging/releases/20130204145734/apps/orpheus/files/models.py", line 17, in <module>
    from orpheus.orders.models import Order
  File "/var/virtualenvs/Staging/releases/20130204145734/apps/orpheus/orders/models.py", line 29, in <module>
    from orpheus.variable_images.models import Newsletter
  File "/var/virtualenvs/Staging/releases/20130204145734/apps/orpheus/variable_images/models.py", line 144, in <module>
    class Topper(mixins.ModifiedDates):
  File "/var/virtualenvs/Staging/releases/20130204145734/apps/orpheus/variable_images/models.py", line 149, in Topper
    file = CouchDBFileField(storage=LongTermStorage(), blank=True)
  File "/var/virtualenvs/Staging/releases/20130204145734/apps/orpheus/files/storage.py", line 183, in __init__
    self.db = server[kwargs.get('database')]    
  File "/var/virtualenvs/Staging/lib/python2.7/site-packages/couchdb/client.py", line 137, in __getitem__
    db.resource.head() # actually make a request to the database
  File "/var/virtualenvs/Staging/lib/python2.7/site-packages/couchdb/http.py", line 377, in head
    return self._request('HEAD', path, headers=headers, **params)
  File "/var/virtualenvs/Staging/lib/python2.7/site-packages/couchdb/http.py", line 419, in _request
    credentials=self.credentials)
  File "/var/virtualenvs/Staging/lib/python2.7/site-packages/couchdb/http.py", line 239, in request
    resp = _try_request_with_retries(iter(self.retry_delays))
  File "/var/virtualenvs/Staging/lib/python2.7/site-packages/couchdb/http.py", line 205, in _try_request_with_retries
    raise e
socket.error: [Errno 111] Connection refused

我只是希望有一个明显的解决方案,我忽略了。希望其他人遇到这个问题,我没有找到任何使用谷歌的东西。

0 个答案:

没有答案