Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

INFO request fails in 3.7 #137

Closed
guss77 opened this issue Mar 31, 2019 · 3 comments
Closed

INFO request fails in 3.7 #137

guss77 opened this issue Mar 31, 2019 · 3 comments
Assignees
Milestone

Comments

@guss77
Copy link

guss77 commented Mar 31, 2019

Version

  • vert.x core: 3.7.0
  • vert.x redis client: 3.7.0

Context

When issuing the info() call, an exception occurs that isn't thrown from the info() command either synchronously or to the handler - leaving the caller with no way to recover.

Do you have a reproducer?

Check the project's Circle CI builds: the master branch uses version 3.6.3, while the above linked branch uses version 3.7.0. The test code in both cases is shown below.

Steps to reproduce

RedisClient redisClient = RedisClient.create(vertx, opts); 
redisClient.info(info -> {
	logger.info("Connecting to redis with host: " + redis.getPort() + " and server data: " + info);
	if (info.failed()) {
		logger.error("Redis connection failed, aborting startup");
	}
});

Running the above code results in neither log being shown instead this output is logged:

SEVERE: Unhandled Error
java.lang.UnsupportedOperationException: This type doesn't hold an Array type
	at io.vertx.redis.client.Response.getKeys(Response.java:169)
	at io.vertx.redis.impl.RedisClientImpl.toJsonObject(RedisClientImpl.java:230)
	at io.vertx.redis.impl.RedisClientImpl.lambda$sendJsonObject$8(RedisClientImpl.java:254)
	at io.vertx.redis.client.impl.RedisClient.handle(RedisClient.java:358)
	at io.vertx.redis.client.impl.RESPParser.handleResponse(RESPParser.java:228)
	at io.vertx.redis.client.impl.RESPParser.handleResponse(RESPParser.java:186)
	at io.vertx.redis.client.impl.RESPParser.handle(RESPParser.java:171)
	at io.vertx.redis.client.impl.RESPParser.handle(RESPParser.java:25)
	at io.vertx.core.net.impl.NetSocketImpl$DataMessageHandler.handle(NetSocketImpl.java:393)
	at io.vertx.core.streams.impl.InboundBuffer.handleEvent(InboundBuffer.java:230)
	at io.vertx.core.streams.impl.InboundBuffer.write(InboundBuffer.java:120)
	at io.vertx.core.net.impl.NetSocketImpl.handleMessage(NetSocketImpl.java:371)
	at io.vertx.core.net.impl.ConnectionBase.handleRead(ConnectionBase.java:390)
	at io.vertx.core.impl.ContextImpl.executeTask(ContextImpl.java:320)
	at io.vertx.core.impl.EventLoopContext.execute(EventLoopContext.java:43)
	at io.vertx.core.impl.ContextImpl.executeFromIO(ContextImpl.java:188)
	at io.vertx.core.net.impl.VertxHandler.channelRead(VertxHandler.java:174)
	at io.netty.channel.AbstractChannelHandlerContext.invokeChannelRead(AbstractChannelHandlerContext.java:362)
	at io.netty.channel.AbstractChannelHandlerContext.invokeChannelRead(AbstractChannelHandlerContext.java:348)
	at io.netty.channel.AbstractChannelHandlerContext.fireChannelRead(AbstractChannelHandlerContext.java:340)
	at io.netty.channel.DefaultChannelPipeline$HeadContext.channelRead(DefaultChannelPipeline.java:1434)
	at io.netty.channel.AbstractChannelHandlerContext.invokeChannelRead(AbstractChannelHandlerContext.java:362)
	at io.netty.channel.AbstractChannelHandlerContext.invokeChannelRead(AbstractChannelHandlerContext.java:348)
	at io.netty.channel.DefaultChannelPipeline.fireChannelRead(DefaultChannelPipeline.java:965)
	at io.netty.channel.nio.AbstractNioByteChannel$NioByteUnsafe.read(AbstractNioByteChannel.java:163)
	at io.netty.channel.nio.NioEventLoop.processSelectedKey(NioEventLoop.java:644)
	at io.netty.channel.nio.NioEventLoop.processSelectedKeysOptimized(NioEventLoop.java:579)
	at io.netty.channel.nio.NioEventLoop.processSelectedKeys(NioEventLoop.java:496)
	at io.netty.channel.nio.NioEventLoop.run(NioEventLoop.java:458)
	at io.netty.util.concurrent.SingleThreadEventExecutor$5.run(SingleThreadEventExecutor.java:897)
	at io.netty.util.concurrent.FastThreadLocalRunnable.run(FastThreadLocalRunnable.java:30)
	at java.base/java.lang.Thread.run(Thread.java:834)

Extra

Tested with Redis 5.0

@vietj vietj added this to the 3.7.1 milestone Mar 31, 2019
@pmlopes pmlopes closed this as completed in 97605de Apr 4, 2019
pmlopes added a commit that referenced this issue Apr 4, 2019
(cherry picked from commit 97605de)
@mikand13
Copy link

This shows up for me as well, hard to pin down exactly what command does it in my case, but ill try creating a reproducer. Reverting to 3.6.3 solved it for now.

@pmlopes
Copy link
Member

pmlopes commented Apr 16, 2019

The fix is on master and will be backported to 3.7 branch too.

@mikand13
Copy link

Alright. Was this only related to info, or generally to send commands?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Development

No branches or pull requests

4 participants