I came across the same problem with flume 0.9.5 from the trunk using thrift 
0.7.0 runtime library.
I had to to use thrift 0.6.0 compiler during the build process to be able to 
build flume. 

Any progress on that issue? 

-----Original Message-----
From: ankul rastogi [mailto:[email protected]] 
Sent: Sunday, January 01, 2012 7:02 AM
To: [email protected]
Subject: NPE issue with thrift

Hi,
I am trying to run flume after compiling from the trunk. I was able to setup 
the master node and collector system. When I try to create a channel for data 
flow I get the following error on the collector side.

-----------------------------

2011-12-31 14:01:09,844 [pool-2-thread-6] ERROR
server.TSaneThreadPoolServer: Error occurred during processing of message.
java.lang.NullPointerException
      at org.apache.thrift.ProcessFunction.process(ProcessFunction.java:34)
      at org.apache.thrift.TBaseProcessor.process(TBaseProcessor.java:34)
      at 
org.apache.thrift.server.TSaneThreadPoolServer$WorkerProcess.run(TSaneThreadPoolServer.java:280)
      at 
java.util.concurrent.ThreadPoolExecutor$Worker.runTask(ThreadPoolExecutor.java:886)
      at 
java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:908)
      at java.lang.Thread.run(Thread.java:662)
Xephyr [INFO Sat Dec 31 14:01:09 IST 2011] { AckChecksum :
(long)1325320259830  (string) ' ' (double)6.547952101194E-312 } { AckTag : 
20111231-140059828+0530.18934067081178.00000025 } { AckType :
end }
 ----------------------------------------

On my Agent Node I get the following log
---------------------------------------------

2011-12-31 14:03:53,873 [naive file wal consumer-26] INFO
thrift.ThriftEventSink: ThriftEventSink on port 35880 closed
2011-12-31 14:03:53,873 [naive file wal consumer-26] INFO
thrift.ThriftEventSink: ThriftEventSink to localhost:35880 opened
2011-12-31 14:03:53,873 [naive file wal consumer-26] INFO
debug.InsistentOpenDecorator: Opened ThriftEventSink on try 0
2011-12-31 14:03:53,874 [naive file wal consumer-26] INFO
agent.WALAckManager: Ack for
20111231-140139864+0530.18974103299247.00000025 is queued to be
checked
2011-12-31 14:03:53,874 [naive file wal consumer-26] INFO
durability.WALSource: end of file NaiveFileWALManager 
(dir=/tmp/flume-ankul/agent/Xephyr )
2011-12-31 14:03:53,874 [naive file wal consumer-26] INFO
durability.NaiveFileWALManager: opening log file
20111231-135939762+0530.18854000963959.00000025
2011-12-31 14:03:53,874 [naive file wal consumer-26] INFO
debug.StubbornAppendSink: append failed on event 'Xephyr [INFO Sat Dec
31 13:59:39 IST 2011] { AckChecksum : (long)1325320179764  (string) ' ' 
(double)6.547951705615E-312 } { AckTag :
20111231-135939762+0530.18854000963959.00000025 } { AckType : beg } '
with error: Append failed java.net.SocketException: Connection reset
2011-12-31 14:03:53,874 [naive file wal consumer-26] INFO
thrift.ThriftEventSink: ThriftEventSink on port 35880 closed
2011-12-31 14:03:53,874 [naive file wal consumer-26] INFO
thrift.ThriftEventSink: ThriftEventSink to localhost:35880 opened
2011-12-31 14:03:53,874 [naive file wal consumer-26] INFO
debug.InsistentOpenDecorator: Opened ThriftEventSink on try 0
2011-12-31 14:03:53,875 [naive file wal consumer-26] INFO
agent.WALAckManager: Ack for
20111231-135939762+0530.18854000963959.00000025 is queued to be
checked
2011-12-31 14:03:53,875 [naive file wal consumer-26] INFO
durability.WALSource: end of file NaiveFileWALManager 
(dir=/tmp/flume-ankul/agent/Xephyr )
2011-12-31 14:03:53,875 [naive file wal consumer-26] INFO
durability.NaiveFileWALManager: opening log file
20111231-134539034+0530.18013273061228.00000019
2011-12-31 14:03:53,875 [naive file wal consumer-26] INFO
debug.StubbornAppendSink: append failed on event 'Xephyr [INFO Sat Dec
31 13:45:39 IST 2011] { AckChecksum : (long)1325319339036  (string) ' ' 
(double)6.547947551867E-312 } { AckTag :
20111231-134539034+0530.18013273061228.00000019 } { AckType : beg } '
with error: Append failed java.net.SocketException: Connection reset
2011-12-31 14:03:53,875 [naive file wal consumer-26] INFO
thrift.ThriftEventSink: ThriftEventSink on port 35880 closed
2011-12-31 14:03:53,875 [naive file wal consumer-26] INFO
thrift.ThriftEventSink: ThriftEventSink to localhost:35880 opened
2011-12-31 14:03:53,875 [naive file wal consumer-26] INFO
debug.InsistentOpenDecorator: Opened ThriftEventSink on try 0
2011-12-31 14:03:53,876 [naive file wal consumer-26] INFO
agent.WALAckManager: Ack for
20111231-134539034+0530.18013273061228.00000019 is queued to be
checked
2011-12-31 14:03:53,876 [naive file wal consumer-26] INFO
durability.WALSource: end of file NaiveFileWALManager 
(dir=/tmp/flume-ankul/agent/Xephyr )

-------------------------------------------------

Steps Followed -

1. Started master by flume master_nowatch 2. Started node using flume 
node_nowatch 3. Started collector using flume node_nowatch -n trial 4. Code 
checkout path - http://svn.apache.org/repos/asf/incubator/flume/trunk

In my master->config ,set the data flow as

host : console | agentSink("localhost",35880) ; trial : collectorSource(35880) 
| console ;

The port of my collector is 35863 but the TransportService for
collectorSource() was not able to bind itself to that port as it was used by 
internal Jetty, so specified a random port 35880.

I am not sure of the reason for NPE Exception. Can someone please throw some 
light.

Thanks
Ankul..!!!

Reply via email to