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

知识库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就好了

相关文章:

  • 使用sealos部署kubernetes集群并实现集群管理
  • Idea连接远程云服务器上的MySQL,开放云服务器端口
  • Markdown 教程
  • Linux驱动开发-①regmap②IIO子系统
  • Spring Boot 项目中发布流式接口支持实时数据向客户端推送
  • 【KWDB创作者计划】_KwDB2.2.0深度实践:从存储引擎到物联网场景的多模数据库实战
  • XSS之同源、跨域、内容安全策略
  • C语言——数组
  • 【网络技术_域名解析DNS】一、DNS 基础剖析及其原理
  • [轻量化超分]CAMixerSR: Only Details Need More “Attention“
  • HTML5好看的水果蔬菜在线商城网站源码系列模板5
  • 有什么工具可以在家连接到公司内网?局域网址提供异地公网访问的那些常用方法
  • CentOS系统-超详细的Kubernetes集群搭建教程(kubernetes:1.28.2)
  • Rust生命周期、文件与IO
  • 20.3 使用技巧3
  • Qwen2.5-VL视觉大语言模型复现过程,没碰到什么坑
  • 【AI量化第24篇】KhQuant 策略框架深度解析:让策略开发回归本质——基于miniQMT的量化交易回测系统开发实记
  • Go语言入门到入土——三、处理并返回异常
  • Python爬虫之线程、进程、协程详解
  • Python 实现日志备份守护进程
  • 快评|印巴为何停火?已达成“一场胜利,各自表述”的效果
  • 陕西永寿4岁女童被蜜蜂蜇伤致死,当地镇政府介入处理
  • 国防部:奉劝有关国家不要引狼入室,甘当棋子
  • 上海如何为街镇营商环境赋能?送政策、配资源、解难题、强活力
  • 4月深圳新房、二手房成交同比均上涨,“5月有望延续积极向好的发展态势”
  • 吴清:创造条件支持优质中概股企业回归内地和香港股市