cancel
Showing results for 
Search instead for 
Did you mean: 

ConnectException from Solr

nobby
Champ on-the-rise
Champ on-the-rise
Hi all,

this exception fills catalina.out since it is thrown by a scheduled job:


java.net.ConnectException: Connection refused
   at java.net.PlainSocketImpl.socketConnect(Native Method)
   at java.net.PlainSocketImpl.doConnect(PlainSocketImpl.java:333)
   at java.net.PlainSocketImpl.connectToAddress(PlainSocketImpl.java:195)
   at java.net.PlainSocketImpl.connect(PlainSocketImpl.java:182)
   at java.net.SocksSocketImpl.connect(SocksSocketImpl.java:366)
   at java.net.Socket.connect(Socket.java:525)
   at com.sun.net.ssl.internal.ssl.SSLSocketImpl.connect(SSLSocketImpl.java:550)
   at com.sun.net.ssl.internal.ssl.SSLSocketImpl.<init>(SSLSocketImpl.java:394)
   at com.sun.net.ssl.internal.ssl.SSLSocketFactoryImpl.createSocket(SSLSocketFactoryImpl.java:123)
   at org.alfresco.encryption.ssl.AuthSSLProtocolSocketFactory.createSocket(AuthSSLProtocolSocketFactory.java:168)
   at org.apache.commons.httpclient.HttpConnection.open(HttpConnection.java:707)
   at org.apache.commons.httpclient.MultiThreadedHttpConnectionManager$HttpConnectionAdapter.open(MultiThreadedHttpConnectionManager.java:1361)
   at org.apache.commons.httpclient.HttpMethodDirector.executeWithRetry(HttpMethodDirector.java:387)
   at org.apache.commons.httpclient.HttpMethodDirector.executeMethod(HttpMethodDirector.java:171)
   at org.apache.commons.httpclient.HttpClient.executeMethod(HttpClient.java:397)
   at org.apache.commons.httpclient.HttpClient.executeMethod(HttpClient.java:323)
   at org.alfresco.httpclient.AbstractHttpClient.executeMethod(AbstractHttpClient.java:133)
   at org.alfresco.httpclient.AbstractHttpClient.sendRemoteRequest(AbstractHttpClient.java:85)
   at org.alfresco.httpclient.HttpClientFactory$HttpsClient.sendRequest(HttpClientFactory.java:307)
   at org.alfresco.solr.client.SOLRAPIClient.getModelsDiff(SOLRAPIClient.java:982)
   at org.alfresco.solr.tracker.CoreTracker.trackModels(CoreTracker.java:1405)
   at org.alfresco.solr.tracker.CoreTracker.trackRepository(CoreTracker.java:1127)
   at org.alfresco.solr.tracker.CoreTracker.updateIndex(CoreTracker.java:481)
   at org.alfresco.solr.tracker.CoreTrackerJob.execute(CoreTrackerJob.java:45)
   at org.quartz.core.JobRunShell.run(JobRunShell.java:216)
   at org.quartz.simpl.SimpleThreadPool$WorkerThread.run(SimpleThreadPool.java:549)

Any ideas how to resolve it? I run a Tomcat SSL connector on port 18443, the SSL connection works.

I updated the solr port in alfesco-global.properties, no idea if this makes sense though:


### Solr indexing ###
index.subsystem.name=solr
dir.keystore=${dir.root}/keystore
solr.port=18443

Thanks in advance for any suggestions!

Best regards,
Andreas
15 REPLIES 15

janv
Employee
Employee
This message indicates that the Alfresco SOLR server (=> CoreTracker) cannot connect back into to the Alfresco Repository server in order to poll for (changes that require) indexing. I assume you're using Community 4.0a - if so, is this a fresh install and did you use the installer to setup your system ?

Regards,
Jan

nobby
Champ on-the-rise
Champ on-the-rise
Hi Jan,

This message indicates that the Alfresco SOLR server (=> CoreTracker) cannot connect back into to the Alfresco Repository server in order to poll for (changes that require) indexing.

thanks! Since the message is "connection refused", I assume that SOLR uses the wrong URI/port. Maybe the reason is that I use a custom port? Do I need to configure this somewhere?

I assume you're using Community 4.0a

Yes.

if so, is this a fresh install and did you use the installer to setup your system ?

Yes, I only customized the Tomcat ports and the Kerberos authentication settings.

Best regards,
Andreas

nobby
Champ on-the-rise
Champ on-the-rise
I see a lot of references to the port in the webapp config files. Maybe I need to reinstall Alfresco and configure the port initially?


