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 asia <as...@lntinfotech.com> on 2012/03/29 10:37:27 UTC

SolrCloud

Hello,
I am working on solr.I have set up 2 solr instances on different systems i.e
i did sharding.I am using tomcat and eclipse environment.When I fire a query
in solrj for a data from  index,i get response when both system's tomcat is
working.But when I stop one of the system's server I dont get response from
any of the system.Is there any solution for this that when any one of the
system is down I will get response from any one of the server.

--
View this message in context: http://lucene.472066.n3.nabble.com/SolrCloud-tp3867086p3867086.html
Sent from the Solr - User mailing list archive at Nabble.com.

Re: SolrCloud

Posted by asia <as...@lntinfotech.com>.
I tried solrwiki example A but I am getting following errors:

HTTP ERROR 500
Problem accessing /solr/collection1/admin/zookeeper.jsp. Reason: 

    PWC6033: Unable to compile class for JSP

PWC6199: Generated servlet error:
Only a type can be imported. org.apache.zookeeper.data.Stat resolves to a
package

PWC6197: An error occurred at line: 75 in the jsp file: /admin/zookeeper.jsp
PWC6199: Generated servlet error:
SolrZkClient cannot be resolved to a type

PWC6197: An error occurred at line: 75 in the jsp file: /admin/zookeeper.jsp
PWC6199: Generated servlet error:
ZkController cannot be resolved to a type

PWC6197: An error occurred at line: 75 in the jsp file: /admin/zookeeper.jsp
PWC6199: Generated servlet error:
The method getZkController() is undefined for the type CoreContainer

PWC6197: An error occurred at line: 75 in the jsp file: /admin/zookeeper.jsp
PWC6199: Generated servlet error:
zkClient cannot be resolved

PWC6197: An error occurred at line: 75 in the jsp file: /admin/zookeeper.jsp
PWC6199: Generated servlet error:
zkClient cannot be resolved

PWC6197: An error occurred at line: 75 in the jsp file: /admin/zookeeper.jsp
PWC6199: Generated servlet error:
zkClient cannot be resolved

PWC6197: An error occurred at line: 75 in the jsp file: /admin/zookeeper.jsp
PWC6199: Generated servlet error:
zkClient cannot be resolved

PWC6197: An error occurred at line: 75 in the jsp file: /admin/zookeeper.jsp
PWC6199: Generated servlet error:
SolrZkClient cannot be resolved to a type

PWC6197: An error occurred at line: 75 in the jsp file: /admin/zookeeper.jsp
PWC6199: Generated servlet error:
zkClient cannot be resolved

PWC6197: An error occurred at line: 75 in the jsp file: /admin/zookeeper.jsp
PWC6199: Generated servlet error:
zkClient cannot be resolved

PWC6197: An error occurred at line: 75 in the jsp file: /admin/zookeeper.jsp
PWC6199: Generated servlet error:
zkClient cannot be resolved

PWC6197: An error occurred at line: 75 in the jsp file: /admin/zookeeper.jsp
PWC6199: Generated servlet error:
zkClient cannot be resolved

PWC6197: An error occurred at line: 75 in the jsp file: /admin/zookeeper.jsp
PWC6199: Generated servlet error:
Stat cannot be resolved to a type

PWC6197: An error occurred at line: 75 in the jsp file: /admin/zookeeper.jsp
PWC6199: Generated servlet error:
Stat cannot be resolved to a type

PWC6197: An error occurred at line: 75 in the jsp file: /admin/zookeeper.jsp
PWC6199: Generated servlet error:
zkClient cannot be resolved

PWC6197: An error occurred at line: 75 in the jsp file: /admin/zookeeper.jsp
PWC6199: Generated servlet error:
KeeperException cannot be resolved to a type

PWC6197: An error occurred at line: 75 in the jsp file: /admin/zookeeper.jsp
PWC6199: Generated servlet error:
e cannot be resolved

PWC6197: An error occurred at line: 75 in the jsp file: /admin/zookeeper.jsp
PWC6199: Generated servlet error:
zkClient cannot be resolved

PWC6197: An error occurred at line: 75 in the jsp file: /admin/zookeeper.jsp
PWC6199: Generated servlet error:
KeeperException cannot be resolved to a type

PWC6197: An error occurred at line: 75 in the jsp file: /admin/zookeeper.jsp
PWC6199: Generated servlet error:
e cannot be resolved

PWC6197: An error occurred at line: 75 in the jsp file: /admin/zookeeper.jsp
PWC6199: Generated servlet error:
Stat cannot be resolved to a type

PWC6197: An error occurred at line: 75 in the jsp file: /admin/zookeeper.jsp
PWC6199: Generated servlet error:
Stat cannot be resolved to a type

