{"record":{"id":"d6d01bd37459ecd9","repo":"thanos-io/thanos","slug":"create-default-tenant-tsdb-in-v","errorCode":null,"errorMessage":"create default tenant tsdb in %v","messagePattern":"create default tenant tsdb in (.+?)","errorType":"console","errorClass":null,"httpStatus":null,"severity":"error","filePath":"cmd/thanos/receive.go","lineNumber":222,"sourceCode":"\t\t} else {\n\t\t\tlevel.Info(logger).Log(\"msg\", \"no supported bucket was configured, uploads will be disabled\")\n\t\t}\n\t}\n\n\tvar dataDir *os.Root\n\tif enableIngestion {\n\t\tif err := os.MkdirAll(conf.dataDir, 0o755); err != nil {\n\t\t\treturn errors.Wrapf(err, \"create data dir in %v\", conf.dataDir)\n\t\t}\n\n\t\tdataDir, err = os.OpenRoot(conf.dataDir)\n\t\tif err != nil {\n\t\t\treturn errors.Wrap(err, \"open storage dir\")\n\t\t}\n\n\t\t// Create TSDB for the default tenant.\n\t\tif err := createDefautTenantTSDB(logger, conf.defaultTenantID, dataDir); err != nil {\n\t\t\treturn errors.Wrapf(err, \"create default tenant tsdb in %v\", conf.dataDir)\n\t\t}\n\t}\n\n\trelabelConfig, err := conf.relabelCfg.RelabelConfig(nil)\n\tif err != nil {\n\t\treturn errors.Wrap(err, \"get relabel configuration\")\n\t}\n\n\tvar cache = storecache.NoopMatchersCache\n\tif conf.matcherCacheSize > 0 {\n\t\tcache, err = storecache.NewMatchersCache(storecache.WithSize(conf.matcherCacheSize), storecache.WithPromRegistry(reg))\n\t\tif err != nil {\n\t\t\treturn errors.Wrap(err, \"failed to create matchers cache\")\n\t\t}\n\t\tmultiTSDBOptions = append(multiTSDBOptions, receive.WithMatchersCache(cache))\n\t}\n\n\tmultiTSDBOptions = append(multiTSDBOptions, receive.WithUploadConcurrency(conf.uploadConcurrency))","sourceCodeStart":204,"sourceCodeEnd":240,"githubUrl":"https://github.com/thanos-io/thanos/blob/35b8b991177def87ed52dcf10f9b6d87f07282c8/cmd/thanos/receive.go#L204-L240","documentation":"Wraps a failure of createDefautTenantTSDB, which bootstraps the TSDB instance for the default tenant inside the freshly opened data directory. Any error from opening or initializing that per-tenant TSDB lands here; ingestion cannot start without the default tenant's storage.","triggerScenarios":"Thrown at cmd/thanos/receive.go:222 when the library encounters an invalid state.","commonSituations":"See trigger scenarios.","solutions":["Check disk space and inode availability","Inspect permissions on the data dir","Look for a corrupt pre-existing tenant directory and check earlier logs"],"exampleFix":null,"handlingStrategy":"try-catch","validationCode":null,"typeGuard":null,"tryCatchPattern":null,"preventionTips":[],"tags":[],"backgroundTag":null,"analyzedSha":"35b8b991177def87ed52dcf10f9b6d87f07282c8","analyzedAt":"2026-09-07T01:49:59.689Z","contentChangedAt":"2026-09-07T01:49:59.689Z","schemaVersion":2},"datasetVersion":"2026-09-15T23:17:13.987Z"}