部署
ragflow用docker部署,部署步骤就不再赘述
直接使用docker-compose
这个kibana的版本要跟es的版本对应,否则会报错,用户我用的是kibana_system,然后做了持久化挂载,写一个yml
docker-compose.yml
version: '3'
services:
kibana:
image: kibana:8.11.3
environment:
- "ELASTICSEARCH_URL=http://kibana_system:password@192.168.10.10:1200"
volumes:
- /data/kibana/data:/usr/share/kibana/data
- /data/kibana/kibana.yml:/usr/share/kibana/config/kibana.yml # 如果你有配置文件的话
ports:
- "5601:5601"
kibana.yml
elasticsearch.hosts: "http://192.168.10.10:1200"
server.host: "0.0.0.0"
elasticsearch.username: "kibana_system"
elasticsearch.password: "password"
配置完成后需要进入es容器中创建这个用户,自动生成密码就可以
报错盘点
FATAL Error: Unable to write to UUID file at /usr/share/kibana/data/uuid. Ensure Kibana has sufficient permissions to read / write to this file. Error was: EACCES
这个报错是没有权限,授权一下就好了,然后重启
sudo chown -R 1000:1000 /data/kibana/data
sudo chmod -R 777 /data/kibana/data
es健康检查接口
curl -XGET http://192.168.10.10:1200/_cluster/health
#返回以下
{ "cluster_name": "docker-cluster", "status": "green", "timed_out": false, "number_of_nodes": 1, "number_of_data_nodes": 1, "active_primary_shards": 2, "active_shards": 2, "relocating_shards": 0, "initializing_shards": 0, "unassigned_shards": 0, "delayed_unassigned_shards": 0, "number_of_pending_tasks": 0, "number_of_in_flight_fetch": 0, "task_max_waiting_in_queue_millis": 0, "active_shards_percent_as_number": 100 }
从 Elasticsearch 的健康检查结果来看,Elasticsearch 正常运行,状态为 green,这意味着集群没有问题,所有分片都已经分配并且处于活动状态。
security_exception: action [indices:admin/create] is unauthorized for user [elastic] with effective roles [superuser] on restricted indices [...], this action is granted by the index privileges [create_index, manage, all]
{"error":{"root_cause":[{"type":"security_exception","reason":"unable to authenticate user [elastic] for REST request [/_security/user/kibana_system/_password]","header":{"WWW-Authenticate":["Basic realm=\"security\" charset=\"UTF-8\"","ApiKey"]}}],"type":"security_exception","reason":"unable to authenticate user [elastic] for REST request [/_security/user/kibana_system/_password]","header":{"WWW-Authenticate":["Basic realm=\"security\" charset=\"UTF-8\"","ApiKey"]}},"status":401}
Elasticsearch 8.x 版本中,elastic 用户的行为有所变化,默认情况下,elastic 用户的登录权限被禁用了。这是为了增强安全性,防止默认账户被滥用。在 8.x 版本中,Elasticsearch 会自动禁用 elastic 用户的登录,并要求用户创建自定义的超级用户。
docker exec进入es的容器,重新生成一个密码即可
elasticsearch@8523f86e5401:~/bin$ ./elasticsearch-reset-password -u kibana_system
WARNING: Owner of file [/usr/share/elasticsearch/config/users] used to be [root], but now is [elasticsearch]
WARNING: Owner of file [/usr/share/elasticsearch/config/users_roles] used to be [root], but now is [elasticsearch]
This tool will reset the password of the [kibana_system] user to an autogenerated value.
The password will be printed in the console.
Please confirm that you would like to continue [y/N]y
Password for the [kibana_system] user successfully reset.
New value: 新密码会出现在这里
再次docker-compose restart即可



434

被折叠的 条评论
为什么被折叠?



