5

I want to use the captive core of stellar-horizon v2.0.0, but the following command does not work. Instance is building a new.

As far as I read the docs, I don't think it will make http requests to core by default. Is this a bug?

A. a subprocess of Horizon, streaming ledger data over a filesystem pipe. This is the default: https://github.com/stellar/go/blob/master/services/horizon/internal/docs/captive_core.md#introduction

My command and config are:

$ sudo -u stellar stellar-horizon \
--db-url="postgres://stellar:stellar123@localhost/horizon?sslmode=disable" \
--network-passphrase="Public Global Stellar Network ; September 2015" \
--stellar-core-binary-path="/usr/local/bin/stellar-core" \
--captive-core-config-append-path="/etc/default/stellar-captive-core-stub.toml" \
--enable-captive-core-ingestion="true"
WARN[2021-03-15T10:19:58.017Z] could not load stellar-core info: http request errored: Get "http://localhost:11626/info": dial tcp [::1]:11626: connect: connection refused  pid=19811
INFO[2021-03-15T10:19:58.023Z] Starting horizon on :8000 (ingest: false)     pid=19811
WARN[2021-03-15T10:19:59.017Z] could not load stellar-core info: http request errored: Get "http://localhost:11626/info": dial tcp [::1]:11626: connect: connection refused  pid=19811
ERRO[2021-03-15T10:19:59.017Z] failed to load the stellar-core info          err="http request errored: Get \"http://localhost:11626/info\": dial tcp [::1]:11626: connect: connection refused" pid=19811 stack="[main.go:43 client.go:67 app.go:216 app.go:410 asm_amd64.s:1373]"
WARN[2021-03-15T10:20:00.017Z] could not load stellar-core info: http request errored: Get "http://localhost:11626/info": dial tcp [::1]:11626: connect: connection refused  pid=19811
ERRO[2021-03-15T10:20:00.017Z] failed to load the stellar-core info          err="http request errored: Get \"http://localhost:11626/info\": dial tcp [::1]:11626: connect: connection refused" pid=19811 stack="[main.go:43 client.go:67 app.go:216 app.go:410 asm_amd64.s:1373]"
ERRO[2021-03-15T10:20:01.017Z] failed to load the stellar-core info          err="http request errored: Get \"http://localhost:11626/info\": dial tcp [::1]:11626: connect: connection refused" pid=19811 stack="[main.go:43 client.go:67 app.go:216 app.go:410 asm_amd64.s:1373]"
WARN[2021-03-15T10:20:01.017Z] could not load stellar-core info: http request errored: Get "http://localhost:11626/info": dial tcp [::1]:11626: connect: connection refused  pid=19811
INFO[2021-03-15T10:20:01.967Z] Finished request                              app_name=undefined app_version=undefined bytes=3840 client_name=undefined client_version=undefined duration=0.000649964 forwarded_ip= host="localhost:8000" ip="[::1]" ip_port="[::1]:53090" method=GET path=/ pid=19811 referer=undefined req=ip-10-10-0-191.ap-northeast-1.compute.internal/06FSDb1on8-000001 route=/ status=200 streaming=false
INFO[2021-03-15T10:20:01.979Z] Finished request                              app_name=undefined app_version=undefined bytes=579 client_name=undefined client_version=undefined duration=0.000247862 forwarded_ip= host="localhost:8000" ip="[::1]" ip_port="[::1]:53094" method=GET path=/fee_stats pid=19811 referer=undefined req=ip-10-10-0-191.ap-northeast-1.compute.internal/06FSDb1on8-000002 route=/fee_stats status=200 streaming=false
WARN[2021-03-15T10:20:02.017Z] could not load stellar-core info: http request errored: Get "http://localhost:11626/info": dial tcp [::1]:11626: connect: connection refused  pid=19811
$ cat /etc/default/stellar-captive-core-stub.toml 
[[HOME_DOMAINS]]
HOME_DOMAIN="MYDOMAIN"
QUALITY="HIGH"

[[VALIDATORS]]
NAME="sdf_live_1"
HOME_DOMAIN="stellar.org"
PUBLIC_KEY="GCGB2S2KGYARPVIA37HYZXVRM2YZUEXA6S33ZU5BUDC6THSB62LZSTYH"
ADDRESS="core-live-a.stellar.org:"
HISTORY="curl -sf http://history.stellar.org/prd/core-live/core_live_001/{0} -o {1}"

[[VALIDATORS]]
NAME="sdf_live_2"
HOME_DOMAIN="stellar.org"
PUBLIC_KEY="GCM6QMP3DLRPTAZW2UZPCPX2LF3SXWXKPMP3GKFZBDSF3QZGV2G5QSTK"
ADDRESS="core-live-b.stellar.org"
HISTORY="curl -sf http://history.stellar.org/prd/core-live/core_live_002/{0} -o {1}"

[[VALIDATORS]]
NAME="sdf_live_3"
HOME_DOMAIN="stellar.org"
PUBLIC_KEY="GABMKJM6I25XI4K7U6XWMULOUQIQ27BCTMLS6BYYSOWKTBUXVRJSXHYQ"
ADDRESS="core-live-c.stellar.org"
HISTORY="curl -sf http://history.stellar.org/prd/core-live/core_live_003/{0} -o {1}"

Can you tell me the boot options or configs that captive core works for?

0

1 Answer 1

3

You are missing --ingest option. By default Horizon instances are not ingesting ledger data, just starting the API server. I created this issue to make params validation more strict.

2
  • I added the --ingest option, but the situation did not change. Thank you.
    – fatminer
    Commented Apr 7, 2021 at 10:14
  • Any new errors in the logs? Commented Apr 7, 2021 at 15:15

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Not the answer you're looking for? Browse other questions tagged or ask your own question.