Return-Path: X-Original-To: apmail-avro-user-archive@www.apache.org Delivered-To: apmail-avro-user-archive@www.apache.org Received: from mail.apache.org (hermes.apache.org [140.211.11.3]) by minotaur.apache.org (Postfix) with SMTP id B33489DD5 for ; Mon, 16 Jul 2012 22:23:59 +0000 (UTC) Received: (qmail 63060 invoked by uid 500); 16 Jul 2012 22:23:59 -0000 Delivered-To: apmail-avro-user-archive@avro.apache.org Received: (qmail 62972 invoked by uid 500); 16 Jul 2012 22:23:59 -0000 Mailing-List: contact user-help@avro.apache.org; run by ezmlm Precedence: bulk List-Help: List-Unsubscribe: List-Post: List-Id: Reply-To: user@avro.apache.org Delivered-To: mailing list user@avro.apache.org Received: (qmail 62964 invoked by uid 99); 16 Jul 2012 22:23:59 -0000 Received: from minotaur.apache.org (HELO minotaur.apache.org) (140.211.11.9) by apache.org (qpsmtpd/0.29) with ESMTP; Mon, 16 Jul 2012 22:23:59 +0000 Received: from localhost (HELO mail-vb0-f43.google.com) (127.0.0.1) (smtp-auth username mpercy, mechanism plain) by minotaur.apache.org (qpsmtpd/0.29) with ESMTP; Mon, 16 Jul 2012 22:23:59 +0000 Received: by vbbfq11 with SMTP id fq11so5559728vbb.30 for ; Mon, 16 Jul 2012 15:23:57 -0700 (PDT) Received: by 10.52.95.82 with SMTP id di18mr37725vdb.61.1342477437851; Mon, 16 Jul 2012 15:23:57 -0700 (PDT) MIME-Version: 1.0 Received: by 10.58.219.137 with HTTP; Mon, 16 Jul 2012 15:23:17 -0700 (PDT) In-Reply-To: References: From: Mike Percy Date: Mon, 16 Jul 2012 15:23:17 -0700 Message-ID: Subject: Re: Avro remote exception To: user@flume.apache.org Content-Type: multipart/alternative; boundary=20cf307f3554cd579404c4f9e203 --20cf307f3554cd579404c4f9e203 Content-Type: text/plain; charset=UTF-8 (adding flume users list, bcc: avro users list) Shekhar, Can you please provide more information about what you are doing when you see this message and the version of Flume that you are running? Regards, Mike On Mon, Jul 16, 2012 at 3:12 PM, Doug Cutting wrote: > From the stack trace you sent this looks like an error thrown by > Flume, not by Avro. > > Doug > > On Fri, Jul 13, 2012 at 11:53 AM, shekhar sharma > wrote: > > Hello, > > i am using avro source to send the events to Flume Avro source. > Connection > > is fine but when i am sending the events it is throwing Avro remote > > exception. > > I have an application which uses RPC client factory get > > connected to the avro source. RpcClient is successfuly connected to > > the Avro Source but when i am sending the events to the Avro source i > > am getting AvroRemoteException. > > > > This is the following code snippet am using: > > AvroSource source = new AvroSource(); > > Channel channel = new MemoryChannel(); > > List ch = new ArrayList(); > > ch.add(channel); > > ChannelSelector cs = new ReplicatingChannelSelector(); > > cs.setChannels(ch); > > Configurables.configure(cs, new Context()); > > > > ChannelProcessor cp = new ChannelProcessor(cs); > > Context context = new Context(); > > context.put("bind","localhost" > > ); > > context.put("port", "12345"); > > source.configure(context); > > source.setChannelProcessor(cp); > > source.start(); > > //Server server = new NettyServer(new > > SpecificResponder(AvroSource.class, source), new > > InetSocketAddress("localhost",12345)); > > //server.start(); > > > > AvroSourceProtocol client = > > SpecificRequestor.getClient(AvroSourceProtocol.class, new > > NettyTransceiver(new InetSocketAddress(12345))); > > AvroFlumeEvent avroEvent = new AvroFlumeEvent(); > > > > avroEvent.setHeaders(new HashMap()); > > avroEvent.setBody(ByteBuffer.wrap("Hello avro".getBytes())); > > Status status = client.append(avroEvent); > > > > > > Transaction transaction = channel.getTransaction(); > > transaction.begin(); > > > > Event event1 = channel.take(); > > transaction.commit(); > > transaction.close(); > > > > And i am getting the following exception: > > > > [New I/O server worker #1-1] WARN org.apache.avro.ipc.Responder - user > error > > java.lang.NullPointerException > > at > > > org.apache.flume.channel.ChannelProcessor.processEvent(ChannelProcessor.java:183) > > at org.apache.flume.source.AvroSource.append(AvroSource.java:179) > > at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method) > > at > > > sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39) > > at > > > sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25) > > at java.lang.reflect.Method.invoke(Method.java:597) > > at > > > org.apache.avro.ipc.specific.SpecificResponder.respond(SpecificResponder.java:88) > > at org.apache.avro.ipc.Responder.respond(Responder.java:149) > > at > > > org.apache.avro.ipc.NettyServer$NettyServerAvroHandler.messageReceived(NettyServer.java:140) > > at > > > org.jboss.netty.channel.SimpleChannelUpstreamHandler.handleUpstream(SimpleChannelUpstreamHandler.java:80) > > at > > > org.apache.avro.ipc.NettyServer$NettyServerAvroHandler.handleUpstream(NettyServer.java:125) > > at > > > org.jboss.netty.channel.DefaultChannelPipeline.sendUpstream(DefaultChannelPipeline.java:564) > > at > > > org.jboss.netty.channel.DefaultChannelPipeline$DefaultChannelHandlerContext.sendUpstream(DefaultChannelPipeline.java:783) > > at > > org.jboss.netty.channel.Channels.fireMessageReceived(Channels.java:302) > > at > > > org.jboss.netty.handler.codec.frame.FrameDecoder.unfoldAndFireMessageReceived(FrameDecoder.java:317) > > at > > > org.jboss.netty.handler.codec.frame.FrameDecoder.callDecode(FrameDecoder.java:299) > > at > > > org.jboss.netty.handler.codec.frame.FrameDecoder.messageReceived(FrameDecoder.java:216) > > at > > > org.jboss.netty.channel.SimpleChannelUpstreamHandler.handleUpstream(SimpleChannelUpstreamHandler.java:80) > > at > > > org.jboss.netty.channel.DefaultChannelPipeline.sendUpstream(DefaultChannelPipeline.java:564) > > at > > > org.jboss.netty.channel.DefaultChannelPipeline.sendUpstream(DefaultChannelPipeline.java:559) > > at > > org.jboss.netty.channel.Channels.fireMessageReceived(Channels.java:274) > > at > > org.jboss.netty.channel.Channels.fireMessageReceived(Channels.java:261) > > at > > org.jboss.netty.channel.socket.nio.NioWorker.read(NioWorker.java:351) > > at > > > org.jboss.netty.channel.socket.nio.NioWorker.processSelectedKeys(NioWorker.java:282) > > at > > org.jboss.netty.channel.socket.nio.NioWorker.run(NioWorker.java:202) > > at > > > org.jboss.netty.util.ThreadRenamingRunnable.run(ThreadRenamingRunnable.java:108) > > at > > > org.jboss.netty.util.internal.DeadLockProofWorker$1.run(DeadLockProofWorker.java:44) > > 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) > --20cf307f3554cd579404c4f9e203 Content-Type: text/html; charset=UTF-8 Content-Transfer-Encoding: quoted-printable (adding flume users list, bcc: avro users list)

