Area: Deployment
Sub-Area: Docker
Applies to: OSS
This article applies to self-hosted DataHub that you start with datahub docker quickstart. DataHub Cloud customers don't run Docker, so it doesn't apply to Cloud.
Issue
DataHub fails to start with datahub docker quickstart, services can't reach each other, or the deployment is unstable. Common causes are too few Docker resources, port conflicts and a stale install.
A documented example is a MySQL port conflict:
ERROR: for mysql Cannot start service mysql: ... Error starting userland proxy: listen tcp 0.0.0.0:3306: bind: address already in use
You Might Be Asking
- How many resources does DataHub need for Docker?
- Why won't DataHub start with
datahub docker quickstart? - How do I change a port that is already in use?
- How do I reset a broken quickstart?
Cause
- Docker has fewer resources than the documented tested configuration.
- A host port that quickstart publishes is already in use, for example 3306 for MySQL.
- Local state from an earlier run is broken.
Solution
-
Give Docker enough resources. The documented tested configuration is 2 CPUs, 8GB RAM, 2GB swap and 13GB disk space. See the Quickstart guide.
-
Start DataHub with the CLI. Install it with
python3 -m pip install --upgrade acryl-datahuborbrew install datahub-project/tap/datahub. Python 3.10 or later is required. Then run:datahub docker quickstartTo pin a version, run
datahub docker quickstart --version <tag>, for example--version v1.6.0. -
Check health with
datahub docker check, or list containers withdocker container ls. Thedatahub-system-updatejob runs once and exits, so it is not in the running list. -
Find the service. The quickstart compose project is named
datahub. Its services aredatahub-gms-quickstart,frontend-quickstart,kafka-broker,mysql,opensearch,datahub-actions-quickstartandsystem-update-quickstart. There is no service nameddatahub-gms,datahub-frontend-react,elasticsearchorkafka. Use the real container names fromdocker container lswithdocker logs <container>. -
Know the internal hostnames. Inside the quickstart network, GMS reaches search at host
search, Kafka atbroker:29092and MySQL atmysql:3306. The namesdatahub-gmsanddatahub-frontend-reactare hostnames, not service names. -
Fix port conflicts. Quickstart publishes these host ports: 3306 (MySQL), 9200 (OpenSearch), 9092 (Kafka), 9002 (frontend), 8080 (GMS) and 4319 (GMS management endpoint). To find what holds a port, run
sudo lsof -i :3306, then stop that process withkill -15 <PID>. Or change the quickstart port with a flag, for example:datahub docker quickstart --mysql-port 53306Run
datahub docker quickstart --helpfor the full list. For GMS, set an environment variable:DATAHUB_MAPPED_GMS_PORT=58080 datahub docker quickstartPort 4319 is fixed and has no override, so it must be free. Quickstart doesn't use ZooKeeper (2181) or a standalone Schema Registry (8081). See Quickstart troubleshooting.
-
Don't replace memory settings casually. Quickstart sets GMS
JAVA_OPTSto-Xms1g -Xmx1g -Dhazelcast.wait.seconds.before.join=0. If you replace that value, you drop the hazelcast flag. The search container is OpenSearch, and its heap is set withOPENSEARCH_JAVA_OPTS(-Xms768m -Xmx1024m). If containers keep exiting, compare your Docker allocation with the tested configuration in step 1. -
Reset a broken install. Run:
datahub docker nukeThis removes the containers, volumes and networks of the DataHub compose project, so it deletes your data. To keep the data volumes, run
datahub docker nuke --keep-data. Then start again withdatahub docker quickstart. See the Quickstart guide. If you need to free general Docker space, the troubleshooting guide usesdocker system prune. It removes all unused containers, networks and images on the host, not only DataHub's. -
To keep your data across a reset, back it up first with
datahub docker quickstart --backup. The default file is~/.datahub/quickstart/backup.sql. Restore it withdatahub docker quickstart --restore, which restores the database and the search indexes.
Additional Notes
Quickstart (Docker) is not for production. For production, use Kubernetes with the Helm charts. After startup, the UI is at http://localhost:9002 with login datahub / datahub.