grep -r 8080 webapps/ | grep -v \.css | grep -v \.js
webapps/alfresco/WEB-INF/classes/alfresco-global.properties.sample:#alfresco.port=8080
webapps/alfresco/WEB-INF/classes/alfresco-global.properties.sample:#share.port=8080
webapps/alfresco/WEB-INF/classes/alfresco/repository.properties:repo.remote.url=http://localhost:8080/alfresco
webapps/alfresco/WEB-INF/classes/alfresco/repository.properties:solr.port=8080
webapps/alfresco/WEB-INF/classes/alfresco/subsystems/sysAdmin/default/sysadmin-parameter.properties:alfresco.port=8080
webapps/alfresco/WEB-INF/classes/alfresco/subsystems/sysAdmin/default/sysadmin-parameter.properties:share.port=8080
webapps/alfresco/WEB-INF/classes/alfresco/subsystems/Search/solr/solr-search.properties:solr.port=8080
webapps/alfresco/WEB-INF/classes/alfresco/web-client-config.xml:         <port>8080</port>
Binary file webapps/alfresco/WEB-INF/lib/standard.jar matches
webapps/alfresco/wsdl/authentication-service.wsdl:         <wsdlsoap:address location="http://localhost:8080/alfresco/api/AuthenticationService'/>
webapps/alfresco/wsdl/repository-service.wsdl:         <wsdlsoap:address location="http://localhost:8080/alfresco/api/RepositoryService'/>
webapps/alfresco/wsdl/administration-service.wsdl:          <wsdlsoap:address location="http://localhost:8080/alfresco/api/AdministrationService'/>
webapps/alfresco/wsdl/action-service.wsdl:          <wsdlsoap:address location="http://localhost:8080/alfresco/api/ActionService'/>
webapps/alfresco/wsdl/classification-service.wsdl:         <wsdlsoap:address location="http://localhost:8080/alfresco/api/ClassificationService'/>
webapps/alfresco/wsdl/access-control-service.wsdl:          <wsdlsoap:address location="http://localhost:8080/alfresco/api/AccessControlService'/>
webapps/alfresco/wsdl/dictionary-service.wsdl:         <wsdlsoap:address location="http://localhost:8080/alfresco/api/DictionaryService'/>
webapps/alfresco/wsdl/authoring-service.wsdl:         <wsdlsoap:address location="http://localhost:8080/alfresco/api/AuthoringService'/>
webapps/alfresco/wsdl/content-service.wsdl:         <wsdlsoap:address location="http://localhost:8080/alfresco/api/ContentService'/>
webapps/share/WEB-INF/classes/alfresco/share-documentlibrary-config.xml:      <repository-url>http://localhost:8080/alfresco</repository-url>
webapps/share/WEB-INF/classes/alfresco/share-cmis-config.xml:            <parameter key="org.apache.chemistry.opencmis.binding.atompub.url" value="http://localhost:8080/alfresco/cmisatom'/>
webapps/share/WEB-INF/classes/alfresco/share-config.xml:            <endpoint-url>http://localhost:8080/alfresco/activiti-admin</endpoint-url>
webapps/share/yui/swfplayer/assets/as/README.txt:   http://localhost:8080/share/yui/swfplayer/assets
webapps/share/yui/swfplayer/assets/as/SWFPlayer.as:         //load("http://localhost:8080/share/proxy/alfresco/api/node/content/workspace/SpacesStore/d90b9295-0e9e-4241...", false);
webapps/share/yui/swfplayer/assets/as/SWFPlayer.as:         load("http://localhost:8080/AVM2.swf", false);

Best regards,
Andreas

nobby
Champ on-the-rise
Champ on-the-rise
I changed the ports back to 8080/8443. Now the connection seems to succeed, but the certificate check fails:

unable to find valid certification path to requested target

Do I have to add the Tomcat certificate to the SOLR keystore? Is it this configuration entry?


### Solr indexing ###
index.subsystem.name=solr
dir.keystore=${dir.root}/keystore

Where is the ${dir.root}?
What is the name of the keystore file?

TIA and best regards,
Andreas

nobby
Champ on-the-rise
Champ on-the-rise
IIUC Alfresco tries to connect as a client to the SOLR server via SSL. Maybe I have to add the Tomcat cert to the Tomcat truststore so that it can connect to itself. I'll try this and report back.

nobby
Champ on-the-rise
Champ on-the-rise
Unfortunately that didn't work.

janv
Employee
Employee

paulhh
Champ in-the-making
Champ in-the-making
The installer is not substituting the SSL port property for Solr.  You can do this manually in two locations within alf_data/solr:

archive-SpacesStore/conf/solrcore.properties
workspace-SpacesStore/conf/solrcore.properties

Also the port number should be set in tomcat/conf/server.xml in te connector with all the keystore parameters.

Paul.

fstnboy
Champ on-the-rise
Champ on-the-rise
Hi,

I'm facing the same issue….

Nothing special in the installation, I used the keystore and truststore provided by Alfresco and followed the instructions on HowToSetUpSolr.txt, but I'm getting the same ConnectionRefused error thrown by the tracker.

I'm working with Alfresco Enterprise 4 Beta and have both under the same Tomcat instance…

Any clue on that?