Refine search
/** {@inheritDoc} */ @Override public void onDisconnected(GridNioSession ses, @Nullable Exception e) { if (e != null) { if (e instanceof RuntimeException) U.error(log, "Failed to process request from remote client: " + ses, e); else U.warn(log, "Closed client session due to exception [ses=" + ses + ", msg=" + e.getMessage() + ']'); } }
/** * Unregister MBean. */ private void unregisterMBean() { if (mbeanName == null) return; assert !U.IGNITE_MBEANS_DISABLED; try { ManagementFactory.getPlatformMBeanServer().unregisterMBean(mbeanName); if (log.isDebugEnabled()) log.debug("Unregistered MBean: " + mbeanName); } catch (JMException e) { U.error(log, "Failed to unregister MBean.", e); } }
/** {@inheritDoc} */ @Override public void onMessage(UUID nodeId, Object msg, byte plc) { if (msg instanceof IgfsFragmentizerRequest || msg instanceof IgfsSyncMessage) { if (log.isDebugEnabled()) log.debug("Received fragmentizer request from remote node [nodeId=" + nodeId + ", msg=" + msg + ']'); IgniteBiTuple<UUID, IgfsCommunicationMessage> tup = F.t(nodeId, (IgfsCommunicationMessage)msg); try { if (!msgs.offer(tup, MSG_OFFER_TIMEOUT, TimeUnit.MILLISECONDS)) { U.error(log, "Failed to process fragmentizer communication message (will discard) " + "[nodeId=" + nodeId + ", msg=" + msg + ']'); } } catch (InterruptedException ignored) { Thread.currentThread().interrupt(); U.warn(log, "Failed to process fragmentizer communication message (thread was interrupted) "+ "[nodeId=" + nodeId + ", msg=" + msg + ']'); } } }
/** * Sends response to remote node. * * @param nodeId Node ID to send response to. * @param msg Message to send. */ private void sendResponse(UUID nodeId, IgfsCommunicationMessage msg) { try { sendWithRetries(nodeId, msg); } catch (IgniteCheckedException e) { if (e.hasCause(ClusterTopologyCheckedException.class)) { if (log.isDebugEnabled()) log.debug("Failed to send sync response to IGFS fragmentizer coordinator " + "(originating node left the grid): " + nodeId); } else U.error(log, "Failed to send sync response to IGFS fragmentizer coordinator: " + nodeId, e); } } }
U.warn(log, "Cannot obtain trash directory info (is node stopping?)"); if (log.isDebugEnabled()) U.error(log, "Cannot obtain trash directory info.", e); IgniteUuid fileId = entry.getValue().fileId(); if (log.isDebugEnabled()) log.debug("Deleting IGFS trash entry [name=" + entry.getKey() + ", fileId=" + fileId + ']'); if (log.isDebugEnabled()) log.debug("Sending delete confirmation message [name=" + entry.getKey() + ", fileId=" + fileId + ']'); U.error(log, "Failed to delete entry from the trash directory: " + entry.getKey(), e);
/** {@inheritDoc} */ @Override public void onDisconnected(GridNioSession ses, @Nullable Exception e) { if (e != null) { if (e instanceof RuntimeException) U.error(log, "Failed to process request from remote client: " + ses, e); else U.warn(log, "Closed client session due to exception [ses=" + ses + ", err=" + e.getMessage() + ']'); } }
/** {@inheritDoc} */ @Override public void apply(IgniteInternalFuture<IgniteInternalTx> t) { try { t.get(); } catch (IgniteTxOptimisticCheckedException ignore) { if (log.isDebugEnabled()) log.debug("Optimistic failure while committing prepared transaction (will rollback): " + tx); try { tx.rollbackAsync(); } catch (Throwable e) { U.error(log, "Failed to automatically rollback transaction: " + tx, e); } } catch (IgniteCheckedException e) { U.error(log, "Failed to commit transaction during failover: " + tx, e); } } }
if (log.isDebugEnabled()) log.debug("Grid runnable started: " + name); if (log.isDebugEnabled()) log.debug("Caught interrupted exception: " + e); if (log.isDebugEnabled()) log.debug("Caught interrupted exception: " + e); U.error(log, "Runtime error caught during grid runnable execution: " + this, e); else U.warn(log, "Runtime exception occurred during grid runnable execution caused by thread interruption: " + e.getMessage());
/** * Log error and delegate processing to {@link #handleCacheOperationException(Exception)}. * * @param sesId Session ID. * @param tryCnt Try count. * @param e Exception to process. */ private void handleAttributeUpdateException(final String sesId, final int tryCnt, final RuntimeException e) { if (tryCnt == retries - 1) { U.error(log, "Failed to apply updates for session (maximum number of retries exceeded) [sesId=" + sesId + ", retries=" + retries + ']', e); } else { U.warn(log, "Failed to apply updates for session (will retry): " + sesId); handleCacheOperationException(e); } }
/** * Try to register MBean. */ private void registerMBean() { if (U.IGNITE_MBEANS_DISABLED) return; try { ObjectName objName = U.registerMBean( ManagementFactory.getPlatformMBeanServer(), "Router", "TCP Router " + id, getClass().getSimpleName(), this, GridTcpRouterMBean.class); if (log.isDebugEnabled()) log.debug("Registered MBean: " + objName); mbeanName = objName; } catch (JMException e) { U.error(log, "Failed to register MBean.", e); } }
U.warn(log, "Attempting to stop an already stopped Ignite instance (ignore): " + name); if (log != null && log.isDebugEnabled()) log.debug("Shutdown hook is removed."); if (log != null && log.isDebugEnabled()) log.debug("Shutdown is in progress (ignoring): " + e.getMessage()); grid0.stop(cancel); if (log != null && log.isDebugEnabled()) log.debug("Ignite instance stopped ok: " + name); U.error(log, "Failed to properly stop grid instance due to undeclared exception.", e);
/** * Search given context for required configuration and starts router. * * @param beans Beans loaded from spring configuration file. */ public void start(Map<Class<?>, Object> beans) { log = (IgniteLogger)beans.get(IgniteLogger.class); if (log == null) { U.error(log, "Failed to find logger definition in application context. Stopping the router."); return; } GridTcpRouterConfiguration tcpCfg = (GridTcpRouterConfiguration)beans.get(GridTcpRouterConfiguration.class); if (tcpCfg == null) U.warn(log, "TCP router startup skipped (configuration not found)."); else { tcpRouter = new GridTcpRouterImpl(tcpCfg); try { tcpRouter.start(); } catch (Exception e) { U.error(log, "Failed to start TCP router on port " + tcpCfg.getPort() + ": " + e.getMessage(), e); tcpRouter = null; } } }
/** * @param workTokDir Token directory (common for multiple nodes). */ private void cleanupResources(File workTokDir) { RandomAccessFile lockFile = null; FileLock lock = null; try { lockFile = new RandomAccessFile(new File(workTokDir, LOCK_FILE_NAME), "rw"); lock = lockFile.getChannel().lock(); if (lock != null) processTokenDirectory(workTokDir); else if (log.isDebugEnabled()) log.debug("Token directory is being processed concurrently: " + workTokDir.getAbsolutePath()); } catch (OverlappingFileLockException ignored) { if (log.isDebugEnabled()) log.debug("Token directory is being processed concurrently: " + workTokDir.getAbsolutePath()); } catch (FileLockInterruptionException ignored) { Thread.currentThread().interrupt(); } catch (IOException e) { U.error(log, "Failed to process directory: " + workTokDir.getAbsolutePath(), e); } finally { U.releaseQuiet(lock); U.closeQuiet(lockFile); } }
if (log.isDebugEnabled()) log.debug(S.toString("Reduced job responses", "reduceRes", reduceRes, true, "ses", ses, false)); U.warn(log, "Failed to reduce job results for task (any nodes from task topology left grid?): " + task); U.error(log, "Failed to reduce job results for task: " + task, e); ", err=" + e + ']'; U.error(log, errMsg, e);
/** {@inheritDoc} */ @Override public IgniteInternalFuture<GridRestResponse> handleAsync(GridRestRequest req) { try { return handleAsyncUnsafe(req); } catch (IgniteCheckedException e) { if (!X.hasCause(e, VisorClusterGroupEmptyException.class)) U.error(log, "Failed to execute task command: " + req, e); return new GridFinishedFuture<>(e); } finally { if (log.isDebugEnabled()) log.debug("Handled task REST request: " + req); } }
/** {@inheritDoc} */ @Override public void onKernalStop(boolean cancel) { if (ctx.config().isDaemon()) return; if (!ctx.clientNode()) ctx.io().removeMessageListener(TOPIC_DATASTREAM); busyLock.block(); U.interrupt(flusher); U.join(flusher, log); for (DataStreamerImpl<?, ?> ldr : ldrs) { if (log.isDebugEnabled()) log.debug("Closing active data streamer on grid stop [ldr=" + ldr + ", cancel=" + cancel + ']'); try { ldr.closeEx(cancel); } catch (IgniteInterruptedCheckedException e) { U.warn(log, "Interrupted while waiting for completion of the data streamer: " + ldr, e); } catch (IgniteCheckedException e) { U.error(log, "Failed to close data streamer: " + ldr, e); } } if (log.isDebugEnabled()) log.debug("Stopped data streamer processor."); }
/** * @param src Source. * @param marsh Marsh. * @param clsLdr Class loader. * @param log Logger. */ private Map<Integer, Serializable> unmarshalData( Map<Integer, byte[]> src, Marshaller marsh, ClassLoader clsLdr, boolean clientNode, IgniteLogger log ) { Map<Integer, Serializable> res = U.newHashMap(src.size()); for (Map.Entry<Integer, byte[]> binEntry : src.entrySet()) { try { Serializable compData = marsh.unmarshal(binEntry.getValue(), clsLdr); res.put(binEntry.getKey(), compData); } catch (IgniteCheckedException e) { if (CONTINUOUS_PROC.ordinal() == binEntry.getKey() && X.hasCause(e, ClassNotFoundException.class) && clientNode) U.warn(log, "Failed to unmarshal continuous query remote filter on client node. Can be ignored."); else U.error(log, "Failed to unmarshal discovery data for component: " + binEntry.getKey(), e); } } return res; }
/** {@inheritDoc} */ @Override public IgniteInternalFuture<?> cancel(String name) { while (true) { try { return removeServiceFromCache(name).fut; } catch (IgniteException | IgniteCheckedException e) { if (X.hasCause(e, ClusterTopologyCheckedException.class)) { if (log.isDebugEnabled()) log.debug("Topology changed while cancelling service (will retry): " + e.getMessage()); } else { U.error(log, "Failed to undeploy service: " + name, e); return new GridFinishedFuture<>(e); } } } }
if (log.isDebugEnabled()) log.debug("Deployment meta for local deployment: " + meta); if (log.isDebugEnabled()) log.debug("Acquired deployment class from local cache: " + dep); if (log.isDebugEnabled()) log.debug("Acquired deployment class from SPI: " + dep); U.warn(log, "Failed to find resource from deployment SPI even after registering: " + meta); U.error(log, "Failed to deploy local class with meta: " + meta, e);