Agent can't connect to the server (Websocket issue)

Hello, I just tried to setup a new 0.5 version of drone and the agent just refuses to connect to the server. Server starts correctly though, and I can do stuff in web ui. I am using the configuration under the nginx proxy, but agent is connecting via docker compose service name. I guess it should not be a problem, but please correct me if i’m wrong.

I took docker-compose file configuration from the official docs here:

The output of the logs is the following:

drone-agent_1 | time="2017-02-18T19:00:33Z" level=warning msg="reconnect in 15s. Post ws://drone-server:8000/ws/broker/api/queue/pull/linux/amd64: unsupported protocol scheme \"ws\""

Other info that could be useful:

Docker version 1.12.1, build 23cf638
docker-compose version 1.6.0, build d99cad6

My slightly changed docker-compose.yml:

    image: drone/drone:0.5
      - 8000
      - ./drone:/var/lib/drone/
    restart: always
      - DRONE_OPEN=true
      - DRONE_SECRET=drone
      - DRONE_GOGS=true
      - DRONE_DEBUG=true

    image: drone/drone:0.5
    command: agent
    restart: always
      - drone-server
      - /var/run/docker.sock:/var/run/docker.sock
      - DRONE_SERVER=ws://drone-server:8000/ws/broker
      - DRONE_SECRET=drone
      - DRONE_DEBUG=true

I appreciate any help. Thanks.

I’m not sure how, but looks like you have an old version of the drone image running your agent

ws://drone-server:8000/ws/broker/api/queue/pull/linux/amd64: unsupported protocol scheme “ws”"

This error message shows the agent trying to make an HTTP post. This code was changed to websockets, which is what leads me to believe you have an older image

Thanks a lot, that was the problem. However, I still can’t believe docker didn’t automatically pulled new image for agent while running 0.5 for the server. I knew i had 0.4 image on machine, but changing 0.4 to 0.5 in docker-compose.yml should’ve pulled new image and updated the container, am i right?