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

添加节点不成功 #401

Closed ksiailaohuyou closed 4 years ago

ksiailaohuyou commented 4 years ago

Describe the bug 添加work节点不成功,redis只有master的数据,mongo只有一个主节点的信息(master可以正常访问UI界面),worker节点信息打印如下,一直停留于此,但是测试上传一个zip包。worker节点又有信息输出

To Reproduce 1.使用命令添加master

docker run -d --restart always --name crawlab_master \
        -e CRAWLAB_REDIS_ADDRESS=10.2.7.61 \
        -e CRAWLAB_MONGO_HOST=10.2.7.61 \
        -e CRAWLAB_SERVER_MASTER=Y \
        -e CRAWLAB_API_ADDRESS=http://10.2.7.61:8000 \
        -p 8001:8080 \
        -p 8000:8000 \
        -v /var/logs/crawlab:/var/logs/crawlab \
        tikazyq/crawlab:latest
  1. 使用命令添加worker
docker run  --name crawlab_worker04 \
        -e CRAWLAB_REDIS_ADDRESS=10.2.7.61 \
        -e CRAWLAB_MONGO_HOST=10.2.7.61 \
        -e CRAWLAB_SERVER_MASTER=N \
        -v /var/logs/crawlab:/var/logs/crawlab \
        tikazyq/crawlab:latest

Screenshots image

image

image

image

image

tikazyq commented 4 years ago

是一个机器上部署的还是多台机器?

ksiailaohuyou commented 4 years ago

是一个机器上部署的还是多台机器?

一台windows运行VMware跑三个节点, 桥连接网络,每个节点都有固定的局域网ip

tikazyq commented 4 years ago

CRAWLAB_SERVER_REGISTER_TYPE,设置为ip,CRAWLAB_SERVER_REGISTER_IP设置为节点ip

tikazyq commented 4 years ago

参考 http://docs.crawlab.cn/Config/

ksiailaohuyou commented 4 years ago

参考 http://docs.crawlab.cn/Config/

感谢🙏 已成功配置

docker run -d --restart always --name crawlab_worker \
        -e CRAWLAB_REDIS_ADDRESS=10.2.7.61 \
        -e CRAWLAB_MONGO_HOST=10.2.7.61 \
        -e CRAWLAB_SERVER_MASTER=N \
        -e CRAWLAB_SERVER_REGISTER_TYPE =ip \
        -e CRAWLAB_SERVER_REGISTER_IP=10.2.6.62 \
        -v /var/logs/crawlab:/var/logs/crawlab \
        tikazyq/crawlab:latest
jackcily commented 3 years ago

参考 http://docs.crawlab.cn/Config/

感谢🙏 已成功配置

docker run -d --restart always --name crawlab_worker \
        -e CRAWLAB_REDIS_ADDRESS=10.2.7.61 \
        -e CRAWLAB_MONGO_HOST=10.2.7.61 \
        -e CRAWLAB_SERVER_MASTER=N \
        -e CRAWLAB_SERVER_REGISTER_TYPE =ip \
        -e CRAWLAB_SERVER_REGISTER_IP=10.2.6.62 \
        -v /var/logs/crawlab:/var/logs/crawlab \
        tikazyq/crawlab:latest

docker 指令有误,多了个空格,正确指令如下:


docker run -d --restart always --name crawlab_worker \
        -e CRAWLAB_REDIS_ADDRESS=10.2.7.61 \
        -e CRAWLAB_MONGO_HOST=10.2.7.61 \
        -e CRAWLAB_SERVER_MASTER=N \
        -e CRAWLAB_SERVER_REGISTER_TYPE=ip \
        -e CRAWLAB_SERVER_REGISTER_IP=10.2.6.62 \
        -v /var/logs/crawlab:/var/logs/crawlab \
        tikazyq/crawlab:latest