You are viewing a plain text version of this content. The canonical link for it is here.
Posted to user@ignite.apache.org by aitkiar <ai...@gmail.com> on 2017/04/07 10:35:08 UTC

Client connection events fails when visor is open

I have a setup with two server nodes and two client nodes running. I have
subscribed the client nodes to listen to the connection events
EVT_CLIENT_NODE_DISCONNECTED and EVT_CLIENT_NODE_RECONNECTED so i'm notified
when the server nodes are down ( or the client lost connection to them ) and
up again and can came up with a recover strategy for whatever is running on
the client node.

I have a line that writes on the client log when one or the events is
launched on the client server. If i don't have ignitevisor connected to the
cluster, I can see the log lines alerting from the disconnect and the
reconnect, in both client nodes. But if i have ignite visor connected to
monitor the topology and the cache status, i never see those events on the
logs.

¿Any idea why is this happening ? ¿ Is there any configuration parameter on
visor or the clients that makes that the events are always launched ?

Down is my event listener configuration if it helps:
IgnitePredicate<Event> listener = new IgnitePredicate<Event>() 
{
	@Override public boolean apply(Event evt) 
	{
		logger.debug("Cache event: " + evt);
		if ( evt.type() == EventType.EVT_CLIENT_NODE_DISCONNECTED )
		{
			logger.warn("Event type: EVT_CLIENT_NODE_DISCONNECTED" );
			IgniteQueueCacheManager.getInstance( null ).setValid( false );
		}
		else if ( evt.type() == EventType.EVT_CLIENT_NODE_RECONNECTED )
		{
			logger.warn("Event type: EVT_CLIENT_NODE_RECONNECTED" );
			IgniteQueueCacheManager.getInstance( null ).setValid( true );
		}
		return true;
	}
};

ignite.events().localListen(listener,
EventType.EVT_CLIENT_NODE_DISCONNECTED,
EventType.EVT_CLIENT_NODE_RECONNECTED );



--
View this message in context: http://apache-ignite-users.70518.x6.nabble.com/Client-connection-events-fails-when-visor-is-open-tp11806.html
Sent from the Apache Ignite Users mailing list archive at Nabble.com.

Re: Client connection events fails when visor is open

Posted by aitkiar <ai...@gmail.com>.
I'll try creating a specific iginite-config.xml for visor setting the client
mode.

Thank you.



--
View this message in context: http://apache-ignite-users.70518.x6.nabble.com/Client-connection-events-fails-when-visor-is-open-tp11806p11854.html
Sent from the Apache Ignite Users mailing list archive at Nabble.com.

Re: Client connection events fails when visor is open

Posted by vkulichenko <va...@gmail.com>.
Currently Visor runs in server mode by default, so as long as it's up, client
do not disconnect from Visor topology. If you want to avoid this, you can
explicitly set clientMode flag on Visor configuration.

-Val



--
View this message in context: http://apache-ignite-users.70518.x6.nabble.com/Client-connection-events-fails-when-visor-is-open-tp11806p11836.html
Sent from the Apache Ignite Users mailing list archive at Nabble.com.