def clientConnectionFailed(self, connector, reason): global ncidsrv if config.plugins.NcidClient.connectionVerbose.value: Notifications.AddNotification(MessageBox, _("Connecting to NCID Server failed\n (%s)\nretrying...") % reason.getErrorMessage(), type=MessageBox.TYPE_INFO, timeout=config.plugins.NcidClient.timeout.value) ReconnectingClientFactory.clientConnectionFailed(self, connector, reason) # config.plugins.NcidClient.enable.value = False ncidsrv = None
def clientConnectionFailed(self, connector, reason): """Connection failed """ print 'Connection failed. Reason:', reason ReconnectingClientFactory.clientConnectionFailed(self, connector, reason)
def clientConnectionFailed(self, connector, reason): """ Only necessary for as debugging aid - if we can somehow set parent's class noisy attribute then we can omit this method """ if self.debug: print('IPAFactory connection failed:', reason.getErrorMessage()) ReconnectingClientFactory.clientConnectionFailed(self, connector, reason)
def clientConnectionFailed(self, connector, reason): log.info( "Connection to %s failed; will retry in %d second%s" % (connector.getDestination(), self.delay, "" if self.delay == 1 else "s"), system="VOEventSubscriberFactory", ) ReconnectingClientFactory.clientConnectionFailed(self, connector, reason)
def clientConnectionFailed(self, connector, reason): """ Notify the pool that we're unable to connect """ if self.protocolInstance is not None: if self.protocolInstance._lastreq and ((time() - self.protocolInstance._lastreq) >= 100): self.stopTrying() if self.continueTrying: ReconnectingClientFactory.clientConnectionFailed(self, connector, reason) # pool pendings self.pool.addPendings(self) else: if DEBUG: log.msg('Sphinx factory stop', self) if self.deferred: self.deferred.errback(reason) # Clean deferred self.deferred = None else: # pool pendings self.pool.delPendings(self) if self.protocolInstance is not None: self.pool.clientGone(self.protocolInstance) # Clean self.protocolInstance = None
def clientConnectionFailed(self, connector, reason): ReconnectingClientFactory.clientConnectionFailed(self, connector, reason) log.clients( "%s::clientConnectionFailed (%s:%d) %s" % (self, connector.host, connector.port, reason.getErrorMessage()) ) self.connectFailed.callback(dict(connector=connector, reason=reason)) self.connectFailed = Deferred()
def clientConnectionFailed(self, connector, reason): self.logger.warn('CmdrConnection failed: %s ' % (reason)) self.activeConnection = None self.stateCallback(self) ReconnectingClientFactory.clientConnectionFailed(self, connector, reason)
def clientConnectionFailed(self, connector, reason): """ ParaConnFactory.clientConnectionFailed: function that is called when the connectTCP fails to reach the host. Taken from the internet, this function will periodically attempt to connect until the connection is successful. """ ReconnectingClientFactory.clientConnectionFailed(self, connector, reason)
def clientConnectionFailed(self, connector, reason): log.msg("Connection failed. Reason: %s" % reason, logLevel=INFO) if getattr(self, "restart", True): self.reset_protocol_for_login() ReconnectingClientFactory.clientConnectionFailed(self, connector, reason) else: log.msg("Done - no restart", logLevel=INFO) reactor.callWhenRunning(reactor.stop)
def clientConnectionFailed(self, connector, reason): """ ******************************************************* Called when a connection has failed to connect @type reason: L{twisted.python.fialure.Failure} ******************************************************* """ print 'Connection fialed. Reason:', reason ReconnectingClientFactory.clientConnectionFailed(self, connector, reason)
def clientConnectionFailed(self, connector, reason): logging.debug('Connection failed to Envisalink. Reason: %s', str(reason)) if hasattr(self, "_currentLoopingCall"): try: self._currentLoopingCall.stop() except: logging.error("Error trying to stop looping call, ignoring...") ReconnectingClientFactory.clientConnectionFailed(self, connector, reason)
def clientConnectionLost(self, connector, reason): log.info( "Connection to %s lost; will retry in %d second%s" % (connector.getDestination(), self.delay, "" if self.delay == 1 else "s"), system="VOEventSubscriberFactory" ) if self.reset_call.active(): self.reset_call.cancel() ReconnectingClientFactory.clientConnectionFailed(self, connector, reason)
def clientConnectionFailed(self, connector, reason): """ self.CONNECTION_INFO ok """ self.continueTrying = None log.msg('Connection failed. Reason: ', reason) ReconnectingClientFactory.clientConnectionFailed(self,\ connector, reason)
def clientConnectionFailed(self, connector, reason): """ Called when the connection to the server failed. """ ReconnectingClientFactory.clientConnectionFailed( self, connector, reason) if 'OpenSSL.SSL.Error' in str(reason): self.network.exit_code = 3 self.network.stop()
def clientConnectionFailed(self, connector, reason): self._failures += 1 dprint('connection failed ({}): {}'.format( self._failures, reason. getErrorMessage())) if self._listen or self._failures < 4: ReconnectingClientFactory.clientConnectionFailed( self, connector, reason) else: self.reactor.stop()
def clientConnectionFailed(self, connector, reason): # Warn on first failure if self.first_time == True: Speaker.speak("no_server") self.first_time = False # Retry self.resetDelay() log.err("Connection failed. Reason:", reason.getErrorMessage()) ReconnectingClientFactory.clientConnectionFailed(self, connector, reason)
def clientConnectionFailed(self, connector, reason): ReconnectingClientFactory.clientConnectionFailed(self, connector, reason) log.clients("%s::clientConnectionFailed (%s:%d) %s" % ( self, connector.host, connector.port, reason.getErrorMessage())) self.destinationDown(connector.factory.destination) args = dict(connector=connector, reason=reason) d = self.connectFailed self.connectFailed = Deferred() d.callback(args)
def clientConnectionFailed(self, connector, reason): """ Notify the connectionPool that we're unable to connect """ if self._protocolInstance is not None: self.connectionPool.clientBusy(self._protocolInstance) ReconnectingClientFactory.clientConnectionFailed( self, connector, reason)
def clientConnectionFailed(self, connector, reason): """ Notify the connectionPool that we're unable to connect """ self.log.error("MemCache connection failed: %s" % (reason,)) if self._protocolInstance is not None: self.connectionPool.clientBusy(self._protocolInstance) ReconnectingClientFactory.clientConnectionFailed( self, connector, reason)
def clientConnectionFailed(self, connector, reason): """ Override client connection failed method Called when @param connector: @param reason: @return: """ if self.CONNECTION_INFO['reconnection'] == 'yes': self.continueTrying = True elif self.CONNECTION_INFO['reconnection'] == 'no': self.continueTrying = None log.msg('Connection failed. Reason: ', reason) ReconnectingClientFactory.clientConnectionFailed(self, connector, reason)
def clientConnectionFailed(self, connector, reason): """Handle notification from the lower layers of connection failure. If we are shutting down, and twisted sends us the expected type of error, eat the error. Otherwise, log it and pass it along. Also, schedule notification of our subscribers at the next pass through the reactor. """ if self.dDown and reason.check(UserError): # We initiated the close, this is an expected connectionFailed, # given we were trying to connect when close() was called log.debug('%r: clientConnectionFailed:%r:%r', self, connector, reason) notifyReason = None # Not a failure else: log.error('%r: clientConnectionFailed:%r:%r', self, connector, reason) notifyReason = reason # Reset our proto so we don't try to send to a down connection # Needed? I'm not sure we should even _have_ a proto at this point... self.proto = None # Schedule notification of subscribers self._get_clock().callLater(0, self._notify, False, notifyReason) # Call our superclass's method to handle reconnecting return ReconnectingClientFactory.clientConnectionFailed( self, connector, reason)
def test_deserializationResetsParameters(self): """ A L{ReconnectingClientFactory} which is unpickled does not have an L{IConnector} and has its reconnecting timing parameters reset to their initial values. """ factory = ReconnectingClientFactory() factory.clientConnectionFailed(FakeConnector(), None) self.addCleanup(factory.stopTrying) serialized = pickle.dumps(factory) unserialized = pickle.loads(serialized) self.assertIsNone(unserialized.connector) self.assertIsNone(unserialized._callID) self.assertEqual(unserialized.retries, 0) self.assertEqual(unserialized.delay, factory.initialDelay) self.assertTrue(unserialized.continueTrying)
def test_deserializationResetsParameters(self): """ A L{ReconnectingClientFactory} which is unpickled does not have an L{IConnector} and has its reconnecting timing parameters reset to their initial values. """ factory = ReconnectingClientFactory() factory.clientConnectionFailed(FakeConnector(), None) self.addCleanup(factory.stopTrying) serialized = pickle.dumps(factory) unserialized = pickle.loads(serialized) self.assertEqual(unserialized.connector, None) self.assertEqual(unserialized._callID, None) self.assertEqual(unserialized.retries, 0) self.assertEqual(unserialized.delay, factory.initialDelay) self.assertEqual(unserialized.continueTrying, True)
def clientConnectionFailed(self, connector, reason): """ Notify the pool that we're unable to connect """ self.errors += 1 # Stop if self.errors >= self.errorsLimit: self.stopTrying() if self.continueTrying: if self.protocolInstance is not None: if self.protocolInstance._lastreq and ((time() - self.protocolInstance._lastreq) >= 100): self.stopTrying() if self.continueTrying: ReconnectingClientFactory.clientConnectionFailed(self, connector, reason) # pool pendings self.pool.addPendings(self) else: if self.deferred: if self.protocolError is not None: self.deferred.errback(self.protocolError) else: self.deferred.errback(reason) # Clean deferred self.deferred = None else: # pool pendings self.pool.delPendings(self) if self.protocolInstance is not None: self.pool.clientGone(self.protocolInstance) # Clean self.protocolInstance = None self.protocolError = None
def clientConnectionFailed(self, connector, reason): ReconnectingClientFactory.clientConnectionFailed(self, connector, reason) self._errback(reason)
def clientConnectionFailed(self, connector, reason): logging.info('Connection failed. Reason: %s', reason) ReconnectingClientFactory.clientConnectionFailed( self, connector, reason)
def clientConnectionFailed(self, connector, reason): self.log.error("Unable to connect to APN server: %s" % (reason, )) self.connected = False ReconnectingClientFactory.clientConnectionFailed( self, connector, reason)
def clientConnectionFailed(self, connector, reason): log.msg('Connection failed, reason:', reason.getErrorMessage()) ReconnectingClientFactory.clientConnectionFailed(self, connector, reason)
def clientConnectionFailed(self, connector, r): drivers.log.connectError(self.currentServer, errorMsg(r)) (connector.host, connector.port) = self._getNextServer() ReconnectingClientFactory.clientConnectionFailed(self, connector, r)
def clientConnectionFailed(self, connector, reason): ReconnectingClientFactory.clientConnectionFailed(self, connector, reason)
def clientConnectionFailed(self, connector, reason): self.linfo('Connection to beah backend on %s failed: %s', connector.getDestination(), reason) self.backend.set_controller() if not self._done: ReconnectingClientFactory.clientConnectionFailed(self, connector, reason)
def clientConnectionFailed(self, connector, reason): logging.error( 'IntraFace - IntrafaceClient Connection failed. Reason: %s' % (reason) ) ReconnectingClientFactory.clientConnectionFailed(self, connector, reason)
def clientConnectionFailed(self, connector, reason): if DEBUG: print "Got clientConnectionFailed for reason %s" % str(reason) self._handleConnectionError(reason, is_failed=True) ReconnectingClientFactory.clientConnectionFailed( self, connector, reason)
def clientConnectionFailed(self, connector, reason): self.logger.error('connection failed:', reason.getErrorMessage()) self.done.errback(reason) ReconnectingClientFactory.clientConnectionFailed(connector, reason)
def clientConnectionFailed(self, conector, reason): if isinstance(reason, ConnectionLost): log.error('Connection failed: {}'.format(reason)) ReconnectingClientFactory.clientConnectionFailed( self, conector, reason)
def clientConnectionFailed(self, connector, reason): self.listener.connectionLost('clientConnectionFailed %s' % (str(reason))) ReconnectingClientFactory.clientConnectionFailed( self, connector, reason)
def clientConnectionFailed(self, connector, reason): logger.error("Failed to connect to replication: %r", reason) ReconnectingClientFactory.clientConnectionFailed( self, connector, reason)
def clientConnectionFailed(self, connector, reason): log("Connection failed, reason: %s" % reason.getErrorMessage(), syslog.LOG_WARNING) ReconnectingClientFactory.clientConnectionFailed(self, connector, reason)
def clientConnectionFailed(self, connector, reason): self.logger.error("Connection with the broker failed: %s" % reason) ReconnectingClientFactory.clientConnectionFailed( self, connector, reason)
def clientConnectionFailed(self, connector, reason): log.msg('Connection failed: %s' % (reason.value,)) self.window.clear() self.window.addstr(0, 0, 'Connection failed: %s' % (reason.value,)) self.window.refresh() ReconnectingClientFactory.clientConnectionFailed(self, connector, reason)
def clientConnectionFailed(self, connector, reason): log.msg('RabbitMQ connection failed. Reason:', reason) self.handler.channel = None ReconnectingClientFactory.clientConnectionFailed( self, connector, reason)
def clientConnectionFailed(self, connector, reason): print 'Connection failed:', reason.getErrorMessage() # Try to reconnect print 'Trying toe reconnect. Please wait...' ReconnectingClientFactory.clientConnectionFailed(self, connector, reason)
def clientConnectionFailed(self, connector, reason): if self.is_reconnecting: log.debug(reason) ReconnectingClientFactory.clientConnectionFailed( self, connector, reason)
def clientConnectionFailed(self, connector, reason): self.runCallback('failure') return ReconnectingClientFactory.clientConnectionFailed( self, connector, reason)
def clientConnectionFailed(self, connector, reason): self.connectFailed.emit("Connect failed") ReconnectingClientFactory.clientConnectionFailed(self, connector, reason)
def clientConnectionFailed(self, connector, reason): print('Connection failed. Reason:', reason) ReconnectingClientFactory.clientConnectionFailed(self, connector, reason)
def clientConnectionFailed(self, connector, reason): ReconnectingClientFactory.clientConnectionFailed(self, connector, reason) log.aggregator("connection attempt to %s failed: %s" % (self.remoteAddr, reason.value))
def clientConnectionFailed(self, connector, reason): logging.error("Failed connection to IRC server: %s", reason) ReconnectingClientFactory.clientConnectionFailed( self, connector, reason)
def clientConnectionFailed(self, connector, reason): logger.debug('Connection failed. Reason {reason!r}:', reason=reason) ReconnectingClientFactory.clientConnectionFailed(self, connector, reason)
def clientConnectionFailed(self, connector, reason): print 'Lost reason. Reason: ', reason ReconnectingClientFactory.clientConnectionFailed( self, connector, reason)
def clientConnectionFailed(self, connector, reason): self.app.addString(Messages.conn_failed) self.state = Const.STATE_NOT_CONNECTED ReconnectingClientFactory.clientConnectionFailed(self, connector, reason)
def clientConnectionLost(self, connector, reason): print 'Lost connection!\n' #print 'Reason: %s' % reason ReconnectingClientFactory.clientConnectionFailed( self, connector, reason) self.netMgr.quit = True
def clientConnectionFailed(self, connector, reason): dlog("Connect attempt failed:", reason.getErrorMessage()) ReconnectingClientFactory.clientConnectionFailed( self, connector, reason)
def clientConnectionFailed(self, connector, reason): LOGGER.debug('Connection failed. Reason: %s', reason) ReconnectingClientFactory.clientConnectionFailed( self, connector, reason) self._proto = None
def clientConnectionFailed(self, connector, reason): logging.error("Connection failed: %r", reason) ReconnectingClientFactory.clientConnectionFailed( self, connector, reason)
def clientConnectionFailed(self, connector, reason): self.listener.connectionLost('clientConnectionFailed %s' % (str(reason))) ReconnectingClientFactory.clientConnectionFailed(self, connector, reason)
def clientConnectionFailed(self, connector, reason): """Connection failed """ print 'Connection failed. Reason:', reason ReconnectingClientFactory.clientConnectionFailed( self, connector, reason)
def clientConnectionFailed(self, connector, reason): log.err("Failed to connect to realtime server at %s: %s" % (connector.getDestination().host, reason)) ReconnectingClientFactory.clientConnectionFailed(self, connector, reason)
def clientConnectionFailed(self, connector, reason): print "Connection failed. Reason:", reason ReconnectingClientFactory.clientConnectionFailed(self, connector,reason)
def clientConnectionFailed(self, connector, reason): log.error('Telnet connection failed. Reason:%s ' % reason) ReconnectingClientFactory.clientConnectionFailed( self, connector, reason)