Python脚本采集某一台SQL Server服务器数据的时候,突然遇到“Connection to the database failed for an unknown reason”错误,更详细的信息如下
Traceback (most recent call last):
File "src/pymssql.pyx", line 636, in pymssql.connect
File "src/_mssql.pyx", line 1957, in _mssql.connect
File "src/_mssql.pyx", line 677, in _mssql.MSSQLConnection.__init__
_mssql.MSSQLDriverException: Connection to the database failed for an unknown reason.
During handling of the above exception, another exception occurred:
Traceback (most recent call last):
File "/home/konglb/python/get_server_info.py", line 84, in <module>
autocommit=True);
File "src/pymssql.pyx", line 645, in pymssql.connect
pymssql.InterfaceError: Connection to the database failed for an unknown reason.
During handling of the above exception, another exception occurred:
Traceback (most recent call last):
File "/home/konglb/python/get_server_info.py", line 474, in <module>
logger.error(fe.message)
AttributeError: 'InterfaceError' object has no attribute 'message'