crawlab-team / crawlab

Distributed web crawler admin platform for spiders management regardless of languages and frameworks. 分布式爬虫管理平台,支持任何语言和框架
https://www.crawlab.cn
BSD 3-Clause "New" or "Revised" License
11.38k stars 1.8k forks source link

master startup error:rpc error: code = Unknown desc = mongo: no documents in result #1385

Open geosmart opened 1 year ago

geosmart commented 1 year ago
master_1  | replaced api url in file: crawlab-ui.14fd3a25.js                                                                                                                                                 
master_1  | 2023/09/02 17:49:33  info initialized controllers successfully
master_1  | 2023/09/02 17:49:33  info initialized middlewares successfully
master_1  | 2023/09/02 17:49:33  info initialized routes successfully
master_1  | 2023/09/02 17:49:33  info current node type: master
master_1  | 2023/09/02 17:49:33  info running in docker container
master_1  | [nginx]  * Starting nginx nginx
master_1  | 2023/09/02 17:49:33  info grpc server listens to 0.0.0.0:9666
master_1  | 2023/09/02 17:49:33  info master[051d6c45-4976-11ee-887f-0242ac120002] does not exist in db
master_1  | 2023/09/02 17:49:33  info added master[051d6c45-4976-11ee-887f-0242ac120002] in db. id: 64f3052d4f4f0d406cac7a41
master_1  | 2023/09/02 17:49:33  info master[051d6c45-4976-11ee-887f-0242ac120002] monitoring started
master_1  | 2023/09/02 17:49:33  info cron: start               
master_1  | 2023/09/02 17:49:33  info [GrpcClient] grpc client connected to localhost:9666
master_1  | 2023/09/02 17:49:33  info [GrpcClient] grpc client registered client services
master_1  | 2023/09/02 17:49:33  info [GrpcClient] grpc client subscribed to remote server
master_1  | 2023/09/02 17:49:33  info [GrpcClient] start handling stream message...
master_1  | 2023/09/02 17:49:33  info [GrpcClient] grpc client connected to localhost:9666
master_1  | 2023/09/02 17:49:33  info [GrpcClient] grpc client registered client services
master_1  | 2023/09/02 17:49:33  info [GrpcClient] grpc client subscribed to remote server
master_1  | 2023/09/02 17:49:33  info subscribe events         
master_1  | 2023/09/02 17:49:33  info [GrpcClient] start handling stream message...
master_1  | 2023/09/02 17:49:33  info [NodeServer] master received subscribe request from node[051d6c45-4976-11ee-887f-0242ac120002]
master_1  | 2023/09/02 17:49:33  info [NodeServer] master subscribed node[051d6c45-4976-11ee-887f-0242ac120002]
master_1  | 2023/09/02 17:49:33  info [MessageServer] received connect request from node[051d6c45-4976-11ee-887f-0242ac120002], key: plugin:notification:051d6c45-4976-11ee-887f-0242ac120002
master_1  | 2023/09/02 17:49:33  info [NodeServer] master received subscribe request from node[051d6c45-4976-11ee-887f-0242ac120002]
master_1  | 2023/09/02 17:49:33  info [NodeServer] master subscribed node[051d6c45-4976-11ee-887f-0242ac120002]
master_1  | mongo: no documents in result
master_1  | /go/pkg/mod/github.com/crawlab-team/go-trace@v0.1.1/trace.go:13 github.com/crawlab-team/go-trace.TraceError()
master_1  | /go/pkg/mod/github.com/crawlab-team/crawlab-core@v0.6.3-0.20230804030437-664646cf1665/grpc/server/plugin_server.go:50 github.com/crawlab-team/crawlab-core/grpc/server.PluginServer.Register()
master_1  | /go/pkg/mod/github.com/crawlab-team/crawlab-grpc@v0.6.0-beta.20211219.1930.0.20221020032435-afa1c691f73c/plugin_service_grpc.pb.go:159 github.com/crawlab-team/crawlab-grpc._PluginService_Regist
er_Handler.func1()
master_1  | /go/pkg/mod/github.com/grpc-ecosystem/go-grpc-middleware@v1.0.1-0.20190118093823-f849b5445de4/chain.go:31 github.com/grpc-ecosystem/go-grpc-middleware.ChainUnaryServer.func1.1()
master_1  | /go/pkg/mod/github.com/grpc-ecosystem/go-grpc-middleware@v1.0.1-0.20190118093823-f849b5445de4/auth/auth.go:46 github.com/grpc-ecosystem/go-grpc-middleware/auth.UnaryServerInterceptor.func1()
master_1  | /go/pkg/mod/github.com/grpc-ecosystem/go-grpc-middleware@v1.0.1-0.20190118093823-f849b5445de4/chain.go:34 github.com/grpc-ecosystem/go-grpc-middleware.ChainUnaryServer.func1.1()
master_1  | /go/pkg/mod/github.com/grpc-ecosystem/go-grpc-middleware@v1.0.1-0.20190118093823-f849b5445de4/recovery/interceptors.go:29 github.com/grpc-ecosystem/go-grpc-middleware/recovery.UnaryServerInterc
eptor.func1()
master_1  | /go/pkg/mod/github.com/grpc-ecosystem/go-grpc-middleware@v1.0.1-0.20190118093823-f849b5445de4/chain.go:39 github.com/grpc-ecosystem/go-grpc-middleware.ChainUnaryServer.func1()
master_1  | /go/pkg/mod/github.com/crawlab-team/crawlab-grpc@v0.6.0-beta.20211219.1930.0.20221020032435-afa1c691f73c/plugin_service_grpc.pb.go:161 github.com/crawlab-team/crawlab-grpc._PluginService_Regist
er_Handler()
master_1  | /go/pkg/mod/google.golang.org/grpc@v1.42.0/server.go:1282 google.golang.org/grpc.(*Server).processUnaryRPC()
master_1  | /go/pkg/mod/google.golang.org/grpc@v1.42.0/server.go:1616 google.golang.org/grpc.(*Server).handleStream()
master_1  | /go/pkg/mod/google.golang.org/grpc@v1.42.0/server.go:921 google.golang.org/grpc.(*Server).serveStreams.func1.2()
master_1  | /usr/local/go/src/runtime/asm_amd64.s:1571 runtime.goexit()
master_1  | rpc error: code = Unknown desc = mongo: no documents in result

