[BangPypers] An existing connection was forcibly closed by the remote host

Python Consultant pythonconsultant01 at gmail.com
Sat Sep 26 06:29:29 CEST 2015


Hi All,

    I moved my database to different server and when I execute my python
file which accesses that database server, I am getting below error, Can
some one help in finding what might be the issue?

Thanks in advance


Traceback (most recent call last):

  File "TestLink_Auto2_BLR.py", line 1021, in <module>

    startingTime = testLinkHandle.getTimeStamp()

  File "TestLink_Auto2_BLR.py", line 163, in getTimeStamp

    tableAutoLoader = Table('db_version', meta, autoload=True)

  File "C:\Python27\lib\site-packages\sqlalchemy\sql\schema.py", line 406,
in __new__

    table._init(name, metadata, *args, **kw)

  File "C:\Python27\lib\site-packages\sqlalchemy\sql\schema.py", line 479,
in _init

    self._autoload(metadata, autoload_with, include_columns)

  File "C:\Python27\lib\site-packages\sqlalchemy\sql\schema.py", line 503,
in _autoload

    self, include_columns, exclude_columns

  File "C:\Python27\lib\site-packages\sqlalchemy\engine\base.py", line
1731, in run_callable

    with self.contextual_connect() as conn:

  File "C:\Python27\lib\site-packages\sqlalchemy\engine\base.py", line
1798, in contextual_connect

    self.pool.connect(),

  File "C:\Python27\lib\site-packages\sqlalchemy\pool.py", line 338, in
connect

    return _ConnectionFairy._checkout(self)

  File "C:\Python27\lib\site-packages\sqlalchemy\pool.py", line 644, in
_checkout

    fairy = _ConnectionRecord.checkout(pool)

  File "C:\Python27\lib\site-packages\sqlalchemy\pool.py", line 440, in
checkout

    rec = pool._do_get()

  File "C:\Python27\lib\site-packages\sqlalchemy\pool.py", line 963, in
_do_get

    return self._create_connection()

  File "C:\Python27\lib\site-packages\sqlalchemy\pool.py", line 285, in
_create_connection

    return _ConnectionRecord(self)

  File "C:\Python27\lib\site-packages\sqlalchemy\pool.py", line 411, in
__init__

    self.connection = self.__connect()

  File "C:\Python27\lib\site-packages\sqlalchemy\pool.py", line 538, in
__connect

    connection = self.__pool._creator()

  File "C:\Python27\lib\site-packages\sqlalchemy\engine\strategies.py",
line 96, in connect

    connection_invalidated=invalidated

  File "C:\Python27\lib\site-packages\sqlalchemy\util\compat.py", line 199,
in raise_from_cause

    reraise(type(exception), exception, tb=exc_tb)

  File "C:\Python27\lib\site-packages\sqlalchemy\engine\strategies.py",
line 90, in connect

    return dialect.connect(*cargs, **cparams)

  File "C:\Python27\lib\site-packages\sqlalchemy\engine\default.py", line
377, in connect

    return self.dbapi.connect(*cargs, **cparams)

  File "C:\Python27\lib\site-packages\pymysql\__init__.py", line 88, in
Connect

    return Connection(*args, **kwargs)

  File "C:\Python27\lib\site-packages\pymysql\connections.py", line 600, in
__init__

    self._connect()

  File "C:\Python27\lib\site-packages\pymysql\connections.py", line 805, in
_connect

    2003, "Can't connect to MySQL server on %r (%s)" % (self.host, e))

sqlalchemy.exc.OperationalError: (OperationalError) (2003, 'Can\'t connect
to MySQL server on \'10.65.32.96\' ((2013, "Lost connection to MySQL serve

An existing connection was forcibly closed by the remote host\'))"))') None
None


More information about the BangPypers mailing list