Home | About | Sematext search-lucene.com search-hadoop.com
NEW: Monitor These Apps!
elasticsearch, apache solr, apache hbase, hadoop, redis, casssandra, amazon cloudwatch, mysql, memcached, apache kafka, apache zookeeper, apache storm, ubuntu, centOS, red hat, debian, puppet labs, java, senseiDB
 Search Hadoop and all its subprojects:

Switch to Plain View
Flume >> mail # dev >> Returns 127.0.0.1 at HostInterceptor


+
Denny Ye 2013-01-18, 09:33
+
Connor Woodson 2013-01-18, 09:39
+
Mike Percy 2013-01-18, 09:54
+
Denny Ye 2013-01-18, 09:59
Copy link to this message
-
Re: Returns 127.0.0.1 at HostInterceptor
I have wrote some codes to resolve this problem for me, and I want to know
if someone also need this function to obtains actual IP. If it's useful for
others, I can post patch for it if necessary
2013/1/18 Denny Ye <[EMAIL PROTECTED]>

> The result of ' InetAddress.getLocalHost().getCanonicalHostName()' is
> 'localhost', what's your advice if I would like to distinguish the actual
> IP of my several Flume servers?
>
>
> 2013/1/18 Mike Percy <[EMAIL PROTECTED]>
>
>> Today, InetAddress.getLocalHost().getCanonicalHostName() is used if you
>> pass useIP = false to the interceptor config.
>>
>> Regards,
>> Mike
>>
>>
>>
>> On Fri, Jan 18, 2013 at 1:39 AM, Connor Woodson <[EMAIL PROTECTED]
>> >wrote:
>>
>> > We could use InetAddress.getLocalHost().getCanonicalHostName() to get
>> just
>> > the IP, which I feel is good enough; a quick and dirty interceptor
>> could be
>> > built that substitutes certain names for their matching IP
>> > ('SubstitutionInterceptor'?) which would then work well with any other
>> > header-replacement needs someone would need.
>> >
>> > - Connor
>> >
>> >
>> > On Fri, Jan 18, 2013 at 1:33 AM, Denny Ye <[EMAIL PROTECTED]> wrote:
>> >
>> > > hi all, HostInterceptor obtains loopback address if there hasn't
>> > configure
>> > > for local server at /etc/hosts. Can we change the acquire method for
>> > local
>> > > IP. Currently, we are using
>> 'InetAddress.getLocalHost().getHostAddress()'
>> > >
>> >
>>
>
>
+
Mike Percy 2013-01-18, 10:37
+
Ralph Goers 2013-02-11, 23:35
+
Mike Percy 2013-01-18, 09:39
+
Denny Ye 2013-01-18, 09:54
NEW: Monitor These Apps!
elasticsearch, apache solr, apache hbase, hadoop, redis, casssandra, amazon cloudwatch, mysql, memcached, apache kafka, apache zookeeper, apache storm, ubuntu, centOS, red hat, debian, puppet labs, java, senseiDB