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

persistent mode hangs on first startup #464

Closed
sreuland opened this issue Jun 23, 2023 · 11 comments · Fixed by #488 or #489
Closed

persistent mode hangs on first startup #464

sreuland opened this issue Jun 23, 2023 · 11 comments · Fixed by #488 or #489
Assignees
Labels

Comments

@sreuland
Copy link
Contributor

What version are you using?

stellar/quickstart:soroban-dev

What did you do?

docker run --rm -it -p 8000:8000 -e --name stellar -v "/workspace/qs:/opt/stellar" stellar/quickstart:soroban-dev --futurenet --enable-soroban-rpc --logs

What did you expect to see?

quickstart container finishes startup and is ready

What did you see instead?

quickstart hangs in startup

docker run --rm -it -p 8000:8000 -e --name stellar -v "/workspace/qs:/opt/stellar" stellar/quickstart:soroban-dev --futurenet --enable-soroban-rpc --logs
quickstart   | Starting Stellar Quickstart
quickstart   | mode: persistent
quickstart   | network: futurenet (Test SDF Future Network ; October 2022)
quickstart   | postgres user: stellar
... no more logs printed ...

start is getting stuck on the read prompt for pg password on init during persistent mode, a likely soultion would be to remove that prompt and add docs on README to recommend when using volume mount/persistent mode, to pass POSTGRES_PASSWORD env variable to docker instead via. --env-file

@sreuland sreuland added the bug label Jun 23, 2023
@leighmcculloch
Copy link
Member

leighmcculloch commented Jun 23, 2023

The issue is the interaction with the --logs, which is redirecting outputs and inputs. Probably the input is not being redirected correct. We should be able to fix this by fixing the input, without changing the way the password is collected.

@sreuland
Copy link
Contributor Author

yes, confirmed, If I remove --logs the prompt shows up on console, the interactive prompt also requires docker run -it the README describes some of this first time aspect when persistent mode, but it sounds fairly complex for someone to navigate correctly, whereas if we simplify and reduce this config path to be just the env variable mechanism, then it works consistently for any mode, i.e. background -d as well.

@leighmcculloch
Copy link
Member

+1 Simplifying it.

@nyetwurk
Copy link

nyetwurk commented Jul 10, 2023

For those folks that deploy via ansible, this is problematic even without --logs, since the ansible docker module can't handle input either.

@github-actions
Copy link

github-actions bot commented Aug 9, 2023

This issue is stale because it has been open for 30 days with no activity. It will be closed in 30 days unless the stale label is removed.

@github-actions github-actions bot added the stale label Aug 9, 2023
@nyetwurk
Copy link

nyetwurk commented Aug 9, 2023

Please do not close this issue.

@github-actions github-actions bot removed the stale label Aug 10, 2023
@github-actions
Copy link

This issue is stale because it has been open for 30 days with no activity. It will be closed in 30 days unless the stale label is removed.

@github-actions github-actions bot added the stale label Sep 10, 2023
@nyetwurk
Copy link

Do not close this issue.

@leighmcculloch
Copy link
Member

leighmcculloch commented Sep 14, 2023

For those folks that deploy via ansible, this is problematic even without --logs, since the ansible docker module can't handle input either.

@nyetwurk The container supports setting an environment variable, POSTGRES_PASSWORD, which will be used for the postgres password. In this case it will not prompt for a new password. You just need to use the -e option to set a password, or --env-file to do so via file.

@leighmcculloch leighmcculloch self-assigned this Sep 14, 2023
@nyetwurk
Copy link

nyetwurk commented Sep 14, 2023

Likely really only needs documentation then, IMO; setting POSTGRES_PASSWORD fixed the issue for us.

@leighmcculloch
Copy link
Member

I think we can do two things to improve this:

  1. Display an error message when persistent mode is in use, but no password is supplied. Delay capturing logs from services and the start script until after the setup is complete #488
  2. Delay capturing logs when using --logs, so that the password prompt is still displayed to the user correctly. Display an error message when in persistent mode and no password supplied or suppliable #489

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment