hummingbot / deploy

This repository provides various examples of how to deploy Hummingbot using Docker.
Apache License 2.0
79 stars 75 forks source link

Generating gateway certs does not work anymore #33

Closed Arnique closed 1 year ago

Arnique commented 1 year ago

Describe the bug I am using hummingbot_gateway_compose.

Everything seems to install fine, but when running hummingbot command gateway generate-certs fails in latest version i.e

File "/home/hummingbot/hummingbot/core/gateway/__init__.py", line 105, in get_gateway_paths raise EnvironmentError("CERTS_FOLDER, GATEWAY_CONF_FOLDER and GATEWAY_LOGS_FOLDER must be defined when " OSError: CERTS_FOLDER, GATEWAY_CONF_FOLDER and GATEWAY_LOGS_FOLDER must be defined when running as container.

I have tried to add those manually in compose then rebuild i.e

      - CERTS_FOLDER=/home/gateway/certs
      - GATEWAY_CONF_FOLDER=/home/gateway/conf
      - GATEWAY_LOGS_FOLDER=/home/gateway/logs

Command works and says that certs were copied to copied to home/hummingbot/.hummingbot-gateway/certs, but then new error arises in gateway:

Error: Error: ENOENT: no such file or directory, open './certs/server_key.pem'

Seems the certs are copied in the wrong directory since they do not sync in /gateway_files/certs

So I tried to add the volume in compose and rebuild but still no luck

      - "./gateway_files/certs:/home/hummingbot/.hummingbot-gateway/certs"

Steps To Reproduce

  1. Setup docker compose for hummingbot_gateway_compose
  2. Start hummingbot and run gateway generate-certs
  3. Observe behavior
rapcmia commented 1 year ago

Hi my setup works ok, you may want to:

- Setup docker compose file with latest image then `docker compose up -d`
- `docker attach container-name` then run `gateway generate_certs`
- Exit docker client then update `CONFIG-PASSWORD` and `GATEWAY_PASSPHRASE` on docker compose
- Relaunch compose file by:
    - `docker compose down` then `docker compose up -d`

image

Arnique commented 1 year ago

Thank this works in Mac. Unfortunately it still fails on Ubuntu.

Tried a clean install on Ubuntu and still getting:

File "/home/hummingbot/hummingbot/core/gateway/__init__.py", line 105, in get_gateway_paths raise EnvironmentError("CERTS_FOLDER, GATEWAY_CONF_FOLDER and GATEWAY_LOGS_FOLDER must be defined when " OSError: CERTS_FOLDER, GATEWAY_CONF_FOLDER and GATEWAY_LOGS_FOLDER must be defined when running as container.

Note that the environment vars mentioned here are not in the compose file.

rapcmia commented 1 year ago

Thanks for the response, Yes i am able to setup with the same steps on Ubuntu 22.04

image

Arnique commented 1 year ago

Thanks for the response, Yes i am able to setup with the same steps on Ubuntu 22.04

image

Something wrong with my setup then. I will try again