woodpecker-ci / woodpecker

Woodpecker is a simple, yet powerful CI/CD engine with great extensibility.
https://woodpecker-ci.org
Apache License 2.0
4.07k stars 353 forks source link

Builds stopped working - could not find an available, non-overlapping IPv4 address pool among the defaults to assign to the network #1570

Closed MassiveBox closed 1 year ago

MassiveBox commented 1 year ago

With the push of this commit my pipeline started failing for no reason.
You can see in runs like this that not even the clone step is executed.
I checked for logs and found these interesting things:

{"level":"error","error":"Error: No such network: wp_0_2261731327018267548_default","time":"2023-01-30T15:43:33Z","message":"could not remove network 'wp_0_2261731327018267548_default'"} 

and, shortly after

rpc error: code = Unknown desc = Step finished with exitcode 1, Error response from daemon: could not find an available, non-overlapping IPv4 address pool among the defaults to assign to the network

I'm 100% certain that the pipeline didn't break because of errors in the config introduced in the latest push. I've re-run an old pipeline which worked, but now it fails.

I'm running the latest next inside Docker. Here's my docker-compose:

version: '3'

services:
  woodpecker-server:
    image: woodpeckerci/woodpecker-server:next
    restart: always
    ports:
      - 8085:8000
    volumes:
      - ./data:/var/lib/woodpecker/
    environment:
      - WOODPECKER_OPEN=true
      - WOODPECKER_HOST=https://woodpecker.massivebox.net
      - WOODPECKER_GITEA=true
      - WOODPECKER_GITEA_URL=https://gitea.massivebox.net
      - WOODPECKER_GITEA_CLIENT=REDACTED
      - WOODPECKER_GITEA_SECRET=REDACTED
      - WOODPECKER_AGENT_SECRET=REDACTED
    networks:
      - internal
      - caddy
    labels:
      caddy: woodpecker.massivebox.net
      caddy.reverse_proxy: "{{upstreams 8000}}"

  woodpecker-agent:
    image: woodpeckerci/woodpecker-agent:next
    command: agent
    restart: always
    depends_on:
      - woodpecker-server
    volumes:
      - /var/run/docker.sock:/var/run/docker.sock
    environment:
      - WOODPECKER_SERVER=woodpecker-server:9000
      - WOODPECKER_AGENT_SECRET=REDACTED
    networks:
      - internal

networks:
  caddy:
    name: caddy
    external: true
  internal:
    internal: true

I've tried rebooting, deleting and re-creating the containers with and without keeping the storage, and I can see that nothing seems to fix this issue. Please tell me how to further add information if necessary, thanks for your help!

MassiveBox commented 1 year ago

Sorry, I missed this previous issue which contains a solution: https://github.com/woodpecker-ci/woodpecker/issues/1457 This issue can be deleted. Thanks.

lafriks commented 1 year ago

Check docker networks (docker network ls) and delete unneeded ones. Looks like you have run out of available network address pool.

Alternative is to reconfigure and add additional network addresses to docker network address pool