TransWikia.com

Using S3 as Archive for Standalone Node

Stellar Asked on August 21, 2021

I assume this is a classical How To. But i can’t find the answer. How do I configure S3 as archive for a standadlone stellar node?

Here is what I did:

1) Started the node with quickstart template:

docker run --rm -it -p "8000:8000" -v "/home/tidy/stellar:/opt/stellar" --name stellar stellar/quickstart --standalone

2) Jumped into the docker instance with:
docker exec -it stellar /bin/bash

3) Inside the docker instance I load cfg file into vi:
vi opt/stellar/core/etc/stellar-core.cfg

4) Then I comment out the existing history [HISTORY.vs] and replace it with:

[HISTORY.stellar]
get="curl  https://s3.amazonaws.com/tiby-bucket/archive1/{0} -o {1}"
put="aws s3 cp {0} s3://s3.amazonaws.com/tidy-bucket/archive1/{1}"

5) Then I run:

stellar-core --newdb

6) Finally, I run:

stellar-core --newhist stellar

At this point I get following error message:

2018-12-06T14:35:51.479 GCTI6 [Work WARNING] Scheduling retry #5/5 in 17 sec, for put-remote-file .well-known/stellar-history.json
2018-12-06T14:35:51.480 GCTI6 [Process ERROR] posix_spawn() failed: No such file or directory [ProcessManagerImpl.cpp:540]
2018-12-06T14:35:51.480 GCTI6 [Process ERROR] Error starting process: posix_spawn() failed [ProcessManagerImpl.cpp:588]
2018-12-06T14:35:51.480 GCTI6 [Process ERROR] When running: aws s3 cp buckets/tmp/history-8f17a16197cb7fae/stellar-stellar-history.json s3://s3.amazonaws.com/tidy-bucket/archive1/history/00/00/00/history-00000000.json [ProcessManagerImpl.cpp:589]
2018-12-06T14:35:51.480 GCTI6 [Work WARNING] Scheduling retry #5/5 in 11 sec, for put-remote-file history/00/00/00/history-00000000.json
2018-12-06T14:35:51.480 GCTI6 [Process ERROR] posix_spawn() failed: No such file or directory [ProcessManagerImpl.cpp:540]
2018-12-06T14:35:51.480 GCTI6 [Process ERROR] Error starting process: posix_spawn() failed [ProcessManagerImpl.cpp:588]
2018-12-06T14:35:51.480 GCTI6 [Process ERROR] When running: aws s3 cp buckets/tmp/history-8f17a16197cb7fae/stellar-stellar-history.json s3://s3.amazonaws.com/tidy-bucket/archive1/history/00/00/00/history-00000000.json [ProcessManagerImpl.cpp:589]

Even after restarting the stellar core using supervisorctl newhist doesn’t seem to be able to initialize the archive.

Despite all of this the core, horizon, and postgres seem to be runing fine. Though nothing is being written to S3.

So, my question is what is the procedure for running stellar with S3 as archive. I followed whatever is suggested in this document without much success: https://www.stellar.org/developers/stellar-core/software/admin.html

What I am missing?

One Answer

I have come across this one as well and its a bit misleading.

This could be a missing BUCKET_DIR_PATH declaration in the config.

or more likely you are missing the curl command.

Answered by BrinkOO7 on August 21, 2021

Add your own answers!

Ask a Question

Get help from others!

© 2024 TransWikia.com. All rights reserved. Sites we Love: PCI Database, UKBizDB, Menu Kuliner, Sharing RPP