Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

pysolr.SolrError: ('Unknown collection: %s", collectionname) #224

Open
EssamEid614 opened this issue Oct 26, 2017 · 13 comments
Open

pysolr.SolrError: ('Unknown collection: %s", collectionname) #224

EssamEid614 opened this issue Oct 26, 2017 · 13 comments
Assignees

Comments

@EssamEid614
Copy link

EssamEid614 commented Oct 26, 2017

i am trying to use the pysolr api and i am getting this strange error my solr instance is in cloud mode with zookeeper running and i can even see the collection name inside the solr admin browser
can anyone help with that ?
solr version running is 5.5.3 with zookeeper 3.4.6 on ubuntu server 16.01 with anaconda 3 and python 3

acdha added a commit to acdha/pysolr that referenced this issue Oct 26, 2017
@acdha
Copy link
Collaborator

acdha commented Oct 26, 2017

I just pushed ac421dc which will at least fix that error message to show the name it expected to find. Do you know which collection name was being passed in and/or have a reproducible test case for this?

@EssamEid614
Copy link
Author

EssamEid614 commented Oct 29, 2017

@acdha sorry for the late reply , i just modified my pysolr.py as well and it still wont find the collection , i added a line to print self.collections which prints "{}" meaning no collections exist for solr is this normal ? i am sure the collection is created i can see it on my solr admin menu and i can see all my nodes are alive
also yes i know the collection name its trying to add data to and i tried 2 different collections which i can see in my solr admin view that they exist however they still cant be seen by pysolr

@uzayr
Copy link

uzayr commented Apr 29, 2018

You can change pysolr.ZooKeeper.CLUSTER_STATE = '/collections/{collection_name}/state.json'
according to your collection. Then it'll work. Because solr stop managing cluster states in clusterstate.json

@acdha
Copy link
Collaborator

acdha commented Jun 22, 2018

That looks like a bit of a refactor since

pysolr/pysolr.py

Line 1279 in f848946

@self.zk.DataWatch(ZooKeeper.CLUSTER_STATE)
assumes that the cluster state URL can be known in advance and now it'll need to change when the collection changes.

@stale
Copy link

stale bot commented Sep 20, 2018

This issue has been automatically marked as stale because it has not had recent activity. It will be closed if no further activity occurs. Thank you for your contributions.

@stale stale bot added the stale label Sep 20, 2018
@stale stale bot closed this as completed Oct 20, 2018
@chadgh
Copy link

chadgh commented Dec 5, 2018

This is still an issue for me

@acdha
Copy link
Collaborator

acdha commented Dec 5, 2018

@chadgh Yes - if you want to contribute a pull request I’m sure it’d be appreciated by the other users

@chadgh
Copy link

chadgh commented Dec 6, 2018

@acdha Maybe I will.

For reference it looks like since version 6.3.0 SolrCloud doesn't update the clusterstate.json anymore.
http://lucene.472066.n3.nabble.com/clusterstate-json-not-updated-in-zookeeper-after-creating-the-collection-using-API-td4328845.html

I've got a working version of pysolr tweaked a bit after I found that out. I'll do some more testing and submit a PR.

@parisni
Copy link

parisni commented Jan 12, 2019

hi @chadgh , any news on this ?

@chadgh
Copy link

chadgh commented Jan 15, 2019

@parisni, Sorry, not really.

I've made a few changes to the pysolr file to get things working with solr cloud 7.3. I have not tested it against other versions of solr and am in the middle of getting things to work for my specific problem.

I have no timeline on when I'll be able to get a solution submitted that is tested and compatible with other versions of solr.

@parisni
Copy link

parisni commented Jan 16, 2019

@chadgh thanks for the answer.

From my side the @uzayr method worked. That's fairly simple. (solr 7.6)

@rokclimb15
Copy link

@acdha I've run into this as well and would like to contribute a PR. Can you reopen and assign to me please?

@acdha acdha reopened this Mar 9, 2020
@acdha acdha removed the stale label Mar 9, 2020
@oskarissimus
Copy link

oskarissimus commented Apr 22, 2022

Hi, I think I encountered similar issue. My specific use-case is integration testing. It looks like I have this error if I create new instance of pysolr.ZooKeeper too early (maybe service itself is not fully initialized?) For me sleep(5) solves this problem, but I hate that.

btw, @rokclimb15 how is progress?

rokclimb15 added a commit to rokclimb15/pysolr that referenced this issue Sep 15, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

7 participants