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

0.6 后端怎么启动的呢 #1039

Closed munding closed 2 years ago

munding commented 2 years ago

go run main.go api 报错spider error: forbidden panic: could not build arguments for function "github.com/crawlab-team/crawlab-core/controllers".newSpiderContext.func1 (/Users/aladdin/go/pkg/mod/github.com/crawlab-team/crawlab-core@v0.6.0-beta.20211224.1718/controllers/spider.go:1104): failed to build interfaces.SpiderAdminService: received non-nil error from function "github.com/crawlab-team/crawlab-core/spider/admin".NewSpiderAdminService (/Users/aladdin/go/pkg/mod/github.com/crawlab-team/crawlab-core@v0.6.0-beta.20211224.1718/spider/admin/service.go:161): spider error: forbidden

tikazyq commented 2 years ago

试试这个命令 go run main.go master

niuguoqin commented 2 years ago

刚接触宝藏项目,萌新提问: 删除 ~/.crawlab go run main.go master go run main.go - master export CRAWLAB_NODE_SERVER=Y export CRAWLAB_SERVER_MASTER=Y 以上方法都试过了依然有问题,求问小伙伴么还有什么办法吗?直接 docker run 是可以起来服务的

tikazyq commented 2 years ago

export CRAWLAB_NODE_SERVER=Y go run main.go master

mr-m0nst3r commented 2 years ago

export CRAWLAB_NODE_SERVER=Y echo $CRAWLAB_NODE_SERVER Y go run main.go master [GIN-debug] [WARNING] Running in "debug" mode. Switch to "release" mode in production.

  • using env: export GIN_MODE=release
  • using code: gin.SetMode(gin.ReleaseMode)

spider error: forbidden

还是同样的问题,没跑起来

zte-tcb commented 10 months ago

我用这个例子运行起来了,https://github.com/crawlab-team/examples/blob/main/docker/basic/docker-compose.yml 。单master的也是这个问题,没运行起来