fpiesche / docker-woodpecker

1 stars 0 forks source link

woodpecker-server fails with "index.html: file does not exist" #73

Closed lafleurdeboum closed 2 years ago

lafleurdeboum commented 2 years ago

Hello, I was glad I found your work ; I'm trying to use woodpecker on an armv7 server. It runs latest Arch and podman.

I have the same configuration on my computer (only, it's an x86_64). If I run the following docker-compose.yml file, the agent succeeds in connecting with the server. But running the same docker-compose.yml, only with your images instead of woodpecker's ones, it fails - see the attached log. In short, when the server finally becomes ready and the agent's request apparently reaches it, it fails with panic: open index.html: file does not exist.

The docker-compose file I ran on armv7 :

# docker-compose.yml
version: '3'

services:
  woodpecker-server:
    #image: woodpeckerci/woodpecker-server:latest
    image: florianpiesche/woodpecker-server:latest
    ports:
      - "8000:8000"
      - "9000"
      - "80"
      - "443"
    volumes:
      - ./woodpecker-server-data:/var/lib/woodpecker/
    environment:
      - WOODPECKER_OPEN=true
      - WOODPECKER_HOST=https://MY_HOSTNAME_HERE
      - WOODPECKER_GITEA=true
      - WOODPECKER_GITEA_URL=${WOODPECKER_GITEA_URL}
      - WOODPECKER_GITEA_CLIENT=${WOODPECKER_GITEA_CLIENT}
      - WOODPECKER_GITEA_SECRET=${WOODPECKER_GITEA_SECRET}
      - WOODPECKER_AGENT_SECRET=SOME_SECRET_HERE
      - WOODPECKER_MAX_PROCS=2

  woodpecker-agent:
    #image: woodpeckerci/woodpecker-agent:latest
    image: florianpiesche/woodpecker-agent:latest
    ports:
      - "3000"
    # My ARM platform has ~450Mb free RAM, plus ~750Mb swap.
    mem_limit: 400M
    memswap_limit: 700M
    command: agent
    restart: always
    depends_on:
      - woodpecker-server
    volumes:
      - /run/podman/podman.sock:/var/run/docker.sock
    environment:
      - WOODPECKER_SERVER=localhost:9000
      - WOODPECKER_AGENT_ENVIRON=NODE_OPTIONS:--max-old-space-size=1024
      - WOODPECKER_AGENT_SECRET=SOME_SECRET_HERE

volumes:
  woodpecker-server-data: {}

The log :

e36cb0f996c90c0dc81e212cae0553a562360770db7292f1ca009dbc0f061622
432c02a35be629cc77ba696192276841fa51a5f01dcc57f6adc1a657aa820fda
6e52968e2eff3bb8b55e985530839efe470e1353e34b054cb88232ef7ea10b80
{"time":"2021-12-16T21:05:21Z","message":"LogLevel = warn"}
{"level":"debug","time":"2021-12-16T21:05:21Z","message":"request next execution"}
{"level":"error","error":"rpc error: code = Unavailable desc = connection error: desc = \"transport: Error while dialing dial tcp 127.0.0.1:9000: connect: connection refused\"","time":"2021-12-16T21:05:21Z","message":"grpc error: done(): code: Unavailable: rpc error: code = Unavailable desc = connection error: desc = \"transport: Error while dialing dial tcp 127.0.0.1:9000: connect: connection refused\""}
{"level":"error","error":"rpc error: code = Unavailable desc = connection error: desc = \"transport: Error while dialing dial tcp 127.0.0.1:9000: connect: connection refused\"","time":"2021-12-16T21:05:22Z","message":"grpc error: done(): code: Unavailable: rpc error: code = Unavailable desc = connection error: desc = \"transport: Error while dialing dial tcp 127.0.0.1:9000: connect: connection refused\""}

[...]

{"level":"error","error":"rpc error: code = Unavailable desc = connection error: desc = \"transport: Error while dialing dial tcp 127.0.0.1:9000: connect: connection refused\"","time":"2021-12-16T21:05:29Z","message":"grpc error: done(): code: Unavailable: rpc error: code = Unavailable desc = connection error: desc = \"transport: Error while dialing dial tcp 127.0.0.1:9000: connect: connection refused\""}
[GIN-debug] [WARNING] Running in "debug" mode. Switch to "release" mode in production.
 - using env:   export GIN_MODE=release
 - using code:  gin.SetMode(gin.ReleaseMode)

panic: open index.html: file does not exist

goroutine 1 [running]:
github.com/woodpecker-ci/woodpecker/web.MustLookup(...)
    /woodpecker/web/web.go:40
github.com/woodpecker-ci/woodpecker/server/web.New({0x1d57c1c, 0x2, 0x2})
    /woodpecker/server/web/web.go:50 +0x194
main.setupTree(0x199a160)
    /woodpecker/cmd/server/setup.go:207 +0xd4
main.loop(0x199a160)
    /woodpecker/cmd/server/server.go:120 +0x728
github.com/urfave/cli.HandleAction({0x92cae0, 0xa77bf8}, 0x199a160)
    /woodpecker/vendor/github.com/urfave/cli/app.go:526 +0xd8
github.com/urfave/cli.(*App).Run(0x191a000, {0x1910108, 0x1, 0x1})
    /woodpecker/vendor/github.com/urfave/cli/app.go:288 +0x648
main.main()
    /woodpecker/cmd/server/main.go:38 +0x1d0
{"level":"error","error":"rpc error: code = Unavailable desc = connection error: desc = \"transport: Error while dialing dial tcp 127.0.0.1:9000: connect: connection refused\"","time":"2021-12-16T21:05:30Z","message":"grpc error: done(): code: Unavailable: rpc error: code = Unavailable desc = connection error: desc = \"transport: Error while dialing dial tcp 127.0.0.1:9000: connect: connection refused\""}
{"level":"error","error":"rpc error: code = Unavailable desc = connection error: desc = \"transport: Error while dialing dial tcp 127.0.0.1:9000: connect: connection refused\"","time":"2021-12-16T21:05:31Z","message":"grpc error: done(): code: Unavailable: rpc error: code = Unavailable desc = connection error: desc = \"transport: Error while dialing dial tcp 127.0.0.1:9000: connect: connection refused\""}
{"level":"error","error":"rpc error: code = Unavailable desc = connection error: desc = \"transport: Error while dialing dial tcp 127.0.0.1:9000: connect: connection refused\"","time":"2021-12-16T21:05:32Z","message":"grpc error: done(): code: Unavailable: rpc error: code = Unavailable desc = connection error: desc = \"transport: Error while dialing dial tcp 127.0.0.1:9000: connect: connection refused\""}
fpiesche commented 2 years ago

This problem was originally unrelated, but at this point some of the Woodpecker server's dependencies don't compile on 32bit anymore, and I'm not really enough of a Golang person to fix that particular issue. I had set this repo up mostly to have any ARM images when the Woodpecker project itself wasn't offering any at all, but there are now official images for ARM64 at least so I'll be archiving this repo. Sorry :(