<class 'mysql.connector.errors.InterfaceError'>
Python 2.7.6: /usr/bin/python
Sat Nov 17 01:11:56 2018

A problem occurred in a Python script. Here is the sequence of function calls leading up to the error, in the order they occurred.

 /usr/lib/python2.7/dist-packages/flup/server/fcgi_base.py in run(self=<flup.server.fcgi_base.Request object>)
    556         """Runs the handler, flushes the streams, and ends the request."""
    557         try:
=>  558             protocolStatus, appStatus = self.server.handler(self)
    559         except:
    560             traceback.print_exc(file=self.stderr)
protocolStatus undefined, appStatus undefined, self = <flup.server.fcgi_base.Request object>, self.server = <flup.server.fcgi.WSGIServer object>, self.server.handler = <bound method WSGIServer.handler of <flup.server.fcgi.WSGIServer object>>
 /usr/lib/python2.7/dist-packages/flup/server/fcgi_base.py in handler(self=<flup.server.fcgi.WSGIServer object>, req=<flup.server.fcgi_base.Request object>)
   1116         try:
   1117             try:
=> 1118                 result = self.application(environ, start_response)
   1119                 try:
   1120                     for data in result:
result = None, self = <flup.server.fcgi.WSGIServer object>, self.application = <Flask 'frontend'>, environ = {'CONTENT_LENGTH': '0', 'CONTEXT_DOCUMENT_ROOT': '/usr/local/share/avolon/web', 'CONTEXT_PREFIX': '', 'DOCUMENT_ROOT': '/usr/local/share/avolon/web', 'GATEWAY_INTERFACE': 'CGI/1.1', 'HTTP_ACCEPT': 'text/html,application/xhtml+xml,application/xml;q=0.9,*/*;q=0.8', 'HTTP_ACCEPT_ENCODING': 'gzip', 'HTTP_CONNECTION': 'close', 'HTTP_HOST': 'pioneersandaviators.avolon.aero', 'HTTP_IF_MODIFIED_SINCE': 'Sun, 21 Oct 2018 15:24:10 CEST', ...}, start_response = <function start_response>
 /usr/lib/python2.7/dist-packages/flask/app.py in __call__(self=<Flask 'frontend'>, environ={'CONTENT_LENGTH': '0', 'CONTEXT_DOCUMENT_ROOT': '/usr/local/share/avolon/web', 'CONTEXT_PREFIX': '', 'DOCUMENT_ROOT': '/usr/local/share/avolon/web', 'GATEWAY_INTERFACE': 'CGI/1.1', 'HTTP_ACCEPT': 'text/html,application/xhtml+xml,application/xml;q=0.9,*/*;q=0.8', 'HTTP_ACCEPT_ENCODING': 'gzip', 'HTTP_CONNECTION': 'close', 'HTTP_HOST': 'pioneersandaviators.avolon.aero', 'HTTP_IF_MODIFIED_SINCE': 'Sun, 21 Oct 2018 15:24:10 CEST', ...}, start_response=<function start_response>)
   1834     def __call__(self, environ, start_response):
   1835         """Shortcut for :attr:`wsgi_app`."""
=> 1836         return self.wsgi_app(environ, start_response)
   1837 
   1838     def __repr__(self):
self = <Flask 'frontend'>, self.wsgi_app = <bound method Flask.wsgi_app of <Flask 'frontend'>>, environ = {'CONTENT_LENGTH': '0', 'CONTEXT_DOCUMENT_ROOT': '/usr/local/share/avolon/web', 'CONTEXT_PREFIX': '', 'DOCUMENT_ROOT': '/usr/local/share/avolon/web', 'GATEWAY_INTERFACE': 'CGI/1.1', 'HTTP_ACCEPT': 'text/html,application/xhtml+xml,application/xml;q=0.9,*/*;q=0.8', 'HTTP_ACCEPT_ENCODING': 'gzip', 'HTTP_CONNECTION': 'close', 'HTTP_HOST': 'pioneersandaviators.avolon.aero', 'HTTP_IF_MODIFIED_SINCE': 'Sun, 21 Oct 2018 15:24:10 CEST', ...}, start_response = <function start_response>
 /usr/lib/python2.7/dist-packages/flask/app.py in wsgi_app(self=<Flask 'frontend'>, environ={'CONTENT_LENGTH': '0', 'CONTEXT_DOCUMENT_ROOT': '/usr/local/share/avolon/web', 'CONTEXT_PREFIX': '', 'DOCUMENT_ROOT': '/usr/local/share/avolon/web', 'GATEWAY_INTERFACE': 'CGI/1.1', 'HTTP_ACCEPT': 'text/html,application/xhtml+xml,application/xml;q=0.9,*/*;q=0.8', 'HTTP_ACCEPT_ENCODING': 'gzip', 'HTTP_CONNECTION': 'close', 'HTTP_HOST': 'pioneersandaviators.avolon.aero', 'HTTP_IF_MODIFIED_SINCE': 'Sun, 21 Oct 2018 15:24:10 CEST', ...}, start_response=<function start_response>)
   1818             except Exception as e:
   1819                 error = e
