lucene-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Robert Krüger <>
Subject Re: Possible to avoid hangs in org.apache.solr.handler.admin.SystemInfoHandler
Date Wed, 05 Aug 2015 18:52:56 GMT
Just to follow up on this: Replacing getCanonicalHostName() by
getHostName() would solve the problem AFAICS and e.g. Logback does exactly
that for exactly the same purpose.

How do I submit a patch? Via this mailing list?

Best regards,


On Wed, Aug 5, 2015 at 6:57 PM, Robert Krüger <> wrote:

> Hi,
> I am tracking down a problem with huge startup delays of a solr instance
> and tracked it down to this code in SystemInfoHandler:
>   private void init() {
>     try {
>       InetAddress addr = InetAddress.getLocalHost();
>       hostname = addr.getCanonicalHostName();
> ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ this is where it hangs
>     } catch (UnknownHostException e) {
>       //default to null
>     }
>   }
> The setup I have gives me no control over the local network configuration
> as solr is delivered as part of a larger software that users install on
> their machines and that has worked really well and it is technically fit
> for this purpose just as other no-sql stores or rdbmss. However, when our
> software users have problems like a reverse lookup not working because they
> work in a VPN environment (which in no other way affects the correct
> operation of solr) they currently have to wait a minute for solr startup
> (otherwise about a second) because two timeouts of these lookups happen,
> one when setting up the container, another for the core and that only to
> have the "host" info contain a name that was reverse-looked up.
> Would it be acceptable to submit a patch that allows this to be disabled
> overidden by a system property be acceptable? I.e. suppress the lookup and
> just use what can be retrieved about the host without a lookup (e.g. the ip
> address).
> Best regards,
> Robert

Robert Krüger
Managing Partner
Lesspain GmbH & Co. KG

View raw message