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

Panic on interface convertion #50

Open
gwan284 opened this issue Jan 29, 2019 · 5 comments
Open

Panic on interface convertion #50

gwan284 opened this issue Jan 29, 2019 · 5 comments

Comments

@gwan284
Copy link

gwan284 commented Jan 29, 2019

interface conversion: interface {} is nil, not map[string]interface {}:
panic(0x2423640, 0xc0168b8930)
	C:/Go/src/runtime/panic.go:513 +0x1c7
github.com/vanng822/go-solr/solr.(*StandardResultParser).Parse(0x3410718, 0xc07f1360e0, 0x6, 0xc015d9cf38, 0xc07f1360e0)
	C:/Users/Margaryta/GoSrc/src/bitbucket.org/repustate/repustate-go/src/github.com/vanng822/go-solr/solr/parser.go:130 +0x6a5
github.com/vanng822/go-solr/solr.(*Search).Result(0xc032187710, 0x0, 0x0, 0x0, 0x1, 0xc04ed9c0b0)
	C:/Users/Margaryta/GoSrc/src/bitbucket.org/repustate/repustate-go/src/github.com/vanng822/go-solr/solr/search.go:72 +0xbe

Happens when Solr fails to load core to execute solr.Search , in such cases Solr instance returns error object like :

  "error":{
    "metadata":[
      "error-class","org.apache.solr.core.SolrCoreInitializationException",
      "root-error-class","org.apache.solr.common.SolrException"],
    "msg":"SolrCore 'clientindices' is not available due to init failure: Could not load configuration from directory /var/solr/data/configsets/_default",
    "trace":"org.apache.solr.core.SolrCoreInitializationException: SolrCore 'clientindices' is not available due to init failure: Could not load configuration from directory /var/solr/data/configsets/_default\n\tat org.apache.solr.core.CoreContainer.getCore(CoreContainer.java:1593)\n\tat org.apache.solr.servlet.HttpSolrCall.init(HttpSolrCall.java:249)\n\tat .
...
org.apache.solr.servlet.HttpSolrCall.handleAdmin(HttpSolrCall.java:734)\n\tat org.apache.solr.servlet.HttpSolrCall.call(HttpSolrCall.java:496)\n\t... 36 more\n",
    "code":500}}
@chadwcarlson
Copy link

@gwan284 Just came across this same issue. Find a solution?

@gwan284
Copy link
Author

gwan284 commented Jul 9, 2019

@chadwcarlson workarounded by checking core status via STATUS command before executing search.

@chadwcarlson
Copy link

@gwan284 Is this something that can be done using SolrInterface or it requires a CoreAdmin?

@gwan284
Copy link
Author

gwan284 commented Jul 9, 2019

It requires CoreAdmin (see STATUS command):
https://lucene.apache.org/solr/guide/6_6/coreadmin-api.html

If your client might not have such access level, just fork this lib and fix locally, because this repo seems to be not maintained any longer.

@vanng822
Copy link
Owner

Sorry for not responding
It sounds like you need a better release process and monitoring tool to make sure things are up and running.

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

3 participants