Failed to connect to server

classic Classic list List threaded Threaded
9 messages Options
Reply | Threaded
Open this post in threaded view
|

Failed to connect to server

rhys J
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
Reply | Threaded
Open this post in threaded view
|

Re: Failed to connect to server

Edward Ribeiro
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 <[hidden email]> 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
Reply | Threaded
Open this post in threaded view
|

Re: Failed to connect to server

rhys J
On Thu, Jan 16, 2020 at 3:27 PM Edward Ribeiro <[hidden email]>
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
Reply | Threaded
Open this post in threaded view
|

Re: Failed to connect to server

David Hastings
>  '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 <[hidden email]> wrote:

> On Thu, Jan 16, 2020 at 3:27 PM Edward Ribeiro <[hidden email]>
> 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
>
Reply | Threaded
Open this post in threaded view
|

Re: Failed to connect to server

rhys J
On Thu, Jan 16, 2020 at 3:48 PM David Hastings <[hidden email]>
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
Reply | Threaded
Open this post in threaded view
|

Re: Failed to connect to server

David Hastings
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 <[hidden email]> wrote:

> On Thu, Jan 16, 2020 at 3:48 PM David Hastings <
> [hidden email]>
> 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
>
Reply | Threaded
Open this post in threaded view
|

Re: Failed to connect to server

rhys J
On Fri, Jan 17, 2020 at 12:10 PM David Hastings <
[hidden email]> 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
Reply | Threaded
Open this post in threaded view
|

Re: Failed to connect to server

David Hastings
It doesn’t need to be identical, just anything with a buildon reload statement

> On Jan 17, 2020, at 12:17 PM, rhys J <[hidden email]> wrote:
>
> On Fri, Jan 17, 2020 at 12:10 PM David Hastings <
> [hidden email]> 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
Reply | Threaded
Open this post in threaded view
|

Re: Failed to connect to server

Edward Ribeiro
> 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 <[hidden email]> 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 <[hidden email]> wrote:
> >
> > On Fri, Jan 17, 2020 at 12:10 PM David Hastings <
> > [hidden email]> 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
>