=> 1820                 response = self.make_response(self.handle_exception(e))
   1821             return response(environ, start_response)
   1822         finally:
response undefined, self = <Flask 'frontend'>, self.make_response = <bound method Flask.make_response of <Flask 'frontend'>>, self.handle_exception = <bound method Flask.handle_exception of <Flask 'frontend'>>, e = InterfaceError()
 /usr/lib/python2.7/dist-packages/flask/app.py in handle_exception(self=<Flask 'frontend'>, e=InterfaceError())
   1401             # otherwise, we just raise the error again
   1402             if exc_value is e:
=> 1403                 reraise(exc_type, exc_value, tb)
   1404             else:
   1405                 raise e
global reraise = <function reraise>, exc_type = <class 'mysql.connector.errors.InterfaceError'>, exc_value = InterfaceError(), tb = <traceback object>
 /usr/lib/python2.7/dist-packages/flask/app.py in wsgi_app(self=<Flask 'frontend'>, environ={'CONTENT_LENGTH': '0', 'CONTEXT_DOCUMENT_ROOT': '/usr/local/share/avolon/web', 'CONTEXT_PREFIX': '', 'DOCUMENT_ROOT': '/usr/local/share/avolon/web', 'GATEWAY_INTERFACE': 'CGI/1.1', 'HTTP_ACCEPT': 'text/html,application/xhtml+xml,application/xml;q=0.9,*/*;q=0.8', 'HTTP_ACCEPT_ENCODING': 'gzip', 'HTTP_CONNECTION': 'close', 'HTTP_HOST': 'pioneersandaviators.avolon.aero', 'HTTP_IF_MODIFIED_SINCE': 'Sun, 21 Oct 2018 15:24:10 CEST', ...}, start_response=<function start_response>)
   1815         try:
   1816             try:
=> 1817                 response = self.full_dispatch_request()
   1818             except Exception as e:
   1819                 error = e
response undefined, self = <Flask 'frontend'>, self.full_dispatch_request = <bound method Flask.full_dispatch_request of <Flask 'frontend'>>
 /usr/lib/python2.7/dist-packages/flask/app.py in full_dispatch_request(self=<Flask 'frontend'>)
   1475                 rv = self.dispatch_request()
   1476         except Exception as e:
=> 1477             rv = self.handle_user_exception(e)
   1478         response = self.make_response(rv)
   1479         response = self.process_response(response)
rv undefined, self = <Flask 'frontend'>, self.handle_user_exception = <bound method Flask.handle_user_exception of <Flask 'frontend'>>, e = InterfaceError()
 /usr/lib/python2.7/dist-packages/flask/app.py in handle_user_exception(self=<Flask 'frontend'>, e=InterfaceError())
   1379                 return handler(e)
   1380 
=> 1381         reraise(exc_type, exc_value, tb)
   1382 
   1383     def handle_exception(self, e):
global reraise = <function reraise>, exc_type = <class 'mysql.connector.errors.InterfaceError'>, exc_value = InterfaceError(), tb = <traceback object>
 /usr/lib/python2.7/dist-packages/flask/app.py in full_dispatch_request(self=<Flask 'frontend'>)
   1471         try:
   1472             request_started.send(self)
=> 1473             rv = self.preprocess_request()
   1474             if rv is None:
   1475                 rv = self.dispatch_request()
