For example, the MySQL server became unreachable and/or the hostname no longer resolves:
2015-04-11 15:03:29,889 ERROR Uncaught exception POST /api/authenticate (127.0.0.1)
HTTPServerRequest(protocol='http', host='localhost:8990', method='POST', uri='/api/authenticate', version='HTTP/1.1', remote_ip='127.0.0.1', headers={'Content-Length': '91', 'Host': 'localhost:8990', 'Accept-Encoding': 'gzip, deflate', 'Content-Type': 'application/json', 'Connection': 'keep-alive', 'Accept': '*/*', 'User-Agent': 'python-requests/2.5.1 CPython/2.7.8 Darwin/14.3.0'})
Traceback (most recent call last):
File "/Users/jathan/sandbox/virtualenvs/nsot/lib/python2.7/site-packages/tornado/web.py", line 1309, in _execute
result = self.prepare()
File "/Users/jathan/sandbox/src/nsot/nsot/handlers/util.py", line 203, in prepare
BaseHandler.prepare(self)
File "/Users/jathan/sandbox/src/nsot/nsot/handlers/util.py", line 81, in prepare
if not self.current_user:
File "/Users/jathan/sandbox/virtualenvs/nsot/lib/python2.7/site-packages/tornado/web.py", line 1022, in current_user
self._current_user = self.get_current_user()
File "/Users/jathan/sandbox/src/nsot/nsot/handlers/api.py", line 2561, in get_current_user
user = self.session.query(models.User).filter_by(email=email).scalar()
File "/Users/jathan/sandbox/virtualenvs/nsot/lib/python2.7/site-packages/sqlalchemy/orm/query.py", line 2426, in scalar
ret = self.one()
File "/Users/jathan/sandbox/virtualenvs/nsot/lib/python2.7/site-packages/sqlalchemy/orm/query.py", line 2395, in one
ret = list(self)
File "/Users/jathan/sandbox/virtualenvs/nsot/lib/python2.7/site-packages/sqlalchemy/orm/query.py", line 2438, in __iter__
return self._execute_and_instances(context)
File "/Users/jathan/sandbox/virtualenvs/nsot/lib/python2.7/site-packages/sqlalchemy/orm/query.py", line 2451, in _execute_and_instances
close_with_result=True)
File "/Users/jathan/sandbox/virtualenvs/nsot/lib/python2.7/site-packages/sqlalchemy/orm/query.py", line 2442, in _connection_from_session
**kw)
File "/Users/jathan/sandbox/virtualenvs/nsot/lib/python2.7/site-packages/sqlalchemy/orm/session.py", line 854, in connection
close_with_result=close_with_result)
File "/Users/jathan/sandbox/virtualenvs/nsot/lib/python2.7/site-packages/sqlalchemy/orm/session.py", line 858, in _connection_for_bind
return self.transaction._connection_for_bind(engine)
File "/Users/jathan/sandbox/virtualenvs/nsot/lib/python2.7/site-packages/sqlalchemy/orm/session.py", line 322, in _connection_for_bind
conn = bind.contextual_connect()
File "/Users/jathan/sandbox/virtualenvs/nsot/lib/python2.7/site-packages/sqlalchemy/engine/base.py", line 1798, in contextual_connect
self.pool.connect(),
File "/Users/jathan/sandbox/virtualenvs/nsot/lib/python2.7/site-packages/sqlalchemy/pool.py", line 338, in connect
return _ConnectionFairy._checkout(self)
File "/Users/jathan/sandbox/virtualenvs/nsot/lib/python2.7/site-packages/sqlalchemy/pool.py", line 644, in _checkout
fairy = _ConnectionRecord.checkout(pool)
File "/Users/jathan/sandbox/virtualenvs/nsot/lib/python2.7/site-packages/sqlalchemy/pool.py", line 442, in checkout
dbapi_connection = rec.get_connection()
File "/Users/jathan/sandbox/virtualenvs/nsot/lib/python2.7/site-packages/sqlalchemy/pool.py", line 526, in get_connection
self.connection = self.__connect()
File "/Users/jathan/sandbox/virtualenvs/nsot/lib/python2.7/site-packages/sqlalchemy/pool.py", line 538, in __connect
connection = self.__pool._creator()
File "/Users/jathan/sandbox/virtualenvs/nsot/lib/python2.7/site-packages/sqlalchemy/engine/strategies.py", line 96, in connect
connection_invalidated=invalidated
File "/Users/jathan/sandbox/virtualenvs/nsot/lib/python2.7/site-packages/sqlalchemy/util/compat.py", line 199, in raise_from_cause
reraise(type(exception), exception, tb=exc_tb)
File "/Users/jathan/sandbox/virtualenvs/nsot/lib/python2.7/site-packages/sqlalchemy/engine/strategies.py", line 90, in connect
return dialect.connect(*cargs, **cparams)
File "/Users/jathan/sandbox/virtualenvs/nsot/lib/python2.7/site-packages/sqlalchemy/engine/default.py", line 377, in connect
return self.dbapi.connect(*cargs, **cparams)
File "/Users/jathan/sandbox/virtualenvs/nsot/lib/python2.7/site-packages/MySQLdb/__init__.py", line 81, in Connect
return Connection(*args, **kwargs)
File "/Users/jathan/sandbox/virtualenvs/nsot/lib/python2.7/site-packages/MySQLdb/connections.py", line 193, in __init__
super(Connection, self).__init__(*args, **kwargs2)
OperationalError: (OperationalError) (2005, "Unknown MySQL server host 'ubuntu.local' (0)") None None
2015-04-11 15:03:29,909 ERROR Exception closing connection <_mysql.connection closed at 7fdd6c1aae20>
Traceback (most recent call last):
File "/Users/jathan/sandbox/virtualenvs/nsot/lib/python2.7/site-packages/sqlalchemy/pool.py", line 250, in _close_connection
self._dialect.do_close(connection)
File "/Users/jathan/sandbox/virtualenvs/nsot/lib/python2.7/site-packages/sqlalchemy/engine/default.py", line 412, in do_close
dbapi_connection.close()
ProgrammingError: closing a closed connection
$ DEBUG=1 ./nsot networks update -i 5 -a "vlan=300"
DEBUG:pynsot.dotfile:Enforcing permissions 600 on /Users/jathan/.pynsotrc
DEBUG:rcfile:files read: [u'/Users/jathan/.pynsotrc', '/Users/jathan/.pynsotrc']
DEBUG:pynsot.commands.callbacks:TRANSFORM_ATTRIBUTES [IN]: (u'vlan=300',)
DEBUG:pynsot.commands.callbacks: name = u'vlan'
DEBUG:pynsot.commands.callbacks:value = '300'
DEBUG:pynsot.commands.callbacks:TRANSFORM_ATTRIBUTES [OUT]: {u'vlan': '300'}
DEBUG:pynsot.client:Getting token for user data: {'secret_key': 'XXXXXXXX', 'email': 'jathan@localhost'}
INFO:requests.packages.urllib3.connectionpool:Starting new HTTP connection (1): localhost