Hi, Ambud,

Thanks for your reply.

I'm not using Maven to build my project. I tried excluding the conflict
classes when packaging the jar, but the worker in supervisor then complains
about NoClassDefException, though the class exists in one of the jars in
the classpath of the worker.

On Wed, Sep 14, 2016 at 7:04 AM, Ambud Sharma <asharma52...@gmail.com>
wrote:

> Can you post the snippet of your pom.xml file especially around where
> storm-core is imported?
>
> I suspect you are not excluding dependencies explicitly if there is a
> conflict in maven .
>
> What is serialized is your bolt instance so you need either have
> serialization objects or mark them transient and instantiate them in the
> prepare method.
>
> Thanks,
> Ambid
>
> On Sep 12, 2016 11:39 AM, "Jianfei Li" <lijianfei2...@gmail.com> wrote:
>
>>
>> Hi,
>>
>> I got a InvalidClassException in the supervior after uploading the jars
>> to storm using the *"storm jar"* command. The exception is as below:
>>
>> 2016-09-06 21:49:32.649 org.apache.storm.daemon.executor [INFO][main] 
>> Loading executor __acker:[8 8]
>> 2016-09-06 21:49:32.661 org.apache.storm.daemon.executor [INFO][main] Loaded 
>> executor tasks __acker:[8 8]
>> 2016-09-06 21:49:32.672 org.apache.storm.daemon.executor [INFO][main] 
>> Timeouts disabled for executor __acker:[8 8]
>> 2016-09-06 21:49:32.673 org.apache.storm.daemon.executor [INFO][main] 
>> Finished loading executor __acker:[8 8]
>> 2016-09-06 21:49:32.688 org.apache.storm.daemon.executor [INFO][main] 
>> Loading executor EventDistributionBolt:[2 2]
>> 2016-09-06 21:49:32.711 org.apache.storm.daemon.executor [INFO][main] Loaded 
>> executor tasks EventDistributionBolt:[2 2]
>> 2016-09-06 21:49:32.713 org.apache.storm.daemon.executor [INFO][main] 
>> Finished loading executor EventDistributionBolt:[2 2]
>> 2016-09-06 21:49:32.728 org.apache.storm.daemon.executor [INFO][main] 
>> Loading executor SubscriptionFinderBolt:[6 6]
>> 2016-09-06 21:49:32.735 org.apache.storm.daemon.executor [INFO][main] Loaded 
>> executor tasks SubscriptionFinderBolt:[6 6]
>> 2016-09-06 21:49:32.742 org.apache.storm.daemon.executor [INFO][main] 
>> Finished loading executor SubscriptionFinderBolt:[6 6]
>> 2016-09-06 21:49:32.753 org.apache.storm.daemon.executor [INFO][main] 
>> Loading executor __system:[-1 -1]
>> 2016-09-06 21:49:32.755 org.apache.storm.daemon.executor [INFO][main] Loaded 
>> executor tasks __system:[-1 -1]
>> 2016-09-06 21:49:32.757 org.apache.storm.daemon.executor [INFO][main] 
>> Finished loading executor __system:[-1 -1]
>> 2016-09-06 21:49:32.768 org.apache.storm.daemon.executor [INFO][main] 
>> Loading executor 
>> __metricscom.xxx.alp.storm.metric.ServiceLogMetricsConsumer:[10 10]
>> 2016-09-06 21:49:32.771 org.apache.storm.daemon.executor [INFO][main] Loaded 
>> executor tasks 
>> __metricscom.xxxx.alp.storm.metric.ServiceLogMetricsConsumer:[10 10]
>> 2016-09-06 21:49:32.777 org.apache.storm.daemon.executor [INFO][main] 
>> Finished loading executor 
>> __metricscom.xxxx.alp.storm.metric.ServiceLogMetricsConsumer:[10 10]
>> 2016-09-06 21:49:32.789 org.apache.storm.daemon.executor [INFO][main] 
>> Loading executor EventStreamSpout:[4 4]
>> 2016-09-06 21:49:32.807 org.apache.storm.messaging.netty.Client 
>> [ERROR][client-boss-1] connection attempt 2 to 
>> Netty-Client-alp-storm-supervisor-2a-i-f478ab2f.XXXXXXXX.com/xxxx:6700 
>> failed: java.net.ConnectException: Connection refused: 
>> alp-storm-supervisor-2a-i-f478ab2f.XXXX.com/xxxx:6700
>> 2016-09-06 
>> <http://alp-storm-supervisor-2a-i-f478ab2f.XXXX.com/xxxx:67002016-09-06> 
>> 21:49:32.936 org.apache.storm.daemon.worker [ERROR][main] Error on 
>> initialization of server mk-workerjava.lang.RuntimeException: 
>> java.io.InvalidClassException: 
>> com.fasterxml.jackson.databind.deser.BasicDeserializerFactory; local class 
>> incompatible: stream classdesc serialVersionUID = -1426550576764902820, 
>> local class serialVersionUID = 2445376702910286321
>>         at org.apache.storm.utils.Utils.javaDeserialize(Utils.java:179) 
>> ~[storm-core-1.0.x.jar:?]
>>         at 
>> org.apache.storm.utils.Utils.getSetComponentObject(Utils.java:430) 
>> ~[storm-core-1.0.x.jar:?]
>>         at org.apache.storm.daemon.task$get_task_object.invoke(task.clj:74) 
>> ~[storm-core-1.0.x.jar:?]
>>         at 
>> org.apache.storm.daemon.task$mk_task_data$fn__5625.invoke(task.clj:177) 
>> ~[storm-core-1.0.x.jar:?]
>>         at org.apache.storm.util$assoc_apply_self.invoke(util.clj:930) 
>> ~[storm-core-1.0.x.jar:?]
>>         at org.apache.storm.daemon.task$mk_task_data.invoke(task.clj:170) 
>> ~[storm-core-1.0.x.jar:?]
>>         at xxxx......
>>
>> From the exception, I figured out it was because the version of
>> jackson-databind classes in the uploaded jar was not the same as the
>> jackson-databind the supervisor uses. Then I make them the same and
>> re-upload the jars again. The executor at the supervisor node could be
>> started without issue this time.
>>
>> Based on this issue, my questions are:
>>
>>    1. Do I have to make all the shared classes between supervisor and
>>    the jar I uploaded the same version? This seems impossible, since once I
>>    uploading new jars containing new version or deploying new version of 
>> class
>>    to the supervisor, the issue above would happen.
>>    2. What is the serialize/deserialize machanism storm uses during
>>    starting an executor inside the worker process? What would it
>>    serialize/deserialize?
>>    3. If the answer to the first question is yes, how to upgrade a class
>>    shared by supervior and the uploaded jar without impacting the stream
>>    processing?
>>
>>
>> I would appreciate it very much if anyone could answer the questions.
>>
>> Thanks.
>>
>>
>>
>> --
>> Jianfei Li
>>
>>
>>
>> --
>> Jianfei Li
>>
>


-- 
Jianfei Li

Reply via email to