Scheduler gets connection refused from runservice

Hello!
I’m trying to setup agola for the first time on two servers, one running all-base and one executor

I can’t figure out why service runner is refusing connection from scheduler.

svc_app@ci1:~$ /home/svc_app/agola serve --config /home/svc_app/agola.yml --components all-base
2021-04-16T14:58:28.064Z        ERROR   scheduler/scheduler.go:116      err: failed to get running runs:
    agola.io/agola/internal/services/scheduler.(*Scheduler).approve
        /home/svc_app/agola/internal/services/scheduler/scheduler.go:133
  - Get "http://localhost:4000/api/v1alpha/runs?asc=&phase=running": dial tcp 127.0.0.1:4000: connect: connection refused
2021-04-16T14:58:28.080Z        ERROR   scheduler/scheduler.go:42       err: failed to get queued runs:
    agola.io/agola/internal/services/scheduler.(*Scheduler).schedule
        /home/svc_app/agola/internal/services/scheduler/scheduler.go:62
  - Get "http://localhost:4000/api/v1alpha/runs?asc=&phase=queued": dial tcp 127.0.0.1:4000: connect: connection refused
2021-04-16T14:58:28.083Z        INFO    runservice/runservice.go:95     watcher: maintenance mode enabled: false
2021-04-16T14:58:28.085Z        INFO    configstore/configstore.go:68   watcher: maintenance mode enabled: false
2021-04-16T14:58:28.099Z        ERROR   notification/runevents.go:41    err: Get "http://localhost:4000/api/v1alpha/runs/events?startruneventid=": dial tcp 127.0.0.1:4000: connect: connection refused
2021-04-16T14:58:28.142Z        INFO    readdb/readdb.go:325    starting handleEventsOST
2021-04-16T14:58:28.155Z        INFO    readdb/readdb.go:316    starting handleEvents
2021-04-16T14:58:28.183Z        INFO    readdb/readdb.go:341    syncing from wals
2021-04-16T14:58:28.200Z        INFO    readdb/readdb.go:455    starting handleEvents

I’ve tried running sorintlab/agolademo docker image on local PC, however I get same issue.
My config is pretty much as provided in example. I see port 4000 is open on all IPs on server, I can telnet to it.

Any ideas what I’m missing?

P.S.
I didn’t post config, since it’s basically copy-paste.

Hello,

to configure agola with services distributed on more servers/containers you need to change your configuration slightly.
I think “runserviceURL” is still pointing to localhost but it must be an address reachable by the other server because it’s used by executor.
Check out the k8s example, it can be easily adapted to your case.

Sorry for not responding for so long.
At the time I tried variety of different CD options.
I will try my luck with Agola again, once I get my Pi cluster.