my docker-compose file

version: '3.3'
services:
  master: 
    image: crawlabteam/crawlab:latest
    container_name: crawlab_master
    environment:
      CRAWLAB_NODE_MASTER: "Y"
      CRAWLAB_MONGO_HOST: "10.199.150.136"
      CRAWLAB_MONGO_PORT: "27017"
      CRAWLAB_MONGO_DB: "crawlab"
      CRAWLAB_MONGO_USERNAME: "mongo"
      CRAWLAB_MONGO_PASSWORD: "password"
      CRAWLAB_MONGO_AUTHSOURCE: "admin"
    volumes:
      - "/opt/crawlab/metadata:/root/.crawlab"
      - "/opt/crawlab/data:/data"
      - "/opt/crawlab/logs:/var/log/crawlab"
    ports:    
      - "8080:8080"
      - "9666:9666"

mongodb

version: '3.3'
services:
  mongo:
    container_name: mongo
    image: mongo:4.2
    restart: always
    environment:
      MONGO_DATA_DIR: /data/db
      MONGO_LOG_DIR: /data/logs
      MONGO_INITDB_ROOT_USERNAME: "mongo"
      MONGO_INITDB_ROOT_PASSWORD: "password"
    volumes:
      - "/opt/mongo/data/db:/data/db"
      - "/opt/mongo/logs:/data/logs"
      - "/opt/mongo/conf:/etc/mongo"
    ports:
      - "27017:27017"
    command: mongod --auth
wesleywgu commented 1 year ago

I encountered the same issue using the standalone mongo. Is there any way to solve this problem?

techiewonk commented 10 months ago

Screenshot_19

I encountered the same issue

no log updates Screenshot_20

maxyou2090 commented 10 months ago

This is an error log generated when initializing the notification plugin, but it does not affect the normal operation of the framework. The issue has already been reported to the author.

maxyou2090 commented 10 months ago

Screenshot_19

I encountered(遇到) the same issue(问题)

no log updates(更新) Screenshot_20

Your question is not related to this error log; please check whether the SeaweedFS service is running properly.