songtianyi
(songtianyi)
September 3, 2019, 2:44am
1
container-runner:
image: "drone/agent:1"
container_name: drone-container
ports:
- "3000:3000"
volumes:
- /var/run/docker.sock:/var/run/docker.sock
- /etc/localtime:/etc/localtime:ro
environment:
- DRONE_RPC_PROTO=http
- DRONE_RPC_HOST=drone.sky-cloud.net
- DRONE_RPC_SECRET=ce65d14c6a00bde94542718bd1d87d
- DRONE_RUNNER_CAPACITY=2
- DRONE_RUNNER_NAME=drone-container
- DRONE_DEBUG=true
depends_on:
- "postgres"
- "drone-server"
restart: always
root@drone ~]# telnet 172.18.0.4 3000
Trying 172.18.0.4...
telnet: connect to address 172.18.0.4: Connection refused
[root@drone ~]# docker logs drone-container
[root@drone ~]#
Same here. First were “context deadline exceeded” and now the agent goes silent. The only way to return anything is to bring it down and start it without mounting the docker socket.
Try using this:
DRONE_LOGS_DEBUG=true
DRONE_LOGS_TRACE=true
songtianyi
(songtianyi)
September 4, 2019, 3:01am
4
songtianyi
(songtianyi)
September 4, 2019, 3:36am
5
drone-server and drone-container are in same subnet
2019/09/04 11:14:17 [ERR] POST http://drone-server/rpc/v1/request request failed: Post http://drone-server/rpc/v1/request: context deadline exceeded
{"arch":"amd64","level":"debug","machine":"drone-container","msg":"runner: polling queue","os":"linux","time":"2019-09-04T11:14:17+08:00"}
2019/09/04 11:14:17 [DEBUG] POST http://drone-server/rpc/v1/request
2019/09/04 11:14:47 [DEBUG] POST http://drone-server/rpc/v1/request (status: 524): retrying in 1s (30 left)
2019/09/04 11:14:47 [DEBUG] POST http://drone-server/rpc/v1/request (status: 524): retrying in 1s (30 left)
Veiasai
(Jinfeng Liu)
September 16, 2019, 10:18am
6
Get the same problem.
services:
drone-server:
image: drone/drone:1
ports:
- 10080:80
- 10443:443
volumes:
- drone-data:/data
restart: always
environment:
- DRONE_AGENTS_ENABLED=true
- DRONE_LOGS_DEBUG=true
- DRONE_LOGS_TRACE=true
- DRONE_GITLAB_SERVER=https://gitlab.com
- DRONE_SERVER_HOST=x.x.x.x:10080
- DRONE_SERVER_PROTO=http
- DRONE_GITLAB_CLIENT_ID=x
- DRONE_GITLAB_CLIENT_SECRET=x
- DRONE_RPC_SECRET=c7a10cf5dccd542e01fc8e8864c0aaef
drone-agent:
image: drone/agent:1
volumes:
- /var/run/docker.sock:/var/run/docker.sock
restart: always
environment:
- DRONE_LOGS_DEBUG=true
- DRONE_LOGS_TRACE=true
- DRONE_RPC_PROTO=http
- DRONE_RPC_HOST=x.x.x.x:80
- DRONE_RPC_SECRET=c7a10cf5dccd542e01fc8e8864c0aaef
- DRONE_RUNNER_CAPACITY=5
- DRONE_RUNNER_NAME=cirros
volumes:
drone-data: