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

[I/O] InfluxDB adapter: Failed to establish a new connection: [Errno 111] Connection refused, when using Docker runtime #151

Closed
amotl opened this issue May 28, 2024 · 2 comments

Comments

@amotl
Copy link
Member

amotl commented May 28, 2024

Procedure

docker run -d --name crate -p 4200:4200 crate/crate:latest

docker run -d --name influxdb -p 8086:8086 \
    --env=DOCKER_INFLUXDB_INIT_MODE=setup \
    --env=DOCKER_INFLUXDB_INIT_USERNAME=user1 \
    --env=DOCKER_INFLUXDB_INIT_PASSWORD=secret1234 \
    --env=DOCKER_INFLUXDB_INIT_ORG=example \
    --env=DOCKER_INFLUXDB_INIT_BUCKET=testdrive \
    --env=DOCKER_INFLUXDB_INIT_ADMIN_TOKEN=token \
    influxdb:latest

alias ctk="docker run --rm -it ghcr.io/crate-workbench/cratedb-toolkit:latest ctk"
ctk load table influxdb2://example:token@localhost:8086/testdrive/demo --cratedb-sqlalchemy-url "crate://crate@localhost:4200/testdrive/demo"

Problem

urllib3.exceptions.NewConnectionError: <urllib3.connection.HTTPConnection object at 0x7f9ebfd32450>: Failed to establish a new connection: [Errno 111] Connection refused

References

@amotl
Copy link
Member Author

amotl commented May 28, 2024

Evaluation

When running all services in Docker, manually, like outlined above, you will need to address the service containers appropriately on behalf of corresponding host names.

For your recipe, that command, using the host names influxdb and crate, may help.

ctk load table \
  influxdb2://example:token@influxdb:8086/testdrive/demo \
  --cratedb-sqlalchemy-url "crate://crate@crate:4200/testdrive/demo"

Suggestions

  • Improve the documentation accordingly.
  • Use the "hostname" cratedb for the CrateDB container.

@amotl
Copy link
Member Author

amotl commented May 30, 2024

Summary

There have been a few connectivity quirks (bugs, ambiguities, you name it), which have been improved on behalf of corresponding patches.

Patches

References

@amotl amotl closed this as completed May 30, 2024
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

1 participant