hi, all:
I want to use exec source under Flume 1.5.0.  Follow the flume user guide, tail 
command is running successfully on my computer, the flume.conf is :

a1.sources.r1.type = exec
      a1.sources.r1.command = tail -F /var/log/secure

When I want to run Python script,  change the flume.conf as follows:

a1.sources.r1.type = exec
      a1.sources.r1.command = python /home/test.py

The  test.py is very simpe,  just print string line periodically

cat test_flume.py 

#!/usr/bin/python

import sys
import time

sys.stdout.write("gogogo\n")
while True:
           sys.stdout.write("gogogo\n")
           time.sleep(3)

Start the flume with: nohup bin/flume-ng agent --conf ./conf/ -f 
./conf/flume.conf -n a1 &
The flume is running and the python subprocess is existed, but no data is 
catched from command : python /home/test.py, looks like Flume cann't read 
anything from Python stdout.

Can someone help me ? T_T   Thank you very much!




2014-09-18



shengyi.pan

Reply via email to