PWC6197: An error occurred at line: 75 in the jsp file: /admin/zookeeper.jsp
PWC6199: Generated servlet error:
zkClient cannot be resolved

PWC6197: An error occurred at line: 75 in the jsp file: /admin/zookeeper.jsp
PWC6199: Generated servlet error:
KeeperException cannot be resolved to a type

PWC6197: An error occurred at line: 75 in the jsp file: /admin/zookeeper.jsp
PWC6199: Generated servlet error:
e cannot be resolved

PWC6197: An error occurred at line: 46 in the jsp file: /admin/zookeeper.jsp
PWC6199: Generated servlet error:
printer.zkClient cannot be resolved or is not a field



org.apache.jasper.JasperException: PWC6033: Unable to compile class for JSP

PWC6199: Generated servlet error:
Only a type can be imported. org.apache.zookeeper.data.Stat resolves to a
package

PWC6197: An error occurred at line: 75 in the jsp file: /admin/zookeeper.jsp
PWC6199: Generated servlet error:
SolrZkClient cannot be resolved to a type

PWC6197: An error occurred at line: 75 in the jsp file: /admin/zookeeper.jsp
PWC6199: Generated servlet error:
ZkController cannot be resolved to a type

PWC6197: An error occurred at line: 75 in the jsp file: /admin/zookeeper.jsp
PWC6199: Generated servlet error:
The method getZkController() is undefined for the type CoreContainer

PWC6197: An error occurred at line: 75 in the jsp file: /admin/zookeeper.jsp
PWC6199: Generated servlet error:
zkClient cannot be resolved

PWC6197: An error occurred at line: 75 in the jsp file: /admin/zookeeper.jsp
PWC6199: Generated servlet error:
zkClient cannot be resolved

PWC6197: An error occurred at line: 75 in the jsp file: /admin/zookeeper.jsp
PWC6199: Generated servlet error:
zkClient cannot be resolved

PWC6197: An error occurred at line: 75 in the jsp file: /admin/zookeeper.jsp
PWC6199: Generated servlet error:
zkClient cannot be resolved

PWC6197: An error occurred at line: 75 in the jsp file: /admin/zookeeper.jsp
PWC6199: Generated servlet error:
SolrZkClient cannot be resolved to a type

PWC6197: An error occurred at line: 75 in the jsp file: /admin/zookeeper.jsp
PWC6199: Generated servlet error:
zkClient cannot be resolved

PWC6197: An error occurred at line: 75 in the jsp file: /admin/zookeeper.jsp
PWC6199: Generated servlet error:
zkClient cannot be resolved

PWC6197: An error occurred at line: 75 in the jsp file: /admin/zookeeper.jsp
PWC6199: Generated servlet error:
zkClient cannot be resolved

PWC6197: An error occurred at line: 75 in the jsp file: /admin/zookeeper.jsp
PWC6199: Generated servlet error:
zkClient cannot be resolved

PWC6197: An error occurred at line: 75 in the jsp file: /admin/zookeeper.jsp
PWC6199: Generated servlet error:
Stat cannot be resolved to a type

PWC6197: An error occurred at line: 75 in the jsp file: /admin/zookeeper.jsp
PWC6199: Generated servlet error:
Stat cannot be resolved to a type

PWC6197: An error occurred at line: 75 in the jsp file: /admin/zookeeper.jsp
PWC6199: Generated servlet error:
zkClient cannot be resolved

PWC6197: An error occurred at line: 75 in the jsp file: /admin/zookeeper.jsp
PWC6199: Generated servlet error:
KeeperException cannot be resolved to a type

PWC6197: An error occurred at line: 75 in the jsp file: /admin/zookeeper.jsp
PWC6199: Generated servlet error:
e cannot be resolved

PWC6197: An error occurred at line: 75 in the jsp file: /admin/zookeeper.jsp
PWC6199: Generated servlet error:
zkClient cannot be resolved

PWC6197: An error occurred at line: 75 in the jsp file: /admin/zookeeper.jsp
PWC6199: Generated servlet error:
KeeperException cannot be resolved to a type

PWC6197: An error occurred at line: 75 in the jsp file: /admin/zookeeper.jsp
PWC6199: Generated servlet error:
e cannot be resolved

PWC6197: An error occurred at line: 75 in the jsp file: /admin/zookeeper.jsp
PWC6199: Generated servlet error:
Stat cannot be resolved to a type

PWC6197: An error occurred at line: 75 in the jsp file: /admin/zookeeper.jsp
PWC6199: Generated servlet error:
Stat cannot be resolved to a type

PWC6197: An error occurred at line: 75 in the jsp file: /admin/zookeeper.jsp
PWC6199: Generated servlet error:
zkClient cannot be resolved

