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 rhys J <rh...@gmail.com> on 2020/01/16 16:45:25 UTC

Failed to connect to server

I have noticed that if I am using curl to index a csv file *and* using curl
thru a script to update the Solr cores, that I get the following error:

curl: (7) Failed to connect to 10.40.10.14 port 8983: Connection refused

Can I only index *or* update, but not do both?

I am not running shards or collections, just a standalone set of cores.

Thanks,

Rhys

Re: Failed to connect to server

Posted by Edward Ribeiro <ed...@gmail.com>.
> I have increased the number of maxConnections to see if this fixes the
problem.

This solved the "connection refused" issue?

> I noticed in the log that there was an error from a curl statement that
said 'Error: Solr core is loading'

This is weird. Solr usually don't just reload cores. Are you sure you are
not reloading the core during the indexing process?

See this similar issue:
https://lucene.472066.n3.nabble.com/SolrCore-is-loading-in-the-middle-of-indexing-td4292909.html

Edward


On Fri, Jan 17, 2020 at 2:29 PM Dave <ha...@gmail.com> wrote:

> It doesn’t need to be identical, just anything with a buildon reload
> statement
>
> > On Jan 17, 2020, at 12:17 PM, rhys J <rh...@gmail.com> wrote:
> >
> > On Fri, Jan 17, 2020 at 12:10 PM David Hastings <
> > hastings.recursive@gmail.com> wrote:
> >
> >> something like this in your solr config:
> >>
> >> <lst name="suggester"> <str name="name">autosuggest</str> <bool name=
> >> "exactMatchFirst">false</bool> <str
> name="suggestAnalyzerFieldType">text</
> >> str> <float name="threshold">0.005</float> <str name="dictionaryImpl">
> >> DocumentDictionaryFactory</str> <str name="field">title</str> <str name=
> >> "weightField">weight</str> <str name="buildOnStartup">true</str> <str
> name=
> >> "buildOnOptimize">true</str> </lst>
> >>
> >>
> > I checked both /var/solr/solr/data/solr.xml and
> > /var/solr/data/CORE/solrconfig.xml, and I did not find this entry.
> >
> > Thanks,
> >
> > Rhys
>

Re: Failed to connect to server

Posted by Dave <ha...@gmail.com>.
It doesn’t need to be identical, just anything with a buildon reload statement

> On Jan 17, 2020, at 12:17 PM, rhys J <rh...@gmail.com> wrote:
> 
> On Fri, Jan 17, 2020 at 12:10 PM David Hastings <
> hastings.recursive@gmail.com> wrote:
> 
>> something like this in your solr config:
>> 
>> <lst name="suggester"> <str name="name">autosuggest</str> <bool name=
>> "exactMatchFirst">false</bool> <str name="suggestAnalyzerFieldType">text</
>> str> <float name="threshold">0.005</float> <str name="dictionaryImpl">
>> DocumentDictionaryFactory</str> <str name="field">title</str> <str name=
>> "weightField">weight</str> <str name="buildOnStartup">true</str> <str name=
>> "buildOnOptimize">true</str> </lst>
>> 
>> 
> I checked both /var/solr/solr/data/solr.xml and
> /var/solr/data/CORE/solrconfig.xml, and I did not find this entry.
> 
> Thanks,
> 
> Rhys

Re: Failed to connect to server

Posted by rhys J <rh...@gmail.com>.
On Fri, Jan 17, 2020 at 12:10 PM David Hastings <
hastings.recursive@gmail.com> wrote:

> something like this in your solr config:
>
> <lst name="suggester"> <str name="name">autosuggest</str> <bool name=
> "exactMatchFirst">false</bool> <str name="suggestAnalyzerFieldType">text</
> str> <float name="threshold">0.005</float> <str name="dictionaryImpl">
> DocumentDictionaryFactory</str> <str name="field">title</str> <str name=
> "weightField">weight</str> <str name="buildOnStartup">true</str> <str name=
> "buildOnOptimize">true</str> </lst>
>
>
I checked both /var/solr/solr/data/solr.xml and
/var/solr/data/CORE/solrconfig.xml, and I did not find this entry.

Thanks,

Rhys

Re: Failed to connect to server

Posted by David Hastings <ha...@gmail.com>.
something like this in your solr config:

<lst name="suggester"> <str name="name">autosuggest</str> <bool name=
"exactMatchFirst">false</bool> <str name="suggestAnalyzerFieldType">text</
str> <float name="threshold">0.005</float> <str name="dictionaryImpl">
DocumentDictionaryFactory</str> <str name="field">title</str> <str name=
"weightField">weight</str> <str name="buildOnStartup">true</str> <str name=
"buildOnOptimize">true</str> </lst>





On Fri, Jan 17, 2020 at 12:02 PM rhys J <rh...@gmail.com> wrote:

> On Thu, Jan 16, 2020 at 3:48 PM David Hastings <
> hastings.recursive@gmail.com>
> wrote:
>
> > >  'Error: Solr core is loading'
> >
> > do you have any suggesters or anything configured that would get rebuilt?
> >
> >
> > I don't think so? But I'm not quite sure what you are asking?
> >
>
> Rhys
>

Re: Failed to connect to server

Posted by rhys J <rh...@gmail.com>.
On Thu, Jan 16, 2020 at 3:48 PM David Hastings <ha...@gmail.com>
wrote:

> >  'Error: Solr core is loading'
>
> do you have any suggesters or anything configured that would get rebuilt?
>
>
> I don't think so? But I'm not quite sure what you are asking?
>

Rhys

Re: Failed to connect to server

Posted by David Hastings <ha...@gmail.com>.
>  'Error: Solr core is loading'

do you have any suggesters or anything configured that would get rebuilt?



On Thu, Jan 16, 2020 at 3:41 PM rhys J <rh...@gmail.com> wrote:

> On Thu, Jan 16, 2020 at 3:27 PM Edward Ribeiro <ed...@gmail.com>
> wrote:
>
> > A regular update is a delete followed by an indexing of the document. So
> > technically both are indexes. :) If there's an atomic update (
> >
> https://lucene.apache.org/solr/guide/8_4/updating-parts-of-documents.html
> > ), Solr would throw some sort of version conflict exception like
> >
> >
> These would have been atomic updates running at the same time I was
> importing a csv file into another core.
>
> After the connection errors, I noticed in the log that there was an error
> from a curl statement that said 'Error: Solr core is loading'
>
> The connection refused exception does not seem related to the indexing by
> > itself. Maybe it has to do with you hitting the maximum connection
> requests
> > allowed per host. See in the link below the maxConnectionsPerHost and
> > maxConnections parameters of your Solr version:
> >
> >
> >
> https://lucene.apache.org/solr/guide/6_6/format-of-solr-xml.html#Formatofsolr.xml-The%3CshardHandlerFactory%3Eelement
> >
> >
> Thank you for this. This was helpful. I have increased the number of
> maxConnections to see if this fixes the problem.
>
> Rhys
>

Re: Failed to connect to server

Posted by rhys J <rh...@gmail.com>.
On Thu, Jan 16, 2020 at 3:27 PM Edward Ribeiro <ed...@gmail.com>
wrote:

> A regular update is a delete followed by an indexing of the document. So
> technically both are indexes. :) If there's an atomic update (
> https://lucene.apache.org/solr/guide/8_4/updating-parts-of-documents.html
> ), Solr would throw some sort of version conflict exception like
>
>
These would have been atomic updates running at the same time I was
importing a csv file into another core.

After the connection errors, I noticed in the log that there was an error
from a curl statement that said 'Error: Solr core is loading'

The connection refused exception does not seem related to the indexing by
> itself. Maybe it has to do with you hitting the maximum connection requests
> allowed per host. See in the link below the maxConnectionsPerHost and
> maxConnections parameters of your Solr version:
>
>
> https://lucene.apache.org/solr/guide/6_6/format-of-solr-xml.html#Formatofsolr.xml-The%3CshardHandlerFactory%3Eelement
>
>
Thank you for this. This was helpful. I have increased the number of
maxConnections to see if this fixes the problem.

Rhys

Re: Failed to connect to server

Posted by Edward Ribeiro <ed...@gmail.com>.
A regular update is a delete followed by an indexing of the document. So
technically both are indexes. :) If there's an atomic update (
https://lucene.apache.org/solr/guide/8_4/updating-parts-of-documents.html
), Solr would throw some sort of version conflict exception like

{"error":{
    "metadata":[
      "error-class","org.apache.solr.common.SolrException",
      "root-error-class","org.apache.solr.common.SolrException"],
    "msg":"version conflict for aaa expected=999999
actual=1632740120218042368",
    "code":409}}

The connection refused exception does not seem related to the indexing by
itself. Maybe it has to do with you hitting the maximum connection requests
allowed per host. See in the link below the maxConnectionsPerHost and
maxConnections parameters of your Solr version:

https://lucene.apache.org/solr/guide/6_6/format-of-solr-xml.html#Formatofsolr.xml-The%3CshardHandlerFactory%3Eelement

Other than that, it can be related to connection issues with the VM,
containers, etc, I guess.

Edward

On Thu, Jan 16, 2020 at 1:45 PM rhys J <rh...@gmail.com> wrote:
>
> I have noticed that if I am using curl to index a csv file *and* using
curl
> thru a script to update the Solr cores, that I get the following error:
>
> curl: (7) Failed to connect to 10.40.10.14 port 8983: Connection refused
>
> Can I only index *or* update, but not do both?
>
> I am not running shards or collections, just a standalone set of cores.
>
> Thanks,
>
> Rhys