Merge "Add check credentials to log message if rabbmitmq closes socket"

This commit is contained in:
Jenkins
2014-06-17 15:49:30 +00:00
committed by Gerrit Code Review

View File

@@ -640,6 +640,11 @@ class Connection(object):
sleep_time = min(sleep_time, self.interval_max)
log_info['sleep_time'] = sleep_time
if 'Socket closed' in six.text_type(e):
LOG.error(_('AMQP server %(hostname)s:%(port)d closed'
' the connection. Check login credentials:'
' %(err_str)s') % log_info)
else:
LOG.error(_('AMQP server on %(hostname)s:%(port)d is '
'unreachable: %(err_str)s. Trying again in '
'%(sleep_time)d seconds.') % log_info)