You are viewing a plain text version of this content. The canonical link for it is here.
Posted to user@flume.apache.org by Simon Monecke <si...@gmail.com> on 2013/02/27 12:15:23 UTC

import a log file

Hi :)

I try to import a existing log file and i don't know why it doesn't work.

my configuration is
..
# Describe/configure the source
a1.sources.r1.type = exec
a1.sources.r1.command = cat ~/logfile
..

ERROR:
2013-02-27 12:12:11,831 (pool-4-thread-1) [INFO -
org.apache.flume.source.ExecSource$ExecRunnable.run(ExecSource.java:307)]
Command [cat ~/logfile] exited with 1
2013-02-27 12:12:11,838 (StderrReader-[cat ~/logfile]) [INFO -
org.apache.flume.source.ExecSource$StderrReader.run(ExecSource.java:347)]
StderrLogger exiting
java.io.IOException: Bad file descriptor




i tried a second conf:
..
# Describe/configure the source
a1.sources.r1.type = exec
a1.sources.r1.command = tail -F ~/tempfile
..
-> start agent, open second terminal and use "cat logfile >> tempfile"

ERROR:
Nothing happens...

Can anybody help me?

Regards,
Simon

Re: import a log file

Posted by Alexander Alten-Lorenz <wg...@gmail.com>.
> Command [cat ~/logfile] exited with 1

Use the full path instead the tilde.

- Alex

On Feb 27, 2013, at 12:15 PM, Simon Monecke <si...@gmail.com> wrote:

> Hi :)
> 
> I try to import a existing log file and i don't know why it doesn't work.
> 
> my configuration is
> ..
> # Describe/configure the source
> a1.sources.r1.type = exec
> a1.sources.r1.command = cat ~/logfile
> ..
> 
> ERROR:
> 2013-02-27 12:12:11,831 (pool-4-thread-1) [INFO - org.apache.flume.source.ExecSource$ExecRunnable.run(ExecSource.java:307)] Command [cat ~/logfile] exited with 1
> 2013-02-27 12:12:11,838 (StderrReader-[cat ~/logfile]) [INFO - org.apache.flume.source.ExecSource$StderrReader.run(ExecSource.java:347)] StderrLogger exiting
> java.io.IOException: Bad file descriptor
> 
> 
> 
> 
> i tried a second conf:
> ..
> # Describe/configure the source
> a1.sources.r1.type = exec
> a1.sources.r1.command = tail -F ~/tempfile
> ..
> -> start agent, open second terminal and use "cat logfile >> tempfile"
> 
> ERROR:
> Nothing happens...
> 
> Can anybody help me?
> 
> Regards,
> Simon

--
Alexander Alten-Lorenz
http://mapredit.blogspot.com
German Hadoop LinkedIn Group: http://goo.gl/N8pCF