DRONE_HOST is not properly configured

time=“2017-09-22T07:20:24Z” level=fatal msg=“DRONE_HOST is not properly configured”

I want install drone using docker link network. this is my compose file:

  drone-server:
    container_name: droneServer
    hostname: droneServer
    image: drone/drone:0.8
    ports:
      - 8080:8000
    volumes:
      - /data/drone:/var/lib/drone/
    restart: always
    links:
      - gogs:gogs
    environment:
      - DRONE_OPEN=true
      - DOCKER_API_VERSION=1.24
      - DRONE_HOST=172.31.124.184
      - DRONE_GOGS=true
      - DRONE_GOGS_URL=http://gogs:3000
      - DRONE_SECRET=ok

  drone-agent:
    image: drone/drone:0.8
    links:
       - drone-server:droneServer
    command: agent --max-procs 50
    restart: always
    depends_on:
      - drone-server
    environment:
      - DRONE_HOST=droneServer
    volumes:
      - /var/run/docker.sock:/var/run/docker.sock
    links:
      - drone-server:droneServer
    environment:
      - DOCKER_API_VERSION=1.24
      - DRONE_SERVER=ws://droneServer:8000/ws/broker
      - DRONE_SECRET=ok

DRONE_HOST must config an ip address? I don’t want to config an ip, I want to use --link

drone-server:
    container_name: droneServer
    hostname: droneServer
    image: drone/drone:0.8
    ports:
      - 8080:8000
    volumes:
      - /data/drone:/var/lib/drone/
    restart: always
    links:
      - gogs:gogs
    environment:
      - DRONE_OPEN=true
      - DOCKER_API_VERSION=1.24
      - DRONE_HOST=localhost 
      - DRONE_GOGS=true
      - DRONE_GOGS_URL=http://gogs:3000
      - DRONE_SECRET=ok

  drone-agent:
    image: drone/drone:0.8
    links:
       - drone-server:droneServer
    command: agent --max-procs 50
    restart: always
    depends_on:
      - drone-server
    environment:
      - DRONE_HOST=droneServer
    volumes:
      - /var/run/docker.sock:/var/run/docker.sock
    links:
      - drone-server:droneServer

Actually, I don’t want to care about server ip, I want to use localhost, so this compose file can move to other hosts, run containers without edit something.

put “http” or “https” in front of it

drone-server:
    container_name: droneServer
    hostname: droneServer
    image: drone/drone:0.8.0
    ports:
      - 8080:8000
    volumes:
      - /data/drone:/var/lib/drone/
    restart: always
    links:
      - gogs:gogs
    environment:
      - DRONE_OPEN=true
      - DOCKER_API_VERSION=1.24
      - DRONE_HOST=127.0.0.1
      - DRONE_GOGS=true
      - DRONE_GOGS_URL=http://gogs:3000
      - DRONE_SECRET=ok

  drone-agent:
    image: drone/agent:0.8.0
    links:
       - drone-server:droneServer
    restart: always
    depends_on:
      - drone-server
    volumes:
      - /var/run/docker.sock:/var/run/docker.sock
    links:
      - drone-server:droneServer
    environment:
      - DOCKER_API_VERSION=1.24
      - DRONE_SERVER=ws://droneServer:8000/ws/broker
      - DRONE_SECRET=ok

drone 0.8 separate server and agent image… :sweat_smile: above compose worked, but agent still can’t access to server :

INFO: 2017/09/22 07:49:00 grpc: addrConn.resetTransport failed to create client transport: connection error: desc = “transport: Error while dialing dial tcp: address ws://droneServer:8000/ws/broker: too many colons in address”; Reconnecting to {ws://droneServer:8000/ws/broker }

I fixed the agent environment
DRONE_SERVER=droneServer:8000
it accessed to drone server

but agent output a lots of logs… :
INFO: 2017/09/22 08:02:46 transport: http2Client.notifyError got notified that the client transport was broken unexpected EOF.
INFO: 2017/09/22 08:02:47 transport: http2Client.notifyError got notified that the client transport was broken unexpected EOF.
INFO: 2017/09/22 08:02:47 transport: http2Client.notifyError got notified that the client transport was broken unexpected EOF.
INFO: 2017/09/22 08:02:47 transport: http2Client.notifyError got notified that the client transport was broken unexpected EOF.
INFO: 2017/09/22 08:02:47 transport: http2Client.notifyError got notified that the client transport was broken unexpected EOF.
INFO: 2017/09/22 08:02:47 transport: http2Client.notifyError got notified that the client transport was broken unexpected EOF.
INFO: 2017/09/22 08:02:47 transport: http2Client.notifyError got notified that the client transport was broken unexpected EOF.
INFO: 2017/09/22 08:02:47 transport: http2Client.notifyError got notified that the client transport was broken unexpected EOF.
INFO: 2017/09/22 08:02:47 transport: http2Client.notifyError got notified that the client transport was broken unexpected EOF.
INFO: 2017/09/22 08:02:47 transport: http2Client.notifyError got notified that the client transport was broken unexpected EOF.

The installation document for 0.8 is here:

http://docs.drone.io/release-0.8.0

-    - DRONE_SERVER=ws://drone-server:8000/ws/broker
+    - DRONE_SERVER=drone-server:9000
1 Like