当前位置: 首页 > backend >正文

知识库Qanyting部署问题总结

说明

QAnything (Question and Answer based on Anything) 是致力于支持任意格式文件或数据库的本地知识库问答系统,可断网安装使用。

这是网易开源的一个项目,地址在:https://github.com/netease-youdao/QAnything

项目主页:https://qanything.ai/

这个项目涉及的中间件有:elasticsearc、etcd、minio、milvus、mysql

我在安装过程遇到一些错误,总结下错误和解决办法。

安装遇到的问题及解决办法

1. elasticsearch启动报错

failed to obtain node locks, tried [/usr/share/elasticsearch/data]; maybe these locations are not writable or multiple nodes were started on the same data path

问题分析
Elasticsearch 默认以用户 elasticsearch(UID 1000)运行。需要确保数据目录的所有权和权限正确。
解决方法:修改用户所有者和权限

sudo chown -R 1000:1000 volumes/es/data
sudo chmod -R 755 volumes/es/data

2. etcd目录权限问题

"msg":"check file permission","error":"directory "/etcd" exist, but the permission is "drwxrwxrwx". The recommended permission is "-rwx------" to prevent possible unprivileged access to the data"

问题分析
etcd对数据目录的权限要求比较严格,建议设置为只有所有者有读写执行权限,也就是700(drwx------)。而当前的权限是777,意味着所有用户都有完全访问权限,这可能导致安全隐患,所以etcd在启动时检查到这个不符合要求,就报错了。

解决办法:修改所有者和权限

docker stop dh-milvus-etcd-local
sudo chmod 700 ./volumes/etcd/  -R
sudo chown -R root:root ./volumes/etcd/

3. etcd租约(lease)问题

{"level":"warn","ts":"2025-03-18T01:50:40.877Z","caller":"etcdserver/server.go:1159","msg":"failed to revoke lease","lease-id":"694d94023955a43a","error":"etcdserver: request timed out"}

之前映射的etcd目录下有之前开发保存的文件,全部清空重建目录就好了

4. milvus启动失败

Connection Refused on port 53100  、failed to connect 172.21.0.6:53100

53100 is the port of rootcoord node. “Connection refused” indicated the rootcoord failed to initialize. A possible reason is the rootcoord could not connect to the Etcd service.
You can check the log of the rootcoord, there should be errors about etcd.

参考信息: https://github.com/milvus-io/milvus/discussions/34459

5.访问大模型报错

Error calling OpenAI API: temperature not in (0.0, 2.0]

解决方法:qanything_kernel/connector/llm/llm_for_openai_api.py中将temperature从0改为0.6

temperature: float = 0.6

另一个语义分割调用错误

在使用语义分割onnx模型遇到的问题

AttributeError: module 'onnxruntime' has no attribute 'get_device'
AttributeError: module 'onnxruntime' has no attribute 'SessionOptions'

错误原因:onnxruntime-gpu 1.20版本废弃了这个接口,下降为1.16就好了

http://www.xdnf.cn/news/36.html

相关文章:

  • 个人博客系统后端 - 用户信息管理功能实现指南(上)
  • Ubuntu利用docker搭建Java相关环境记录(二)
  • C++学习:六个月从基础到就业——面向对象编程:重载运算符(下)
  • 容器docker入门学习
  • ubuntu24.04离线安装deb格式的mysql-community-8.4.4
  • 【C++初阶】--- list容器功能模拟实现
  • 基于flask+vue框架的灯饰安装维修系统u49cf(程序+源码+数据库+调试部署+开发环境)带论文文档1万字以上,文末可获取,系统界面在最后面。
  • 【Unity】JSON数据的存取
  • 燕山大学计算机网络之Java实现TCP数据包结构设计与收发
  • 有什么工具可以在家连接到公司内网?局域网址提供异地公网访问的那些常用方法
  • 一台 Master 多节点玩转 Kubernetes:sealos 一键部署实践
  • MahApps.Metro:专为 WPF 应用程序设计的 UI 框架
  • 【数据结构】AVL树
  • 自动驾驶系列—GLane3D: Detecting Lanes with Graph of 3D Keypoints
  • android liveData observeForever 与 observe对比
  • CS144 Lab0实战记录:搭建网络编程基础
  • 游戏引擎学习第231天
  • 02、GPIO外设(一):基础知识
  • Windows平台使用Docker部署Neo4j
  • 从零上手GUI Guider学习LVGL——Button
  • 【Windows本地部署n8n工作流自动平台结合内网穿透远程在线访问】
  • SAP HANA使用命令行快速导出导入
  • 【HFP】深入解析蓝牙 HFP 协议中呼叫转移、呼叫建立及保持呼叫状态的机制
  • 在 Kali Linux 上安装 Java OpenJDK 8(详细指南)
  • 在Pycharm配置stable diffusion环境(使用conda虚拟环境)
  • Mac idea WordExcel等文件git modify 一直提示修改状态
  • 深度剖析:GPT-3.5与GPT-4的主要区别及架构解析
  • 消除异步的传染性(代数效应)
  • Java八种常见的设计模式
  • 【python画图】:从入门到精通绘制完美柱状图