PWC6197: An error occurred at line: 75 in the jsp file: /admin/zookeeper.jsp
PWC6199: Generated servlet error:
KeeperException cannot be resolved to a type

PWC6197: An error occurred at line: 75 in the jsp file: /admin/zookeeper.jsp
PWC6199: Generated servlet error:
e cannot be resolved

PWC6197: An error occurred at line: 46 in the jsp file: /admin/zookeeper.jsp
PWC6199: Generated servlet error:
printer.zkClient cannot be resolved or is not a field


	at
org.apache.jasper.compiler.DefaultErrorHandler.javacError(DefaultErrorHandler.java:123)
	at
org.apache.jasper.compiler.ErrorDispatcher.javacError(ErrorDispatcher.java:296)
	at org.apache.jasper.compiler.Compiler.generateClass(Compiler.java:376)
	at org.apache.jasper.compiler.Compiler.compile(Compiler.java:437)
	at
org.apache.jasper.JspCompilationContext.compile(JspCompilationContext.java:608)
	at
org.apache.jasper.servlet.JspServletWrapper.service(JspServletWrapper.java:360)
	at org.apache.jasper.servlet.JspServlet.serviceJspFile(JspServlet.java:486)
	at org.apache.jasper.servlet.JspServlet.service(JspServlet.java:380)
	at javax.servlet.http.HttpServlet.service(HttpServlet.java:820)
	at org.mortbay.jetty.servlet.ServletHolder.handle(ServletHolder.java:511)
	at org.mortbay.jetty.servlet.ServletHandler.handle(ServletHandler.java:401)
	at
org.mortbay.jetty.security.SecurityHandler.handle(SecurityHandler.java:216)
	at org.mortbay.jetty.servlet.SessionHandler.handle(SessionHandler.java:182)
	at org.mortbay.jetty.handler.ContextHandler.handle(ContextHandler.java:766)
	at org.mortbay.jetty.webapp.WebAppContext.handle(WebAppContext.java:450)
	at org.mortbay.jetty.servlet.Dispatcher.forward(Dispatcher.java:327)
	at org.mortbay.jetty.servlet.Dispatcher.forward(Dispatcher.java:126)
	at
org.apache.solr.servlet.SolrDispatchFilter.doFilter(SolrDispatchFilter.java:275)
	at
org.mortbay.jetty.servlet.ServletHandler$CachedChain.doFilter(ServletHandler.java:1212)
	at org.mortbay.jetty.servlet.ServletHandler.handle(ServletHandler.java:399)
	at
org.mortbay.jetty.security.SecurityHandler.handle(SecurityHandler.java:216)
	at org.mortbay.jetty.servlet.SessionHandler.handle(SessionHandler.java:182)
	at org.mortbay.jetty.handler.ContextHandler.handle(ContextHandler.java:766)
	at org.mortbay.jetty.webapp.WebAppContext.handle(WebAppContext.java:450)
	at
org.mortbay.jetty.handler.ContextHandlerCollection.handle(ContextHandlerCollection.java:230)
	at
org.mortbay.jetty.handler.HandlerCollection.handle(HandlerCollection.java:114)
	at org.mortbay.jetty.handler.HandlerWrapper.handle(HandlerWrapper.java:152)
	at org.mortbay.jetty.Server.handle(Server.java:326)
	at org.mortbay.jetty.HttpConnection.handleRequest(HttpConnection.java:542)
	at
org.mortbay.jetty.HttpConnection$RequestHandler.headerComplete(HttpConnection.java:928)
	at org.mortbay.jetty.HttpParser.parseNext(HttpParser.java:549)
	at org.mortbay.jetty.HttpParser.parseAvailable(HttpParser.java:212)
	at org.mortbay.jetty.HttpConnection.handle(HttpConnection.java:404)
	at
org.mortbay.jetty.bio.SocketConnector$Connection.run(SocketConnector.java:228)
	at
org.mortbay.thread.QueuedThreadPool$PoolThread.run(QueuedThreadPool.java:582)



--------------------------------------------------------------------------------
Powered by Jetty://





















--
View this message in context: http://lucene.472066.n3.nabble.com/SolrCloud-tp3867086p3880612.html
Sent from the Solr - User mailing list archive at Nabble.com.

Re: SolrCloud

Posted by Erick Erickson <er...@gmail.com>.
No, you don't have to run zookeeper on each replica. Zookeeper
is a repository for your system (cluster) information. It knows
about each replica, but ZK does not need to run on each shard.

You can run one zookeeper instance for your entire cluster, no matter
how many shards/replicas you have.

Here's a good place to get started understanding ZK:
http://zookeeper.apache.org/

Internally, SolrCloud uses ZooKeeper to understand what to do
with update and search requests. In effect, it asks ZK
"How many shards are there and what is the address of each
leader"? and "does the right thing" with the results...

