{"record":{"id":"ce70aa428e3e9a77","repo":"crowdsecurity/crowdsec","slug":"no-matching-files-for-pattern-s","errorCode":null,"errorMessage":"no matching files for pattern %s","messagePattern":"no matching files for pattern (.+?)","errorType":"exception","errorClass":null,"httpStatus":null,"severity":"error","filePath":"pkg/acquisition/modules/file/config.go","lineNumber":215,"sourceCode":"\t\t\tdefault:\n\t\t\t\treturn fmt.Errorf(\"unknown parameter %s\", key)\n\t\t\t}\n\t\t}\n\t}\n\n\ts.config.Labels = labels\n\ts.config.Mode = configuration.CAT_MODE\n\ts.config.UniqueId = uuid\n\n\ts.logger.Debugf(\"Will try pattern %s\", args[0])\n\n\tfiles, err := filepath.Glob(args[0])\n\tif err != nil {\n\t\treturn fmt.Errorf(\"glob failure: %w\", err)\n\t}\n\n\tif len(files) == 0 {\n\t\treturn fmt.Errorf(\"no matching files for pattern %s\", args[0])\n\t}\n\n\tif len(files) > 1 {\n\t\ts.logger.Infof(\"Will read %d files\", len(files))\n\t}\n\n\tfor _, file := range files {\n\t\ts.logger.Infof(\"Adding file %s to filelist\", file)\n\t\ts.files = append(s.files, file)\n\t}\n\n\treturn nil\n}\n","sourceCodeStart":197,"sourceCodeEnd":229,"githubUrl":"https://github.com/crowdsecurity/crowdsec/blob/909b5157986a2b2c2163300fdaef5ed01289f7d2/pkg/acquisition/modules/file/config.go#L197-L229","documentation":"ConfigureByDSN expands the file glob of the file:// DSN and requires at least one match. It fires when filepath.Glob returns no files for the pattern (typo, wrong path, files not yet present), aborting acquisition setup.","triggerScenarios":"Thrown at pkg/acquisition/modules/file/config.go:215 when the library encounters an invalid state.","commonSituations":"See trigger scenarios.","solutions":["Fix the glob pattern in the DSN to match existing files","Verify the path relative to the crowdsec working directory","Create the log files, or use a pattern matching rotated files too (e.g. /var/log/myapp.log*)"],"exampleFix":null,"handlingStrategy":"validation","validationCode":null,"typeGuard":null,"tryCatchPattern":null,"preventionTips":[],"tags":[],"backgroundTag":null,"analyzedSha":"909b5157986a2b2c2163300fdaef5ed01289f7d2","analyzedAt":"2026-09-06T12:27:26.012Z","contentChangedAt":"2026-09-06T12:27:26.012Z","schemaVersion":2},"datasetVersion":"2026-09-14T05:17:10.506Z"}