You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@flume.apache.org by "JunLuo (JIRA)" <ji...@apache.org> on 2015/01/28 09:56:34 UTC

[jira] [Created] (FLUME-2611) Can't send message to flume through python script

JunLuo created FLUME-2611:
-----------------------------

             Summary: Can't send message to flume through python script
                 Key: FLUME-2611
                 URL: https://issues.apache.org/jira/browse/FLUME-2611
             Project: Flume
          Issue Type: Question
          Components: Sinks+Sources
    Affects Versions: v1.5.2
         Environment: Linux
            Reporter: JunLuo


config file is as below:
agent.sources = seqGenSrc
agent.channels = memoryChannel
agent.sinks = loggerSink

agent.sources.seqGenSrc.type = netcat
agent.sources.seqGenSrc.bind = 168.7.2.167
agent.sources.seqGenSrc.port = 44444

agent.sinks.loggerSink.type = com.thilinamb.flume.sink.KafkaSink 
agent.sinks.loggerSink.topic = good
agent.sinks.loggerSink.kafka.metadata.broker.list = hosts
agent.sinks.loggerSink.kafka.serializer.class = kafka.serializer.StringEncoder
agent.sinks.loggerSink.kafka.request.required.acks = 1

python script is:
#1.py
import telnetlib
tn = telnetlib.Telnet(Host, port, timeout)
tn.write(‘hello’')
#2.py
from socket import *
tcpCliSock = socket(AF_INET, SOCK_STREAM)
tcpCliSock.connect((host, port))
tcpCliSock.send(data)

both of the two script can't send message to flume agent. But I can see the connection is established through netstat.
However, when I use telnet command in bash, message can be sent correctly.

Can someone tell me what happens?
 



--
This message was sent by Atlassian JIRA
(v6.3.4#6332)