diff --git a/components/playground/playground.go b/components/playground/playground.go index ece66c1c5d..a3b529a3d4 100644 --- a/components/playground/playground.go +++ b/components/playground/playground.go @@ -380,7 +380,7 @@ func (p *Playground) sanitizeConfig(boot instance.Config, cfg *instance.Config) cfg.ConfigPath = boot.ConfigPath } if cfg.Host == "" { - cfg.Host = boot.ConfigPath + cfg.Host = boot.Host } path, err := getAbsolutePath(cfg.ConfigPath) @@ -610,6 +610,9 @@ func (p *Playground) addInstance(componentID string, cfg instance.Config) (ins i host = cfg.Host } + // use the advertised host instead of 0.0.0.0 + host = instance.AdvertiseHost(host) + switch componentID { case "pd": inst := instance.NewPDInstance(cfg.BinPath, dir, host, cfg.ConfigPath, id)