Re: creating a new collection fails as SearchHandler can't be found

2015-02-12 Thread Lee Carroll
Hi
it was jars copied into a solr-zk-cli directory to allow easy running of
solr zk cmd line client. well i think that is what fixed tomcat! I've also
tried with jetty with a clean solr home and that also works and seems a
much cleaner way of running multiple instances  (probably more to do with
rubbish tomcat sys admin skills on my part than anything else)

anyway cheers for help.

On 11 February 2015 at 22:38, Chris Hostetter hossman_luc...@fucit.org
wrote:


 : The collection fails to be created (shard_replica dir and data and index
 : across the servers get created but collection creation fails)
 :
 : The full log is appended below. I thought it should be a straight forward
 : class not found problem but I just can't seem to fix this (few hours
 now).
 : I've even placed all the libs from solr.war into a directory and
 referenced
 : these from the solrconfig. You can see these being loaded in the below
 log.

 what exactly did hte logs  errors look like *BEFORE* you started copying
 libs arround?

 as things stand right now, you've got at least 2 (possibly 3, i'm not
 certain) copies of every Solr class in your classpath -- which can cause a
 lot more classloader type errors (including ClassNotFound) then it will
 ever solve, because of how the classloader hierarchy works -- if you have
 to copies of ClassX loaded by two differnet classloaders, and ClassX
 refers to SearchHandler but SearchHandler is not available in the same
 ClassLoader that loaded ClassX, all sorts of not-fun ClassNotFound type
 exceptions can happen.

 Go back to a clean install, w/ a single solr.war file, and no manulaly
 copied jars anywhere, and see if you still get problems with SearchHandler
 when you create a collection.

 if you do, then take another step back and try a single (tomcat) solr node
 setup (no solrcloud) with an instanceDir already in place with a single
 SolrCore
 using hte example configs included in Solr 4.10.3 ... if that *STILL*
 doesn't work, and you still get ClassNotFound errors then something is
 jacked up with your tomcat setup/classpath (unless of coure you can still
 reproduce the same problem with the same example configs using hte
 Solr provided jetty -- in that case, the problem gets a lot more
 interesting and your logs from *that* would be helpful to diagnose it)





 : Any help would be appreciated.
 :
 : Cheers Lee C
 :
 :
 : INFO  - 2015-02-11 19:22:42.494;
 : org.apache.solr.servlet.SolrDispatchFilter; [admin] webapp=null
 : path=/admin/collections
 : params={numShards=4name=hotelPackagereplicationFactor=1action=CREATE}
 : status=0 QTime=3519
 : INFO  - 2015-02-11 19:22:42.594;
 : org.apache.solr.common.cloud.ZkStateReader$2; A cluster state change:
 : WatchedEvent state:SyncConnected type:NodeDataChanged
 : path:/clusterstate.json, has occurred - updating... (live nodes size: 4)
 : INFO  - 2015-02-11 19:33:52.275;
 : org.apache.solr.handler.admin.CollectionsHandler; Creating Collection :
 : numShards=4name=hotelPackagereplicationFactor=1action=CREATE
 : INFO  - 2015-02-11 19:33:52.280;
 : org.apache.solr.cloud.DistributedQueue$LatchChildWatcher;
 LatchChildWatcher
 : fired on path: /overseer/collection-queue-work state: SyncConnected type
 : NodeChildrenChanged
 : INFO  - 2015-02-11 19:33:52.282;
 : org.apache.solr.cloud.OverseerCollectionProcessor; Overseer Collection
 : Processor: Get the message
 id:/overseer/collection-queue-work/qn-78
 : message:{
 :   operation:createcollection,
 :   fromApi:true,
 :   name:hotelPackage,
 :   replicationFactor:1,
 :   numShards:4}
 : WARN  - 2015-02-11 19:33:52.283;
 : org.apache.solr.cloud.OverseerCollectionProcessor;
 : OverseerCollectionProcessor.processMessage : createcollection , {
 :   operation:createcollection,
 :   fromApi:true,
 :   name:hotelPackage,
 :   replicationFactor:1,
 :   numShards:4}
 : INFO  - 2015-02-11 19:33:52.284;
 : org.apache.solr.cloud.OverseerCollectionProcessor; Only one config set
 : found in zk - using it:hotelPackageConf
 : INFO  - 2015-02-11 19:33:52.285;
 : org.apache.solr.cloud.OverseerCollectionProcessor; creating collections
 : conf node /collections/hotelPackage
 : INFO  - 2015-02-11 19:33:52.285;
 org.apache.solr.common.cloud.SolrZkClient;
 : makePath: /collections/hotelPackage
 : INFO  - 2015-02-11 19:33:52.297;
 : org.apache.solr.cloud.DistributedQueue$LatchChildWatcher;
 LatchChildWatcher
 : fired on path: /overseer/queue state: SyncConnected type
 NodeChildrenChanged
 : INFO  - 2015-02-11 19:33:52.300;
 : org.apache.solr.cloud.Overseer$ClusterStateUpdater; building a new
 : collection: hotelPackage
 : INFO  - 2015-02-11 19:33:52.300;
 : org.apache.solr.cloud.Overseer$ClusterStateUpdater; Create collection
 : hotelPackage with shards [shard1, shard2, shard3, shard4]
 : INFO  - 2015-02-11 19:33:52.313;
 : org.apache.solr.common.cloud.ZkStateReader$2; A cluster state change:
 : WatchedEvent state:SyncConnected type:NodeDataChanged
 : path:/clusterstate.json, has occurred - updating... (live nodes 

creating a new collection fails as SearchHandler can't be found

2015-02-11 Thread Lee Carroll
Hi all

Creating a new collection fails with class not found:
org.apache.solr.handler.component.SearchHandler

Running under tomcat 7.0.59 with solr 4.10.3. Solr app looks to be deployed
ok and the web app looks fine when browsing.
An external zookeeper set up looks fine and the configs are loaded and
playing nicely.

However when I issue curl 'http://myserver:port
/solr/admin/collections?action=CREATEname=hotelPackagenumShards=4replicationFactor=1'

The collection fails to be created (shard_replica dir and data and index
across the servers get created but collection creation fails)

The full log is appended below. I thought it should be a straight forward
class not found problem but I just can't seem to fix this (few hours now).
I've even placed all the libs from solr.war into a directory and referenced
these from the solrconfig. You can see these being loaded in the below log.

Any help would be appreciated.

Cheers Lee C


INFO  - 2015-02-11 19:22:42.494;
org.apache.solr.servlet.SolrDispatchFilter; [admin] webapp=null
path=/admin/collections
params={numShards=4name=hotelPackagereplicationFactor=1action=CREATE}
status=0 QTime=3519
INFO  - 2015-02-11 19:22:42.594;
org.apache.solr.common.cloud.ZkStateReader$2; A cluster state change:
WatchedEvent state:SyncConnected type:NodeDataChanged
path:/clusterstate.json, has occurred - updating... (live nodes size: 4)
INFO  - 2015-02-11 19:33:52.275;
org.apache.solr.handler.admin.CollectionsHandler; Creating Collection :
numShards=4name=hotelPackagereplicationFactor=1action=CREATE
INFO  - 2015-02-11 19:33:52.280;
org.apache.solr.cloud.DistributedQueue$LatchChildWatcher; LatchChildWatcher
fired on path: /overseer/collection-queue-work state: SyncConnected type
NodeChildrenChanged
INFO  - 2015-02-11 19:33:52.282;
org.apache.solr.cloud.OverseerCollectionProcessor; Overseer Collection
Processor: Get the message id:/overseer/collection-queue-work/qn-78
message:{
  operation:createcollection,
  fromApi:true,
  name:hotelPackage,
  replicationFactor:1,
  numShards:4}
WARN  - 2015-02-11 19:33:52.283;
org.apache.solr.cloud.OverseerCollectionProcessor;
OverseerCollectionProcessor.processMessage : createcollection , {
  operation:createcollection,
  fromApi:true,
  name:hotelPackage,
  replicationFactor:1,
  numShards:4}
INFO  - 2015-02-11 19:33:52.284;
org.apache.solr.cloud.OverseerCollectionProcessor; Only one config set
found in zk - using it:hotelPackageConf
INFO  - 2015-02-11 19:33:52.285;
org.apache.solr.cloud.OverseerCollectionProcessor; creating collections
conf node /collections/hotelPackage
INFO  - 2015-02-11 19:33:52.285; org.apache.solr.common.cloud.SolrZkClient;
makePath: /collections/hotelPackage
INFO  - 2015-02-11 19:33:52.297;
org.apache.solr.cloud.DistributedQueue$LatchChildWatcher; LatchChildWatcher
fired on path: /overseer/queue state: SyncConnected type NodeChildrenChanged
INFO  - 2015-02-11 19:33:52.300;
org.apache.solr.cloud.Overseer$ClusterStateUpdater; building a new
collection: hotelPackage
INFO  - 2015-02-11 19:33:52.300;
org.apache.solr.cloud.Overseer$ClusterStateUpdater; Create collection
hotelPackage with shards [shard1, shard2, shard3, shard4]
INFO  - 2015-02-11 19:33:52.313;
org.apache.solr.common.cloud.ZkStateReader$2; A cluster state change:
WatchedEvent state:SyncConnected type:NodeDataChanged
path:/clusterstate.json, has occurred - updating... (live nodes size: 4)
INFO  - 2015-02-11 19:33:52.397;
org.apache.solr.cloud.OverseerCollectionProcessor; Creating SolrCores for
new collection hotelPackage, shardNames [shard1, shard2, shard3, shard4] ,
replicationFactor : 1
INFO  - 2015-02-11 19:33:52.398;
org.apache.solr.cloud.OverseerCollectionProcessor; Creating shard
hotelPackage_shard1_replica1 as part of slice shard1 of collection
hotelPackage on 161.2.46.40:8080_solr
INFO  - 2015-02-11 19:33:52.399;
org.apache.solr.cloud.OverseerCollectionProcessor; Creating shard
hotelPackage_shard2_replica1 as part of slice shard2 of collection
hotelPackage on 161.2.46.41:8080_solr
INFO  - 2015-02-11 19:33:52.402;
org.apache.solr.handler.admin.CoreAdminHandler; core create command
numShards=4shard=shard1collection.configName=hotelPackageConfname=hotelPackage_shard1_replica1action=CREATEcollection=hotelPackagewt=javabinqt=/admin/coresversion=2
INFO  - 2015-02-11 19:33:52.406;
org.apache.solr.cloud.OverseerCollectionProcessor; Creating shard
hotelPackage_shard3_replica1 as part of slice shard3 of collection
hotelPackage on 161.2.46.43:8080_solr
INFO  - 2015-02-11 19:33:52.407; org.apache.solr.cloud.ZkController;
publishing core=hotelPackage_shard1_replica1 state=down
collection=hotelPackage
INFO  - 2015-02-11 19:33:52.408;
org.apache.solr.cloud.OverseerCollectionProcessor; Creating shard
hotelPackage_shard4_replica1 as part of slice shard4 of collection
hotelPackage on 161.2.46.42:8080_solr
INFO  - 2015-02-11 19:33:52.412; org.apache.solr.cloud.ZkController; look
for our core node name
INFO  - 2015-02-11 19:33:52.413;

Re: creating a new collection fails as SearchHandler can't be found

2015-02-11 Thread Chris Hostetter

: The collection fails to be created (shard_replica dir and data and index
: across the servers get created but collection creation fails)
: 
: The full log is appended below. I thought it should be a straight forward
: class not found problem but I just can't seem to fix this (few hours now).
: I've even placed all the libs from solr.war into a directory and referenced
: these from the solrconfig. You can see these being loaded in the below log.

what exactly did hte logs  errors look like *BEFORE* you started copying 
libs arround?

as things stand right now, you've got at least 2 (possibly 3, i'm not 
certain) copies of every Solr class in your classpath -- which can cause a 
lot more classloader type errors (including ClassNotFound) then it will 
ever solve, because of how the classloader hierarchy works -- if you have 
to copies of ClassX loaded by two differnet classloaders, and ClassX 
refers to SearchHandler but SearchHandler is not available in the same 
ClassLoader that loaded ClassX, all sorts of not-fun ClassNotFound type 
exceptions can happen.

