Giter VIP home page Giter VIP logo

quickstart's Introduction

Stellar Quickstart Docker Image

This docker image provides a simple way to run stellar-core and horizon locally for development and testing.

Looking for instructions for how to run stellar-core or horizon in production? Take a look at the docs here.

This image provides a default, non-validating, ephemeral configuration that should work for most developers. By configuring a container using this image with a host-based volume (described below in the "Usage" section) an operator gains access to full configuration customization and persistence of data.

The image uses the following software:

Usage

To use this project successfully, you should first decide a few things:

First, decide whether you want your container to be part of the public, production Stellar network (referred to as the pubnet) or the test network (called testnet) that we recommend you use while developing software because you need not worry about losing money on the testnet. Alternatively, choose to run a local network (called local) which allows you to run your own acellerated private Stellar network for testing.

Next, you must decide whether you will use a docker volume or not. When not using a volume, we say that the container is in ephemeral mode, that is, nothing will be persisted between runs of the container. Persistent mode is the alternative, which should be used in the case that you need to either customize your configuration (such as to add a validation seed) or would like avoid a slow catchup to the Stellar network in the case of a crash or server restart. We recommend persistent mode for anything besides a development or test environment.

Finally, you must decide what ports to expose. The software in these images listen on 4 ports, each of which you may or may not want to expose to the network your host system is connected to. A container that exposes no ports isn't very useful, so we recommend at a minimum you expose the horizon http port. See the "Ports" section below for a more nuanced discussion regarding the decision about what ports to expose.

After deciding on the questions above, you can setup your container. Please refer to the appropriate section below based upon what mode you will run the container in.

Network Options

Provide either --pubnet, --testnet or --local as a command line flag when starting the container to determine which network (and base configuration file) to use.

--pubnet

In public network mode, the node will join the public, production Stellar network.

Note: In pubnet mode the node will consume more disk, memory, and CPU resources because of the size of the ledger and frequency of transactions. If disk space warnings occur and the image is being used on a Docker runtime that uses a VM, like that of macOS and Windows, the VM may need to have its disk space allocation increased.

--testnet

In test network mode, the node will join the network that developers use while developing software. Use the Stellar Laboratory to create an account on the test network.

--futurenet

In futurenet network mode, the node will join the Soroban test network that developers use while developing smart contracts on Stellar.

--local

In local network mode, you can optionally pass:

  • --protocol-version {version} to run a specific protocol version (defaults to latest version).

  • --limits {limits} to configure specific Soroban resource limits to one of:

    • default leaves limits set extremely low which is stellar-core's default configuration
    • testnet sets limits to match those used on testnet (the default quickstart configuration)
    • unlimited sets limits to the maximum resources that can be configured

The network passphrase of the network defaults to:

Standalone Network ; February 2017

Set the network passphrase in the SDK or tool you're using. If an incorrect network passphrase is used in clients signing transactions, the transactions will fail with a bad authentication error.

The root account of the network is fixed to:

Public Key: GBZXN7PIRZGNMHGA7MUUUF4GWPY5AYPV6LY4UV2GL6VJGIQRXFDNMADI
Secret Key: SC5O7VZUXDJ6JBDSZ74DSERXL7W3Y5LTOAMRF7RQRL3TAGAPS7LUVG3L

The root account is derived from the network passphrase and if the network passphrase is changed the root account will change. To find out the root account when changing the network passphrase view the logs for stellar-core on its first start. See Viewing logs for more details.

In local network mode a ledger occurs every one second and so transactions are finalized faster than on deployed networks.

Note: The local network in this container is not suitable for any production use as it has a fixed root account. Any private network intended for production use would also required a unique network passphrase.

Service Options

The image runs all services available by default, but can be configured to run only certain services as needed. The option for configuring which services run is the --enable option.

The option takes a comma-separated list of service names to enable. To enable all services which is the default behavior, use:

--enable core,horizon,rpc

To run only select services, simply specify only those services. For example, to enable the RPC, use:

--enable rpc

Note: All services, and in addition friendbot, always run on a local network.

Faucet (Friendbot)

Stellar development/test networks use friendbot as a faucet for the native asset.

When running in local, testnet, and futurenet modes friendbot is available on :8000/friendbot and can be used to fund a new account.

For example:

$ curl http://localhost:8000/friendbot?addr=G...

Note: In local mode a local friendbot is running. In testnet and futurenet modes requests to the local :8000/friendbot endpoint will be proxied to the friendbot deployments for the respective network.

Soroban Development

The RPC Server will be avaialble on port 8000 of the container, and the base URL path for Soroban RPC will be http://<container_host>:8000/rpc. This endpoint uses JSON-RPC protocol. Refer to example usages in soroban-example-dapp.

To enable soroban rpc admin endpoint for access to metrics and Go pprof (profiling), include the --enable-soroban-rpc-admin-endpoint flag, the HTTP endpoint will be listening on container port 6061, which can be exposed with standard docker port rule -p "6061:6061", the published endpoints are:

http://<container_host>:6061/metrics
http://<container_host>:6061/debug/pprof/

Soroban Diagnostic Events

Soroban diagnostic events contain logs about internal events that have occurred while a contract is executing. They're particularly useful for debugging why a contract trapped (panicked).

To enable Soroban diagnostic events provide the following command line flag when starting the container: --enable-soroban-diagnostic-events

In local network mode diagnostics are enabled by default and can be disabled with: --disable-soroban-diagnostic-events

Note: Diagnostic events are unmetered and their execution is not metered or contrained by network limits or transaction resource limits. This means the resources consumed by an instance with diagnostic events enabled may exceed resources typically required by a deployment with diagnostic events disabled.

Deploy to Digital Ocean

You can deploy the quickstart image to DigitalOcean by clicking the button below. It will by default create a container that can be used for development and testing, running the latest tag, in ephemeral mode, and on the local network.

Deploy to DO

After clicking the button above, the deployment can be configured to deploy a different variant of the image, or join a different network such as testnet or futurenet by changing environment variables.

Some example configurations that can be used are:

  • Local network matching pubnet: IMAGE: stellar/quickstart:latest NETWORK: local
  • Local network matching testnet: IMAGE: stellar/quickstart:testing NETWORK: local
  • Testnet node: IMAGE: stellar/quickstart:testnet NETWORK: testnet

Disclaimer: The DigitalOcean server is publicly accessible on the Internet. Do not put sensitive information on the network that you would not want someone else to know. Anyone with access to the network will be able to use the root account above.

Building Custom Images

To build a quickstart image with custom or specific versions of stellar-core, horizon, etc, use the Makefile. The following parameters can be specified to customize the version of each component, and for stellar-core the features it is built with.

  • TAG: The docker tag to assign to the build. Default dev.
  • CORE_REF: The git reference of stellar-core to build.
  • CORE_CONFIGURE_FLAGS: The CONFIGURE_FLAGS to configure the stellar-core build with. Typically include --disable-tests, and to enable the next protocol version that is still in development, add --enable-next-protocol-version-unsafe-for-production.
  • HORIZON_REF: The git reference of stellar-horizon to build.
  • FRIENDBOT_REF: The git reference of stellar-friendbot to build.
  • SOROBAN_RPC_REF: The git reference of soroban-rpc to build.

