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

Readable byte limit exceeded: 1305 #686

Open
viandham opened this issue Oct 30, 2015 · 2 comments
Open

Readable byte limit exceeded: 1305 #686

viandham opened this issue Oct 30, 2015 · 2 comments

Comments

@viandham
Copy link

I'm running ES 2.0.0-beta2 (via their apt repo), and the latest version of elasticsearch-jdbc, 2.0.0.1. I upgraded to this today, because I wanted to test the new stuff, was running 1.5 previously where everything was working.
JDK: OpenJDK Runtime Environment (IcedTea 2.5.6) (7u79-2.5.6-1~deb7u1)

The problem I encounter is this:

[11:18:58,968][ERROR][importer                 ][pool-3-thread-1] error while getting next input: Failed to deserialize exception response from stream
org.elasticsearch.transport.TransportSerializationException: Failed to deserialize exception response from stream
        at org.elasticsearch.transport.netty.MessageChannelHandler.handlerResponseError(MessageChannelHandler.java:199) ~[elasticsearch-jdbc-2.0.0.1-uberjar.jar:?]
        at org.elasticsearch.transport.netty.MessageChannelHandler.messageReceived(MessageChannelHandler.java:136) ~[elasticsearch-jdbc-2.0.0.1-uberjar.jar:?]
        at org.jboss.netty.channel.SimpleChannelUpstreamHandler.handleUpstream(SimpleChannelUpstreamHandler.java:70) ~[elasticsearch-jdbc-2.0.0.1-uberjar.jar:?]
        at org.jboss.netty.channel.DefaultChannelPipeline.sendUpstream(DefaultChannelPipeline.java:564) ~[elasticsearch-jdbc-2.0.0.1-uberjar.jar:?]
        at org.jboss.netty.channel.DefaultChannelPipeline$DefaultChannelHandlerContext.sendUpstream(DefaultChannelPipeline.java:791) ~[elasticsearch-jdbc-2.0.0.1-uberjar.jar:?]
        at org.jboss.netty.channel.Channels.fireMessageReceived(Channels.java:296) ~[elasticsearch-jdbc-2.0.0.1-uberjar.jar:?]
        at org.jboss.netty.handler.codec.frame.FrameDecoder.unfoldAndFireMessageReceived(FrameDecoder.java:462) ~[elasticsearch-jdbc-2.0.0.1-uberjar.jar:?]
        at org.jboss.netty.handler.codec.frame.FrameDecoder.callDecode(FrameDecoder.java:443) ~[elasticsearch-jdbc-2.0.0.1-uberjar.jar:?]
        at org.jboss.netty.handler.codec.frame.FrameDecoder.messageReceived(FrameDecoder.java:303) ~[elasticsearch-jdbc-2.0.0.1-uberjar.jar:?]
        at org.jboss.netty.channel.SimpleChannelUpstreamHandler.handleUpstream(SimpleChannelUpstreamHandler.java:70) ~[elasticsearch-jdbc-2.0.0.1-uberjar.jar:?]
        at org.jboss.netty.channel.DefaultChannelPipeline.sendUpstream(DefaultChannelPipeline.java:564) ~[elasticsearch-jdbc-2.0.0.1-uberjar.jar:?]
        at org.jboss.netty.channel.DefaultChannelPipeline.sendUpstream(DefaultChannelPipeline.java:559) ~[elasticsearch-jdbc-2.0.0.1-uberjar.jar:?]
        at org.jboss.netty.channel.Channels.fireMessageReceived(Channels.java:268) ~[elasticsearch-jdbc-2.0.0.1-uberjar.jar:?]
        at org.jboss.netty.channel.Channels.fireMessageReceived(Channels.java:255) ~[elasticsearch-jdbc-2.0.0.1-uberjar.jar:?]
        at org.jboss.netty.channel.socket.nio.NioWorker.read(NioWorker.java:88) ~[elasticsearch-jdbc-2.0.0.1-uberjar.jar:?]
        at org.jboss.netty.channel.socket.nio.AbstractNioWorker.process(AbstractNioWorker.java:108) ~[elasticsearch-jdbc-2.0.0.1-uberjar.jar:?]
        at org.jboss.netty.channel.socket.nio.AbstractNioSelector.run(AbstractNioSelector.java:337) ~[elasticsearch-jdbc-2.0.0.1-uberjar.jar:?]
        at org.jboss.netty.channel.socket.nio.AbstractNioWorker.run(AbstractNioWorker.java:89) ~[elasticsearch-jdbc-2.0.0.1-uberjar.jar:?]
        at org.jboss.netty.channel.socket.nio.NioWorker.run(NioWorker.java:178) ~[elasticsearch-jdbc-2.0.0.1-uberjar.jar:?]
        at org.jboss.netty.util.ThreadRenamingRunnable.run(ThreadRenamingRunnable.java:108) ~[elasticsearch-jdbc-2.0.0.1-uberjar.jar:?]
        at org.jboss.netty.util.internal.DeadLockProofWorker$1.run(DeadLockProofWorker.java:42) ~[elasticsearch-jdbc-2.0.0.1-uberjar.jar:?]
        at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1145) [?:1.7.0_79]
        at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:615) [?:1.7.0_79]
        at java.lang.Thread.run(Thread.java:745) [?:1.7.0_79]
