Hello experts,
I am trying to capture weblogs using the flume
netcat-collect source, if I try to bind it to the localhost, it works and
starts writing to HDFS, but if I enter an IP address of another server, I get
the following exception:
“ERROR source.NetcatSource: Unable to bind to socket.
Exception follows.
java.net.BindException: Cannot assign requested address”
This is Flume conf:
Logagent.sources = netcat-collectLogagent.channels =
memoryChannelLogagent.sinks = HDFS
Logagent.sources.netcat-collect.type =
netcatLogagent.sources.netcat-collect.bind = <machine IP
address>Logagent.sources.netcat-collect.port = 11111
Logagent.sinks.HDFS.type = hdfsLogagent.sinks.HDFS.hdfs.path =
hdfs://localhost:8020/user/flume/capturedLogsLogagent.sinks.HDFS.rollInterval =
30Logagent.sinks.HDFS.writeFormat = TextLogagent.sinks.HDFS.fileType =
DataStream
Logagent.channels.memoryChannel.type =
memoryLogagent.channels.memoryChannel.capacity = 10000
Logagent.sinks.HDFS.channel =
memoryChannelLogagent.sources.netcat-collect.channels = memoryChannel
Has anyone encountered this? Is there any special flume
configuration that needs to be added when binding netcat to non-local machines?
Thanks in advance.
Best regards,Bilal