rv undefined, self = <Flask 'frontend'>, self.preprocess_request = <bound method Flask.preprocess_request of <Flask 'frontend'>>
 /usr/lib/python2.7/dist-packages/flask/app.py in preprocess_request(self=<Flask 'frontend'>)
   1664             funcs = chain(funcs, self.before_request_funcs[bp])
   1665         for func in funcs:
=> 1666             rv = func()
   1667             if rv is not None:
   1668                 return rv
rv undefined, func = <function before_request>
 /usr/local/share/avolon/web/frontend.py in before_request()
     29 @app.before_request
     30 def before_request():
=>   31     g.db = connect_db()
     32 
     33 @app.route('/')
 /usr/local/share/avolon/web/frontend.py in connect_db()
     25 
     26 def connect_db():
=>   27     return connect(user=MYSQL_USER, password=MYSQL_PASS, database=MYSQL_DB, host=MYSQL_SERVER)
     28 
     29 @app.before_request
 /usr/lib/python2.7/dist-packages/mysql/connector/__init__.py in connect(*args=(), **kwargs={'database': 'avolon', 'host': 'localhost', 'password': None, 'user': 'root'})
     96 
     97     # Regular connection
=>   98     return MySQLConnection(*args, **kwargs)
     99 Connect = connect  # pylint: disable=C0103
    100 
global MySQLConnection = <class 'mysql.connector.connection.MySQLConnection'>, args = (), kwargs = {'database': 'avolon', 'host': 'localhost', 'password': None, 'user': 'root'}
 /usr/lib/python2.7/dist-packages/mysql/connector/connection.py in __init__(self=<mysql.connector.connection.MySQLConnection object>, **kwargs={'database': 'avolon', 'host': 'localhost', 'password': None, 'user': 'root'})
    116 
    117         if len(kwargs) > 0:
=>  118             self.connect(**kwargs)
    119 
    120     def _get_self(self):
self = <mysql.connector.connection.MySQLConnection object>, self.connect = <bound method MySQLConnection.connect of <mysql.connector.connection.MySQLConnection object>>, kwargs = {'database': 'avolon', 'host': 'localhost', 'password': None, 'user': 'root'}
 /usr/lib/python2.7/dist-packages/mysql/connector/connection.py in connect(self=<mysql.connector.connection.MySQLConnection object>, **kwargs={'database': 'avolon', 'host': 'localhost', 'password': None, 'user': 'root'})
    380 
    381         self.disconnect()
=>  382         self._open_connection()
    383         self._post_connection()
    384 
self = <mysql.connector.connection.MySQLConnection object>, self._open_connection = <bound method MySQLConnection._open_connection o...sql.connector.connection.MySQLConnection object>>
 /usr/lib/python2.7/dist-packages/mysql/connector/connection.py in _open_connection(self=<mysql.connector.connection.MySQLConnection object>)
    343         """
    344         self._socket = self._get_connection()
=>  345         self._socket.open_connection()
    346         self._do_handshake()
    347         self._do_auth(self._user, self._password,
self = <mysql.connector.connection.MySQLConnection object>, self._socket = <mysql.connector.network.MySQLTCPSocket object>, self._socket.open_connection = <bound method MySQLTCPSocket.open_connection of <mysql.connector.network.MySQLTCPSocket object>>
 /usr/lib/python2.7/dist-packages/mysql/connector/network.py in open_connection(self=<mysql.connector.network.MySQLTCPSocket object>)
    384         except IOError as err:
    385             raise errors.InterfaceError(
=>  386                 errno=2003, values=(self.get_address(), _strioerror(err)))
    387         except StandardError as err:
    388             raise errors.InterfaceError(str(err))
errno undefined, values undefined, self = <mysql.connector.network.MySQLTCPSocket object>, self.get_address = <bound method MySQLTCPSocket.get_address of <mysql.connector.network.MySQLTCPSocket object>>, global _strioerror = <function _strioerror>, err = error(111, 'Connection refused')

<class 'mysql.connector.errors.InterfaceError'>: 2003: Can't connect to MySQL server on 'localhost:3306' (111 Connection refused)
      args = ()
      errno = 2003
      message = ''
      msg = u"Can't connect to MySQL server on 'localhost:3306' (111 Connection refused)"
      sqlstate = None