我正在使用 portainer 来管理 docker swarm。版本:portainer/portainer-ce:2.11.0-alpine。通过 portainer 的 Web UI,我无法显示我的 docker swarm 的任何数据(堆栈、服务……)。
当我显示 docker swarm 的服务列表时:
docker service ls
ID NAME MODE REPLICAS IMAGE PORTS
okczbojnoyvf portainer_agent global 4/4 portainer/agent:2.11.0-alpine
77286g12ru0q portainer_portainer replicated 1/1 portainer/portainer-ce:2.11.0-alpine *:8000->8000/tcp, *:9443->9443/tcp, *:29000->9000/tcp
yifs4y2rplzj swarmpit_agent global 4/4 swarmpit/agent:latest
2swudmbmtiec swarmpit_app replicated 0/1 swarmpit/swarmpit:latest *:888->8080/tcp
tdwb6iy2ykie swarmpit_db replicated 1/1 couchdb:2.3.0
buzdxnbpn5da swarmpit_influxdb replicated 0/1 influxdb:1.7
swarmpit_influxdb的日志:
docker service logs -f swarmpit_influxdb
[email protected] | ts=2024-01-12T18:45:02.630346Z lvl=info msg="InfluxDB starting" log_id=0mgkiE9W000 version=1.7.11 branch=1.7.11 commit=f11ad4780c8a61108108a18b141c1d067d920a80
[email protected] | ts=2024-01-12T18:45:02.630394Z lvl=info msg="Go runtime" log_id=0mgkiE9W000 version=go1.13.8 maxprocs=16
[email protected] | run: create server: rename /var/lib/influxdb/meta/meta.dbtmp /var/lib/influxdb/meta/meta.db: file exists
[email protected] | ts=2024-01-12T18:45:26.634682Z lvl=info msg="InfluxDB starting" log_id=0mgkjgvW000 version=1.7.11 branch=1.7.11 commit=f11ad4780c8a61108108a18b141c1d067d920a80
[email protected] | ts=2024-01-12T18:45:26.634730Z lvl=info msg="Go runtime" log_id=0mgkjgvW000 version=go1.13.8 maxprocs=16
[email protected] | run: create server: rename /var/lib/influxdb/meta/meta.dbtmp /var/lib/influxdb/meta/meta.db: file exists
[email protected] | ts=2024-01-12T18:45:45.832173Z lvl=info msg="InfluxDB starting" log_id=0mgkkrv0000 version=1.7.11 branch=1.7.11 commit=f11ad4780c8a61108108a18b141c1d067d920a80
[email protected] | ts=2024-01-12T18:45:45.832223Z lvl=info msg="Go runtime" log_id=0mgkkrv0000 version=go1.13.8 maxprocs=16
[email protected] | run: create server: rename /var/lib/influxdb/meta/meta.dbtmp /var/lib/influxdb/meta/meta.db: file exists
[email protected] | ts=2024-01-12T18:46:13.431821Z lvl=info msg="InfluxDB starting" log_id=0mgkmYil000 version=1.7.11 branch=1.7.11 commit=f11ad4780c8a61108108a18b141c1d067d920a80
[email protected] | ts=2024-01-12T18:46:13.431878Z lvl=info msg="Go runtime" log_id=0mgkmYil000 version=go1.13.8 maxprocs=16
[email protected] | run: create server: rename /var/lib/influxdb/meta/meta.dbtmp /var/lib/influxdb/meta/meta.db: file exists
[email protected] | ts=2024-01-12T18:46:30.722784Z lvl=info msg="InfluxDB starting" log_id=0mgknbGW000 version=1.7.11 branch=1.7.11 commit=f11ad4780c8a61108108a18b141c1d067d920a80
[email protected] | ts=2024-01-12T18:46:30.722830Z lvl=info msg="Go runtime" log_id=0mgknbGW000 version=go1.13.8 maxprocs=16
[email protected] | run: create server: rename /var/lib/influxdb/meta/meta.dbtmp /var/lib/influxdb/meta/meta.db: file exists
然后我检查每个主机中的文件 meta.db:
[root@docker03 meta]# pwd
/data/swarmpit/influxdb/meta
[root@docker03 meta]# ls -la
ls: cannot access meta.db: No such file or directory
total 9
drwxr-xr-x. 2 root root 4096 Jan 13 02:32 .
drwxr-xr-x. 5 root root 4096 Sep 27 2021 ..
-?????????? ? ? ? ? ? meta.db
-rw-r--r--. 1 root root 20 Jan 13 02:32 meta.dbtmp
Portainer 工作正常,但重新启动 Node 后出现错误。
如何修复此问题?如果我删除 meta.db 文件是否安全?
谢谢你们。