juicedata/juicefs · error
Invalid endpoint %s: %s
Error message
Invalid endpoint %s: %s
What it means
newMinio parses the endpoint with url.ParseRequestURI after defaulting the scheme to http. If parsing fails, the endpoint string is not a valid absolute URI (bad scheme, control characters, empty string, etc.) and the constructor returns this wrapped parse error including the underlying url.Error text.
Source
Thrown at pkg/object/minio.go:67
}
func (m *minio) Limits() Limits {
return Limits{
IsSupportMultipartUpload: true,
IsSupportUploadPartCopy: true,
MinPartSize: 5 << 20,
MaxPartSize: 5 << 30,
MaxPartCount: 10000,
}
}
func newMinio(endpoint, accessKey, secretKey, token string) (ObjectStorage, error) {
if !strings.Contains(endpoint, "://") {
endpoint = fmt.Sprintf("http://%s", endpoint)
}
uri, err := url.ParseRequestURI(endpoint)
if err != nil {
return nil, fmt.Errorf("Invalid endpoint %s: %s", endpoint, err)
}
ssl := strings.ToLower(uri.Scheme) == "https"
region := uri.Query().Get("region")
if region == "" {
region = os.Getenv("MINIO_REGION")
}
if region == "" {
region = awsDefaultRegion
}
if accessKey == "" {
accessKey = os.Getenv("MINIO_ACCESS_KEY")
}
if secretKey == "" {
secretKey = os.Getenv("MINIO_SECRET_KEY")
}
var cfg aws.Config
if accessKey != "" {
cfg, err = config.LoadDefaultConfig(ctx, append(defaultChecksumOpts(),View on GitHub (pinned to c9a67b23e8)
Solutions
- Inspect the endpoint value in the error and fix the malformed URL syntax (wrap IPv6 hosts in brackets: 'http://[::1]:9000').
- Ensure the endpoint is a non-empty absolute URL with scheme://host[:port].
- Quote shell variables and check that environment/config substitution isn't mangling the value.
Example fix
// before endpoint := "http://::1:9000" // unparseable // after endpoint := "http://[::1]:9000"
Defensive patterns
Strategy: validation
Validate before calling
u, err := url.ParseRequestURI(endpoint)
if err != nil || u.Host == "" {
return fmt.Errorf("endpoint %q is not a valid absolute URL", endpoint)
} Try / catch
store, err := newMinio(endpoint, ak, sk, "")
if err != nil && strings.Contains(err.Error(), "Invalid endpoint") {
return fmt.Errorf("fix minio endpoint %q: %w", endpoint, err)
} Prevention
- Always specify scheme://host[:port] explicitly.
- Bracket IPv6 literals in the host part.
- Quote variables in shell/config templates to avoid character loss.
When it happens
Trigger: Creating a MinIO object store with an unparseable endpoint, e.g. an empty endpoint, 'http://[bad-ipv6', an endpoint containing spaces, or a scheme with invalid characters.
Common situations: Config interpolation leaving an empty or malformed URL; unquoted shell variables stripping characters; IPv6 endpoints missing brackets.
Understand the failure class
Background: "Invalid URL" / "URL cannot be empty": fix the malformed or missing URL behind request-construction failures — this error's family across 50 libraries.
Related errors
- invalid endpoint: %s
- no bucket name provided in %s
- Invalid endpoint: %v, error: %v
- illegal value for parameter 'ranger-rest-url': " + url
- ceph: can't put empty file
AI-assisted analysis of juicedata/juicefs@c9a67b23e8 (2026-09-06).
Data as JSON: /api/errors/92730bb9f0180c08.
Report an issue: GitHub.