【问题标题】:how to restart solr server (cloudera) from command line如何从命令行重新启动 solr 服务器(cloudera)
【发布时间】:2015-04-07 07:42:30
【问题描述】:

我想从命令行或 shell 脚本重新启动 solr cloud。当我使用命令 sudo service solr-server restart 时,它会提供无法识别的服务。

有没有办法从命令行重启 solr cloud?

我正在使用 cloudea-serach 4.3 cdh 4.7

还有

1)有没有办法知道重启操作触发时cloudera manager执行的后端命令?

【问题讨论】:

    标签: solr cloudera-cdh cloudera-manager


    【解决方案1】:

    对于有相同问题的任何人:

    您可以使用curl POST 命令

    curl -u admin:admin -X POST http://ipaddress:7180/api/v4/clusters/<Cluster_name>/services/solr1/commands/start -H 'Content-type:aplication/json; charset=utf-8';
    

    【讨论】:

    • 我在运行查询时遇到此错误:{ "message" : "No content to map due to end-of-input\n at [Source: org.apache.cxf.transport. http.AbstractHTTPDestination$1@63620408;行:1,列:1]" }.
    【解决方案2】:

    它适用于 @Bhuvan 的解决方案,只是添加了转义字符以从 Bash 运行。

    curl -k  -X POST -u user:password 'https://ipaddr:7183/api/v19/clusters/clustername/commands/restart' -H "Content-Type: **application\\/json**"
    

    【讨论】:

      猜你喜欢
      • 1970-01-01
      • 1970-01-01
      • 1970-01-01
      • 2014-10-18
      • 1970-01-01
      • 1970-01-01
      • 1970-01-01
      • 1970-01-01
      • 2011-12-11
      相关资源
      最近更新 更多