Caused by: java.io.IOException: failed to read exception for id [52]
        at org.elasticsearch.ElasticsearchException.readException(ElasticsearchException.java:242) ~[elasticsearch-jdbc-2.0.0.1-uberjar.jar:?]
        at org.elasticsearch.common.io.stream.StreamInput.readThrowable(StreamInput.java:488) ~[elasticsearch-jdbc-2.0.0.1-uberjar.jar:?]
        at org.elasticsearch.transport.netty.MessageChannelHandler.handlerResponseError(MessageChannelHandler.java:197) ~[elasticsearch-jdbc-2.0.0.1-uberjar.jar:?]
        ... 23 more
Caused by: java.lang.reflect.InvocationTargetException
        at sun.reflect.NativeConstructorAccessorImpl.newInstance0(Native Method) ~[?:1.7.0_79]
        at sun.reflect.NativeConstructorAccessorImpl.newInstance(NativeConstructorAccessorImpl.java:57) ~[?:1.7.0_79]
        at sun.reflect.DelegatingConstructorAccessorImpl.newInstance(DelegatingConstructorAccessorImpl.java:45) ~[?:1.7.0_79]
        at java.lang.reflect.Constructor.newInstance(Constructor.java:526) ~[?:1.7.0_79]
        at org.elasticsearch.ElasticsearchException.readException(ElasticsearchException.java:240) ~[elasticsearch-jdbc-2.0.0.1-uberjar.jar:?]
        at org.elasticsearch.common.io.stream.StreamInput.readThrowable(StreamInput.java:488) ~[elasticsearch-jdbc-2.0.0.1-uberjar.jar:?]
        at org.elasticsearch.transport.netty.MessageChannelHandler.handlerResponseError(MessageChannelHandler.java:197) ~[elasticsearch-jdbc-2.0.0.1-uberjar.jar:?]
        ... 23 more
