2014-09-02 356 views
0

我正在使用nelmio/solarium-bundle。我已經完成了這個包,但我有錯誤在運行這個測試文件:在此服務器上找不到請求的URL/solr/admin/ping

Symfony/vendor/solarium/solarium/examples/1.1-check-solarium-and-ping.php

這是錯誤:

Fatal error: Uncaught exception 'Solarium\Exception\HttpException' with message ' in C:\wamp\www\Symfony2\vendor\solarium\solarium\library\Solarium\Core\Query\Result\Result.php on line 103 

Solarium\Exception\HttpException: Solr HTTP error: OK (404) <!DOCTYPE HTML PUBLIC "-//IETF//DTD HTML 2.0//EN"> <html><head> <title>404 Not Found</title> </head><body> <h1>Not Found</h1> <p>The requested URL /solr/admin/ping was not found on this server.</p> <hr> <address>Apache/2.4.9 (Win64) PHP/5.5.12 Server at 127.0.0.1 Port 80</address> </body></html> in C:\wamp\www\Symfony2\vendor\solarium\solarium\library\Solarium\Core\Query\Result\Result.php on line 103 

這是捆綁的配置在我config.yml

nelmio_solarium: ~ 

我已修改config.dist.php文件:

$config = array(
    'endpoint' => array(
     'localhost' => array(
      'host' => '127.0.0.1', 
      'port' => null, 
      'path' => '/solr', 
     ) 
    ) 
); 
+1

的可能重複[HttpException:Solr的HTTP錯誤:HTTP請求失敗,無法連接到127.0.0.1端口8983:連接被拒絕(HTTP:// stackoverflow.com/questions/25597255/httpexception-solr-http-error-http-request-failed-failed-to-connect-to-127-0) – lxg 2014-09-02 09:59:26

+0

你還沒有設置你的Solr服務器,是嗎? http://stackoverflow.com/questions/25597255/httpexception-solr-http-error-http-request-failed-failed-to-connect-to-127-0 – lxg 2014-09-02 09:59:43

+1

事實上,你已經安裝了一個Solr客戶端軟件包Symfony與運行Solr服務器本身無關。再一次:Solr是一個*獨立服務器*。日光浴場只是該服務器的*客戶*。 NelmioSolariumBundle不包含Solr服務器。您需要下載,安裝,配置和啓動Solr服務器。 – lxg 2014-09-02 10:06:18

回答

2

爲什麼你的端口爲null,應由像8983.

相關問題