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

docker部署方式:新建项目 或者新建爬虫都无响应 put请求 都是400状态码 #1150

Closed mayuanyuan199625 closed 2 years ago

mayuanyuan199625 commented 2 years ago

Bug 描述 新建爬虫 或者新建项目等操作均无反应 并且接口状态码为400

crawlab_master | /go/pkg/mod/github.com/gin-gonic/gin@v1.8.1/context.go:173 github.com/gin-gonic/gin.(Context).Next() crawlab_master | /go/pkg/mod/github.com/gin-gonic/gin@v1.8.1/recovery.go:101 github.com/gin-gonic/gin.CustomRecoveryWithWriter.func1() crawlab_master | /go/pkg/mod/github.com/gin-gonic/gin@v1.8.1/context.go:173 github.com/gin-gonic/gin.(Context).Next() crawlab_master | /go/pkg/mod/github.com/gin-gonic/gin@v1.8.1/logger.go:240 github.com/gin-gonic/gin.LoggerWithConfig.func1() crawlab_master | /go/pkg/mod/github.com/gin-gonic/gin@v1.8.1/context.go:173 github.com/gin-gonic/gin.(Context).Next() crawlab_master | /go/pkg/mod/github.com/gin-gonic/gin@v1.8.1/gin.go:616 github.com/gin-gonic/gin.(Engine).handleHTTPRequest() crawlab_master | /go/pkg/mod/github.com/gin-gonic/gin@v1.8.1/gin.go:572 github.com/gin-gonic/gin.(Engine).ServeHTTP() crawlab_master | /usr/local/go/src/net/http/server.go:2868 net/http.serverHandler.ServeHTTP() crawlab_master | /usr/local/go/src/net/http/server.go:1933 net/http.(conn).serve() crawlab_master | /usr/local/go/src/runtime/asm_amd64.s:1371 runtime.goexit() crawlab_master | [GIN] 2022/07/25 - 10:33:48 | 400 | 2.707442ms | 127.0.0.1 | PUT "/projects"

mayuanyuan199625 commented 2 years ago

`version: '3.3' services: master: image: crawlabteam/crawlab container_name: crawlab_master restart: always environment: CRAWLAB_NODE_MASTER: "Y" # Y: 主节点 CRAWLAB_MONGO_HOST: "mongo" # mongo host address. 在 Docker-Compose 网络中,直接引用 service 名称 CRAWLAB_MONGO_PORT: "27017" # mongo port CRAWLAB_MONGO_DB: "crawlab" # mongo database CRAWLAB_MONGO_USERNAME: "username" # mongo username CRAWLAB_MONGO_PASSWORD: "password" # mongo password CRAWLAB_MONGO_AUTHSOURCE: "admin" # mongo auth source volumes:

tikazyq commented 2 years ago

duplicated in https://github.com/crawlab-team/crawlab/issues/1149?notification_referrer_id=NT_kwDOADPGTbI0MDU5NjQzNTA1OjMzOTMxMDE#issuecomment-1193553922