#latest quickstart friendbot returning 502

29 messages · Page 1 of 1 (latest)

humble patrol
#

Using latest quickstart:testing from https://hub.docker.com/layers/stellar/quickstart/testing/images/sha256-6377ce642644e06e42444d2b00a8ce52eee7529f5a5f1d02cb64a29f88f05bfa?context=explore

I'm using this command locally:

docker run --rm -it \
  -p 8000:8000 \
  --name stellar \
  stellar/quickstart:testing@sha256:6377ce642644e06e42444d2b00a8ce52eee7529f5a5f1d02cb64a29f88f05bfa \
  --local \
  --enable-soroban-rpc```

I check if friendbot is live: ```curl --no-progress-meter --fail-with-body "http://localhost:8000/friendbot" | grep '"invalid_field": "addr"'```

And it returns a 502 Bad Gateway response.

You can see that the same thing is happening when I run the latest quickstart as a background service in a GitHub workflow using that same `curl` command as a healthcheck on the container https://github.com/stellar/soroban-tools/actions/runs/6435753648/job/17477664549?pr=973
GitHub

CLI and RPC Server for Soroban Contracts. Contribute to stellar/soroban-tools development by creating an account on GitHub.

#

Using the hash for the arm64 variant, rather than amd64 (1f8cf4a02b41b780629b9b3fdd3ecb8970ae6693d3faade21ea6752aa7dcfc31), the above curl check works

dark flare
#

👀

#

Locally works for me, however, I'm using arm64. I'll retry on amd64.

#

Hmm, the amd64 image is working for me too.

#

Is this happening reliably every time for you?

#

I'm not sure why you're seeing that locally. But the errors in the soroban-tools action look different, and not about friendbot.

#

Something bigger is up with it. Because horizon crashes, and soroban-rpc is throwing errors.

humble patrol
dark flare
#

I have a vague memory of failing to get the image to work with GitHub Actions's services configuration, and instead I ran using docker run in a run: step.

humble patrol
dark flare
#
quickstart   | supervisor: 2023-10-06 19:33:54,407 INFO reaped unknown pid 197 (exit status 0)
quickstart   | supervisor: 2023-10-06 19:33:54,493 INFO exited: horizon (exit status 1; not expected)
quickstart   | stellar-core: Synced!
quickstart   | supervisor: 2023-10-06 19:33:56,663 INFO spawned: 'horizon' with pid 371
quickstart   | supervisor: 2023-10-06 19:33:56,779 INFO exited: horizon (exit status 1; not expected)
#

The errors look to me like the history archive hasn't been created for the local network. That's a step that happens in boot with standalone/local.

#

Oh wait, your healthcheck is new.

#

With preview 11 the healthckec was much simpler.

#

Could you try it with the simpler healthcheck and see if it recovers?

humble patrol
#

looks like I might not be waiting long enough for friendbot to start

dark flare
#

Friendbot won't work until Horizon is up, and Horizon looks like he failed to come up, but it'll keep trying.

humble patrol
#

when I try locally, if I run too soon, I get 502

#

if I wait another minute, I get 400

dark flare
#

There's a cascade of things that need to happen.

#

It's surprising to me that Horizon crashed though and that the history archive isn't up. But maybe on the CI device the history archive server was just a little slow?

#

Tbh the "history archive server" is literally a directory of files and a python command to expose them on a http interface, so it's nothing complex, but it also isn't managed by supervisor like everything else is, so there's zero resilience.

#

I'm not sure why it was done that way, I could move it into supervisor.

#

It's also possible the history archive server crashed. We have no visibility because it wasn't tracked by supervisor. I'll open a change changing that if it's simple.

#

Is it reasonable to tell the healthcheck to wait longer for the initial successful check?

humble patrol
dark flare
#

Fwiw I'd like to get the boot time of quickstart lower. Got ideas for how to do that, just have to find time. I'd like to make it as lightweight as possible. Esp for soroban dev. Ideas include dropping the use of postgres internally, making horizon optional and off-by-default. There are some problems with that though because friendbot is dependent on horizon unfortunately.