RE: weird error for accessing solr

2018-09-19 Thread Gu, Steve (CDC/OD/OADS) (CTR)
A little update.

For the client machine where solr admin page behaves differently, it turns out 
that the requests on the page like */admin/* were never served.  I think it is 
related to the server setting that might prevent these urls with "/admin/" from 
being sent.

In essence, it is not a solr issue.

Thanks a lot
Steve

-Original Message-
From: Erick Erickson  
Sent: Tuesday, September 18, 2018 4:18 PM
To: solr-user 
Subject: Re: weird error for accessing solr

bq. can you share *ALL* of...

from both machines!
On Tue, Sep 18, 2018 at 12:40 PM Shawn Heisey  wrote:
>
> On 9/18/2018 12:23 PM, Gu, Steve (CDC/OD/OADS) (CTR) wrote:
> > I have set up my solr as a standalone service and the its url is 
> > http://solr.server:8983/solr.  I opened 8983 on  solr.server to anyone, and 
> > solr can be accessed from laptops/desktops.  But when I tried to access the 
> > solr from some servers, I got the error of SolrCore Initialization 
> > Failures.  The left nav on the page is shown but indicates that the solr is 
> > set up as SolrCloud, which is not.
>
> On the dashboard when you see the Cloud tab, can you share *ALL* of 
> what's under JVM in the Args section?
>
> Thanks,
> Shawn
>


RE: weird error for accessing solr

2018-09-18 Thread Gu, Steve (CDC/OD/OADS) (CTR)
Alex,

I tried to curl http://solr.server:8983/solr/ and got different results from 
different machines.  I also did shift-reload which gave me the same result.  So 
it does not seem to be a browser cache issue.

I also shut down solr and tried to access it.  It gave connection failure error 
for both client machines.  So it is not the case they are connecting to 
different instances.

A bit more information, for the machine that see solr correctly, it is a 
laptop/desktop for developers.  The other machine which solr admin page showed 
solrcloud with core initialization error, is a dev/qa server. 

Any help will be greatly appreciated.

Steve

-Original Message-
From: Alexandre Rafalovitch  
Sent: Tuesday, September 18, 2018 2:45 PM
To: solr-user 
Subject: Re: weird error for accessing solr

Then you are either seeing different instances or your browser is hard-caching 
the Admin pages. Trying shift-reload or anonymous mode to get a full-refresh of 
HTML/Javascript. Or even a command line request.

Regards,
   Alex.

On 18 September 2018 at 14:43, Gu, Steve (CDC/OD/OADS) (CTR)  
wrote:
> No the solr was not restarted as SolrCloud.  We see solr from one computer 
> and all cores are available for query, but from another computer, it shows 
> the admin page as solrcloud with errors on the page.  All the links on the 
> left nav  do not work either.
>
>
>
> -Original Message-
> From: Alexandre Rafalovitch 
> Sent: Tuesday, September 18, 2018 2:39 PM
> To: solr-user 
> Subject: Re: weird error for accessing solr
>
> Sounds like your Solr was restarted as a SolrCloud, maybe by an automated 
> script or an init service?
>
> If you created a core in a standalone mode and then restart the same 
> configuration in a SolrCloud mode, it would know that you have those 
> collections/cores, but will not be able to find any configuration files 
> (because it will expect them in ZooKeeper, not on disk). So, that would 
> explain the error.
>
> I would focus on the restart point, maybe check the logs (in
> server/logs) and see if there are hints there.
>
> Regards,
>Alex.
> P.s. Unless you are able to see the SolrCloud from one computer and Solr from 
> another at the same time/back-and-forth. That would indicate some sort of 
> proxy/routing and then I would look at the Overview page system variables to 
> confirm the directories/options. But that's kind of a distant second 
> possibility.
>
>
> On 18 September 2018 at 14:23, Gu, Steve (CDC/OD/OADS) (CTR)  
> wrote:
>> I have set up my solr as a standalone service and the its url is 
>> http://solr.server:8983/solr.  I opened 8983 on  solr.server to anyone, and 
>> solr can be accessed from laptops/desktops.  But when I tried to access the 
>> solr from some servers, I got the error of SolrCore Initialization Failures. 
>>  The left nav on the page is shown but indicates that the solr is set up as 
>> SolrCloud, which is not.
>>
>> I am really confused about this and have no idea how to tackle this problem. 
>>  Has anyone ever had a similar issue?  Or any idea why this is happening?
>>
>> Thanks
>> Steve
>>


RE: weird error for accessing solr

2018-09-18 Thread Gu, Steve (CDC/OD/OADS) (CTR)
No the solr was not restarted as SolrCloud.  We see solr from one computer and 
all cores are available for query, but from another computer, it shows the 
admin page as solrcloud with errors on the page.  All the links on the left nav 
 do not work either.



-Original Message-
From: Alexandre Rafalovitch  
Sent: Tuesday, September 18, 2018 2:39 PM
To: solr-user 
Subject: Re: weird error for accessing solr

Sounds like your Solr was restarted as a SolrCloud, maybe by an automated 
script or an init service?

If you created a core in a standalone mode and then restart the same 
configuration in a SolrCloud mode, it would know that you have those 
collections/cores, but will not be able to find any configuration files 
(because it will expect them in ZooKeeper, not on disk). So, that would explain 
the error.

I would focus on the restart point, maybe check the logs (in
server/logs) and see if there are hints there.

Regards,
   Alex.
P.s. Unless you are able to see the SolrCloud from one computer and Solr from 
another at the same time/back-and-forth. That would indicate some sort of 
proxy/routing and then I would look at the Overview page system variables to 
confirm the directories/options. But that's kind of a distant second 
possibility.


On 18 September 2018 at 14:23, Gu, Steve (CDC/OD/OADS) (CTR)  
wrote:
> I have set up my solr as a standalone service and the its url is 
> http://solr.server:8983/solr.  I opened 8983 on  solr.server to anyone, and 
> solr can be accessed from laptops/desktops.  But when I tried to access the 
> solr from some servers, I got the error of SolrCore Initialization Failures.  
> The left nav on the page is shown but indicates that the solr is set up as 
> SolrCloud, which is not.
>
> I am really confused about this and have no idea how to tackle this problem.  
> Has anyone ever had a similar issue?  Or any idea why this is happening?
>
> Thanks
> Steve
>


weird error for accessing solr

2018-09-18 Thread Gu, Steve (CDC/OD/OADS) (CTR)
I have set up my solr as a standalone service and the its url is 
http://solr.server:8983/solr.  I opened 8983 on  solr.server to anyone, and 
solr can be accessed from laptops/desktops.  But when I tried to access the 
solr from some servers, I got the error of SolrCore Initialization Failures.  
The left nav on the page is shown but indicates that the solr is set up as 
SolrCloud, which is not.

I am really confused about this and have no idea how to tackle this problem.  
Has anyone ever had a similar issue?  Or any idea why this is happening?

Thanks
Steve



RE: solrcloud configuration: solr failed to start with multiple zookeeper servers

2018-09-13 Thread Gu, Steve (CDC/OD/OADS) (CTR)
Yes, my zookeeper ensemble have 3 servers and they are all up running.

-Original Message-
From: Pure Host - Wolfgang Freudenberger  
Sent: Thursday, September 13, 2018 8:57 AM
To: solr-user@lucene.apache.org
Subject: Re: solrcloud configuration: solr failed to start with multiple 
zookeeper servers

did you configure the zookeeper as a quorum?

Am 13.09.2018 um 14:47 schrieb Gu, Steve (CDC/OD/OADS) (CTR):
> Hi,
>
> I am prototyping solrcloud and I have three zookeeper servers 
> (localhost:2181,localhost:2182,localhost:2183).  I set the zkHost in 
> solr.in.cmd file as:
>
> set ZK_HOST="localhost:2181,localhost:2182,localhost:2183"
>
> After zk servers have started, I got the following error when I tried to 
> start solr:  localhost:2182 was unexpected at this time.
>
> Solr starts ok if I set ZK_Host to only one server, such as set 
> ZK_HOST="localhost:2181".
>
> Any suggestions?
>
> Thanks
> Steve
>




solrcloud configuration: solr failed to start with multiple zookeeper servers

2018-09-13 Thread Gu, Steve (CDC/OD/OADS) (CTR)
Hi,

I am prototyping solrcloud and I have three zookeeper servers 
(localhost:2181,localhost:2182,localhost:2183).  I set the zkHost in 
solr.in.cmd file as:

set ZK_HOST="localhost:2181,localhost:2182,localhost:2183"

After zk servers have started, I got the following error when I tried to start 
solr:  localhost:2182 was unexpected at this time.

Solr starts ok if I set ZK_Host to only one server, such as set 
ZK_HOST="localhost:2181".

Any suggestions?

Thanks
Steve


RE: how to access solr in solrcloud

2018-09-13 Thread Gu, Steve (CDC/OD/OADS) (CTR)
Hi, Florian

We need to pass zookeeper url to CloudSolrClient.  Since there are multiple zk 
servers, is it the common practice to set a proxy server in front of zookeeper?

Thanks for your advice.
Steve

-Original Message-
From: Florian Gleixner  
Sent: Wednesday, September 12, 2018 6:27 PM
To: solr-user@lucene.apache.org
Subject: Re: how to access solr in solrcloud

On 9/12/18 8:21 PM, Shawn Heisey wrote:
> On 9/12/2018 7:38 AM, Gu, Steve (CDC/OD/OADS) (CTR) wrote:
>> I am upgrading our solr to 7.4 and would like to set up solrcloud for 
>> failover and load balance.   There are three zookeeper servers 
>> (zk1:2181, zk1:2182) and two solr instance solr1:8983, solr2:8983.  
>> So what will be the solr url should the client to use for access?  
>> Will it be solr1:8983, the leader?
>>
>> If we  use solr1:8983 to access solr, what happens if solr1:8983 is 
>> down?  Will the request be routed to solr2:8983 via the zookeeper?  I 
>> understand that zookeeper is doing all the coordination works but 
>> wanted to understand how this works.
> 
> Zookeeper does not handle Solr requests.  It doesn't know anything at 
> all about Solr.  It is Solr that uses ZK to coordinate the cluster.
> 
> If you are using the Java client called CloudSolrClient, then you will 
> most likely be informing it about ZK, not Solr, and it will 
> automatically determine what Solr servers there are by talking to ZK, 
> and then will talk directly to the correct Solr servers.  If you are 
> not using a client that is ZK-aware, then you will need a load 
> balancer sitting in front of your Solr servers. Don't put a load 
> balancer in front of ZooKeeper.  Your clients will then talk to the load 
> balancer.

The advantage over haproxy/nginx/... solutions is, that a client, that is using 
zookeeper, registers at zookeeper and in case a solr node goes down, the solr 
node may inform zookeeper, which may inform all registered clients. Failover 
can be much faster with CloudSolrClient than with haproxy or similar solutions.
And CloudSolrClient knows which is the leader and when indexing, it routes 
documents to the leader which avoids overhead.
I've written a SolrCloudProxy which can be used to connect non-cloud aware 
clients to a solr cloud. The proxy uses CloudSolrClient with all its 
advantages. It is not yet production ready, but you may want to try it:
https://gitlab.lrz.de/a2814ad/SolrCloudProxy





RE: how to access solr in solrcloud

2018-09-12 Thread Gu, Steve (CDC/OD/OADS) (CTR)
Vadim,

That makes perfect sense.

Thanks
Steve

-Original Message-
From: Vadim Ivanov  
Sent: Wednesday, September 12, 2018 10:23 AM
To: solr-user@lucene.apache.org
Subject: RE: how to access solr in solrcloud

Hi,  Steve
If you are using  solr1:8983 to access solr and solr1 is down IMHO nothing 
helps you to access dead ip.
You should switch to any other live node in the cluster or I'd propose to have 
nginx as frontend to access Solrcloud. 

--
BR, Vadim



-Original Message-
From: Gu, Steve (CDC/OD/OADS) (CTR) [mailto:c...@cdc.gov] 
Sent: Wednesday, September 12, 2018 4:38 PM
To: 'solr-user@lucene.apache.org'
Subject: how to access solr in solrcloud

Hi, all

I am upgrading our solr to 7.4 and would like to set up solrcloud for
failover and load balance.   There are three zookeeper servers (zk1:2181,
zk1:2182) and two solr instance solr1:8983, solr2:8983.  So what will be the
solr url should the client to use for access?  Will it be solr1:8983, the
leader?

If we  use solr1:8983 to access solr, what happens if solr1:8983 is down?
Will the request be routed to solr2:8983 via the zookeeper?  I understand
that zookeeper is doing all the coordination works but wanted to understand
how this works.

Any insight would be greatly appreciated.
Steve





RE: how to access solr in solrcloud

2018-09-12 Thread Gu, Steve (CDC/OD/OADS) (CTR)
Thanks, Walter

-Original Message-
From: Walter Underwood  
Sent: Wednesday, September 12, 2018 10:41 AM
To: solr-user@lucene.apache.org
Subject: Re: how to access solr in solrcloud

Use a load balancer. It doesn’t have to be fancy, we use the Amazon ALB because 
our clusters are in AWS.

Zookeeper never handles queries. It coordinates cluster changes with the Solr 
instances.

wunder
Walter Underwood
wun...@wunderwood.org
http://observer.wunderwood.org/  (my blog)

> On Sep 12, 2018, at 6:38 AM, Gu, Steve (CDC/OD/OADS) (CTR)  
> wrote:
> 
> Hi, all
> 
> I am upgrading our solr to 7.4 and would like to set up solrcloud for 
> failover and load balance.   There are three zookeeper servers (zk1:2181, 
> zk1:2182) and two solr instance solr1:8983, solr2:8983.  So what will be the 
> solr url should the client to use for access?  Will it be solr1:8983, the 
> leader?
> 
> If we  use solr1:8983 to access solr, what happens if solr1:8983 is down?  
> Will the request be routed to solr2:8983 via the zookeeper?  I understand 
> that zookeeper is doing all the coordination works but wanted to understand 
> how this works.
> 
> Any insight would be greatly appreciated.
> Steve
> 



RE: how to access solr in solrcloud

2018-09-12 Thread Gu, Steve (CDC/OD/OADS) (CTR)
Thanks, David

-Original Message-
From: David Santamauro  
Sent: Wednesday, September 12, 2018 10:28 AM
To: solr-user@lucene.apache.org
Cc: David Santamauro 
Subject: Re: how to access solr in solrcloud

... or haproxy.

On 9/12/18, 10:23 AM, "Vadim Ivanov"  wrote:

Hi,  Steve
If you are using  solr1:8983 to access solr and solr1 is down IMHO nothing
helps you to access dead ip.
You should switch to any other live node in the cluster or I'd propose to
have nginx as frontend to access
Solrcloud. 

-- 
BR, Vadim



-Original Message-
    From: Gu, Steve (CDC/OD/OADS) (CTR) [mailto:c...@cdc.gov] 
Sent: Wednesday, September 12, 2018 4:38 PM
To: 'solr-user@lucene.apache.org'
Subject: how to access solr in solrcloud

Hi, all

I am upgrading our solr to 7.4 and would like to set up solrcloud for
failover and load balance.   There are three zookeeper servers (zk1:2181,
zk1:2182) and two solr instance solr1:8983, solr2:8983.  So what will be the
solr url should the client to use for access?  Will it be solr1:8983, the
leader?

If we  use solr1:8983 to access solr, what happens if solr1:8983 is down?
Will the request be routed to solr2:8983 via the zookeeper?  I understand
that zookeeper is doing all the coordination works but wanted to understand
how this works.

Any insight would be greatly appreciated.
Steve





how to access solr in solrcloud

2018-09-12 Thread Gu, Steve (CDC/OD/OADS) (CTR)
Hi, all

I am upgrading our solr to 7.4 and would like to set up solrcloud for failover 
and load balance.   There are three zookeeper servers (zk1:2181, zk1:2182) and 
two solr instance solr1:8983, solr2:8983.  So what will be the solr url should 
the client to use for access?  Will it be solr1:8983, the leader?

If we  use solr1:8983 to access solr, what happens if solr1:8983 is down?  Will 
the request be routed to solr2:8983 via the zookeeper?  I understand that 
zookeeper is doing all the coordination works but wanted to understand how this 
works.

Any insight would be greatly appreciated.
Steve