{"record":{"id":"1b9b44d273c52ba5","repo":"juicedata/juicefs","slug":"build-tls-config-from-s-s-1b9b44","errorCode":null,"errorMessage":"build tls config from %s: %s","messagePattern":"build tls config from (.+?): (.+?)","errorType":"exception","errorClass":null,"httpStatus":null,"severity":"error","filePath":"pkg/object/etcd.go","lineNumber":191,"sourceCode":"\tif err != nil {\n\t\treturn nil, fmt.Errorf(\"parse %s: %s\", addr, err)\n\t}\n\thosts := strings.Split(u.Host, \",\")\n\tfor i, h := range hosts {\n\t\th, _, err := net.SplitHostPort(h)\n\t\tif err != nil {\n\t\t\thosts[i] = net.JoinHostPort(h, \"2379\")\n\t\t}\n\t}\n\tconf := etcd.Config{\n\t\tEndpoints:        hosts,\n\t\tUsername:         user,\n\t\tPassword:         passwd,\n\t\tAutoSyncInterval: time.Minute,\n\t}\n\tconf.TLS, err = buildTlsConfig(u)\n\tif err != nil {\n\t\treturn nil, fmt.Errorf(\"build tls config from %s: %s\", u.RawQuery, err)\n\t}\n\tc, err := etcd.New(conf)\n\tif err != nil {\n\t\treturn nil, err\n\t}\n\treturn &etcdClient{DefaultObjectStorage{}, c, c.KV, u.Host}, nil\n}\n\nfunc init() {\n\tRegister(\"etcd\", newEtcd)\n}\n","sourceCodeStart":173,"sourceCodeEnd":203,"githubUrl":"https://github.com/juicedata/juicefs/blob/c9a67b23e8e08ec23ec331aa6f1675e2319e921c/pkg/object/etcd.go#L173-L203","documentation":"Building the TLS configuration for the etcd client failed; the query string of the etcd endpoint URL (u.RawQuery) carries TLS parameters (cert/key/CA paths or insecure settings) that could not be applied. The query string itself is printed as the offending input.","triggerScenarios":"Thrown at pkg/object/etcd.go:191 when the library encounters an invalid state.","commonSituations":"See trigger scenarios.","solutions":["Verify the cacert/cert/key files exist, are readable, and match each other","Check server-name matches the certificate's CN/SAN"],"exampleFix":null,"handlingStrategy":"validation","validationCode":null,"typeGuard":null,"tryCatchPattern":null,"preventionTips":[],"tags":[],"backgroundTag":null,"analyzedSha":"c9a67b23e8e08ec23ec331aa6f1675e2319e921c","analyzedAt":"2026-09-06T17:55:48.476Z","contentChangedAt":"2026-09-06T17:55:48.476Z","schemaVersion":2},"datasetVersion":"2026-09-14T05:17:10.506Z"}