I`m trying to implement HA for lobby server. I have configuration with one Active and one Standby server, when active goes down, standby is started and persisted rooms are restored and virtual IP address is moved to the new server.
I need to reconnect client to new lobby server, the easiest solution would be HRC (http://docs2x.smartfoxserver.com/Gettin ... n-hrc-plus), but when I try to use HRC system I get following error when client tries to reconnect:
Code: Select all
::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::
23 Mar 2017 | 19:17:34,114 | WARN | SocketReader | protocol.binary.BinaryIoHandler | | java.lang.IllegalStateException:
::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::
Exception: java.lang.IllegalStateException
Message: Session does not support encryption: { Id: 1, Type: DEFAULT, Logged: No, IP: x.x.x.x:37267 }
Sender: { Id: 1, Type: DEFAULT, Logged: No, IP: x.x.x.x:37267 }
+--- --- ---+
Stack Trace:
+--- --- ---+
com.smartfoxserver.v2.protocol.binary.DefaultPacketEncrypter.execute(DefaultPacketEncrypter.java:42)
com.smartfoxserver.v2.protocol.binary.DefaultPacketEncrypter.decrypt(DefaultPacketEncrypter.java:22)
com.smartfoxserver.v2.protocol.binary.BinaryIoHandler.handlePacketData(BinaryIoHandler.java:410)
com.smartfoxserver.v2.protocol.binary.BinaryIoHandler.handleRead(BinaryIoHandler.java:197)
com.smartfoxserver.v2.protocol.SFSIoHandler.onDataRead(SFSIoHandler.java:142)
com.smartfoxserver.bitswarm.core.SocketReader.readTcpData(SocketReader.java:336)
com.smartfoxserver.bitswarm.core.SocketReader.readIncomingSocketData(SocketReader.java:220)
com.smartfoxserver.bitswarm.core.SocketReader.run(SocketReader.java:171)
java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1142)
java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:617)
java.lang.Thread.run(Thread.java:745)
It's probably because the session and TCP connection does not exists on newly started server and encryption is not initialized. Is there a way how to fix this?
Thanks for any suggestion.