juicedata/juicefs · error
parse %s: %s
Error message
parse %s: %s
What it means
Returned by newEtcd when the etcd:// address URL cannot be parsed. The endpoint must be a valid URL (host list plus optional query parameters like cacert/key); the wrapped parse error shows the defect.
Source
Thrown at pkg/object/etcd.go:174
q := u.Query()
tsinfo.CAFile = q.Get("cacert")
tsinfo.CertFile = q.Get("cert")
tsinfo.KeyFile = q.Get("key")
tsinfo.ServerName = q.Get("server-name")
tsinfo.InsecureSkipVerify = q.Get("insecure-skip-verify") != ""
if tsinfo.CAFile != "" || tsinfo.CertFile != "" || tsinfo.KeyFile != "" || tsinfo.ServerName != "" {
return tsinfo.ClientConfig()
}
return nil, nil
}
func newEtcd(addr, user, passwd, token string) (ObjectStorage, error) {
if !strings.HasPrefix(addr, "etcd://") {
addr = "etcd://" + addr
}
u, err := url.Parse(addr)
if err != nil {
return nil, fmt.Errorf("parse %s: %s", addr, err)
}
hosts := strings.Split(u.Host, ",")
for i, h := range hosts {
h, _, err := net.SplitHostPort(h)
if err != nil {
hosts[i] = net.JoinHostPort(h, "2379")
}
}
conf := etcd.Config{
Endpoints: hosts,
Username: user,
Password: passwd,
AutoSyncInterval: time.Minute,
}
conf.TLS, err = buildTlsConfig(u)
if err != nil {
return nil, fmt.Errorf("build tls config from %s: %s", u.RawQuery, err)
}View on GitHub (pinned to c9a67b23e8)
Solutions
- Correct the etcd URL syntax, e.g. etcd://host1:2379,host2:2379?cacert=/path/ca.crt
Defensive patterns
Strategy: validation
When it happens
Trigger: Thrown at pkg/object/etcd.go:174 when the library encounters an invalid state.
Common situations: See trigger scenarios.
AI-assisted analysis of juicedata/juicefs@c9a67b23e8 (2026-09-06).
Data as JSON: /api/errors/946fbbbb4b023645.
Report an issue: GitHub.