背景,在虚拟机用docker安装milvus后,正常访问attu,过段时间挂机后无法访问

日志报错:

[2024/02/19 06:59:46.761 +00:00] [ERROR] [grpcclient/client.go:330] ["ClientBase ReCall grpc second call get error"] [role=querycoord] [error="err: find no available querycoord, check querycoord state\n, /go/src/github.com/milvus-io/milvus/internal/util/trace/stack_trace.go:51 github.com/milvus-io/milvus/internal/util/trace.StackTrace\n/go/src/github.com/milvus-io/milvus/internal/util/grpcclient/client.go:329 github.com/milvus-io/milvus/internal/util/grpcclient.(*ClientBase[...]).ReCall\n/go/src/github.com/milvus-io/milvus/internal/distributed/querycoord/client/client.go:121 github.com/milvus-io/milvus/internal/distributed/querycoord/client.(*Client).GetComponentStates\n/go/src/github.com/milvus-io/milvus/internal/util/funcutil/func.go:65 github.com/milvus-io/milvus/internal/util/funcutil.WaitForComponentStates.func1\n/go/src/github.com/milvus-io/milvus/internal/util/retry/retry.go:42 github.com/milvus-io/milvus/internal/util/retry.Do\n/go/src/github.com/milvus-io/milvus/internal/util/funcutil/func.go:89 github.com/milvus-io/milvus/internal/util/funcutil.WaitForComponentStates\n/go/src/github.com/milvus-io/milvus/internal/util/funcutil/func.go:104 github.com/milvus-io/milvus/internal/util/funcutil.WaitForComponentHealthy\n/go/src/github.com/milvus-io/milvus/internal/distributed/proxy/service.go:467 github.com/milvus-io/milvus/internal/distributed/proxy.(*Server).init\n/go/src/github.com/milvus-io/milvus/internal/distributed/proxy/service.go:295 github.com/milvus-io/milvus/internal/distributed/proxy.(*Server).Run\n/go/src/github.com/milvus-io/milvus/cmd/components/proxy.go:53 github.com/milvus-io/milvus/cmd/components.(*Proxy).Run\n"] [stack="github.com/milvus-io/milvus/internal/util/grpcclient.(*ClientBase[...]).ReCall\n\t/go/src/github.com/milvus-io/milvus/internal/util/grpcclient/client.go:330\ngithub.com/milvus-io/milvus/internal/distributed/querycoord/client.(*Client).GetComponentStates\n\t/go/src/github.com/milvus-io/milvus/internal/distributed/querycoord/client/client.go:121\ngithub.com/milvus-io/milvus/internal/util/funcutil.WaitForComponentStates.func1\n\t/go/src/github.com/milvus-io/milvus/internal/util/funcutil/func.go:65\ngithub.com/milvus-io/milvus/internal/util/retry.Do\n\t/go/src/github.com/milvus-io/milvus/internal/util/retry/retry.go:42\ngithub.com/milvus-io/milvus/internal/util/funcutil.WaitForComponentStates\n\t/go/src/github.com/milvus-io/milvus/internal/util/funcutil/func.go:89\ngithub.com/milvus-io/milvus/internal/util/funcutil.WaitForComponentHealthy\n\t/go/src/github.com/milvus-io/milvus/internal/util/funcutil/func.go:104\ngithub.com/milvus-io/milvus/internal/distributed/proxy.(*Server).init\n\t/go/src/github.com/milvus-io/milvus/internal/distributed/proxy/service.go:467\ngithub.com/milvus-io/milvus/internal/distributed/proxy.(*Server).Run\n\t/go/src/github.com/milvus-io/milvus/internal/distributed/proxy/service.go:295\ngithub.com/milvus-io/milvus/cmd/components.(*Proxy).Run\n\t/go/src/github.com/milvus-io/milvus/cmd/components/proxy.go:53\ngithub.com/milvus-io/milvus/cmd/roles.runComponent[...].func1\n\t/go/src/github.com/milvus-io/milvus/cmd/roles/roles.go:120"]
[2024/02/19 06:59:46.761 +00:00] [WARN] [retry/retry.go:44] ["retry func failed"] ["retry time"=0] [error="err: find no available querycoord, check querycoord state\n, /go/src/github.com/milvus-io/milvus/internal/util/trace/stack_trace.go:51 github.com/milvus-io/milvus/internal/util/trace.StackTrace\n/go/src/github.com/milvus-io/milvus/internal/util/grpcclient/client.go:329 github.com/milvus-io/milvus/internal/util/grpcclient.(*ClientBase[...]).ReCall\n/go/src/github.com/milvus-io/milvus/internal/distributed/querycoord/client/client.go:121 github.com/milvus-io/milvus/internal/distributed/querycoord/client.(*Client).GetComponentStates\n/go/src/github.com/milvus-io/milvus/internal/util/funcutil/func.go:65 github.com/milvus-io/milvus/internal/util/funcutil.WaitForComponentStates.func1\n/go/src/github.com/milvus-io/milvus/internal/util/retry/retry.go:42 github.com/milvus-io/milvus/internal/util/retry.Do\n/go/src/github.com/milvus-io/milvus/internal/util/funcutil/func.go:89 github.com/milvus-io/milvus/internal/util/funcutil.WaitForComponentStates\n/go/src/github.com/milvus-io/milvus/internal/util/funcutil/func.go:104 github.com/milvus-io/milvus/internal/util/funcutil.WaitForComponentHealthy\n/go/src/github.com/milvus-io/milvus/internal/distributed/proxy/service.go:467 github.com/milvus-io/milvus/internal/distributed/proxy.(*Server).init\n/go/src/github.com/milvus-io/milvus/internal/distributed/proxy/service.go:295 github.com/milvus-io/milvus/internal/distributed/proxy.(*Server).Run\n/go/src/github.com/milvus-io/milvus/cmd/components/proxy.go:53 github.com/milvus-io/milvus/cmd/components.(*Proxy).Run\n"]
[2024/02/19 07:20:41.181 +00:00] [WARN] [grpclog/grpclog.go:46] ["[core][Server #40] grpc: Server.Serve failed to create ServerTransport: connection error: desc = "transport: http2Server.HandleStreams received bogus greeting from client: \"GET /healthz HTTP/1.1\\r\\nU\"""]

重启了各种服务都不行

reboot后 各种重启后恢复正常,记录下

1,执行docker-compose up -d

Creating milvus-etcd  ... done
Creating milvus-minio ... done
Creating milvus-standalone ... done

 docker ps


      Name                     Command                  State                            Ports
--------------------------------------------------------------------------------------------------------------------
milvus-etcd         etcd -advertise-client-url ...   Up             2379/tcp, 2380/tcp
milvus-minio        /usr/bin/docker-entrypoint ...   Up (healthy)   9000/tcp
milvus-standalone   /tini -- milvus run standalone   Up             0.0.0.0:19530->19530/tcp, 0.0.0.0:9091->9091/tcp

 2,启动attu

docker run -d -p 8000:3000 -e MILVUS_URL=http://192.168.81.28:19530 zilliz/attu:latest

attu恢复正常

 3,下载hello_milvus.py

wget https://raw.githubusercontent.com/milvus-io/pymilvus/v2.2.8/examples/hello_milvus.py

 执行 python hello_milvus.py

正常运行,attu也恢复正常

找不到问题时可以用docker logs  容器id 看下日志

Logo

华为开发者空间,是为全球开发者打造的专属开发空间,汇聚了华为优质开发资源及工具,致力于让每一位开发者拥有一台云主机,基于华为根生态开发、创新。

更多推荐