For example:

make build \
  TAG=future \
  CORE_REF=... \
  CORE_CONFIGURE_FLAGS=... \
  HORIZON_REF=... \
  FRIENDBOT_REF=... \
  SOROBAN_RPC_REF=...

Background vs. Interactive containers

Docker containers can be run interactively (using the -it flags) or in a detached, background state (using the -d flag). Many of the example commands below use the -it flags to aid in debugging but in many cases you will simply want to run a node in the background. It's recommended that you use the use the tutorials at docker to familiarize yourself with using docker.

Ephemeral mode

Ephermeral mode is provided to support development and testing environments. Every time you start a container in ephemeral mode, the database starts empty and a default configuration file will be used for the appropriate network.

Starting an ephemeral node is simple, just craft a docker run command to launch the appropriate image but do not mount a volume. To craft your docker command, you need the network name you intend to run against and the flags to expose the ports your want available (See the section named "Ports" below to learn about exposing ports). Thus, launching a testnet node while exposing horizon would be:

$ docker run --rm -it -p "8000:8000" --name stellar stellar/quickstart --testnet

As part of launching, an ephemeral mode container will generate a random password for securing the postgresql service and will output it to standard out. You may use this password (provided you have exposed the postgresql port) to access the running postgresql database (See the section "Accessing Databases" below).

Persistent mode

In comparison to ephemeral mode, persistent mode is more complicated to operate, but also more powerful. Persistent mode uses a mounted host volume, a directory on the host machine that is exposed to the running docker container, to store all database data as well as the configuration files used for running services. This allows you to manage and modify these files from the host system.

Note that there is no guarantee that the organization of the files of the volume will remain consistent between releases of the image, that occur on every commit to the stellar/quickstart repository. At anytime new files may be added, old files removed, or dependencies and references between them changed. For this reason persistent mode is primarily intended for running short lived test instances for development. If consistency is required over any period of time use image digest references to pin to a specific build.

Starting a persistent mode container is the same as the ephemeral mode with one exception:

$ docker run --rm -it -p "8000:8000" -v "/home/scott/stellar:/opt/stellar" --name stellar stellar/quickstart --testnet

The -v option in the example above tells docker to mount the host directory /home/scott/stellar into the container at the /opt/stellar path. You may customize the host directory to any location you like, simply make sure to use the same value every time you launch the container. Also note: an absolute directory path is required. The second portion of the volume mount (/opt/stellar) should never be changed. This special directory is checked by the container to see if it is mounted from the host system which is used to see if we should launch in ephemeral or persistent mode.

Upon launching a persistent mode container for the first time, the launch script will notice that the mounted volume is empty. This will trigger an interactive initialization process to populate the initial configuration for the container. This interactive initialization adds some complications to the setup process because in most cases you won't want to run the container interactively during normal operation, but rather in the background. We recommend the following steps to setup a persistent mode node:

  1. Run an interactive session of the container at first, ensuring that all services start and run correctly.
  2. Shut down the interactive container (using Ctrl-C).
  3. Start a new container using the same host directory in the background.

Regarding user accounts

Managing UIDs between a docker container and a host volume can be complicated. At present, this image simply tries to create a UID that does not conflict with the host system by using a preset UID: 10011001. Currently there is no way to customize this value. All data produced in the host volume be owned by 10011001. If this UID value is inappropriate for your infrastructure we recommend you fork this project and do a find/replace operation to change UIDs. We may improve this story in the future if enough users request it.

Ports

The image exposes one main port through which services provide their APIs:

Port Service Description
8000 horizon, soroban-rpc, friendbot main http port

The image also exposes a few other ports that most developers do not need, but area available:

Port Service Description
5432 postgresql database access port
6060 horizon admin port
6061 soroban-rpc admin port
11625 stellar-core peer node port
11626 stellar-core main http port
11725 stellar-core (horizon) peer node port
11726 stellar-core (horizon) main http port
11825 stellar-core (soroban-rpc) peer node port
11826 stellar-core (soroban-rpc) main http port

Security Considerations

Exposing the network ports used by your running container comes with potential risks. While many attacks are preventable due to the nature of the stellar network, it is extremely important that you maintain protected access to the postgresql server that runs within a quickstart container. An attacker who gains write access to this DB will be able to corrupt your view of the stellar network, potentially inserting fake transactions, accounts, etc.

It is safe to open the horizon http port. Horizon is designed to listen on an internet-facing interface and provides no privileged operations on the port. At the same time admin port should only be exposed to a trusted network, as it provides no security itself.

The HTTP port for stellar-core should only be exposed to a trusted network, as it provides no security itself. An attacker that can make requests to the port will be able to perform administrative commands such as forcing a catchup or changing the logging level and more, many of which could be used to disrupt operations or deny service.

The peer port for stellar-core however can be exposed, and ideally would be routable from the internet. This would allow external peers to initiate connections to your node, improving connectivity of the overlay network. However, this is not required as your container will also establish outgoing connections to peers.

Accessing and debugging a running container

There will come a time when you want to inspect the running container, either to debug one of the services, to review logs, or perhaps some other administrative tasks. We do this by starting a new interactive shell inside the running container:

$ docker exec -it stellar /bin/bash

The command above assumes that you launched your container with the name stellar; Replace that name with whatever you chose if different. When run, it will open an interactive shell running as root within the container.

Restarting services

Services within the quickstart container are managed using supervisord and we recommend you use supervisor's shell to interact with running services. To launch the supervisor shell, open an interactive shell to the container and then run supervisorctl. You should then see a command prompt that looks like:

horizon                          RUNNING    pid 143, uptime 0:01:12
postgresql                       RUNNING    pid 126, uptime 0:01:13
stellar-core                     RUNNING    pid 125, uptime 0:01:13
supervisor>

From this prompt you can execute any of the supervisord commands:

# restart horizon
supervisor> restart horizon


# stop stellar-core
supervisor> stop stellar-core

You can learn more about what commands are available by using the help command.

Viewing logs

Logs can be found within the container at the path /var/log/supervisor/. A file is kept for both the stdout and stderr of the processes managed by supervisord. Additionally, you can use the tail command provided by supervisorctl.

Alternatively, to tail all logs into the container's output for all services, append the --logs option.

Accessing databases

The point of this project is to make running stellar's software within your own infrastructure easier, so that your software can more easily integrate with the stellar network. In many cases, you can integrate with horizon's REST API, but often times you'll want direct access to the database either horizon or stellar-core provide. This allows you to craft your own custom sql queries against the stellar network data.

This image manages two postgres databases: core for stellar-core's data and horizon for horizon's data. The username to use when connecting with your postgresql client or library is stellar. The password to use is dependent upon the mode your container is running in: Persistent mode uses a password supplied by you and ephemeral mode generates a password and prints it to the console upon container startup.

Example launch commands

Below is a list of various ways you might want to launch the quickstart container annotated to illustrate what options are enabled. It's also recommended that you should learn and get familiar with the docker command.

Launch an ephemeral local only dev/test network:

$ docker run -d -p "8000:8000" --name stellar stellar/quickstart --local

Launch an ephemeral testnet node in the foreground:

$ docker run --rm -it \
    -p "8000:8000" \
    --name stellar \
    stellar/quickstart --testnet

Setup a new persistent node using the host directory /str:

$ docker run -it --rm \
    -p "8000:8000" \
    -v "/str:/opt/stellar" \
    --name stellar \
    stellar/quickstart --testnet

Troubleshooting

Let us know what you're having trouble with! Open an issue or join us on our public slack channel.

quickstart's People

Contributors

2opremio avatar abuiles avatar acharb avatar anupsdf avatar bartekn avatar brahman81 avatar dmkozh avatar graydon avatar jacekn avatar jonjove avatar kalepail avatar leighmcculloch avatar marta-lokhova avatar mbsdf avatar mollykarcher avatar monsieurnicolas avatar mvaneijk avatar mwtzzz avatar nullstyle avatar poliha avatar raymens avatar shaptic avatar sisuresh avatar sreuland avatar tamirms avatar thomasbrady avatar tsachiherman avatar urvisavla avatar willemneal avatar zulucrypto avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

quickstart's Issues

catchup between ledger 0 and N

I set CATCHUP_COMPLETE=true in /opt/stellar/core/etc/stellar-core.cfg but I did it shortly after the sync started so it looks like I am missing ledgers between 0 and N.

Core database

maybe it doesn't matter for core, I can't tell if it is auto pruning old stuff despite CATCHUP_COMPLETE

core=> select min(ledgerseq) from ledgerheaders;
  min   
--------
 750016
(1 row)

but horizon seems to be missing 67 ledgers

Horizon database

horizon=> select min(sequence) from history_ledgers;
 min 
-----
  67
(1 row)

if core's lowest ledger is 750016 then I assume it's not possible to get anything less than that, so then my question is: how can I force core+horizon to sync between 0 and 750016?

