Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Missing network passphrase in example compose file #12

Open
todkap opened this issue Apr 26, 2019 · 1 comment
Open

Missing network passphrase in example compose file #12

todkap opened this issue Apr 26, 2019 · 1 comment

Comments

@todkap
Copy link

todkap commented Apr 26, 2019

When trying to start docker compose, I was seeing the following in the logs...

stellar-horizon-postgres_1 | AS $$ SELECT $1 $$
stellar-horizon_1 | 2019/04/26 11:09:11 Invalid config: network-passphrase is blank. Please specify --network-passphrase on the command line or set the NETWORK_PASSPHRASE environment variable.
docker-stellar-horizon_stellar-horizon_1 exited with code 1

If I add - NETWORK_PASSPHRASE=Public Global Stellar Network ; September 2015 to the horizon ENV...

 stellar-horizon:
    image: satoshipay/stellar-horizon:0.17.2
    restart: on-failure
    ports:
    - 8000:8000
    environment:
      - DATABASE_URL=postgres://postgres@stellar-horizon-postgres/stellar-horizon?sslmode=disable
      - STELLAR_CORE_DATABASE_URL=postgres://postgres@stellar-core-postgres/stellar-core?sslmode=disable
      - STELLAR_CORE_URL=http://stellar-core:11626
      - NETWORK_PASSPHRASE=Public Global Stellar Network ; September 2015
      - INGEST=true

and now I can access the server on http://localhost:8000/

@gluk73
Copy link

gluk73 commented Sep 17, 2019

How did you provided password for connection to Horizon? From where it takes password?
I installed postgres on local Linux and disabled both dockers that run db for core and for horizon. Instead of that I point both of them to my local db. The core is connecting to db and Horizon screams that connection failed due to password auth failed.

This is how the end of my .yml file looks like. So it is not clear from where Horizon takes password for its db.

stellar-horizon:
image: satoshipay/stellar-horizon:0.17.2
restart: on-failure
ports:
- 8000:8000
environment:
- DATABASE_URL=postgres://[email protected]/stellar_horizon?sslmode=disable
- STELLAR_CORE_DATABASE_URL=postgres://[email protected]/stellar_core?sslmode=disable
- STELLAR_CORE_URL=http://stellar-core:11626
- INGEST=true
- NETWORK_PASSPHRASE=Public Global Stellar Network ; September 2015

This is log i'm getting

root@virtualserver01:~# docker-compose -f /mnt/xvdc/github/docker-stellar-horizon/conf_horizon_docker-compose_extdb.yml up
Starting docker-stellar-horizon_stellar-core_1 ... done
Starting docker-stellar-horizon_stellar-horizon_1 ... done
Attaching to docker-stellar-horizon_stellar-horizon_1, docker-stellar-horizon_stellar-core_1
stellar-horizon_1 | Initializing Horizon database...
stellar-horizon_1 | 2019/09/17 00:03:39 connect failed: pq: password authentication failed for user "postgres"
stellar-horizon_1 | Horizon database initialization failed (possibly because it has been done before)
stellar-horizon_1 | 2019/09/17 00:03:39 pq: password authentication failed for user "postgres"
stellar-core_1 | Core db has already been initialized.
stellar-core_1 | Not initializing history archives (set INITIALIZE_HISTORY_ARCHIVES=true if you want to initialize them).
stellar-core_1 | Using DEPRECATED command-line syntax.
stellar-core_1 | Please refer to documentation for new syntax.
stellar-core_1 |
stellar-core_1 | 2019-09-17T00:03:41.160 [default INFO] Assigning calculated value of 1 to FAILURE_SAFETY
stellar-core_1 | 2019-09-17T00:03:41.165 GC2LC [default INFO] Starting stellar-core v10.2.0
stellar-core_1 | 2019-09-17T00:03:41.166 GC2LC [Database INFO] Connecting to: postgresql://dbname=stellar_core user=postgres password=******** host=10.165.7.173
stellar-core_1 | 2019-09-17T00:03:41.170 GC2LC [SCP INFO] LocalNode::LocalNode@GC2LC qSet: 1f303f
stellar-core_1 | 2019-09-17T00:03:41.170 GC2LC [default INFO] Listening on 0.0.0.0:11626 for HTTP requests

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants