You are viewing a plain text version of this content. The canonical link for it is here.
Posted to solr-user@lucene.apache.org by deniz <de...@gmail.com> on 2012/11/20 09:56:30 UTC

SolrCloud(5x) - Detects all of the Solr insrances on a machine

Hello,

I am running a Solr instance (4.0), without invoking anything about
zookeeper and solrcloud, as a standalone server on a machine.

then for testing Solr 5x trunk, i have set 2 Solr (5x) instances, running
with -DzkHost= someaddress:port

and when i check zookeeper logs, i can see that the standalone Solr(4.0) is
also detected, and although there is nothing indexed on the last two which
are in cloud, a search query returns results from the standalone Solr... 

I am using basic configs from SolrCloud wiki, except showing an external
Zookeeper server rather than embedded one into Solr..

can anyone explain why I am able to see my standalone solr in cloud and why
my search queries returning results? 

i am totally confused



-----
Zeki ama calismiyor... Calissa yapar...
--
View this message in context: http://lucene.472066.n3.nabble.com/SolrCloud-5x-Detects-all-of-the-Solr-insrances-on-a-machine-tp4021254.html
Sent from the Solr - User mailing list archive at Nabble.com.

Re: SolrCloud(5x) - Detects all of the Solr insrances on a machine

Posted by Mark Miller <ma...@gmail.com>.
Limitation of web containers. There is not a clean way to get the port without making some request.

If you pass the port as a sys prop on the cmd line and use jetty, it works out of the box. If you don't do that, there is config necessary.

- Mark

On Nov 21, 2012, at 8:34 PM, deniz <de...@gmail.com> wrote:

> after putting the port information to solr.xml too, it seems properly... i
> dont know why this thing only happens on remote machines not on local, but
> could this be a minor bug related with solr? basically if we are giving the
> port information in the starting command, then we shouldnt be dealing with
> the port information in configs files, imho
> 
> 
> 
> -----
> Zeki ama calismiyor... Calissa yapar...
> --
> View this message in context: http://lucene.472066.n3.nabble.com/SolrCloud-5x-Detects-all-of-the-Solr-insrances-on-a-machine-tp4021254p4021777.html
> Sent from the Solr - User mailing list archive at Nabble.com.


Re: SolrCloud(5x) - Detects all of the Solr insrances on a machine

Posted by deniz <de...@gmail.com>.
after putting the port information to solr.xml too, it seems properly... i
dont know why this thing only happens on remote machines not on local, but
could this be a minor bug related with solr? basically if we are giving the
port information in the starting command, then we shouldnt be dealing with
the port information in configs files, imho



-----
Zeki ama calismiyor... Calissa yapar...
--
View this message in context: http://lucene.472066.n3.nabble.com/SolrCloud-5x-Detects-all-of-the-Solr-insrances-on-a-machine-tp4021254p4021777.html
Sent from the Solr - User mailing list archive at Nabble.com.

Re: SolrCloud(5x) - Detects all of the Solr insrances on a machine

Posted by deniz <de...@gmail.com>.
Mark Miller-3 wrote
> It must be passes with -D as a system prop with the default setup.
> That feeds hostPort in solr.xml. If you use etc/jetty.xml, but sure to
> still pass it on the cmd line or also put the port in solr.xml for
> hostPort.
> - Mark

basically I should add the port info to the solr.xml too? 




-----
Zeki ama calismiyor... Calissa yapar...
--
View this message in context: http://lucene.472066.n3.nabble.com/SolrCloud-5x-Detects-all-of-the-Solr-insrances-on-a-machine-tp4021254p4021485.html
Sent from the Solr - User mailing list archive at Nabble.com.

Re: SolrCloud(5x) - Detects all of the Solr insrances on a machine

Posted by Mark Miller <ma...@gmail.com>.
It must be passes with -D as a system prop with the default setup.
That feeds hostPort in solr.xml. If you use etc/jetty.xml, but sure to
still pass it on the cmd line or also put the port in solr.xml for
hostPort.

- Mark

On Tue, Nov 20, 2012 at 10:11 PM, deniz <de...@gmail.com> wrote:
> Mark Miller-3 wrote
>> How are you specifying the port? I don't see jetty.port in there. That
>> is critical - it sets the hostPort in solr.xml.
>> - Mark
>
> setting it with -Djetty.port=blabla or directly in etc/jetty.xml
>
>
>
> -----
> Zeki ama calismiyor... Calissa yapar...
> --
> View this message in context: http://lucene.472066.n3.nabble.com/SolrCloud-5x-Detects-all-of-the-Solr-insrances-on-a-machine-tp4021254p4021480.html
> Sent from the Solr - User mailing list archive at Nabble.com.



-- 
- Mark

Re: SolrCloud(5x) - Detects all of the Solr insrances on a machine

Posted by deniz <de...@gmail.com>.
Mark Miller-3 wrote
> How are you specifying the port? I don't see jetty.port in there. That
> is critical - it sets the hostPort in solr.xml.
> - Mark

setting it with -Djetty.port=blabla or directly in etc/jetty.xml



-----
Zeki ama calismiyor... Calissa yapar...
--
View this message in context: http://lucene.472066.n3.nabble.com/SolrCloud-5x-Detects-all-of-the-Solr-insrances-on-a-machine-tp4021254p4021480.html
Sent from the Solr - User mailing list archive at Nabble.com.

Re: SolrCloud(5x) - Detects all of the Solr insrances on a machine

Posted by Mark Miller <ma...@gmail.com>.
How are you specifying the port? I don't see jetty.port in there. That
is critical - it sets the hostPort in solr.xml.

