Skip to content

Instantly share code, notes, and snippets.

@Domon
Created October 25, 2014 00:17
Show Gist options
  • Save Domon/3e98668ee34548f41a92 to your computer and use it in GitHub Desktop.
Save Domon/3e98668ee34548f41a92 to your computer and use it in GitHub Desktop.
MySQL connection errors from Plurk
Traceback (most recent call last):
File "/home/plurk/plurk/git_trunk/ext/parts/web/wsgiserver/__init__.py", line 1246, in communicate
req.respond()
File "/home/plurk/plurk/git_trunk/ext/parts/web/wsgiserver/__init__.py", line 758, in respond
self.server.gateway(self).respond()
File "/home/plurk/plurk/git_trunk/ext/parts/web/wsgiserver/__init__.py", line 1949, in respond
response = self.req.server.wsgi_app(self.env, self.start_response)
File "/home/plurk/plurk/git_trunk/ext/werkzeug/utils.py", line 859, in __call__
return self.app(environ, start_response)
File "/home/plurk/plurk/git_trunk/ext/parts/web/web.py", line 295, in dispatch_request
rv = handle_error()
File "/home/plurk/plurk/git_trunk/ext/parts/web/web.py", line 358, in handle_error
result = handler(e)
File "plurk/web/error_handler.py", line 70, in error_handler
trace_back=t_b)
File "plurk/templates.py", line 144, in renderPlurkTemplate
GLOBAL = kwargs['GLOBAL'] = globalVariable( **kwargs)
File "plurk/users.py", line 514, in globalVariable
ses_user = getCurrentUser()
File "plurk/users.py", line 44, in getCurrentUser
user = Users().getUserById(uid, full_info=True)
File "plurk/models/users.py", line 496, in getUserById
as_one=True)
File "/home/plurk/plurk/git_trunk/ext/parts/db/wrapper.py", line 121, in select
with self.cursor(sql) as cursor:
File "/home/plurk/plurk/git_trunk/ext/parts/db/wrapper.py", line 55, in cursor
con = self.connections.getConnection(host)
File "/home/plurk/plurk/git_trunk/ext/parts/db/wrapper.py", line 578, in getConnection
(pprint.pformat(attempts), dbinfo, exception))
Exception: Could not create a connection on server [{'charset': 'utf8',
'compress': False,
'exception': 'Traceback (most recent call last):\n File "/home/plurk/plurk/git_trunk/ext/parts/db/wrapper.py", line 557, in getConnection\n con = MySQLdb.Connect(**conf)\n File "/usr/local/lib/python2.6/dist-packages/MySQL_python-1.2.3-py2.6-linux-x86_64.egg/MySQLdb/__init__.py", line 81, in Connect\n return Connection(*args, **kwargs)\n File "/usr/local/lib/python2.6/dist-packages/MySQL_python-1.2.3-py2.6-linux-x86_64.egg/MySQLdb/connections.py", line 187, in __init__\n super(Connection, self).__init__(*args, **kwargs2)\nOperationalError: (2003, "Can\'t connect to MySQL server on \'192.168.0.227\' (110)")\n',
'host': u'192.168.0.227',
'passwd': u'plurk',
'port': 3306,
'refresh': True,
'refresh_host': u'192.168.0.227',
'use_unicode': True,
'user': u'plurk'},
{'charset': 'utf8',
'compress': False,
'exception': 'Traceback (most recent call last):\n File "/home/plurk/plurk/git_trunk/ext/parts/db/wrapper.py", line 557, in getConnection\n con = MySQLdb.Connect(**conf)\n File "/usr/local/lib/python2.6/dist-packages/MySQL_python-1.2.3-py2.6-linux-x86_64.egg/MySQLdb/__init__.py", line 81, in Connect\n return Connection(*args, **kwargs)\n File "/usr/local/lib/python2.6/dist-packages/MySQL_python-1.2.3-py2.6-linux-x86_64.egg/MySQLdb/connections.py", line 187, in __init__\n super(Connection, self).__init__(*args, **kwargs2)\nOperationalError: (2003, "Can\'t connect to MySQL server on \'192.168.0.227\' (110)")\n',
'host': u'192.168.0.227',
'passwd': u'plurk',
'port': 3306,
'refresh': True,
'refresh_host': u'192.168.0.227',
'use_unicode': True,
'user': u'plurk'},
{'charset': 'utf8',
'compress': False,
'exception': 'Traceback (most recent call last):\n File "/home/plurk/plurk/git_trunk/ext/parts/db/wrapper.py", line 557, in getConnection\n con = MySQLdb.Connect(**conf)\n File "/usr/local/lib/python2.6/dist-packages/MySQL_python-1.2.3-py2.6-linux-x86_64.egg/MySQLdb/__init__.py", line 81, in Connect\n return Connection(*args, **kwargs)\n File "/usr/local/lib/python2.6/dist-packages/MySQL_python-1.2.3-py2.6-linux-x86_64.egg/MySQLdb/connections.py", line 187, in __init__\n super(Connection, self).__init__(*args, **kwargs2)\nOperationalError: (2003, "Can\'t connect to MySQL server on \'192.168.0.227\' (110)")\n',
'host': u'192.168.0.227',
'passwd': u'plurk',
'port': 3306,
'refresh': True,
'refresh_host': u'192.168.0.227',
'use_unicode': True,
'user': u'plurk'}]
.{'charset': 'utf8', 'db': '', 'compress': False, 'host': u'192.168.0.227', 'balancing': u'host', 'user': u'plurk', 'password': u'plurk', 'id': 2L, 'name': u'db02_db01', 'use_unicode': True, 'server_name': 'plurk_group002', '_rhost': u'192.168.0.227', 'resolve_host': <function resolve_host at 0x5ae67d0>, 'shard_info': {'name': u'db02_db01', 'port': 3306, 'host': u'192.168.0.227', 'host_extra': u'192.168.0.226', 'balancing': u'host', 'user': u'plurk', 'password': u'plurk', 'id': 2L}, 'port': 3306, 'host_extra': u'192.168.0.226', 'refresh_host': <function refresh_host at 0x5585c80>}
Error was
Traceback (most recent call last):
File "/home/plurk/plurk/git_trunk/ext/parts/db/wrapper.py", line 557, in getConnection
con = MySQLdb.Connect(**conf)
File "/usr/local/lib/python2.6/dist-packages/MySQL_python-1.2.3-py2.6-linux-x86_64.egg/MySQLdb/__init__.py", line 81, in Connect
return Connection(*args, **kwargs)
File "/usr/local/lib/python2.6/dist-packages/MySQL_python-1.2.3-py2.6-linux-x86_64.egg/MySQLdb/connections.py", line 187, in __init__
super(Connection, self).__init__(*args, **kwargs2)
OperationalError: (2003, "Can't connect to MySQL server on '192.168.0.227' (110)")
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment