You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@flume.apache.org by Alexander Alten-Lorenz <wg...@gmail.com> on 2013/01/02 09:04:50 UTC

Re: help with Djava.library.path in flume

Hi,

Check the flume-env.sh.template (FLUME_CLASSPATH=""). 
The included libs will be constructed in bin/flume-ng, starting line 63

Cheers,
 Alex 


On Dec 29, 2012, at 8:46 PM, Liting Hu <fo...@gmail.com> wrote:

> Hi, everyone..
> 
> My flume code needs to use zeromq.jar, so i imported it. It compile
> successfully and install successfully.
> 
> However, when I run flume-ng, it can not link to libjzmq.so. I googled it
> and find out the java library path for JVM options need to be set at first.
> 
> So I parse the follows into the flume-ng command line
> 
> -Djava.library.path=/usr/local/lib
> 
> 
> Then I found out....Djava.library.path has been overwritten!!!!
> 
> see the follows:
> bin/flume-ng agent -Djava.library.path=/usr/local/lib -c conf -f
> ~/Desktop/myFlumeConf/agent1.conf -n agent1
> -Dflume.root.logger=INFO,console
> + exec /usr/lib/jvm/java-1.6.0-openjdk/bin/java -Xmx20m
> -Djava.library.path=/usr/local/lib -Dflume.root.logger=INFO,console -cp
> '/home/liting/apache-flume-1.3.0-bin/conf:/home/liting/apache-flume-1.3.0-bin/lib/*'
> -Djava.library.path= org.apache.flume.node.Application -f
> /home/liting/Desktop/myFlumeConf/agent1.conf -n agent1
> 2012-12-29 14:28:17,873 (main) [INFO -
> org.apache.flume.lifecycle.LifecycleSupervisor.start(LifecycleSupervisor.java:67)]
> Starting lifecycle supervisor 1
> 2012-12-29 14:28:17,883 (main) [INFO -
> org.apache.flume.node.FlumeNode.start(FlumeNode.java:54)] Flume node
> starting - agent1
> 2012-12-29 14:28:17,893 (lifecycleSupervisor-1-1) [INFO -
> org.apache.flume.conf.file.AbstractFileConfigurationProvider.start(AbstractFileConfigurationProvider.java:67)]
> Configuration provider starting
> 
> my code still reports the following error.
> java.lang.
> NoClassDefFoundError: org/zeromq/ZMQ
> 
> Any clue?
> 
> Thanks,
> LIting


Re: help with Djava.library.path in flume

Posted by Liting Hu <fo...@gmail.com>.
Thanks a lot Alex!

On Wed, Jan 2, 2013 at 3:04 AM, Alexander Alten-Lorenz
<wg...@gmail.com>wrote:

> Hi,
>
> Check the flume-env.sh.template (FLUME_CLASSPATH="").
> The included libs will be constructed in bin/flume-ng, starting line 63
>
> Cheers,
>  Alex
>
>
> On Dec 29, 2012, at 8:46 PM, Liting Hu <fo...@gmail.com> wrote:
>
> > Hi, everyone..
> >
> > My flume code needs to use zeromq.jar, so i imported it. It compile
> > successfully and install successfully.
> >
> > However, when I run flume-ng, it can not link to libjzmq.so. I googled it
> > and find out the java library path for JVM options need to be set at
> first.
> >
> > So I parse the follows into the flume-ng command line
> >
> > -Djava.library.path=/usr/local/lib
> >
> >
> > Then I found out....Djava.library.path has been overwritten!!!!
> >
> > see the follows:
> > bin/flume-ng agent -Djava.library.path=/usr/local/lib -c conf -f
> > ~/Desktop/myFlumeConf/agent1.conf -n agent1
> > -Dflume.root.logger=INFO,console
> > + exec /usr/lib/jvm/java-1.6.0-openjdk/bin/java -Xmx20m
> > -Djava.library.path=/usr/local/lib -Dflume.root.logger=INFO,console -cp
> >
> '/home/liting/apache-flume-1.3.0-bin/conf:/home/liting/apache-flume-1.3.0-bin/lib/*'
> > -Djava.library.path= org.apache.flume.node.Application -f
> > /home/liting/Desktop/myFlumeConf/agent1.conf -n agent1
> > 2012-12-29 14:28:17,873 (main) [INFO -
> >
> org.apache.flume.lifecycle.LifecycleSupervisor.start(LifecycleSupervisor.java:67)]
> > Starting lifecycle supervisor 1
> > 2012-12-29 14:28:17,883 (main) [INFO -
> > org.apache.flume.node.FlumeNode.start(FlumeNode.java:54)] Flume node
> > starting - agent1
> > 2012-12-29 14:28:17,893 (lifecycleSupervisor-1-1) [INFO -
> >
> org.apache.flume.conf.file.AbstractFileConfigurationProvider.start(AbstractFileConfigurationProvider.java:67)]
> > Configuration provider starting
> >
> > my code still reports the following error.
> > java.lang.
> > NoClassDefFoundError: org/zeromq/ZMQ
> >
> > Any clue?
> >
> > Thanks,
> > LIting
>
>