服务器上的 Solr HTTP 错误,HTTP 请求失败
Solr HTTP error on server, HTTP request failed
搜索停止工作,在服务器的日志中是:
Request.CRITICAL: Uncaught PHP Exception Solarium\Exception\HttpException:
"Solr HTTP error: HTTP request failed, Failed to connect to solr port 8983:
Connection refused" at
/var/www/vendor/solarium/solarium/library/Solarium/Core/Client/Adapter/Curl.php
line 195 {"exception":"[object] (Solarium\Exception\HttpException(code: 0):
Solr HTTP error: HTTP request failed, Failed to connect to solr port 8983:
Connection refused at
/var/www/vendor/solarium/solarium/library/Solarium/Core/Client/Adapter/Curl.php:195)"} []
欢迎猜测这与什么有关。
docker-compose.yml:
solr:
image: solr:latest
env_file: .env
ports:
- 8983:8983
volumes:
- solr_volume:/opt/solr/server/solr/mycores
entrypoint:
- docker-entrypoint.sh
- solr-precreate
- ${SOLR_CORE}
.env:
# Solr
SOLR_HOST=solr
SOLR_PORT=8983
SOLR_PATH=/solr/
SOLR_CORE=election
docker container running
docker 容器中的 Solr 崩溃并出现错误 400,这导致它无法响应外部请求。重建容器解决了这个问题。
搜索停止工作,在服务器的日志中是:
Request.CRITICAL: Uncaught PHP Exception Solarium\Exception\HttpException:
"Solr HTTP error: HTTP request failed, Failed to connect to solr port 8983:
Connection refused" at
/var/www/vendor/solarium/solarium/library/Solarium/Core/Client/Adapter/Curl.php
line 195 {"exception":"[object] (Solarium\Exception\HttpException(code: 0):
Solr HTTP error: HTTP request failed, Failed to connect to solr port 8983:
Connection refused at
/var/www/vendor/solarium/solarium/library/Solarium/Core/Client/Adapter/Curl.php:195)"} []
欢迎猜测这与什么有关。
docker-compose.yml:
solr:
image: solr:latest
env_file: .env
ports:
- 8983:8983
volumes:
- solr_volume:/opt/solr/server/solr/mycores
entrypoint:
- docker-entrypoint.sh
- solr-precreate
- ${SOLR_CORE}
.env:
# Solr
SOLR_HOST=solr
SOLR_PORT=8983
SOLR_PATH=/solr/
SOLR_CORE=election
docker container running
docker 容器中的 Solr 崩溃并出现错误 400,这导致它无法响应外部请求。重建容器解决了这个问题。