[ 
https://issues.apache.org/jira/browse/SOLR-5339?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel
 ]

Shawn Heisey closed SOLR-5339.
------------------------------

    Resolution: Invalid

You can manually specify what hostname or address will go into the cloud 
configuration with by specifying instance parameters in solr.xml.

http://wiki.apache.org/solr/SolrCloud#SolrCloud_Instance_Params

If the wrong address is being detected, then it is likely that your operating 
configuration isn't set up according to your expectactions.  For a linux 
machine, the best config is usually as described below, assuming that 
myhost.example.com is the fully qualified name for your host:

 * The actual hostname of the machine should be myhost - the short name.  On 
CentOS, this is defined in /etc/sysconfig/network.
 * In /etc/hosts, only one entry should have the machine's actual hostname on 
it, and it should look like the following:

192.168.10.54    myhost.example.com myhost

This should ensure that when the local IP address is looked up, it will use 
that entry in /etc/hosts.  When you ask for the hostname, you will get 
'myhost'. and when you ask for the fully qualified hostname, you will get 
'myhost.example.com'.

I can't guarantee that the configuration I have described will work for every 
situation, but it should ensure that Solr detects correctly.


> solr-core-4.4's ip is not right when the os is centos 5.6 sometimes 
> --------------------------------------------------------------------
>
>                 Key: SOLR-5339
>                 URL: https://issues.apache.org/jira/browse/SOLR-5339
>             Project: Solr
>          Issue Type: Bug
>          Components: contrib - Clustering
>    Affects Versions: 4.4
>         Environment: centos 5.6
>            Reporter: dejie Chang
>            Priority: Critical
>
> when I install the solr-cloud on the centos5.6 . it is strange that sometimes 
> ,the ip is not correct which is displayed on the 
> http://192.168.10.54:8081/solr/#/~cloud , it is 202.106.199.36,but my actual 
> is 192.168.10.54. but on the windows it is right. and i found it is because 
> of hostaddress = InetAddress.getLocalHost().getHostAddress(); in 
> ZkController.java . sometimes the method which get ip is not correct .we 
> should not trust . so i think in linux we should not use this method 



--
This message was sent by Atlassian JIRA
(v6.1#6144)

---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscr...@lucene.apache.org
For additional commands, e-mail: dev-h...@lucene.apache.org

Reply via email to