My suggestion is that you pretty much forget ZK exists until
you get a bit more comfortable with SolrCloud. Run it embedded
in a single instance (and do NOT shut that instance down!).

>From there, you should see SolrCloud "just work" and it'll at least
get you started.

Best
Erick

On Mon, Apr 2, 2012 at 1:59 AM, asia <as...@lntinfotech.com> wrote:
> Thanks for replying,
> So if i will make a replica of each shard,then should I use zookeeper for
> every shards and replica or only for the replica.! more question i want to
> ask is that I am using solr in tomcat and eclipse environment using solrj.so
> I am a bit confuse as to how to use zookeeper in it along with tomcat.I have
> downloaded zookeeper jar files also but need little help in it.
> -Asia
>
> --
> View this message in context: http://lucene.472066.n3.nabble.com/SolrCloud-tp3867086p3876869.html
> Sent from the Solr - User mailing list archive at Nabble.com.

Re: SolrCloud

Posted by asia <as...@lntinfotech.com>.
Thanks for replying,
So if i will make a replica of each shard,then should I use zookeeper for
every shards and replica or only for the replica.! more question i want to
ask is that I am using solr in tomcat and eclipse environment using solrj.so
I am a bit confuse as to how to use zookeeper in it along with tomcat.I have
downloaded zookeeper jar files also but need little help in it.
-Asia

--
View this message in context: http://lucene.472066.n3.nabble.com/SolrCloud-tp3867086p3876869.html
Sent from the Solr - User mailing list archive at Nabble.com.

Re: SolrCloud

Posted by asia <as...@lntinfotech.com>.
Then what exactly solrcloud does.because when i am firing query I am getting
response even without zookeeper?

--
View this message in context: http://lucene.472066.n3.nabble.com/SolrCloud-tp3867086p3876820.html
Sent from the Solr - User mailing list archive at Nabble.com.

Re: SolrCloud

Posted by Mark Miller <ma...@gmail.com>.
If you want to be able to continue when a node goes down, you need at least one replica for each shard. Then if a node goes down, the replica will continue serving requests for that shard.

If you have no replicas and a node goes down, requests would return only partial results! We will support this in the future, with a warning in the returned header that the full results were not available, but currently we do not.

On Mar 30, 2012, at 12:30 AM, asia wrote:

> Ok.Then what does exactly zookeeper do in Solrcloud?Why we use?I am geetting
> query response from both shards even without using zookeeper.
> 
> --
> View this message in context: http://lucene.472066.n3.nabble.com/SolrCloud-tp3867086p3869896.html
> Sent from the Solr - User mailing list archive at Nabble.com.

- Mark Miller
lucidimagination.com












Re: SolrCloud

Posted by Erick Erickson <er...@gmail.com>.
Zookeeper is the "meta data" repository. It's in charge of keeping the
state of the cluster, which machines are up/down, etc. It's also
where the bookkeeping for bringing on additional shards lives.

Best
Erick

On Fri, Mar 30, 2012 at 12:30 AM, asia <as...@lntinfotech.com> wrote:
> Ok.Then what does exactly zookeeper do in Solrcloud?Why we use?I am geetting
> query response from both shards even without using zookeeper.
>
> --
> View this message in context: http://lucene.472066.n3.nabble.com/SolrCloud-tp3867086p3869896.html
> Sent from the Solr - User mailing list archive at Nabble.com.

Re: SolrCloud

Posted by asia <as...@lntinfotech.com>.
Ok.Then what does exactly zookeeper do in Solrcloud?Why we use?I am geetting
query response from both shards even without using zookeeper.

--
View this message in context: http://lucene.472066.n3.nabble.com/SolrCloud-tp3867086p3869896.html
Sent from the Solr - User mailing list archive at Nabble.com.

Re: SolrCloud

Posted by Erick Erickson <er...@gmail.com>.
This is the way SolrCloud works at present. There must be at least
one instance of each shard up in order to get results. I believe there
are plans to return partial results in future, but that's not been
implemented yet.

Best
Erick

On Thu, Mar 29, 2012 at 4:37 AM, asia <as...@lntinfotech.com> wrote:
> Hello,
> I am working on solr.I have set up 2 solr instances on different systems i.e
> i did sharding.I am using tomcat and eclipse environment.When I fire a query
> in solrj for a data from  index,i get response when both system's tomcat is
> working.But when I stop one of the system's server I dont get response from
> any of the system.Is there any solution for this that when any one of the
> system is down I will get response from any one of the server.
>
> --
> View this message in context: http://lucene.472066.n3.nabble.com/SolrCloud-tp3867086p3867086.html
> Sent from the Solr - User mailing list archive at Nabble.com.