Closed georgeJzzz closed 4 years ago
配置文件是咋样的
张冶青 Yeqing Zhang 邮箱:tikazyq@163.com |
---|
签名由 网易邮箱大师 定制
在2020年01月20日 17:47,georgeJzzz 写道: docker-compose部署crawlab 使用docker-compose.yml version: '3.3' CRAWLAB_MONGO_PORT: 27017 # MongoDB port MongoDB 的端口 CRAWLAB_MONGO_DB: "crawlab_test" # MongoDB database MongoDB 的数据库 CRAWLAB_MONGO_USERNAME: "admin" # MongoDB username MongoDB 的用户名 CRAWLAB_MONGO_PASSWORD: "admin123" # MongoDB password MongoDB 的密码 CRAWLAB_MONGO_AUTHSOURCE: "admin" # MongoDB auth source MongoDB 的验证源 docker-compose up 部署 问题点:
mongo_1 | 2020-01-20T17:33:31.140+0800 I ACCESS [conn32] SASL SCRAM-SHA-1 authentication failed for admin on admin from client 172.18.0.5:33252 ; UserNotFound: Could not find user "admin" for db "admin" mongo_1 | 2020-01-20T17:33:31.141+0800 I NETWORK [conn32] end connection 172.18.0.5:33252 (4 connections now open) mongo_1 | 2020-01-20T17:33:32.142+0800 I NETWORK [listener] connection accepted from 172.18.0.5:33254 #33 (5 connections now open) mongo_1 | 2020-01-20T17:33:32.142+0800 I NETWORK [conn33] received client metadata from 172.18.0.5:33254 conn33: { driver: { name: "mgo", version: "globalsign" }, os: { type: "linux", architecture: "amd64" }, application: { name: "crawlab" } } mongo_1 | 2020-01-20T17:33:32.143+0800 I ACCESS [conn33] SASL SCRAM-SHA-1 authentication failed for admin on admin from client 172.18.0.5:33254 ; UserNotFound: Could not find user "admin" for db "admin"
其他 部署mongodb的user和password部署正常,但是设置user和password部署后, 容器无法正常启动
望指点解答下,谢谢 :)
— You are receiving this because you are subscribed to this thread. Reply to this email directly, view it on GitHub, or unsubscribe.
version: '3.3' services: master: image: tikazyq/crawlab:latest container_name: master environment:
CRAWLAB_API_ADDRESS: "https://
: " # backend API address 后端 API 地址. 适用于 https 或者源码部署 CRAWLAB_SERVER_MASTER: "Y" # whether to be master node 是否为主节点,主节点为 Y,工作节点为 N CRAWLAB_MONGO_HOST: "mongo" # MongoDB host address MongoDB 的地址,在 docker compose 网络中,直接引用服务名称 CRAWLAB_MONGO_PORT: 27017 # MongoDB port MongoDB 的端口 CRAWLAB_MONGO_DB: "crawlab_test" # MongoDB database MongoDB 的数据库 CRAWLAB_MONGO_USERNAME: "admin" # MongoDB username MongoDB 的用户名 CRAWLAB_MONGO_PASSWORD: "admin123" # MongoDB password MongoDB 的密码 CRAWLAB_MONGO_AUTHSOURCE: "admin" # MongoDB auth source MongoDB 的验证源 CRAWLAB_REDIS_ADDRESS: "redis" # Redis host address Redis 的地址,在 docker compose 网络中,直接引用服务名称 CRAWLAB_REDIS_PORT: 6379 # Redis port Redis 的端口 CRAWLAB_REDIS_DATABASE: "1" # Redis database Redis 的数据库 CRAWLAB_REDIS_PASSWORD: "password" # Redis password Redis 的密码 CRAWLAB_LOG_LEVEL: "info" # log level 日志级别. 默认为 info CRAWLAB_LOG_ISDELETEPERIODICALLY: "N" # whether to periodically delete log files 是否周期性删除日志文件. 默认不删除 CRAWLAB_LOG_DELETEFREQUENCY: "@hourly" # frequency of deleting log files 删除日志文件的频率. 默认为每小时
CRAWLAB_SERVER_REGISTER_TYPE: "ip" # node register type 节点注册方式. 默认为 mac 地址,也可设置为 ip(防止 mac 地址冲突)
CRAWLAB_SERVER_REGISTER_IP: "127.0.0.1" # node register ip 节点注册IP. 节点唯一识别号,只有当 CRAWLAB_SERVER_REGISTER_TYPE 为 "ip" 时才生效
CRAWLAB_TASK_WORKERS: 4 # number of task executors 任务执行器个数(并行执行任务数)
CRAWLAB_SERVER_LANG_NODE: "Y" # whether to pre-install Node.js 预安装 Node.js 语言环境
CRAWLAB_SETTING_ALLOWREGISTER: "Y" # whether to allow user registration 是否允许用户注册
CRAWLAB_NOTIFICATION_MAIL_SERVER: smtp.exmaple.com # STMP server address STMP 服务器地址
CRAWLAB_NOTIFICATIOYN_MAIL_PORT: 465 # STMP server port STMP 服务器端口
CRAWLAB_NOTIFICATION_MAIL_SENDEREMAIL: admin@exmaple.com # sender email 发送者邮箱
CRAWLAB_NOTIFICATION_MAIL_SENDEREIDENTITY: admin@exmaple.com # sender ID 发送者 ID
CRAWLAB_NOTIFICATION_MAIL_SMTP_USER: username # SMTP username SMTP 用户名
CRAWLAB_NOTIFICATION_MAIL_SMTP_PASSWORD: password # SMTP password SMTP 密码
ports:
- "8080:8080" # frontend port mapping 前端端口映射 depends_on:
- mongo
- redis worker: image: tikazyq/crawlab:latest container_name: worker environment: CRAWLAB_SERVER_MASTER: "N" CRAWLAB_MONGO_HOST: "mongo" CRAWLAB_REDIS_ADDRESS: "redis" depends_on:
- mongo
- redis mongo: image: mongo:latest restart: always volumes:
- "/etc/localtime:/etc/localtime" # 使容器时区与时间和宿主同步
- "/opt/crawlab/mongo/data/db:/data/db" # make data persistent 持久化 ports:
- "27017:27017" # expose port to host machine 暴露接口到宿主机 redis: image: redis:latest restart: always
command: redis --requirepass "password" # set redis password 设置 Redis 密码
volumes:
- "/etc/localtime:/etc/localtime" # 使容器时区与时间和宿主同步
- "/opt/crawlab/redis/data:/data" # make data persistent 持久化 ports:
- "6379:6379" # expose port to host machine 暴露接口到宿主机
mongo似乎没有设置用户名密码
张冶青 Yeqing Zhang 邮箱:tikazyq@163.com |
---|
签名由 网易邮箱大师 定制
在2020年01月20日 18:07,georgeJzzz 写道: 配置文件
version: '3.3' services: master: image: tikazyq/crawlab:latest container_name: master environment:
CRAWLAB_SERVER_MASTER: "Y" # whether to be master node 是否为主节点,主节点为 Y,工作节点为 N CRAWLAB_MONGO_HOST: "mongo" # MongoDB host address MongoDB 的地址,在 docker compose 网络中,直接引用服务名称 CRAWLAB_MONGO_PORT: 27017 # MongoDB port MongoDB 的端口 CRAWLAB_MONGO_DB: "crawlab_test" # MongoDB database MongoDB 的数据库 CRAWLAB_MONGO_USERNAME: "admin" # MongoDB username MongoDB 的用户名 CRAWLAB_MONGO_PASSWORD: "admin123" # MongoDB password MongoDB 的密码 CRAWLAB_MONGO_AUTHSOURCE: "admin" # MongoDB auth source MongoDB 的验证源 CRAWLAB_REDIS_ADDRESS: "redis" # Redis host address Redis 的地址,在 docker compose 网络中,直接引用服务名称 CRAWLAB_REDIS_PORT: 6379 # Redis port Redis 的端口 CRAWLAB_REDIS_DATABASE: "1" # Redis database Redis 的数据库 CRAWLAB_REDIS_PASSWORD: "password" # Redis password Redis 的密码 CRAWLAB_LOG_LEVEL: "info" # log level 日志级别. 默认为 info CRAWLAB_LOG_ISDELETEPERIODICALLY: "N" # whether to periodically delete log files 是否周期性删除日志文件. 默认不删除 CRAWLAB_LOG_DELETEFREQUENCY: "@hourly" # frequency of deleting log files 删除日志文件的频率. 默认为每小时
CRAWLAB_SETTING_ALLOWREGISTER: "Y" # whether to allow user registration 是否允许用户注册
ports:
volumes:
— You are receiving this because you commented. Reply to this email directly, view it on GitHub, or unsubscribe.
你好这个是我设置的mongodb CRAWLAB_MONGO_PORT: 27017 # MongoDB port MongoDB 的端口 CRAWLAB_MONGO_DB: "crawlab_test" # MongoDB database MongoDB 的数据库 CRAWLAB_MONGO_USERNAME: "admin" # MongoDB username MongoDB 的用户名 CRAWLAB_MONGO_PASSWORD: "admin123" # MongoDB password MongoDB 的密码 CRAWLAB_MONGO_AUTHSOURCE: "admin" # MongoDB auth source MongoDB 的验证源
你好这个是我设置的mongodb CRAWLAB_MONGO_PORT: 27017 # MongoDB port MongoDB 的端口 CRAWLAB_MONGO_DB: "crawlab_test" # MongoDB database MongoDB 的数据库 CRAWLAB_MONGO_USERNAME: "admin" # MongoDB username MongoDB 的用户名 CRAWLAB_MONGO_PASSWORD: "admin123" # MongoDB password MongoDB 的密码 CRAWLAB_MONGO_AUTHSOURCE: "admin" # MongoDB auth source MongoDB 的验证源
你这里在crawlab中设置了mongo的用户名密码,但是没有在mongo中设置,这就是原因。去掉用户名密码就可以了
docker-compose部署crawlab
问题点:
mongo_1 | 2020-01-20T17:33:31.140+0800 I ACCESS [conn32] SASL SCRAM-SHA-1 authentication failed for admin on admin from client 172.18.0.5:33252 ; UserNotFound: Could not find user "admin" for db "admin" mongo_1 | 2020-01-20T17:33:31.141+0800 I NETWORK [conn32] end connection 172.18.0.5:33252 (4 connections now open) mongo_1 | 2020-01-20T17:33:32.142+0800 I NETWORK [listener] connection accepted from 172.18.0.5:33254 #33 (5 connections now open) mongo_1 | 2020-01-20T17:33:32.142+0800 I NETWORK [conn33] received client metadata from 172.18.0.5:33254 conn33: { driver: { name: "mgo", version: "globalsign" }, os: { type: "linux", architecture: "amd64" }, application: { name: "crawlab" } } mongo_1 | 2020-01-20T17:33:32.143+0800 I ACCESS [conn33] SASL SCRAM-SHA-1 authentication failed for admin on admin from client 172.18.0.5:33254 ; UserNotFound: Could not find user "admin" for db "admin"
其他
望指点解答下,谢谢 :)