2

I've just enabled my app to connect to the Ethereum Ropsten network to test some new functionality, but I seem to hit a regular "handshake failure" error with the connection.

I configure my set-up using a system property, and I can see the following in my log:

13:21:52.910 INFO [general]  Config ( yes ): default properties from resource 'ethereumj.conf'
13:21:52.911 INFO [general]  Config ( yes ): user properties from -Dethereumj.conf.res resource 'ropsten.conf'
13:21:52.911 INFO [general]  Config ( no  ): user properties from resource 'user.conf'
13:21:52.912 INFO [general]  Config ( no  ): user properties from file '/path/to/my/config/ethereumj.conf'
13:21:52.912 INFO [general]  Config ( no  ): test properties from resource 'test-ethereumj.conf'
13:21:52.913 INFO [general]  Config ( no  ): test properties from resource 'test-user.conf'
13:21:52.913 INFO [general]  Config ( no  ): user properties from -Dethereumj.conf.file file 'null'
13:21:52.913 INFO [general]  Config ( no  ): config passed via constructor
13:21:52.937 INFO [general]  Running ropsten.json,  core version: 1.6.1-RELEASE
13:21:52.937 INFO [general]  git.hash: [03dd7b3]
13:21:52.937 INFO [general]  build.time: [GMT]-[16/Oct/2017]-[17:11]
13:21:52.939 INFO [general]  Created database version file

Then, pretty much immediately, it starts regularly spitting out this error:

13:21:59.129 WARN [net]  Handshake failed: 
io.netty.handler.codec.DecoderException: java.lang.IllegalArgumentException: CTR/SIC mode requires IV no greater than: 16 bytes.
    at io.netty.handler.codec.ByteToMessageDecoder.callDecode(ByteToMessageDecoder.java:346)
    at io.netty.handler.codec.ByteToMessageDecoder.channelRead(ByteToMessageDecoder.java:229)
    at io.netty.channel.AbstractChannelHandlerContext.invokeChannelRead(AbstractChannelHandlerContext.java:339)
    at io.netty.channel.AbstractChannelHandlerContext.fireChannelRead(AbstractChannelHandlerContext.java:324)
    at io.netty.channel.ChannelInboundHandlerAdapter.channelRead(ChannelInboundHandlerAdapter.java:86)
    at org.ethereum.net.server.WireTrafficStats$TrafficStatHandler.channelRead(WireTrafficStats.java:103)
    at io.netty.channel.AbstractChannelHandlerContext.invokeChannelRead(AbstractChannelHandlerContext.java:339)
    at io.netty.channel.AbstractChannelHandlerContext.fireChannelRead(AbstractChannelHandlerContext.java:324)
    at io.netty.handler.timeout.ReadTimeoutHandler.channelRead(ReadTimeoutHandler.java:150)
    at io.netty.channel.AbstractChannelHandlerContext.invokeChannelRead(AbstractChannelHandlerContext.java:339)
    at io.netty.channel.AbstractChannelHandlerContext.fireChannelRead(AbstractChannelHandlerContext.java:324)
    at io.netty.channel.DefaultChannelPipeline.fireChannelRead(DefaultChannelPipeline.java:847)
    at io.netty.channel.nio.AbstractNioByteChannel$NioByteUnsafe.read(AbstractNioByteChannel.java:131)
    at io.netty.channel.nio.NioEventLoop.processSelectedKey(NioEventLoop.java:511)
    at io.netty.channel.nio.NioEventLoop.processSelectedKeysOptimized(NioEventLoop.java:468)
    at io.netty.channel.nio.NioEventLoop.processSelectedKeys(NioEventLoop.java:382)
    at io.netty.channel.nio.NioEventLoop.run(NioEventLoop.java:354)
    at io.netty.util.concurrent.SingleThreadEventExecutor$2.run(SingleThreadEventExecutor.java:111)
    at java.lang.Thread.run(Thread.java:745)
Caused by: java.lang.IllegalArgumentException: CTR/SIC mode requires IV no greater than: 16 bytes.
    at org.spongycastle.crypto.modes.SICBlockCipher.init(SICBlockCipher.java:57)
    at org.ethereum.net.rlpx.FrameCodec.<init>(FrameCodec.java:59)
    at org.ethereum.net.rlpx.HandshakeHandler.decodeHandshake(HandshakeHandler.java:171)
    at org.ethereum.net.rlpx.HandshakeHandler.decode(HandshakeHandler.java:104)
    at io.netty.handler.codec.ByteToMessageDecoder.callDecode(ByteToMessageDecoder.java:315)
    ... 18 common frames omitted

My database-ropsten/logs/ethereum.log seems to have a bit more data:

13:00:16.318 DEBUG [net]  Processing new peer: 20c9ad97 | null
13:00:16.318 DEBUG [net]  Processing new peer: 6ce05930 | /13.84.180.240:30303
13:00:16.318 DEBUG [net]  Peer 20c9ad97 | null: notifies about disconnect
13:00:16.362 DEBUG [net]  From: /13.84.180.240:30303    Recv:  AuthResponseMessage{
  ephemeralPublicKey=(3d1a0d2a7adaf18a24d83cda3454c7dd2d1bc87bddd125171246d4616e29349f,d57ee68331af14e2f885adfa5dde1780a1cb34f15c716ce2979e40f8fbfe431e,1,0)
  nonce=abcbc93d16d8bda526bb97c625d816c3046ad10f4370c84d8391565eb827cd7f
  version=4}
13:00:16.362 WARN [net]  Handshake failed: 
io.netty.handler.codec.DecoderException: java.lang.IllegalArgumentException: CTR/SIC mode requires IV no greater than: 16 bytes.

It looks like I'm pretty consistently seeing a problem with messages from that 13.84.180.240 address. Is it just a bad node?

Any ideas how I can get past this?

  • For what it's worth, I ended up dumping EthereumJ, and I've moved over to using web3j. – bcholmes Oct 31 '17 at 16:01

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Browse other questions tagged or ask your own question.