Shekhar,
Can you = please provide more information about what you are doing when you see this = message and the version of Flume that you are running?

Regards,
Mike


On Mon, Jul 16, 2012 at 3:12 PM,= Doug Cutting <cutting@apache.org> wrote:
>From the stack trace you sent this looks like an error thrown by
Flume, not by Avro.

Doug

On Fri, Jul 13, 2012 at 11:53 AM, shekhar sharma <shekhar2581@gmail.com> wrote:
> Hello,
> i am using avro source to send the events to Flume Avro source. Connec= tion
> is fine but when i am sending the events it is throwing Avro remote > exception.
> I =C2=A0have an application which uses RPC client factory get
> connected to the avro source. RpcClient is successfuly connected to > the Avro Source but when i am sending the events to the Avro source i<= br> > am getting AvroRemoteException.
>
> This is the following code snippet =C2=A0am using:
> AvroSource source =3D new AvroSource();
> =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 Channel channe= l =3D new MemoryChannel();
> =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 List<Channe= l> ch =3D new ArrayList();
> =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 ch.add(channel= );
> =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 ChannelSelecto= r cs =3D =C2=A0new ReplicatingChannelSelector();
> =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 cs.setChannels= (ch);
> =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 Configurables.= configure(cs, new Context());
>
> =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 ChannelProcess= or cp =3D new ChannelProcessor(cs);
> =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 Context contex= t =3D new Context();
> =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 context.put(&q= uot;bind","localhost"
> );
> =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 context.put(&q= uot;port", "12345");
> =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 source.configu= re(context);
> =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 source.setChan= nelProcessor(cp);
> =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 source.start()= ;
> =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 //Server serve= r =3D new NettyServer(new
> SpecificResponder(AvroSource.class, source), new
> InetSocketAddress("localhost",12345));
> =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 //server.start= ();
>
> =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 AvroSourceProt= ocol client =3D
> SpecificRequestor.getClient(AvroSourceProtocol.class, new
> NettyTransceiver(new InetSocketAddress(12345)));
> =C2=A0 =C2=A0 =C2=A0 =C2=A0 AvroFlumeEvent avroEvent =3D new AvroFlume= Event();
>
> =C2=A0 =C2=A0 =C2=A0 =C2=A0 avroEvent.setHeaders(new HashMap<CharSe= quence, CharSequence>());
> =C2=A0 =C2=A0 =C2=A0 =C2=A0 avroEvent.setBody(ByteBuffer.wrap("He= llo avro".getBytes()));
> =C2=A0 =C2=A0 =C2=A0 =C2=A0 Status status =3D client.append(avroEvent)= ;
>
>
> =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 Transaction tr= ansaction =3D channel.getTransaction();
> =C2=A0 =C2=A0 =C2=A0 =C2=A0 transaction.begin();
>
> =C2=A0 =C2=A0 =C2=A0 =C2=A0 Event event1 =3D channel.take();
> =C2=A0 =C2=A0 =C2=A0 =C2=A0 transaction.commit();
> =C2=A0 =C2=A0 =C2=A0 =C2=A0 transaction.close();
>
> And i am getting the following exception:
>
> [New I/O server worker #1-1] WARN org.apache.avro.ipc.Responder - user= error
> java.lang.NullPointerException
> =C2=A0 =C2=A0 =C2=A0 =C2=A0 at
> org.apache.flume.channel.ChannelProcessor.processEvent(ChannelProcesso= r.java:183)
> =C2=A0 =C2=A0 =C2=A0 =C2=A0 at org.apache.flume.source.AvroSource.appe= nd(AvroSource.java:179)
> =C2=A0 =C2=A0 =C2=A0 =C2=A0 at sun.reflect.NativeMethodAccessorImpl.in= voke0(Native Method)
> =C2=A0 =C2=A0 =C2=A0 =C2=A0 at
> sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.j= ava:39)
> =C2=A0 =C2=A0 =C2=A0 =C2=A0 at
> sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccess= orImpl.java:25)
> =C2=A0 =C2=A0 =C2=A0 =C2=A0 at java.lang.reflect.Method.invoke(Method.= java:597)
> =C2=A0 =C2=A0 =C2=A0 =C2=A0 at
> org.apache.avro.ipc.specific.SpecificResponder.respond(SpecificRespond= er.java:88)
> =C2=A0 =C2=A0 =C2=A0 =C2=A0 at org.apache.avro.ipc.Responder.respond(R= esponder.java:149)
> =C2=A0 =C2=A0 =C2=A0 =C2=A0 at
> org.apache.avro.ipc.NettyServer$NettyServerAvroHandler.messageReceived= (NettyServer.java:140)
> =C2=A0 =C2=A0 =C2=A0 =C2=A0 at
> org.jboss.netty.channel.SimpleChannelUpstreamHandler.handleUpstream(Si= mpleChannelUpstreamHandler.java:80)
> =C2=A0 =C2=A0 =C2=A0 =C2=A0 at
> org.apache.avro.ipc.NettyServer$NettyServerAvroHandler.handleUpstream(= NettyServer.java:125)
> =C2=A0 =C2=A0 =C2=A0 =C2=A0 at
> org.jboss.netty.channel.DefaultChannelPipeline.sendUpstream(DefaultCha= nnelPipeline.java:564)
> =C2=A0 =C2=A0 =C2=A0 =C2=A0 at
> org.jboss.netty.channel.DefaultChannelPipeline$DefaultChannelHandlerCo= ntext.sendUpstream(DefaultChannelPipeline.java:783)
> =C2=A0 =C2=A0 =C2=A0 =C2=A0 at
> org.jboss.netty.channel.Channels.fireMessageReceived(Channels.java:302= )
> =C2=A0 =C2=A0 =C2=A0 =C2=A0 at
> org.jboss.netty.handler.codec.frame.FrameDecoder.unfoldAndFireMessageR= eceived(FrameDecoder.java:317)
> =C2=A0 =C2=A0 =C2=A0 =C2=A0 at
> org.jboss.netty.handler.codec.frame.FrameDecoder.callDecode(FrameDecod= er.java:299)
> =C2=A0 =C2=A0 =C2=A0 =C2=A0 at
> org.jboss.netty.handler.codec.frame.FrameDecoder.messageReceived(Frame= Decoder.java:216)
> =C2=A0 =C2=A0 =C2=A0 =C2=A0 at
> org.jboss.netty.channel.SimpleChannelUpstreamHandler.handleUpstream(Si= mpleChannelUpstreamHandler.java:80)
> =C2=A0 =C2=A0 =C2=A0 =C2=A0 at
> org.jboss.netty.channel.DefaultChannelPipeline.sendUpstream(DefaultCha= nnelPipeline.java:564)
> =C2=A0 =C2=A0 =C2=A0 =C2=A0 at
> org.jboss.netty.channel.DefaultChannelPipeline.sendUpstream(DefaultCha= nnelPipeline.java:559)
> =C2=A0 =C2=A0 =C2=A0 =C2=A0 at
> org.jboss.netty.channel.Channels.fireMessageReceived(Channels.java:274= )
> =C2=A0 =C2=A0 =C2=A0 =C2=A0 at
> org.jboss.netty.channel.Channels.fireMessageReceived(Channels.java:261= )
> =C2=A0 =C2=A0 =C2=A0 =C2=A0 at
> org.jboss.netty.channel.socket.nio.NioWorker.read(NioWorker.java:351)<= br> > =C2=A0 =C2=A0 =C2=A0 =C2=A0 at
> org.jboss.netty.channel.socket.nio.NioWorker.processSelectedKeys(NioWo= rker.java:282)
> =C2=A0 =C2=A0 =C2=A0 =C2=A0 at
> org.jboss.netty.channel.socket.nio.NioWorker.run(NioWorker.java:202) > =C2=A0 =C2=A0 =C2=A0 =C2=A0 at
> org.jboss.netty.util.ThreadRenamingRunnable.run(ThreadRenamingRunnable= .java:108)
> =C2=A0 =C2=A0 =C2=A0 =C2=A0 at
> org.jboss.netty.util.internal.DeadLockProofWorker$1.run(DeadLockProofW= orker.java:44)
> =C2=A0 =C2=A0 =C2=A0 =C2=A0 at
> java.util.concurrent.ThreadPoolExecutor$Worker.runTask(ThreadPoolExecu= tor.java:886)
> =C2=A0 =C2=A0 =C2=A0 =C2=A0 at
> java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.= java:908)
> =C2=A0 =C2=A0 =C2=A0 =C2=A0 at java.lang.Thread.run(Thread.java:662)

--20cf307f3554cd579404c4f9e203--