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

Stacks-signer cannot resolve hostnames for node_host config #4466

Closed
zone117x opened this issue Mar 1, 2024 · 1 comment · Fixed by #4475
Closed

Stacks-signer cannot resolve hostnames for node_host config #4466

zone117x opened this issue Mar 1, 2024 · 1 comment · Fixed by #4475

Comments

@zone117x
Copy link
Member

zone117x commented Mar 1, 2024

The node_host value in the stacks-signer toml config can only be an IP:port and fails to resolve if given a hostname.

This makes the signer difficult to use in many environments. For example, here's a work-around required for a very simple docker-compose setup:

  stacks-signer-2:
    build:
      context: .
      dockerfile: Dockerfile.stacks-node
    volumes:
      - ./signer-0.toml:/root/config.toml.in
    environment:
      STACKS_NODE_HOST: stacks-node:20443
      STACKS_SIGNER_ENDPOINT: 0.0.0.0:30002
      STACKS_CORE_EVENT_PORT: 3700
      STACKS_SIGNER_LOG_LEVEL: debug
      SIGNER_PRIVATE_KEY: ce109fee08860bb16337c76647dcbc02df0c06b455dd69bcf30af74d4eedd19301
    entrypoint:
      - /bin/bash
      - -c
      - |
        set -e
        # signer cannot resolve hostnames..
        export STACKS_NODE_HOST=$$(getent hosts $${STACKS_NODE_HOST%%:*} | awk '{ print $1 }'):$${STACKS_NODE_HOST##*:}
        echo "Updated STACKS_NODE_HOST to $$STACKS_NODE_HOST"
        envsubst < config.toml.in > config.toml
        exec stacks-signer run --config config.toml --reward-cycle 1
@zone117x
Copy link
Member Author

zone117x commented Mar 5, 2024

Fixed by #4475

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

Successfully merging a pull request may close this issue.

1 participant