Closed ma-pony closed 2 years ago
依赖安装也遇到了类似的问题
Get "http://crawlab06:8080/api/filer/fs/635a5dfcc5e89eb9e40595b5": dial tcp 10.85.213.194:8080: connect: connection refused
工作节点日志显示无法访问主节点8080端口,可以再检查一下
可以去掉敏感信息将配置文件 docker-compose.yml
发出来
通过k8s部署的 master.yaml
apiVersion: apps/v1
kind: StatefulSet
metadata:
name: crawlab06-master
namespace: dev
spec:
serviceName: crawlab06-master
selector:
matchLabels:
app: crawlab06-master
template:
metadata:
labels:
app: crawlab06-master
spec:
containers:
- image: crawlabteam/crawlab@sha256:9c5576929d31914882ca2a185b349d8a43646270e6b987589ba4f0d035272f4f
imagePullPolicy: Always
name: crawlab06
env:
- name: CRAWLAB_NODE_MASTER
value: "Y"
- name: CRAWLAB_MONGO_HOST
value: "crawlab06-mongo"
- name: CRAWLAB_MONGO_PORT
value: "27017"
- name: CRAWLAB_MONGO_DB
value: "crawlab"
- name: CRAWLAB_MONGO_USERNAME
value: ""
- name: CRAWLAB_MONGO_PASSWORD
value: ""
- name: CRAWLAB_MONGO_AUTHSOURCE
value: "admin"
- name: CRAWLAB_ENV
value: "dev"
ports:
- containerPort: 8080
name: crawlab06
- containerPort: 9666
worker.yaml
apiVersion: apps/v1
kind: StatefulSet
metadata:
name: crawlab06-worker
namespace: dev
spec:
serviceName: crawlab06-worker
replicas: 2
selector:
matchLabels:
app: crawlab06-worker
template:
metadata:
labels:
app: crawlab06-worker
spec:
containers:
- image: crawlabteam/crawlab@sha256:9c5576929d31914882ca2a185b349d8a43646270e6b987589ba4f0d035272f4f
imagePullPolicy: Always
name: crawlab06-worker
env:
- name: CRAWLAB_NODE_MASTER
value: "N"
- name: CRAWLAB_GRPC_ADDRESS
value: "crawlab06:9666"
- name: CRAWLAB_FS_FILER_URL
value: "http://crawlab06:8080/api/filer"
- name: CRAWLAB_ENV
value: "dev"
mongo.yaml
apiVersion: v1
kind: Service
metadata:
name: crawlab06-mongo
namespace: dev
spec:
ports:
- port: 27017
selector:
app: crawlab06-mongo
clusterIP: None
---
apiVersion: apps/v1
kind: Deployment
metadata:
name: crawlab06-mongo
namespace: dev
spec:
selector:
matchLabels:
app: crawlab06-mongo
strategy:
type: Recreate
template:
metadata:
labels:
app: crawlab06-mongo
spec:
containers:
- image: mongo:4.2
name: crawlab06-mongo
env:
- name: MONGO_INITDB_ROOT_USERNAME
value: ""
- name: MONGO_INITDB_ROOT_PASSWORD
value: ""
ports:
- containerPort: 27017
name: crawlab06-mongo
Get "http://crawlab06:8080/api/filer/fs/635a5dfcc5e89eb9e40595b5": dial tcp 10.85.213.194:8080: connect: connection refused
工作节点日志显示无法访问主节点8080端口,可以再检查一下
解决了,是端口映射配置的问题,配置在另一个地方,没在yaml文件中
Describe the bug 爬虫都是同一个
To Reproduce Steps to reproduce the behavior: 随机节点到第一个子节点,发现一直待定 手动指派任务到第二个子节点,也是一直待定 手动指派到主节点,就正常执行了
Expected behavior 子节点任务可以正常执行
Screenshots
worker_1_logs.txt
worker_0_logs.txt
master_logs.txt