[ 
https://issues.apache.org/jira/browse/FLUME-1036?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=13236345#comment-13236345
 ] 

[email protected] commented on FLUME-1036:
------------------------------------------------------


-----------------------------------------------------------
This is an automatically generated e-mail. To reply, visit:
https://reviews.apache.org/r/4464/#review6272
-----------------------------------------------------------



flume-ng-core/src/main/java/org/apache/flume/sink/LoggerSink.java
<https://reviews.apache.org/r/4464/#comment13597>

    Is this what you want?


- Brock


On 2012-03-23 05:21:27, Hari Shreedharan wrote:
bq.  
bq.  -----------------------------------------------------------
bq.  This is an automatically generated e-mail. To reply, visit:
bq.  https://reviews.apache.org/r/4464/
bq.  -----------------------------------------------------------
bq.  
bq.  (Updated 2012-03-23 05:21:27)
bq.  
bq.  
bq.  Review request for Flume.
bq.  
bq.  
bq.  Summary
bq.  -------
bq.  
bq.  Added functionality to support stopping of components if configuration 
changes. 
bq.  
bq.  
bq.  This addresses bug FLUME-1036.
bq.      https://issues.apache.org/jira/browse/FLUME-1036
bq.  
bq.  
bq.  Diffs
bq.  -----
bq.  
bq.    
flume-ng-core/src/main/java/org/apache/flume/lifecycle/LifecycleSupervisor.java 
dd757fc 
bq.    flume-ng-core/src/main/java/org/apache/flume/source/NetcatSource.java 
94245ac 
bq.    
flume-ng-node/src/main/java/org/apache/flume/conf/properties/PropertiesFileConfigurationProvider.java
 97f72e1 
bq.    
flume-ng-node/src/main/java/org/apache/flume/node/nodemanager/DefaultLogicalNodeManager.java
 c150097 
bq.    
flume-ng-node/src/main/java/org/apache/flume/node/nodemanager/NodeConfigurationAware.java
 47249e9 
bq.  
bq.  Diff: https://reviews.apache.org/r/4464/diff
bq.  
bq.  
bq.  Testing
bq.  -------
bq.  
bq.  Tested change of configuration - no bind exception when port remains the 
same. When port changes, old port is no longer accessible, new port is. 
bq.  
bq.  
bq.  Thanks,
bq.  
bq.  Hari
bq.  
bq.


                
> Reconfiguration of AVRO or NETCAT source causes port bind exception
> -------------------------------------------------------------------
>
>                 Key: FLUME-1036
>                 URL: https://issues.apache.org/jira/browse/FLUME-1036
>             Project: Flume
>          Issue Type: Bug
>          Components: Sinks+Sources
>    Affects Versions: v1.2.0
>         Environment: [CentOS 6.2 64-bit]
>            Reporter: Will McQueen
>         Attachments: FLUME-1036-1.patch
>
>
> This issue occurs with a source that has binds to a port, such as NETCAT or 
> AVRO. In the steps below, I use AVRO as an example.
> Steps:
> 1. Run with a props file that includes an avro source, such as a props file 
> with these contents:
> # a = agent
> # r = source
> # c = channel
> # k = sink
> a1.sources = r1
> a1.channels = c1
> a1.sinks = k1
> # ===SOURCES===
> a1.sources.r1.type = AVRO
> a1.sources.r1.bind = localhost
> a1.sources.r1.port = 1473
> a1.sources.r1.channels = c1
> # ===CHANNELS===
> a1.channels.c1.type = MEMORY
> # ===SINKS===
> a1.sinks.k1.type = LOGGER
> a1.sinks.k1.channel = c1
> 2. Run the flume node
> [will@localhost flume-1.2.0-incubating-SNAPSHOT]$ pwd
> /home/will/git/apache/flume/flume-1.2.0-incubating-SNAPSHOT
> [will@localhost flume-1.2.0-incubating-SNAPSHOT]$ bin/flume-ng node --conf 
> conf --conf-file conf/a1.properties --name a1
> 3. Simulate a reconfig of a file by just touching the props file:
> [will@localhost flume-1.2.0-incubating-SNAPSHOT]$ touch conf/a1.properties 
> At this point, an exception is thrown because an attempt is made to bind to 
> the same port, even though the port number specified in config file didn't 
> change (actually, nothing changed but the last modification time of the file).
> 2012-03-19 02:17:48,573 (lifecycleSupervisor-1-1) [ERROR - 
> org.apache.flume.lifecycle.LifecycleSupervisor$MonitorRunnable.run(LifecycleSupervisor.java:210)]
>  Unable to start EventDrivenSourceRunner: { source:AvroSource: { 
> bindAddress:localhost port:1473 } } - Exception follows.
> org.jboss.netty.channel.ChannelException: Failed to bind to: 
> localhost/127.0.0.1:1473
>       at 
> org.jboss.netty.bootstrap.ServerBootstrap.bind(ServerBootstrap.java:303)
>       at org.apache.avro.ipc.NettyServer.<init>(NettyServer.java:85)
>       at org.apache.avro.ipc.NettyServer.<init>(NettyServer.java:66)
>       at org.apache.flume.source.AvroSource.start(AvroSource.java:124)
>       at 
> org.apache.flume.source.EventDrivenSourceRunner.start(EventDrivenSourceRunner.java:39)
>       at 
> org.apache.flume.lifecycle.LifecycleSupervisor$MonitorRunnable.run(LifecycleSupervisor.java:208)

--
This message is automatically generated by JIRA.
If you think it was sent incorrectly, please contact your JIRA administrators: 
https://issues.apache.org/jira/secure/ContactAdministrators!default.jspa
For more information on JIRA, see: http://www.atlassian.com/software/jira

        

Reply via email to