Go back to a clean install, w/ a single solr.war file, and no manulaly 
copied jars anywhere, and see if you still get problems with SearchHandler 
when you create a collection.

if you do, then take another step back and try a single (tomcat) solr node 
setup (no solrcloud) with an instanceDir already in place with a single 
SolrCore 
using hte example configs included in Solr 4.10.3 ... if that *STILL* 
doesn't work, and you still get ClassNotFound errors then something is 
jacked up with your tomcat setup/classpath (unless of coure you can still 
reproduce the same problem with the same example configs using hte 
Solr provided jetty -- in that case, the problem gets a lot more 
interesting and your logs from *that* would be helpful to diagnose it)





: Any help would be appreciated.
: 
: Cheers Lee C
: 
: 
: INFO  - 2015-02-11 19:22:42.494;
: org.apache.solr.servlet.SolrDispatchFilter; [admin] webapp=null
: path=/admin/collections
: params={numShards=4name=hotelPackagereplicationFactor=1action=CREATE}
: status=0 QTime=3519
: INFO  - 2015-02-11 19:22:42.594;
: org.apache.solr.common.cloud.ZkStateReader$2; A cluster state change:
: WatchedEvent state:SyncConnected type:NodeDataChanged
: path:/clusterstate.json, has occurred - updating... (live nodes size: 4)
: INFO  - 2015-02-11 19:33:52.275;
: org.apache.solr.handler.admin.CollectionsHandler; Creating Collection :
: numShards=4name=hotelPackagereplicationFactor=1action=CREATE
: INFO  - 2015-02-11 19:33:52.280;
: org.apache.solr.cloud.DistributedQueue$LatchChildWatcher; LatchChildWatcher
: fired on path: /overseer/collection-queue-work state: SyncConnected type
: NodeChildrenChanged
: INFO  - 2015-02-11 19:33:52.282;
: org.apache.solr.cloud.OverseerCollectionProcessor; Overseer Collection
: Processor: Get the message id:/overseer/collection-queue-work/qn-78
: message:{
:   operation:createcollection,
:   fromApi:true,
:   name:hotelPackage,
:   replicationFactor:1,
:   numShards:4}
: WARN  - 2015-02-11 19:33:52.283;
: org.apache.solr.cloud.OverseerCollectionProcessor;
: OverseerCollectionProcessor.processMessage : createcollection , {
:   operation:createcollection,
:   fromApi:true,
:   name:hotelPackage,
:   replicationFactor:1,
:   numShards:4}
: INFO  - 2015-02-11 19:33:52.284;
: org.apache.solr.cloud.OverseerCollectionProcessor; Only one config set
: found in zk - using it:hotelPackageConf
: INFO  - 2015-02-11 19:33:52.285;
: org.apache.solr.cloud.OverseerCollectionProcessor; creating collections
: conf node /collections/hotelPackage
: INFO  - 2015-02-11 19:33:52.285; org.apache.solr.common.cloud.SolrZkClient;
: makePath: /collections/hotelPackage
: INFO  - 2015-02-11 19:33:52.297;
: org.apache.solr.cloud.DistributedQueue$LatchChildWatcher; LatchChildWatcher
: fired on path: /overseer/queue state: SyncConnected type NodeChildrenChanged
: INFO  - 2015-02-11 19:33:52.300;
: org.apache.solr.cloud.Overseer$ClusterStateUpdater; building a new
: collection: hotelPackage
: INFO  - 2015-02-11 19:33:52.300;
: org.apache.solr.cloud.Overseer$ClusterStateUpdater; Create collection
: hotelPackage with shards [shard1, shard2, shard3, shard4]
: INFO  - 2015-02-11 19:33:52.313;
: org.apache.solr.common.cloud.ZkStateReader$2; A cluster state change:
: WatchedEvent state:SyncConnected type:NodeDataChanged
: path:/clusterstate.json, has occurred - updating... (live nodes size: 4)
: INFO  - 2015-02-11 19:33:52.397;
: org.apache.solr.cloud.OverseerCollectionProcessor; Creating SolrCores for
: new collection hotelPackage, shardNames [shard1, shard2, shard3, shard4] ,
: replicationFactor : 1
: INFO  - 2015-02-11 19:33:52.398;
: org.apache.solr.cloud.OverseerCollectionProcessor; Creating shard
: hotelPackage_shard1_replica1 as part of slice shard1 of collection
: hotelPackage on 161.2.46.40:8080_solr
: INFO  - 2015-02-11 19:33:52.399;
: org.apache.solr.cloud.OverseerCollectionProcessor; Creating shard
: