juicedata/juicefs · error

failed to load config: %s

Error message

failed to load config: %s

What it means

Returned by newEos when the AWS SDK's LoadDefaultConfig fails while building the EOS client config — typically invalid static credentials or a broken shared config/environment. The wrapped error pinpoints the config source at fault.

Source

Thrown at pkg/object/eos.go:80

	ssl := strings.ToLower(uri.Scheme) == "https"
	hostParts := strings.Split(uri.Host, ".")
	bucket := hostParts[0]
	endpoint = uri.Scheme + "://" + uri.Host[len(bucket)+1:]
	region := "us-east-1"

	if accessKey == "" {
		accessKey = os.Getenv("EOS_ACCESS_KEY")
	}
	if secretKey == "" {
		secretKey = os.Getenv("EOS_SECRET_KEY")
	}
	if token == "" {
		token = os.Getenv("EOS_TOKEN")
	}
	cfg, err := config.LoadDefaultConfig(ctx, append(defaultChecksumOpts(),
		config.WithCredentialsProvider(credentials.NewStaticCredentialsProvider(accessKey, secretKey, token)))...)
	if err != nil {
		return nil, fmt.Errorf("failed to load config: %s", err)
	}
	client := s3.NewFromConfig(cfg, func(options *s3.Options) {
		options.BaseEndpoint = aws.String(endpoint)
		options.Region = region
		options.EndpointOptions.DisableHTTPS = !ssl
		options.UsePathStyle = defaultPathStyle()
		options.HTTPClient = httpClient
		options.APIOptions = append(options.APIOptions, func(stack *smithymiddleware.Stack) error {
			return v4.SwapComputePayloadSHA256ForUnsignedPayloadMiddleware(stack)
		}, addS3UserAgent)
		options.RetryMaxAttempts = 1
	})

	return &eos{s3client{bucket: bucket, s3: client, region: region}}, nil
}

func init() {
	Register("eos", newEos)

View on GitHub (pinned to c9a67b23e8)

Solutions

  1. Verify EOS access/secret keys (or EOS_ACCESS_KEY/EOS_SECRET_KEY env vars)
  2. Fix any malformed AWS config files or environment settings
Defensive patterns

Strategy: validation

When it happens

Trigger: Thrown at pkg/object/eos.go:80 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/8e197eea362bf469. Report an issue: GitHub.