- Mark

On Tue, Nov 20, 2012 at 9:42 PM, deniz <de...@gmail.com> wrote:
> so another test result:
>
> i have set up a similar environment on another virtual machine which is
> running on the same hard machine with my previous example...
>
> so basically my standalone solr is running on virtual1:8983 and i set up 3
> solr instances which are on virtual2:8995,8996,8997... those virtual1 and
> virtual2 are on the same hard machine, lets call machine1
>
> so basically, whenever i start a zookeeper server and connect any of my
> instances on virtual2, only *virtual2:8983* is displayed in cloud(which must
> be *virtual1:8983* actually, there is nothing running on 8983 on virtual2!)
>
> is this a bug? or something related with virtual machines? or what is it?
>
>
>
> -----
> Zeki ama calismiyor... Calissa yapar...
> --
> View this message in context: http://lucene.472066.n3.nabble.com/SolrCloud-5x-Detects-all-of-the-Solr-insrances-on-a-machine-tp4021254p4021477.html
> Sent from the Solr - User mailing list archive at Nabble.com.



-- 
- Mark

Re: SolrCloud(5x) - Detects all of the Solr insrances on a machine

Posted by deniz <de...@gmail.com>.
so another test result: 

i have set up a similar environment on another virtual machine which is
running on the same hard machine with my previous example...

so basically my standalone solr is running on virtual1:8983 and i set up 3
solr instances which are on virtual2:8995,8996,8997... those virtual1 and
virtual2 are on the same hard machine, lets call machine1

so basically, whenever i start a zookeeper server and connect any of my
instances on virtual2, only *virtual2:8983* is displayed in cloud(which must
be *virtual1:8983* actually, there is nothing running on 8983 on virtual2!) 

is this a bug? or something related with virtual machines? or what is it? 



-----
Zeki ama calismiyor... Calissa yapar...
--
View this message in context: http://lucene.472066.n3.nabble.com/SolrCloud-5x-Detects-all-of-the-Solr-insrances-on-a-machine-tp4021254p4021477.html
Sent from the Solr - User mailing list archive at Nabble.com.

Re: SolrCloud(5x) - Detects all of the Solr insrances on a machine

Posted by deniz <de...@gmail.com>.
well here are more details about my starting commands

This is the standalone SolrServer:
(port 8983)
java 
-server 
-XX:+UnlockExperimentalVMOptions 
-XX:+UseG1GC 
-XX:+UseCompressedStrings 
-Dcom.sun.management.jmxremote 
-d64 
-Xmx4096m 
-Dcom.sun.management.jmxremote.port=9999 
-Dcom.sun.management.jmxremote.ssl=false 
-Dcom.sun.management.jmxremote.authenticate=false 
-Djava.rmi.server.hostname=remotehost -jar start.jar


These are below are the ones who are supposed to be in cloud:

java -DzkHost=zkhost:2182 -jar start.jar (port 8995)
java -DzkHost=zkhost:2181 -jar start.jar (port 8996)

The three of them are on the same remote machine..


and here is the one that i run from my local

java -Dbootstrap_conf=true -DzkHost=zkhost:2181 -jar start.jar (port 8997)



and when i check the cloud page, I see 

localhost:8997 and remotehost: 8983 in cloud... the actual ones
(remotehost:8995 and remotehost:8996) are totally invisible to the cloud






-----
Zeki ama calismiyor... Calissa yapar...
--
View this message in context: http://lucene.472066.n3.nabble.com/SolrCloud-5x-Detects-all-of-the-Solr-insrances-on-a-machine-tp4021254p4021471.html
Sent from the Solr - User mailing list archive at Nabble.com.

Re: SolrCloud(5x) - Detects all of the Solr insrances on a machine

Posted by Mark Miller <ma...@gmail.com>.
You would have to be giving it the address of zookeeper - otherwise how would the other nodes know about it?

Something is fishy.

- Mark

On Nov 20, 2012, at 3:56 AM, deniz <de...@gmail.com> wrote:

> Hello,
> 
> I am running a Solr instance (4.0), without invoking anything about
> zookeeper and solrcloud, as a standalone server on a machine.
> 
> then for testing Solr 5x trunk, i have set 2 Solr (5x) instances, running
> with -DzkHost= someaddress:port
> 
> and when i check zookeeper logs, i can see that the standalone Solr(4.0) is
> also detected, and although there is nothing indexed on the last two which
> are in cloud, a search query returns results from the standalone Solr... 
> 
> I am using basic configs from SolrCloud wiki, except showing an external
> Zookeeper server rather than embedded one into Solr..
> 
> can anyone explain why I am able to see my standalone solr in cloud and why
> my search queries returning results? 
> 
> i am totally confused
> 
> 
> 
> -----
> Zeki ama calismiyor... Calissa yapar...
> --
> View this message in context: http://lucene.472066.n3.nabble.com/SolrCloud-5x-Detects-all-of-the-Solr-insrances-on-a-machine-tp4021254.html
> Sent from the Solr - User mailing list archive at Nabble.com.


Re: SolrCloud(5x) - Detects all of the Solr insrances on a machine

Posted by deniz <de...@gmail.com>.
as an update, it only happens one remote machine which running a virtual
linux... could this be related to the problem? 



-----
Zeki ama calismiyor... Calissa yapar...
--
View this message in context: http://lucene.472066.n3.nabble.com/SolrCloud-5x-Detects-all-of-the-Solr-insrances-on-a-machine-tp4021254p4021460.html
Sent from the Solr - User mailing list archive at Nabble.com.