Area: Ingestion Issues
Sub-Area: CLI Configuration
Issue
The DataHub CLI attempts to connect to localhost:8080 instead of the properly configured DataHub instance, resulting in connection refused errors during ingestion. This commonly occurs when the CLI configuration is set to default localhost values rather than the actual DataHub server endpoint.
Error Messages
HTTPConnectionPool(host='localhost', port=8080): Max retries exceeded with url: /config (Caused by NewConnectionError("HTTPConnection(host='localhost', port=8080): Failed to establish a new connection: [Errno 111] Connection refused"))
You Might Be Asking
- Why is my CLI trying to connect to localhost when I have DataHub Cloud?
- How do I configure the CLI to use my DataHub Cloud instance?
- What's the correct GMS endpoint for my DataHub deployment?
Solution
-
Check your current CLI configuration:
This will show your current server configuration.datahub version -
Update CLI configuration for DataHub Cloud:
Replacedatahub init --server https://.acryl.io/gms <your-org>with your actual organization name. -
For self-hosted deployments, use your actual server URL:
datahub init --server http://:8080 -
Alternatively, update your ingestion recipe directly:
source: type: "your-source-type" config: # your source config sink: type: "datahub-rest" config: server: "https://.acryl.io/gms" # Update this line token: " " -
Verify the configuration:
datahub check connection -
If using environment variables, ensure they point to the correct endpoint:
export DATAHUB_GMS_URL=https://.acryl.io/gms export DATAHUB_GMS_TOKEN=
Additional Notes
This issue commonly occurs after CLI updates where configuration may reset to default localhost values. For DataHub Cloud customers, backend services like GMS are managed by Acryl and never exposed on localhost. Always ensure your CLI configuration points to your actual DataHub instance endpoint. The ~/.datahubenv file stores CLI configuration and may need to be updated if manually edited.
Related Documentation
Tags: cli, connection, localhost, configuration, ingestion, gms, datahub-cloud, connection-refused, endpoint