ddev / ddev-solr

Solr service for DDEV
Apache License 2.0
6 stars 6 forks source link

unable to connect to solr sever instance : Solr HTTP error: HTTP request failed, Failed to connect to localhost port 8983: Connection refused #28

Closed alexbaron closed 10 months ago

alexbaron commented 10 months ago

context :

issue: i try to configure ddev-solr to be able to create view in my local drupal with solr server as data source.

I followed the instructions from the readme but i think something is missing.

after installation and ddev restart

i run this command : ddev drush --numShards=1 search-api-solr:upload-configset my_server_local

the first error was : The config-set could not be created because the targeted Solr version is missing. In case of an auto-detection of the version the Solr server mi ght not be running or is not reachable or the API is blocked (check the log files). As a workaround you can manually configure the targeted Solr version in the settings.

so i export the configs from drupal with drush ddev drush cex -y

and change the file config/sync/search_api.my_server_local.yml by changing: solr_version: '8.11.2'

but now i have this issue : Solr HTTP error: HTTP request failed, Failed to connect to localhost port 8983: Connection refused

what is the missing/correction configuration ?

alexbaron commented 10 months ago

finally i found the solution .

there is a misconfiguration in the drupal connection configuration

i have to change the configuration as follow :

in the file config/sync/search_api.server.my_server_local.yml

changes in :

alexbaron commented 10 months ago

probably host and solr_version should be configurable in ddev config !

rfay commented 10 months ago

When using this addon the host will always be solr. It's not clear what you were trying to do; trying to use an external solr server?