Caused by: java.lang.IndexOutOfBoundsException: Readable byte limit exceeded: 1305
        at org.jboss.netty.buffer.AbstractChannelBuffer.readByte(AbstractChannelBuffer.java:236) ~[elasticsearch-jdbc-2.0.0.1-uberjar.jar:?]
        at org.elasticsearch.transport.netty.ChannelBufferStreamInput.readByte(ChannelBufferStreamInput.java:132) ~[elasticsearch-jdbc-2.0.0.1-uberjar.jar:?]
        at org.elasticsearch.common.io.stream.StreamInput.readString(StreamInput.java:254) ~[elasticsearch-jdbc-2.0.0.1-uberjar.jar:?]
        at org.elasticsearch.ElasticsearchException.readStackTrace(ElasticsearchException.java:428) ~[elasticsearch-jdbc-2.0.0.1-uberjar.jar:?]
        at org.elasticsearch.ElasticsearchException.<init>(ElasticsearchException.java:85) ~[elasticsearch-jdbc-2.0.0.1-uberjar.jar:?]
        at org.elasticsearch.index.engine.EngineException.<init>(EngineException.java:43) ~[elasticsearch-jdbc-2.0.0.1-uberjar.jar:?]
        at org.elasticsearch.index.engine.VersionConflictEngineException.<init>(VersionConflictEngineException.java:42) ~[elasticsearch-jdbc-2.0.0.1-uberjar.jar:?]
        at sun.reflect.NativeConstructorAccessorImpl.newInstance0(Native Method) ~[?:1.7.0_79]
        at sun.reflect.NativeConstructorAccessorImpl.newInstance(NativeConstructorAccessorImpl.java:57) ~[?:1.7.0_79]
        at sun.reflect.DelegatingConstructorAccessorImpl.newInstance(DelegatingConstructorAccessorImpl.java:45) ~[?:1.7.0_79]
        at java.lang.reflect.Constructor.newInstance(Constructor.java:526) ~[?:1.7.0_79]
        at org.elasticsearch.ElasticsearchException.readException(ElasticsearchException.java:240) ~[elasticsearch-jdbc-2.0.0.1-uberjar.jar:?]
        at org.elasticsearch.common.io.stream.StreamInput.readThrowable(StreamInput.java:488) ~[elasticsearch-jdbc-2.0.0.1-uberjar.jar:?]
        at org.elasticsearch.transport.netty.MessageChannelHandler.handlerResponseError(MessageChannelHandler.java:197) ~[elasticsearch-jdbc-2.0.0.1-uberjar.jar:?]
        ... 23 more
[11:19:03,984][WARN ][org.xbib.elasticsearch.support.client.transport.BulkTransportClient][Thread-1] no client

The script I run is here:

echo '
{
    "elasticsearch" : {
         "cluster" : "elasticsearch",
         "host" : "localhost",
         "port" : 9300
    },
    "type" : "jdbc",
    "jdbc" : {
        "url" : "jdbc:mysql://localhost:3306/zabbix",
        "user" : "root",
        "password" : "supersecret",
        "sql" : [
                {
                        "callable" : true,
                        "statement" : "CALL SPRC_ES_SYNC_WRAPPER();"
                }
        ],
        "treat_binary_as_string" : true,
        "index" : "zbxdata-'`date +%Y.%m.%d`'",
        "index_settings" : {
                "index" : {
                        "number_of_shards" : 1,
                        "number_of_replicas" : 0
                }
        },
        "type_mapping" : {
                "jdbc" : {
                        "properties" : {
                                "metric" : { "type" : "string", "index" : "not_analyzed" },
                                "hostname" : { "type" : "string", "index" : "not_analyzed" },
                                "value" : { "type" : "double" }
                        }
                }
        }
    }
}
' | java \
    -cp "${lib}/*" \
    org.xbib.tools.Runner \
    org.xbib.tools.JDBCImporter

The whole stack, mysql, es-jdbc and es itself runs on the same machine so there is no issue with different java versions.

Any idea why this error occurs?

@jprante
Copy link
Owner

jprante commented Oct 30, 2015

JDBC importer 2.0.0.1 is for ES 2.0.0 only. Not 2.0.0-beta2.

@viandham
Copy link
Author

That makes total sense!

For future readers:
http://packages.elasticsearch.org/elasticsearch/2.0/debian <-- contains only beta for 2.0
http://packages.elasticsearch.org/elasticsearch/2.x/debian <-- contains the actual 2.0

Working now, thank you!

/A

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

No branches or pull requests

2 participants