ignite-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Alexey Popov <tank2.a...@gmail.com>
Subject DiscoverySpi Handshake unmarshalling errors at Client (client mode)
Date Fri, 20 Oct 2017 08:12:40 GMT
Hi Igniters, 

I am looking into Client DiscoverySpi procedure and see some differences in
Client behavior when it trying to connect to servers.
Case 1: If the Client can't connect (Connection refused) to some Server it
goes to the next IP/port from the ipFinder list.
Case 2: But if the client can't succesfully finish Discovery Handshake
procedure with the Server it does not try to connect to other IPs. It just
throws an TcpDiscoverySpi exception like this back to a user code
"class org.apache.ignite.IgniteCheckedException: Failed to start SPI:
TcpDiscoverySpi [addrRslvr=null, sockTimeout=5000, ackTimeout=5000,
marsh=JdkMarshaller [], reconCnt=10, maxAckTimeout=600000,
forceSrvMode=false, clientReconnectDisabled=false]"

Case 2 can happen when IP/port was taken by non-Ignite server. For instance,
it could be taken by misconfigured HTTP server and the Client just can't
unmarshall the server HTTP response:

Caused by: java.io.StreamCorruptedException: invalid stream header: 48545450
	at java.io.ObjectInputStream.readStreamHeader(ObjectInputStream.java:857)
	at java.io.ObjectInputStream.<init>(ObjectInputStream.java:349)

So, I would like to change the client behavior in Case 2. It should handle
Discovery Handshake unmarshalling error in the same way it does with
"Connection refused" errors. It should try to connect to other servers.

Your thoughts?


Sent from: http://apache-ignite-developers.2346864.n4.nabble.com/

View raw message