[
https://issues.apache.org/jira/browse/FLUME-1766?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=13510330#comment-13510330
]
Hari Shreedharan commented on FLUME-1766:
-----------------------------------------
Looks like this is the code in the start method that throws:
{code}
if(maxThreads <= 0) {
server = new NettyServer(responder,
new InetSocketAddress(bindAddress, port));
} else {
server = new NettyServer(responder, new InetSocketAddress(bindAddress,
port),
new NioServerSocketChannelFactory(
Executors.newCachedThreadPool(),
Executors.newFixedThreadPool(maxThreads)));
}
{code}
Either we should check hostname is not null or not empty in the configure
method, or we can set
{code}
bindAddress = InetAddress.getLocalHost().getCanonicalHostName();
{code}
Also the LifecycleSupervisor does not check for the hostname, it simply calls
start method, which is throwing in this case, which the LifecycleSupervisor
logs. LifecycleSupervisor is not really "aware" of any components.
> AvroSource throws confusing exception when configured without a port
> --------------------------------------------------------------------
>
> Key: FLUME-1766
> URL: https://issues.apache.org/jira/browse/FLUME-1766
> Project: Flume
> Issue Type: Bug
> Components: Sinks+Sources
> Affects Versions: v1.3.0
> Reporter: Mike Percy
> Assignee: Jeff Lord
> Priority: Minor
> Labels: newbie
> Fix For: v1.4.0
>
> Attachments: FLUME-1766-1.patch, FLUME-1766-2.patch
>
>
> 2012-12-03 18:25:08,210 (conf-file-poller-0) [DEBUG -
> org.apache.flume.source.DefaultSourceFactory.create(DefaultSourceFactory.java:74)]
> Creating instance of source src-1, type AVRO
> 2012-12-03 18:25:08,235 (conf-file-poller-0) [ERROR -
> org.apache.flume.conf.file.AbstractFileConfigurationProvider$FileWatcherRunnable.run(AbstractFileConfigurationProvider.java:204)]
> Failed to load configuration data. Exception follows.
> java.lang.NumberFormatException: null
> at java.lang.Integer.parseInt(Integer.java:417)
> at java.lang.Integer.parseInt(Integer.java:499)
> at org.apache.flume.source.AvroSource.configure(AvroSource.java:126)
> at org.apache.flume.conf.Configurables.configure(Configurables.java:41)
> at
> org.apache.flume.conf.properties.PropertiesFileConfigurationProvider.loadSources(PropertiesFileConfigurationProvider.java:323)
> at
> org.apache.flume.conf.properties.PropertiesFileConfigurationProvider.load(PropertiesFileConfigurationProvider.java:222)
> at
> org.apache.flume.conf.file.AbstractFileConfigurationProvider.doLoad(AbstractFileConfigurationProvider.java:123)
> at
> org.apache.flume.conf.file.AbstractFileConfigurationProvider.access$300(AbstractFileConfigurationProvider.java:38)
> at
> org.apache.flume.conf.file.AbstractFileConfigurationProvider$FileWatcherRunnable.run(AbstractFileConfigurationProvider.java:202)
> at
> java.util.concurrent.Executors$RunnableAdapter.call(Executors.java:439)
> at
> java.util.concurrent.FutureTask$Sync.innerRunAndReset(FutureTask.java:317)
> at java.util.concurrent.FutureTask.runAndReset(FutureTask.java:150)
> at
> java.util.concurrent.ScheduledThreadPoolExecutor$ScheduledFutureTask.access$101(ScheduledThreadPoolExecutor.java:98)
> at
> java.util.concurrent.ScheduledThreadPoolExecutor$ScheduledFutureTask.runPeriodic(ScheduledThreadPoolExecutor.java:180)
> at
> java.util.concurrent.ScheduledThreadPoolExecutor$ScheduledFutureTask.run(ScheduledThreadPoolExecutor.java:204)
> at
> java.util.concurrent.ThreadPoolExecutor$Worker.runTask(ThreadPoolExecutor.java:886)
> at
> java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:908)
> at java.lang.Thread.run(Thread.java:680)
> ^C2012-12-03 18:25:17,989 (node-shutdownHook) [INFO -
> org.apache.flume.node.FlumeNode.stop(FlumeNode.java:67)] Flume node stopping
> - agent
--
This message is automatically generated by JIRA.
If you think it was sent incorrectly, please contact your JIRA administrators
For more information on JIRA, see: http://www.atlassian.com/software/jira