You need to enable JavaScript to run this app.
优惠活动
大模型
产品
解决方案
定价
更多

DSE 6.8.34中编辑solrconfig.xml遇SolrException错误求助

DSE环境下Solr配置编辑问题解决

问题情况

  • 安装DSE的Linux环境中,找不到solrconfig.xml文件
  • 调用Solr Config API执行编辑请求时,返回403错误,提示solrconfig editing is not enabled due to disable.configEdit
  • 找不到独立的Solr .sh脚本文件

执行的POST请求命令:

POST http://localhost:8983/solr/keyspace.mytable/config

返回的错误响应:

{
    "responseHeader": {
        "status": 403,
        "QTime": 27
    },
    "error": {
        "metadata": [
            "error-class",
            "org.apache.solr.common.SolrException",
            "root-error-class",
            "org.apache.solr.common.SolrException"
        ],
        "msg": " solrconfig editing is not enabled due to disable.configEdit",
        "code": 403
    }
}

解决步骤

1. 开启Solr Config编辑权限

DSE默认禁用了solrconfig的编辑功能,需要修改配置开启:

  • 找到DSE配置目录,通常为/etc/dse/
  • 编辑solr.in.sh文件(若找不到,可检查/var/lib/dse/solr/或DSE安装目录下的resources/solr/路径)
  • 添加或修改配置项:
    SOLR_OPTS="$SOLR_OPTS -Ddisable.configEdit=false"
    
  • 重启DSE服务:
    sudo systemctl restart dse
    

2. 找到solrconfig.xml文件

DSE中的solrconfig.xml不存放在本地常规路径,而是存储在Cassandra系统表中,可通过两种方式获取:

  • Web管理界面导出:访问http://localhost:8983/solr/#/keyspace.mytable,进入对应core的配置页面,选择「Download Config」导出完整配置包,里面包含solrconfig.xml
  • 命令行工具导出:使用DSE自带的solrctl工具导出配置:
    dse solrctl config --export keyspace.mytable /path/to/your/export/directory
    
    导出后就能在指定目录找到solrconfig.xml

3. 替代Solr .sh脚本的工具

DSE集成Solr后,没有独立的Solr .sh脚本,统一使用dse solrctl命令管理Solr:

  • 常用命令示例:
    • 列出所有Solr Core:dse solrctl core --list
    • 重新加载Core配置:dse solrctl core --reload keyspace.mytable
    • 上传修改后的配置:dse solrctl config --upload keyspace.mytable /path/to/modified/config-folder

内容的提问来源于stack exchange,提问作者iamvijay

相关产品推荐
方舟 Agent Plan

超全模态模型 × Harness 升级,最新支持 Deepseek-V4.1-Flash、GLM-5.3 系列、Doubao-Seedream-5.0-pro、Kimi-K3 (部分), 限时 9.9 元起

最近更新时间:2026.07.19 04:50:19