I've tried this: https://www.stellar.org/developers/horizon/reference/admin.html#correcting-gaps-in-historical-data but it doesn't seem to help (unless I'm doing it wrong)

Add environment variables for most used config variables

It would be convenient in my opinion to have the possibility to set some of the configuration variables using a ENV variable.

E.g. I'm now trying to run a node with a larger CATCHUP_RECENT. But that's hard to do without building a new docker image based on this one. Altering the variable after boot of the container has no effect.

It would have been nice if this could just be set using an ENV variable.

Awaiting 1/1 prerequisites of: get-history-archive-state

After I running a quick start version , it shown Awaiting 1/1 prerequisites of: get-history-archive-state issue(this msg shown in status after I use stellar-core -c info command ) , and can't sync the nodes . Is there some one can help me to fix that issue ?

Some questions on starting a persistant container

I would like to try and start a persistent container on aws. After reading the README, I have some questions:

  1. I am planning on just creating an ec2 instance and running this docker container on there. Is there a recommended volume size that I need to attach?

  2. The README mentions passing in db credentials in persistent mode but does not clarify how exactly this is done. How do I pass in the credentials for the postgres instance?

Thanks in advance.

Container seems to have stalled. How to restart?

I have a running container with CATCHUP_COMPLETE=true. It seems to have caught up to "2016-05-22 16:20:32" and then stopped. By stopped, I mean that I see no new db entries getting added (to the core db's ledgerheaders table and to horizon db's history_ledgers table). I do however see the process listed when I do docker ps.

I guess I have two questions:

  1. What might have caused this?
  2. What are my options? Should I restart the container (and if so how can I tell it to just pick up where it left off).

Thanks in advance.

some horizon endpoints not available

Running quickstart docker in ephemeral mode, the endpoints /trades and /assets do not work:

{
  "type": "https://stellar.org/horizon-errors/not_found",
  "title": "Resource Missing",
  "status": 404,
  "detail": "The resource at the url requested was not found.  This is usually occurs for one of two reasons:  The url requested is not valid, or no data in our database could be found with the parameters provided.",
  "instance": "5f0cf7d598d2/o8w9Hm008D-000001"
}

Suggestion: Don't rely on git to set executable permission

Spent hours trying to figure out why my copy of your code was not working

It seems you have added some files in git with the executable permission? I didn't even know that was possible and was confused why your code worked and mine failed. I created a new repository and just dragged your files over so that permission was not set, and it was not able to run these files.

For simplicity, always set the permission in the Dockerfile.

I had to add this:

RUN ["chmod", "+x", "/opt/stellar-default/common/core/bin/start"]
RUN ["chmod", "+x", "/opt/stellar-default/common/horizon/bin/start"]
RUN ["chmod", "+x", "/opt/stellar-default/common/horizon/bin/horizon"]

Thanks

stellar/quickstart stuckin fail retry loop

I am having an issue with the latest stellar/quickstart docker image. I started the container with the following: docker run -p 8000:8000 -v /Users/jhancock/Desktop/stellar:/opt/stellar --name stellar -it stellar/quickstart:latest --standalone.

The first transaction that i attempt causes the system to get stuck in the WORK_RUNNING -> WORK_FAILURE_RAISE, WORK_PENDING -> WORK_RUNNING loop. This was a fresh instance of the container. If i destroy the container, remove the local volume, and rerun a new instance the same thing happens. I am not sure how to start diagnosing this issue.

stellar-core.2018.08.15-19:13:17.log

Postgres exits due to missing /var/run directory

Apparently the /var/run/postgresql directory is missing inside the container. Thus starting postgres fails (the error is sent to /dev/null) and the /start script waits for postgres forever. Quick workaround for it:

$ docker run --rm -it --name stellar-testnet --entrypoint /bin/bash stellar/quickstart -c "mkdir -p /var/run/postgresql && /start --testnet"

Stellar/quickstart has state: "Catching up"

Hi. I launched the container with the following
docker run --rm -it -p "8000:8000" -p "11626:11626" -p "11625:11625" -v "/home/user/Stellar/data:/opt/stellar" --name stellar stellar/quickstart --testnet

And second day the state is "Catching up". How long does it take to synchronize the testnet?
My config:

HTTP_PORT=11626
PUBLIC_HTTP_PORT=true
LOG_FILE_PATH="/var/log/stellar/stellar-core.log"

NETWORK_PASSPHRASE="Test SDF Network ; September 2015"

KNOWN_PEERS=[
"core-testnet1.stellar.org",
"core-testnet2.stellar.org",
"core-testnet3.stellar.org"]

DATABASE="postgresql://dbname=core host=localhost user=stellar password=stellar"
UNSAFE_QUORUM=true
FAILURE_SAFETY=1
CATCHUP_COMPLETE=false
CATCHUP_RECENT=8640

#The public keys of the Stellar testnet servers
[QUORUM_SET]
THRESHOLD_PERCENT=51 # rounded up -> 2 nodes out of 3
VALIDATORS=[
"GDKXE2OZMJIPOSLNA6N6F2BVCI3O777I2OOC4BV7VOYUEHYX7RTRYA7Y  sdf1",
"GCUCJTIYXSOXKBSNFGNFWW5MUQ54HKRPGJUTQFJ5RQXZXNOLNXYDHRAP  sdf2",
"GC2V2EFSXN6SQTWVYA5EPJPBWWIMSD2XQNKUOHGEKB535AQE2I6IXV2Z  sdf3"]

and results:

{
   "info" : {
      "UNSAFE_QUORUM" : "UNSAFE QUORUM ALLOWED",
      "build" : "v9.2.0",
      "ledger" : {
         "age" : 1535565962,
         "baseFee" : 100,
         "baseReserve" : 100000000,
         "closeTime" : 0,
         "hash" : "63d98f536ee68d1b27b5b89f23af5311b7569a24faf1403ad0b52b633b07be99",
         "num" : 2,
         "version" : 0
      },
      "network" : "Test SDF Network ; September 2015",
      "peers" : {
         "authenticated_count" : 12,
         "pending_count" : 0
      },
      "protocol_version" : 9,
      "quorum" : {
         "10785910" : {
            "agree" : 3,
            "disagree" : 0,
            "fail_at" : 2,
            "hash" : "273af2",
            "missing" : 0,
            "phase" : "EXTERNALIZE"
         }
      },
      "startedOn" : "2018-08-28T17:09:45Z",
      "state" : "Catching up",
      "status" : [
         "Catching up: Awaiting 1/1 prerequisites of: get-history-archive-state"
      ]
   }
}

Enable friendbot on horizon server

When i try to call friendbot on docker testnet i get error json as

{ "type": "https://stellar.org/horizon-errors/friendbot_disabled", "title": "Friendbot is disabled", "status": 403, "detail": "This horizon server is not configured to provide a friendbot. Contact the server administrator if you believe this to be in error.", "instance": "2480baf748ef/vJBlnyq3qF-000002" }

Stellar/horizon database retention policy

At some point of historical data gap filling I'm getting a message:
[History INFO] Trimming history <= ledger 19521619 (rmin=19521619, qmin=19522067, lmin=19522003
I roughly estimated that the retention policy for the database is set for 1 week by default.
Here is my settings to handle the history upload:
CATCHUP_RECENT = 550000
HISTORY_RETENTION_COUNT = 550000

Starting a container I'm getting an error:
<startup> [default FATAL] Got an exception: Unknown configuration entry: 'HISTORY_RETENTION_COUNT' [main.cpp:915]

Is it possible to fix that somehow or possible workaround to set up a different retention policy or even disable it at all?

Setting up a persistent container

I'm successfully able to start the container in persistent mode and it downloads the ledger files and bucket files okay and persists them on my file system. HOWEVER, when I stop the container and start a new one and mount the same volume I'd used initially, it detects that the mounted volume is not empty but restarts the whole catchup process again and downloads all the ledger files it already had!

I've noticed that it deletes all the files it had downloaded before being stopped the first time.. Am I the one doing it wrong as noone else seems to have this issue. I've spent dozens of hours trying to fix it and would appreciate the help.

starting a persistant container

I meet some questions when starting a persistant container.
i check logs .
1 stellar-core-stdout
could not connect to server: Connection refused
Is the server running on host "localhost" (127.0.0.1) and accepting
TCP/IP connections on port 5432?
2.stellar-core-stderr
NOTICE: relation "pubsub" already exists, skipping
3.postgresql-stderr
database system was interrupted; last known up at 2017-07-12 05:59:20 UTC
database system was not properly shut down; automatic recovery in progress
4.horizon-stderr
time="2017-07-12T08:05:40Z" level=warning msg="could not load stellar-core info: Get http://localhost:11626/info: dial tcp 127.0.0.1:11626: getsockopt: connection refused" pid=10

i don't know how to starting a persistant container correctly

Make image smaller

$ docker images
REPOSITORY           TAG                 IMAGE ID            CREATED             SIZE
stellar/quickstart   latest              66a81376d4a2        5 days ago          3.95GB

We should probably make it smaller.

Postgresql wont run with fatal error

hi, with PostgreSQL 9.4 it used to work fine, but when I rebuilt the image today and ran it , it kept failing with the following fatal error..no other other specific info in the log ..any idea why the PostgreSQL wont run? bin path and data directory are all correct

2018-06-10 17:25:45,979 CRIT Supervisor running as root (no user in config file)
2018-06-10 17:25:45,988 INFO RPC interface 'supervisor' initialized
2018-06-10 17:25:45,988 CRIT Server 'unix_http_server' running without any HTTP authentication checking
2018-06-10 17:25:45,988 INFO supervisord started with pid 7
2018-06-10 17:25:46,991 INFO spawned: 'postgresql' with pid 19
2018-06-10 17:25:46,993 INFO spawned: 'stellar-core' with pid 20
2018-06-10 17:25:46,995 INFO spawned: 'horizon' with pid 21
2018-06-10 17:25:47,007 INFO exited: postgresql (exit status 1; not expected)
2018-06-10 17:25:48,057 INFO spawned: 'postgresql' with pid 45
2018-06-10 17:25:48,058 INFO success: stellar-core entered RUNNING state, process has stayed up for > than 1 seconds (startsecs)
2018-06-10 17:25:48,058 INFO success: horizon entered RUNNING state, process has stayed up for > than 1 seconds (startsecs)
2018-06-10 17:25:48,074 INFO exited: postgresql (exit status 1; not expected)
2018-06-10 17:25:50,157 INFO spawned: 'postgresql' with pid 82
2018-06-10 17:25:50,174 INFO exited: postgresql (exit status 1; not expected)
2018-06-10 17:25:53,310 INFO spawned: 'postgresql' with pid 137
2018-06-10 17:25:53,327 INFO exited: postgresql (exit status 1; not expected)
2018-06-10 17:25:53,353 INFO gave up: postgresql entered FATAL state, too many start retries too quickly

Waiting for postgres to be available....

I tried to run a local persistent version:

winpty docker run --rm -it -p "15432:5432" -p "18000:8000" -p "11626:11626" - "c:/some/local/path:/opt/stellar" --name stellar tellar/quickstart --testnet
running `/start --testnet'
pids are [5]

Starting Stellar Quickstart

mode: persistent
network: testnet (Test SDF Network ; September 2015)
postgres user: stellar
Enter New Postgresql Password:
Confirm:
init-postgres: yes
ok
Waiting for postgres to be available...
Waiting for postgres to be available...
Waiting for postgres to be available...
Waiting for postgres to be available...

It seems like it is stuck waiting for postgres container to be available. I have postgres 9.6 installed fwiw.

I then tried to shut down the process and rerun and got a different error:

running `/start --testnet'
pids are [5]

Starting Stellar Quickstart

mode: persistent
network: testnet (Test SDF Network ; September 2015)
postgres: config directory exists, skipping copy
supervisor: config directory exists, skipping copy
stellar-core: config directory exists, skipping copy
horizon: config directory exists, skipping copy
postgres user: stellar
Enter New Postgresql Password:
Confirm:
init-postgres: failed!

The files belonging to this database system will be owned by user "postgres".
This user must also own the server process.

The database cluster will be initialized with locale "C".
The default database encoding has accordingly been set to "SQL_ASCII".
The default text search configuration will be set to "english".

Data page checksums are disabled.

initdb: directory "/opt/stellar/postgresql/data" exists but is not empty
If you want to create a new database system, either remove or empty
the directory "/opt/stellar/postgresql/data" or run initdb
with an argument other than "/opt/stellar/postgresql/data".
exited 5

Unable to run stellar core

I am running the docker run commands with parameters given in README but 11626 port for Stellar core is not able to connect. Horizon does respond on Telnet. Below is console output:

docker-stellar-core-horizon git:(master) docker run --rm -it -p "8000:8000" -v "/Users/AdnanAhmad/stellarofficial" --name stellar stellar/quickstart --testnet
running `/start --testnet'
pids are [7]

Starting Stellar Quickstart

mode: ephemeral
network: testnet (Test SDF Network ; September 2015)
postgres user: stellar
postgres password: kmjGQunveSNvnyAg
finalize-pgpass: ok
init-postgres: ok
postgres: up
create-horizon-db: ok
create-core-db: ok
stellar-postgres-user: ok
chown-core: ok
finalize-core-config: ok
init-core-db: ok
chown-horizon: ok
init-horizon-db: ok
postgres: down
starting supervisor
2018-02-01 10:17:03,621 CRIT Supervisor running as root (no user in config file)
2018-02-01 10:17:03,629 INFO RPC interface 'supervisor' initialized
2018-02-01 10:17:03,629 CRIT Server 'unix_http_server' running without any HTTP authentication checking
2018-02-01 10:17:03,630 INFO supervisord started with pid 7
2018-02-01 10:17:04,632 INFO spawned: 'postgresql' with pid 143
2018-02-01 10:17:04,634 INFO spawned: 'stellar-core' with pid 144
2018-02-01 10:17:04,635 INFO spawned: 'horizon' with pid 145
2018-02-01 10:17:05,757 INFO success: postgresql entered RUNNING state, process has stayed up for > than 1 seconds (startsecs)
2018-02-01 10:17:05,757 INFO success: stellar-core entered RUNNING state, process has stayed up for > than 1 seconds (startsecs)
2018-02-01 10:17:05,757 INFO success: horizon entered RUNNING state, process has stayed up for > than 1 seconds (startsecs)


docker can't start stellar

When I start with
docker run --rm -it -p "8000:8000" --name stellar stellar/quickstart --testnet,
but it will always stop the log in
2018-12-26 12:32:11,091 INFO success: horizon entered RUNNING state, process has stayed up for > than 1 seconds (startsecs)
Then it is not work.
All supervisor log is:

Starting Stellar Quickstart

mode: ephemeral
network: testnet (Test SDF Network ; September 2015)
postgres user: stellar
postgres password: cI05aBv4fKucrg91
finalize-pgpass: ok
init-postgres: ok
postgres: up
create-horizon-db: ok
create-core-db: ok
stellar-postgres-user: ok
chown-core: ok
finalize-core-config: ok
init-core-db: ok
chown-horizon: ok
init-horizon-db: ok
postgres: down
starting supervisor
2018-12-26 12:32:08,764 CRIT Supervisor running as root (no user in config file)
2018-12-26 12:32:08,777 INFO RPC interface 'supervisor' initialized
2018-12-26 12:32:08,778 CRIT Server 'unix_http_server' running without any HTTP authentication checking
2018-12-26 12:32:08,779 INFO supervisord started with pid 6
2018-12-26 12:32:09,782 INFO spawned: 'postgresql' with pid 119
2018-12-26 12:32:09,791 INFO spawned: 'stellar-core' with pid 120
2018-12-26 12:32:09,796 INFO spawned: 'horizon' with pid 121
2018-12-26 12:32:09,797 INFO reaped unknown pid 116
2018-12-26 12:32:11,091 INFO success: postgresql entered RUNNING state, process has stayed up for > than 1 seconds (startsecs)
2018-12-26 12:32:11,091 INFO success: stellar-core entered RUNNING state, process has stayed up for > than 1 seconds (startsecs)
2018-12-26 12:32:11,091 INFO success: horizon entered RUNNING state, process has stayed up for > than 1 seconds (startsecs)

and horizon-stderr.log is:

time="2018-12-26T12:25:46.499Z" level=warning msg="could not load stellar-core info: http request errored: Get http://localhost:11626/info: dial tcp 127.0.0.1:11626: connect: connection refused" pid=123
time="2018-12-26T12:25:46.536Z" level=info msg="Starting horizon on :8000 (ingest: true)" pid=123
time="2018-12-26T12:25:47.511Z" level=warning msg="ingest: waiting for stellar-core sync" pid=123 service=ingest
time="2018-12-26T12:25:48.504Z" level=warning msg="ingest: waiting for stellar-core sync" pid=123 service=ingest
time="2018-12-26T12:25:49.567Z" level=warning msg="ingest: waiting for stellar-core sync" pid=123 service=ingest
time="2018-12-26T12:25:50.467Z" level=warning msg="ingest: waiting for stellar-core sync" pid=123 service=ingest

and postgresql-stderr.log is :

2018-12-26 12:25:46 UTC [129-1] LOG: database system was shut down at 2018-12-26 12:25:44 UTC
2018-12-26 12:25:46 UTC [129-2] LOG: MultiXact member wraparound protections are now enabled
2018-12-26 12:25:46 UTC [121-1] LOG: database system is ready to accept connections
2018-12-26 12:25:46 UTC [133-1] LOG: autovacuum launcher started

and stellar-core-stderr---supervisor-l_QAbH.log is:

Using DEPRECATED command-line syntax.
Please refer to documentation for new syntax.

cp: cannot stat '/opt/stellar/history-cache/history/00/15/32/history-001532ff.json': No such file or directory
cp: cannot stat '/opt/stellar/history-cache/ledger/00/15/10/ledger-001510ff.xdr.gz': No such file or directory
cp: cannot stat '/opt/stellar/history-cache/ledger/00/15/11/ledger-0015113f.xdr.gz': No such file or directory
cp: cannot stat '/opt/stellar/history-cache/ledger/00/15/12/ledger-001512ff.xdr.gz': No such file or directory
cp: cannot stat '/opt/stellar/history-cache/ledger/00/15/13/ledger-0015133f.xdr.gz': No such file or directory

support standalone mode with friendbot in quickstart container

The quickstart container is awesome for use with the testnet. However the standalone mode is a bit less clear from the documentation.

There is a standalone mode; but it is kind of useless and pointless without friendbot running as well. Unless I'm missing something, you can't really create accounts without it in standalone mode.

As far as I can see friendbot is no longer included with horizon. It still includes a friendbot endpoint but it does a redirect to its own root. Apparently you need to run a separate service with the friend bot and then tell horizon to use that. That seems to be not included with the quickstart container.

What would be helpful is simply including this and allowing users to enable it with some extra config. IMHO standalone by definition means it's a setup intended for integration testing so I don't see any reason to exclude friendbot in such a setup or make it hard to set that up.

[BUG] Multi-signature unexpected failure (tx_bad_auth_extra while all signers are legit)

Description

When a transaction is signed by more legit signers than required, it will be rejected with 'tx_bad_auth_extra' error.

Expected behavior

The transaction should be validated and each legit signer should be recorded into the blockchain.

Consequences

In the current state of affairs wallets/authenticator multisig implementors have to implement additional routines to remove valid signatures from transaction so that the transaction get validated.

Steps to reproduce

StellarSdk.Network.useTestNetwork()
var server = new StellarSdk.Server('https://horizon-testnet.stellar.org')
var account1 = StellarSdk.Keypair.random()
var account2 = StellarSdk.Keypair.random()

function fundAccount (publicKey) {
  return new Promise(function (resolve, reject) {
    const xhr = new XMLHttpRequest()
    xhr.open('GET', 'https://friendbot.stellar.org/?addr=' + publicKey, true)
    xhr.send()
    xhr.onloadend = function () {
      if (xhr.readyState === 4 && xhr.status === 200) resolve()
      else reject()
    }
  })
}

console.log('Fund account1')
fundAccount(account1.publicKey())
  .then(function() {
    console.log('Fund account2')
    return fundAccount(account2.publicKey())
  })
  .then(function() {
    console.log('Set account2 as signer for account1')
    return server.loadAccount(account1.publicKey())
  })
  .then(function(account) {
    var tx = new StellarSdk.TransactionBuilder(account)
      .addOperation(StellarSdk.Operation.setOptions({
        signer: { weight: 1, ed25519PublicKey: account2.publicKey() }
      }))
      .build()
    tx.sign(account1)
    return server.submitTransaction(tx)
  })
  .then(function() {
    console.log('Sign a transaction with both account1 & account2 and send')
    return server.loadAccount(account1.publicKey())
  })
  .then(function(account) {
    console.log(account)
    var tx = new StellarSdk.TransactionBuilder(account)
      .addOperation(StellarSdk.Operation.setOptions({}))
      .build()
    tx.sign(account1)
    tx.sign(account2)
    return server.submitTransaction(tx)
  })
  .then(console.log)
  .catch(console.log)

Failing to run the quickstart docker image

Hi,

I'm trying to run the quickstart docker image (https://hub.docker.com/r/stellar/quickstart/)
with docker run --rm -it -p "8000:8000" --name stellar stellar/quickstart --testnet.
However I'm getting this:

running `/start --testnet'
pids are [7]

Starting Stellar Quickstart

mode: ephemeral
network: testnet (Test SDF Network ; September 2015)
postgres user: stellar
postgres password: XgaJqIQ8B3JiYwQk
finalize-pgpass: ok
init-postgres: failed!

exited 7

The only thing I've done are pulling the image and running this command, so I really don't know. Any idea where I should look?

Thanks!

Unable to start a persistent box

I started a container using the readme instructions but it seems to be crashing and nothing shows in the logs.

$ docker run -d -v "/str:/opt/stellar" -p "8000:8000" --name stellar stellar/quickstart --pubnet

$ docker container ls -al
CONTAINER ID        IMAGE                COMMAND                  CREATED             STATUS                     PORTS               NAMES
7bda77b07a53        stellar/quickstart   "/init -- /start -..."   5 seconds ago       Exited (0) 4 seconds ago                       stellar

$ docker logs stellar
running `/start --pubnet'
pids are [5]

Starting Stellar Quickstart

mode: persistent
network: pubnet (Public Global Stellar Network ; September 2015)
postgres: config directory exists, skipping copy
supervisor: config directory exists, skipping copy
stellar-core: config directory exists, skipping copy
horizon: config directory exists, skipping copy
postgres user: stellar
exited 5

Ubuntu 16.04.3 LTS

Recommended way for updating container in standalone mode

Hello,

I've run docker container from stellar/quickstart image some time ago (tag: 12.3) and right now I'm trying to update it using version horizon-0.13.1. Is is possible to do it in simple way? When I try to use volume from version 12.3 none of services maintained by supervisord even start.

Any helpful recommendations are welcomed.

Error while trying to run Persistent Mode

docker run --rm -it -p "8000:8000" -v "/Users:/opt/stellar" --name stellar stellar/quickstart --testnet
running `/start --testnet'
pids are [5]

Starting Stellar Quickstart

mode: persistent
network: testnet (Test SDF Network ; September 2015)
rsync: mkdir "/opt/stellar/postgresql" failed: Permission denied (13)
rsync error: error in file IO (code 11) at main.c(674) [Receiver=3.1.1]
exited 5

Peer rejections on core

Fresh install on a Ubuntu 16.04.3 x64 Digital Ocean droplet. Ran through the same process yesterday and it was working fine. Today it seems wrecked. Any ideas?

docker run --rm -d \
  -v "/home/tyler/stellar--test:/opt/stellar" \
  -p "5432:5432" \
  -p "8000:8000" \
  --name stellar--test \
  stellar/quickstart --testnet
starting core...
2018-01-31T21:06:33.277 GBAUN [default INFO] Starting stellar-core v9.1.0
2018-01-31T21:06:33.277 GBAUN [default INFO] Config from /opt/stellar/core/etc/stellar-core.cfg
2018-01-31T21:06:33.278 GBAUN [Database INFO] Connecting to: postgresql://dbname=core host=localhost user=stellar password=********
2018-01-31T21:06:33.290 GBAUN [SCP INFO] LocalNode::LocalNode@GBAUN qSet: 273af2
2018-01-31T21:06:33.290 GBAUN [default INFO] Listening on 0.0.0.0:11626 for HTTP requests
2018-01-31T21:06:33.292 GBAUN [History INFO] Archive 'cache' has 'get' command only, will not be written
2018-01-31T21:06:33.292 GBAUN [History INFO] Archive 'h1' has 'get' command only, will not be written
2018-01-31T21:06:33.292 GBAUN [History INFO] Archive 'h2' has 'get' command only, will not be written
2018-01-31T21:06:33.292 GBAUN [History INFO] Archive 'h3' has 'get' command only, will not be written
2018-01-31T21:06:33.292 GBAUN [History WARNING] No writable archives configured, history will not be written.
2018-01-31T21:06:33.293 GBAUN [default INFO] Loading last known ledger
2018-01-31T21:06:33.295 GBAUN [Ledger INFO] Loaded last known ledger: [seq=1, hash=63d98f]
2018-01-31T21:06:33.296 GBAUN [default INFO] Performing maintenance
2018-01-31T21:06:33.297 GBAUN [History INFO] Trimming history <= ledger 0 (rmin=4294967295, qmin=1, lmin=0)
2018-01-31T21:06:35.367 GBAUN [Overlay INFO] New connected peer 54.161.82.181:11625
2018-01-31T21:06:35.370 GBAUN [Overlay INFO] New connected peer 54.211.174.177:11625
2018-01-31T21:06:35.372 GBAUN [Overlay INFO] New connected peer 54.160.175.7:11625
2018-01-31T21:06:35.393 GBAUN [Overlay WARNING] Received error (ERR_LOAD): peer rejected
2018-01-31T21:06:35.393 GBAUN [Overlay INFO] Dropping peer [email protected]:11625
2018-01-31T21:06:35.394 GBAUN [Overlay WARNING] Received error (ERR_LOAD): peer rejected
2018-01-31T21:06:35.394 GBAUN [Overlay INFO] Dropping peer [email protected]:11625
2018-01-31T21:06:35.395 GBAUN [Overlay WARNING] Received error (ERR_LOAD): peer rejected
2018-01-31T21:06:35.395 GBAUN [Overlay INFO] Dropping peer [email protected]:11625
2018-01-31T21:06:38.375 GBAUN [Overlay INFO] New connected peer 54.211.174.177:11625
2018-01-31T21:06:38.398 GBAUN [Overlay WARNING] Received error (ERR_LOAD): peer rejected
2018-01-31T21:06:38.398 GBAUN [Overlay INFO] Dropping peer [email protected]:11625
2018-01-31T21:06:44.381 GBAUN [Overlay INFO] New connected peer 54.160.175.7:11625
2018-01-31T21:06:44.402 GBAUN [Overlay WARNING] Received error (ERR_LOAD): peer rejected
2018-01-31T21:06:44.403 GBAUN [Overlay INFO] Dropping peer [email protected]:11625
2018-01-31T21:06:50.385 GBAUN [Overlay INFO] New connected peer 54.161.82.181:11625
2018-01-31T21:06:50.408 GBAUN [Overlay WARNING] Received error (ERR_LOAD): peer rejected
2018-01-31T21:06:50.408 GBAUN [Overlay INFO] Dropping peer [email protected]:11625
2018-01-31T21:06:56.389 GBAUN [Overlay INFO] New connected peer 54.161.82.181:11625
2018-01-31T21:06:56.413 GBAUN [Overlay WARNING] Received error (ERR_LOAD): peer rejected
2018-01-31T21:06:56.413 GBAUN [Overlay INFO] Dropping peer [email protected]:11625
2018-01-31T21:07:08.295 GBAUN [Herder INFO] Lost track of consensus
2018-01-31T21:07:08.295 GBAUN [Herder INFO] Out of sync context: {
   "queue" : null,
   "you" : "GBAUNCJU6HFYEZ555Z2U2DM3T64SHHFMAACPXBAGPLDPY47H4ESZVTTW"
}

2018-01-31T21:07:17.398 GBAUN [Overlay INFO] New connected peer 54.211.174.177:11625
2018-01-31T21:07:17.420 GBAUN [Overlay WARNING] Received error (ERR_LOAD): peer rejected
2018-01-31T21:07:17.420 GBAUN [Overlay INFO] Dropping peer [email protected]:11625
2018-01-31T21:07:20.401 GBAUN [Overlay INFO] New connected peer 54.211.174.177:11625
2018-01-31T21:07:20.423 GBAUN [Overlay WARNING] Received error (ERR_LOAD): peer rejected
2018-01-31T21:07:20.423 GBAUN [Overlay INFO] Dropping peer [email protected]:11625
2018-01-31T21:07:23.404 GBAUN [Overlay INFO] New connected peer 54.160.175.7:11625
2018-01-31T21:07:23.427 GBAUN [Overlay WARNING] Received error (ERR_LOAD): peer rejected
2018-01-31T21:07:23.427 GBAUN [Overlay INFO] Dropping peer [email protected]:11625
2018-01-31T21:07:29.408 GBAUN [Overlay INFO] New connected peer 54.161.82.181:11625
2018-01-31T21:07:29.432 GBAUN [Overlay WARNING] Received error (ERR_LOAD): peer rejected
2018-01-31T21:07:29.432 GBAUN [Overlay INFO] Dropping peer [email protected]:11625
2018-01-31T21:07:50.417 GBAUN [Overlay INFO] New connected peer 54.161.82.181:11625
2018-01-31T21:07:50.440 GBAUN [Overlay WARNING] Received error (ERR_LOAD): peer rejected
2018-01-31T21:07:50.440 GBAUN [Overlay INFO] Dropping peer [email protected]:11625
2018-01-31T21:08:08.424 GBAUN [Overlay INFO] New connected peer 54.211.174.177:11625
2018-01-31T21:08:08.446 GBAUN [Overlay WARNING] Received error (ERR_LOAD): peer rejected
2018-01-31T21:08:08.446 GBAUN [Overlay INFO] Dropping peer [email protected]:11625
2018-01-31T21:08:14.428 GBAUN [Overlay INFO] New connected peer 54.160.175.7:11625
2018-01-31T21:08:14.450 GBAUN [Overlay WARNING] Received error (ERR_LOAD): peer rejected
2018-01-31T21:08:14.450 GBAUN [Overlay INFO] Dropping peer [email protected]:11625
2018-01-31T21:08:23.434 GBAUN [Overlay INFO] New connected peer 54.161.82.181:11625
2018-01-31T21:08:23.456 GBAUN [Overlay WARNING] Received error (ERR_LOAD): peer rejected

Make sure build fails when something is broken

Example: https://hub.docker.com/r/stellar/quickstart/builds/bnbjbnqxbsjgxosd5djhit9/

Horizon path was invalid but the build on Docker Hub succeeded.

```gzip: stdin: unexpected end of file
tar: Child returned status 1
tar: Error is not recoverable: exiting now
mv: cannot stat '/horizon-v0.12.2-linux-amd64/horizon': No such file or directory
�[0m
�[91mchmod: cannot access '/usr/local/bin/horizon': No such file or directory
�[0m

Done installing stellar-core and horizon...```

What level of participation by default?

Perhaps a newb question but I’m curious what level of participation comes by default when setting up a docker image.

Then how would one adjust that level after setting things up initially?

Thanks!

18f44820-0e78-4bf7-8410-6b3c4a677c48

Stellar/quickstart container fails with "exited 8"

Using Docker version 18.06.1-ce, build e68fc7a, starting container with the following command:

docker run -v "/home/stellar/data:/opt/stellar" \
    -p "8002:8000" \
    -p "11626:11626" \
    -p "11625:11625" \
    --name stellar \
    stellar/quickstart --pubnet

Fails with exited 8:

running `/start --pubnet'
pids are [8]

Starting Stellar Quickstart

mode: persistent
network: pubnet (Public Global Stellar Network ; September 2015)
postgres user: stellar
exited 8

How can we debug the reason of the failure?

Running horizon with all previous data

I recently started up this docker image and it is working well. However, it seems like the data in the horizon database is only data from after I started the container. Is there any way to start the container with the option to get all the previous data as well?

The resource at the url requested was not found. This is usually occurs for one of two reasons: The url requested is not valid, or no data in our database could be found with the parameters provided.

docker run --rm -it -p "8000:8000" -v "/home/scott/stellar:/opt/stellar" --name stellar stellar/quickstart:testing --testnet

http://192.168.2.153:8000/ledgers/10520365/transactions

{
    "type": "https://stellar.org/horizon-errors/not_found",
    "title": "Resource Missing",
    "status": 404,
    "detail": "The resource at the url requested was not found.  This is usually occurs for one of two reasons:  The url requested is not valid, or no data in our database could be found with the parameters provided."
}

http://192.168.2.153:8000/assets

{
    "_links": {
        "self": {
            "href": "http://192.168.2.153:8000/assets?cursor=&limit=10&order=asc"
        },
        "next": {
            "href": "http://192.168.2.153:8000/assets?cursor=&limit=10&order=asc"
        },
        "prev": {
            "href": "http://192.168.2.153:8000/assets?cursor=&limit=10&order=desc"
        }
    },
    "_embedded": {
        "records": []
    }
}

broken wont run

this is not working out of box for sure..I found that it didn't create none of the env variables defined in start file thats why supervisors didnt run. By manually firing up supervisord got the following log , but PostgreSQL will exit ..happens both in testnet and pubnet mode.. any idea how to fix and why postgress would quit..nothing on pg log either
root@7836ab23988c:/# 2018-08-04 00:29:15,812 CRIT Supervisor running as root (no user in config file)
2018-08-04 00:29:15,935 INFO RPC interface 'supervisor' initialized
2018-08-04 00:29:15,935 CRIT Server 'unix_http_server' running without any HTTP authentication checking
2018-08-04 00:29:15,936 INFO supervisord started with pid 25
2018-08-04 00:29:16,940 INFO spawned: 'postgresql' with pid 28
2018-08-04 00:29:16,943 INFO spawned: 'stellar-core' with pid 29
2018-08-04 00:29:16,946 INFO spawned: 'horizon' with pid 30
2018-08-04 00:29:17,926 INFO success: postgresql entered RUNNING state, process has stayed up for > than 0 seconds (startsecs)
2018-08-04 00:29:18,107 INFO success: stellar-core entered RUNNING state, process has stayed up for > than 1 seconds (startsecs)
2018-08-04 00:29:18,107 INFO success: horizon entered RUNNING state, process has stayed up for > than 1 seconds (startsecs)
2018-08-04 00:29:18,136 INFO exited: postgresql (exit status 2; expected)

How to run docker over a secure server using letsencrypt?

Need to start Horizon server over a secure network.
Following Readme-dok tried

`docker run --rm -it -p "8000:8000" --name stellar stellar/quickstart --testnet`

this start my horioz over port 8000 with http server. I need https server. For this tried out few things like

docker run --rm -it -p "8000:443" --name stellar stellar/quickstart --testnet

`docker run --rm -it -p "8000:8000" --name stellar stellar/quickstart --testnet docker --tlsverify --tlscacert=ca.pem --tlscert=cert.pem --tlskey=key.pem` 

And few more with these ssl keys. Tried to redirect https calls from server to http call using nginx, however failed to do so.

Please provide a way to start server over secure server.

stopping stellar-core doesn't

root@93abfd9dbeda:/# pstree
init---supervisord-+-horizon---7*[{horizon}]
                   |-postgres---10*[postgres]
                   `-start---stellar-core---{stellar-core}
root@93abfd9dbeda:/# supervisorctl stop stellar-core
stellar-core: stopped
root@93abfd9dbeda:/# pstree
init-+-stellar-core---{stellar-core}
     `-supervisord-+-horizon---7*[{horizon}]
                   `-postgres---10*[postgres]

When I connect to testnet, it doesn't appear to connect to the network

I start up the docker quickstart container using the command from the readme:

$ docker run --rm -it -p "8000:8000" --name stellar stellar/quickstart --testnet
running `/start --testnet'
pids are [7]

Starting Stellar Quickstart

mode: ephemeral
network: testnet (Test SDF Network ; September 2015)
postgres user: stellar
postgres password: Xb5HlKSR7E32NIVJ
finalize-pgpass: ok
init-postgres: ok
postgres: up
create-horizon-db: ok
create-core-db: ok
stellar-postgres-user: ok
chown-core: ok
finalize-core-config: ok
init-core-db: ok
chown-horizon: ok
init-horizon-db: ok
postgres: down
starting supervisor
2018-03-28 15:43:24,752 CRIT Supervisor running as root (no user in config file)
2018-03-28 15:43:24,760 INFO RPC interface 'supervisor' initialized
2018-03-28 15:43:24,760 CRIT Server 'unix_http_server' running without any HTTP authentication checking
2018-03-28 15:43:24,760 INFO supervisord started with pid 7
2018-03-28 15:43:25,765 INFO spawned: 'postgresql' with pid 148
2018-03-28 15:43:25,768 INFO spawned: 'stellar-core' with pid 149
2018-03-28 15:43:25,770 INFO spawned: 'horizon' with pid 150
2018-03-28 15:43:26,859 INFO success: postgresql entered RUNNING state, process has stayed up for > than 1 seconds (startsecs)
2018-03-28 15:43:26,859 INFO success: stellar-core entered RUNNING state, process has stayed up for > than 1 seconds (startsecs)
2018-03-28 15:43:26,859 INFO success: horizon entered RUNNING state, process has stayed up for > than 1 seconds (startsecs)

It looks like everything is correct. It says it's connecting to the testnet. And I can curl it:

$ curl localhost:8000/assets
{
  "_links": {
    "self": {
      "href": "http://localhost:8000/assets?cursor=\u0026limit=10\u0026order=asc"
    },
    "next": {
      "href": "http://localhost:8000/assets?cursor=\u0026limit=10\u0026order=asc"
    },
    "prev": {
      "href": "http://localhost:8000/assets?cursor=\u0026limit=10\u0026order=desc"
    }
  },
  "_embedded": {
    "records": []
  }
}

The issue is that this is not the same as the actually test net:

$ curl https://horizon-testnet.stellar.org/assets
{
  "_links": {
    "self": {
      "href": "https://horizon-testnet.stellar.org/assets?cursor=\u0026limit=10\u0026order=asc"
    },
    "next": {
      "href": "https://horizon-testnet.stellar.org/assets?cursor=00acc1_GD4SAUKGB6GE2Q25H2CZMZ3BSP5CVYIY2LQYJDCFNNICR473AVL7IYH5_credit_alphanum12\u0026limit=10\u0026order=asc"
    },
    "prev": {
      "href": "https://horizon-testnet.stellar.org/assets?cursor=004d40_GD4SAUKGB6GE2Q25H2CZMZ3BSP5CVYIY2LQYJDCFNNICR473AVL7IYH5_credit_alphanum12\u0026limit=10\u0026order=desc"
    }
  },
  "_embedded": {
    "records": [
      {
        "_links": {
          "toml": {
            "href": ""
          }
        },
        "asset_type": "credit_alphanum12",
        "asset_code": "004d40",
        "asset_issuer": "GD4SAUKGB6GE2Q25H2CZMZ3BSP5CVYIY2LQYJDCFNNICR473AVL7IYH5",
        "paging_token": "004d40_GD4SAUKGB6GE2Q25H2CZMZ3BSP5CVYIY2LQYJDCFNNICR473AVL7IYH5_credit_alphanum12",
        "amount": "52269.0000000",
        "num_accounts": 789,
        "flags": {
          "auth_required": false,
          "auth_revocable": false
        }
      },
...

Which does return assets. Any ideas?

how to manage stellar with supervisor?

I started my test net on ephermeral (Do i need to use persistence mode?) mode using the following command
docker run --rm -it -p "8000:8000" --name stellar stellar/quickstart --testnet
what do i need to update on supervisord.conf to work with supervisor ?
I typed supervisorctl but i have no way to restart horizon for example and i do not see anything like following

Restarting services
Services within the quickstart container are managed using supervisord and we recommend you use supervisor's shell to interact with running services. To launch the supervisor shell, open an interactive shell to the container and then run supervisorctl. You should then see a command prompt that looks like:

horizon RUNNING pid 143, uptime 0:01:12
postgresql RUNNING pid 126, uptime 0:01:13
stellar-core RUNNING pid 125, uptime 0:01:13
supervisor>
From this prompt you can execute any of the supervisord commands:

restart horizon

supervisor> restart horizon

bitpattern01

ManageDataOp fails v10 (Docker only, not in testnet).

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.