xchange-stream icon indicating copy to clipboard operation
xchange-stream copied to clipboard

Hitbtc not disconnect properly

Open lijun003 opened this issue 6 years ago • 2 comments

2018-04-20 13:32:12.828 WARN 6128 --- [ntLoopGroup-4-2] i.b.x.hitbtc.HitbtcStreamingService : The message has been received from disconnected channel 'orderbook-BTCUSD'. Skipped. 2018-04-20 13:32:12.928 WARN 6128 --- [ntLoopGroup-4-2] i.b.x.hitbtc.HitbtcStreamingService : The message has been received from disconnected channel 'orderbook-BTCUSD'. Skipped. 2018-04-20 13:32:13.031 WARN 6128 --- [ntLoopGroup-4-2] i.b.x.hitbtc.HitbtcStreamingService : The message has been received from disconnected channel 'orderbook-BTCUSD'. Skipped. 2018-04-20 13:32:13.135 WARN 6128 --- [ntLoopGroup-4-2] i.b.x.hitbtc.HitbtcStreamingService : The message has been received from disconnected channel 'orderbook-BTCUSD'. Skipped. 2018-04-20 13:32:13.238 WARN 6128 --- [ntLoopGroup-4-2] i.b.x.hitbtc.HitbtcStreamingService : The message has been received from disconnected channel 'orderbook-BTCUSD'. Skipped. 2018-04-20 13:32:13.337 WARN 6128 --- [ntLoopGroup-4-2] i.b.x.hitbtc.HitbtcStreamingService : The message has been received from disconnected channel 'orderbook-BTCUSD'. Skipped. 2018-04-20 13:32:13.422 WARN 6128 --- [ntLoopGroup-4-2] i.b.x.hitbtc.HitbtcStreamingService : The message has been received from disconnected channel 'orderbook-BTCUSD'. Skipped. 2018-04-20 13:32:13.542 WARN 6128 --- [ntLoopGroup-4-2] i.b.x.hitbtc.HitbtcStreamingService : The message has been received from disconnected channel 'orderbook-BTCUSD'. Skipped. 2018-04-20 13:32:13.627 WARN 6128 --- [ntLoopGroup-4-2] i.b.x.hitbtc.HitbtcStreamingService : The message has been received from disconnected channel 'orderbook-BTCUSD'. Skipped. 2018-04-20 13:32:13.725 WARN 6128 --- [ntLoopGroup-4-2] i.b.x.hitbtc.HitbtcStreamingService : The message has been received from disconnected channel 'orderbook-BTCUSD'. Skipped.

lijun003 avatar Apr 20 '18 05:04 lijun003

How did u reporoduce this case? I tryed exchange.disconnect() and orderBookObserver.dispose(); - I don't see problem. There is known issue that netty thread can't be stopped after disconnect and java can't be shutdown, but this problem exists for all exchanges which use NettyStreamingService

pchertalev avatar Apr 24 '18 11:04 pchertalev

I see it just happening now, I sometimes disconnect on purpose from the exchange and after that i'm getting the mentioned error.

Looks like the connection is closed by Hitbtc, it is trying to reconnect and it does too many requests, but finally it gets connected again and at some point it gets another error, then i disconnect and form there i start getting the message (The message has been received from disconnected channel)

I saw these messages (and maybe are not all related to triggering the same issue but I write them just in case)

i.bitrich.xchangestream.service.netty.WebSocketClientHandler - WebSocket Client disconnected!
info.bitrich.xchangestream.hitbtc.HitbtcStreamingService - Reopening websocket because it was closed by the host
info.bitrich.xchangestream.hitbtc.HitbtcStreamingService - Connecting to wss://api.hitbtc.com/api/2/ws
i.bitrich.xchangestream.service.netty.WebSocketClientHandler - WebSocket Client connected!
info.bitrich.xchangestream.hitbtc.HitbtcStreamingService - Resubscribing channels
i.bitrich.xchangestream.service.netty.WebSocketClientHandler - WebSocket Client failed to connect. 

At some point I get some of that ones:
info.bitrich.xchangestream.hitbtc.HitbtcStreamingService - Problem with connection: class io.netty.handler.codec.http.websocketx.WebSocketHandshakeException - Invalid handshake response getStatus: 429 Too Many Requests

Finally I get:
Exception:java.lang.IllegalStateException: Accept exceeded fixed size of 78

Then I disconnect and start receiving the:
The message has been received from disconnected channel 'orderbook-DASHETH'.

Hope it helps to find the problem

garciapd avatar Jul 18 '19 17:07 garciapd