amor71 / LiuAlgoTrader

Framework for algorithmic trading

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

OSError: Multiple exceptions: [Errno 61] Connect call failed ('::1', 5432, 0, 0), [Errno 61] Connect call failed ('127.0.0.1', 5432)

wmelton opened this issue · comments

commented

Describe the bug
Clean install on MacOS running Docker Desktop 4.15. For reasons I'm unable to figure out, streamlit, portfolio create, etc. are unable to connect to PostGres.

I've verified Docker image started, PostGres is running, and no errors are present in logs, but Liu will not successfully connect.

image

Desktop (please complete the following information):

  • MacOS Monterey
  • 12.2.1

Thank you for joining LiuAlgoTrader community and submitting your first issue. Feel free to check out Liu community: https://gitter.im/LiuAlgoTrader/community

@wmelton is that log from your docker?!

commented

@amor71 no, that's from your package attempting to connect to the postgres instance launched via docker compose at run time.

@wmelton after you run liu quickstart there are details at the end. among it is to run environment variables, which set the port to 5400, your example is looking for port 5431 which makes me think we didn't follow all steps, and hence you can't connect to the Postgres running on the docker.

commented

@amor71 so it looks like the env_vars.sh script does set it up, however, I'm pretty sure the liu_samples folder only gets created if you tell the quickstart prompt to include samples. Might be a worthy update to create the env_var.sh file in the root of the project.

After running env_vars.sh the issue is resolved. Thanks!