【问题标题】:HTTP ERROR 404 while accessing /solr/admin/ping. Reason: Not Found in ubuntu 16.04访问 /solr/admin/ping 时出现 HTTP 错误 404。原因:在 ubuntu 16.04 中找不到
【发布时间】:2018-10-21 11:21:06
【问题描述】:

在 ubuntu 16.04 中安装了 SOLR 7.3.0,我可以在浏览器中访问 solr 链接 (http://localhost:8983/solr)。但是管理员链接(http://localhost:8983/solr/admin/ping)给出了 404 错误。 授予 /var/solr/data 的权限,我仍然有问题。

【问题讨论】:

    标签: solr solarium


    【解决方案1】:

    我错过了配置过程,现在我使用带有 symfony 的日光浴室获得了成功的 ping 响应。

    http://localhost:8983/solr(Core Admin 创建核心 > 添加核心)作为“入门”

        use Solarium\Core\Client\Client;
    
        $config = [
            'endpoint' => [
                'localhost' => [
                    'host' => 'localhost',
                    'port' => 8983,
                    'path' => '/solr/gettingstarted',
                ]
            ]
        ];
        echo "<pre>";
        $client = new Client($config);
    
        // create a ping query
        $ping = $client->createPing();
    
        // execute the ping query
        try {
            $result = $client->ping($ping);
            echo 'Ping query successful';
            echo '<br/><pre>';
            var_dump($result->getData());
            echo '</pre>';
        } catch (Exception $e) {
            echo 'Ping query failed';
            print_r($e);
            die;
        }
        die;
    

    【讨论】:

      猜你喜欢
      • 2023-03-29
      • 1970-01-01
      • 2012-04-26
      • 1970-01-01
      • 2022-11-11
      • 2012-04-30
      • 2018-06-11
      • 1970-01-01
      • 2015-06-04
      相关资源
      最近更新 更多