bitflicker64 opened a new pull request, #2952:
URL: https://github.com/apache/incubator-hugegraph/pull/2952
## Purpose of the PR
Fix single node Docker deployment failing on macOS and Windows due to Linux
only host networking.
close #2951
## Main Changes
* Remove network_mode host from single node docker compose setup
* Use default bridge networking
* Add explicit port mappings
* 8080 Server HTTP
* 8520 Store HTTP
* 8620 PD HTTP
* Add configuration volume mounts
* docker pd-conf
* docker store-conf
* docker server-conf
* Replace localhost and non routable addresses with container hostnames
* PD grpc host set to pd
* Store grpc host set to store
* Server pd peers set to pd 8686
* Update healthcheck endpoints
## Problem
The original single node Docker configuration uses network_mode host.
This only works on native Linux. Docker Desktop on macOS and Windows does
not implement host networking the same way. Containers start but HugeGraph
services advertise incorrect addresses such as 127.0.0.1 or 0.0.0.0.
Resulting failures:
* Server stuck in loop waiting for storage backend
* PD client UNAVAILABLE io exception errors
* Store reports zero partitions
* Cluster never becomes usable even though containers are running
The issue is not process failure but invalid service discovery and
advertised endpoints.
## Root Cause
* network_mode host is Linux specific
* Docker Desktop falls back to bridge networking
* HugeGraph components still advertise localhost style addresses
* Other containers cannot route to those addresses
## Solution
Switch to bridge networking and advertise container resolvable hostnames.
Docker DNS resolves service names automatically. Services bind normally
while exposing correct internal endpoints.
## Verification
Observed behavior after changes on Docker Desktop macOS:
**Container state**
```bash
docker ps --format "table {{.Names}}\t{{.Status}}\t{{.Ports}}"
server Up healthy 0.0.0.0:8080->8080
store Up healthy 0.0.0.0:8520->8520
pd Up healthy 0.0.0.0:8620->8620
```
**Server startup sequence**
```bash
Hugegraph server are waiting for storage backend
Initializing HugeGraph Store
Starting HugeGraphServer ... OK
Started
```
**Endpoints**
Server:
```bash
curl http://localhost:8080
```
Returns service metadata.
Store:
```bash
curl http://localhost:8520
```
Returns non zero leader and partition count:
```bash
{"leaderCount":12,"partitionCount":12}
```
PD:
```bash
curl http://localhost:8620
```
Returns expected auth response, confirming service availability.
Cluster becomes operational after initialization delay.
## Why This Works
* Bridge networking is cross platform
* Container names become stable service addresses
* No platform dependent networking behavior
* Services advertise routable endpoints
## Does this PR potentially affect the following parts
* [x] Modify configurations
* [ ] Dependencies
* [ ] The public API
* [ ] Other affects
* [ ] Nope
## Documentation Status
* [x] Doc No Need
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: [email protected]
For queries about this service, please contact Infrastructure at:
[email protected]
---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]