lucene-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Robert Krüger (JIRA) <>
Subject [jira] [Comment Edited] (SOLR-7884) Omit reverse lookups in SystemInfoHandler
Date Tue, 18 Aug 2015 06:50:45 GMT


Robert Krüger edited comment on SOLR-7884 at 8/18/15 6:49 AM:

Sorry, my bad. I didn't read SOLR-5043. The first proposed fix with the background thread
would work perfectly in my case as I don't care about the system info at all. I am not sure
if the second one would work as I do not know under which circumstances the SystemInfoHandler
is actually used. Just delaying the hang until after application startup would actually make
matters worse for my scenario. Waiting for an app to start up slowly is one thing. Having
the app hang unexpectedly after it has started would make it look seriously broken.

was (Author: rmk_apache):
Sorry, my bad. I didn't read SOLR-5043. That would work perfectly in my case as I don't need
the system info at all. Thanks for pointing me to that again. 

> Omit reverse lookups in SystemInfoHandler
> -----------------------------------------
>                 Key: SOLR-7884
>                 URL:
>             Project: Solr
>          Issue Type: Improvement
>    Affects Versions: 5.2.1
>            Reporter: Robert Krüger
>         Attachments: SOLR-7884.patch
> The method SystemInfoHandler.init contains this code:
> {code:java}
>   try {
>       InetAddress addr = InetAddress.getLocalHost();
>       hostname = addr.getCanonicalHostName();
>     } catch (UnknownHostException e) {
>       //default to null
>     }
>   }
> {code}
> The call to getCanonicalHostName triggers a DNS reverse lookup, that on Mac OSX times
out after 30 seconds if the current network setup has a problem with reverse lookup and then
returns the IP address as host name. In our product this leads to a hang of 2x30 seconds (one
for the SystemInfoHandler of the container and another one for that of the core) during startup
under these conditions. Unfortunately I have found no way to make this reproducible by simulating
it as it depends on local network config, os and whatever else.
> As Solr is shipped bundled with a desktop application, there is currently no workaround
because the user network configuration is beyond our reach.
> The suggested fix for this is to replace the call to getCanonicalHostName by one to getHostName(),
which is done for exactly this purpose (obtaining a host string for logging) in the popular
Logback framework (see,
how they do it).
> Otherwise Solr has been working perfectly in this setup (bundled with a desktop app)
for a long time and it would be great to remove that last obstacle to make it a nicer citizen

This message was sent by Atlassian JIRA

To unsubscribe, e-mail:
For additional commands, e-mail:

View raw message