{"record":{"id":"33cab931904acf09","repo":"prometheus/node_exporter","slug":"couldn-t-get-ce-count-for-controller-csrow-channel","errorCode":null,"errorMessage":"couldn't get ce_count for controller/csrow/channel %s/%s/%s: %w","messagePattern":"couldn't get ce_count for controller/csrow/channel (.+?)/(.+?)/(.+?): %w","errorType":"exception","errorClass":null,"httpStatus":null,"severity":"error","filePath":"collector/edac_linux.go","lineNumber":180,"sourceCode":"\t\t\t}\n\t\t\tch <- prometheus.MustNewConstMetric(\n\t\t\t\tedacCsRowUECount, prometheus.CounterValue, float64(value), controllerNumber, csrowNumber)\n\n\t\t\tchannelFiles, err := filepath.Glob(csrow + \"/ch*_ce_count\")\n\t\t\tif err != nil {\n\t\t\t\treturn err\n\t\t\t}\n\t\t\tfor _, chFile := range channelFiles {\n\t\t\t\tmatch := edacMemChannelRE.FindStringSubmatch(filepath.Base(chFile))\n\t\t\t\tif match == nil {\n\t\t\t\t\tcontinue\n\t\t\t\t}\n\t\t\t\tchannelNumber := match[1]\n\t\t\t\tlabel := edacDimmLabel(csrow, channelNumber)\n\n\t\t\t\tvalue, err = readUintFromFile(chFile)\n\t\t\t\tif err != nil {\n\t\t\t\t\treturn fmt.Errorf(\"couldn't get ce_count for controller/csrow/channel %s/%s/%s: %w\", controllerNumber, csrowNumber, channelNumber, err)\n\t\t\t\t}\n\t\t\t\tch <- prometheus.MustNewConstMetric(\n\t\t\t\t\tedacChannelCECount,\n\t\t\t\t\tprometheus.CounterValue,\n\t\t\t\t\tfloat64(value),\n\t\t\t\t\tcontrollerNumber,\n\t\t\t\t\tcsrowNumber,\n\t\t\t\t\tchannelNumber,\n\t\t\t\t\tlabel,\n\t\t\t\t)\n\n\t\t\t\tvalue, err = readUintFromFile(filepath.Join(csrow, \"ch\"+channelNumber+\"_ue_count\"))\n\t\t\t\tif err == nil {\n\t\t\t\t\tch <- prometheus.MustNewConstMetric(\n\t\t\t\t\t\tedacChannelUECount,\n\t\t\t\t\t\tprometheus.CounterValue,\n\t\t\t\t\t\tfloat64(value),\n\t\t\t\t\t\tcontrollerNumber,","sourceCodeStart":162,"sourceCodeEnd":198,"githubUrl":"https://github.com/prometheus/node_exporter/blob/17ddd77c59ba27e1508e9f7894b1e55b44d6aed3/collector/edac_linux.go#L162-L198","documentation":"The EDAC collector globs <csrow>/ch*_ce_count files for per-channel correctable-error counts; when reading one of these files fails, it returns this error naming controller, csrow, and channel. Like the csrow counters, this aborts the collector's Update and the scrape reports failed.","triggerScenarios":"readUintFromFile(chFile) fails for a file matched by filepath.Glob(csrow + \"/ch*_ce_count\") during Update.","commonSituations":"Channel files present but unreadable due to permissions; driver exposing chX_ue_count only (no _ce variant matched path stays fine but content unreadable); sysfs churn while the EDAC module reloads; kernel drivers with partial channel support.","solutions":["Check the specific file: `cat /sys/devices/system/edac/mc/mc0/csrow0/ch0_ce_count`.","Fix read permissions / MAC (SELinux/AppArmor) policy on sysfs EDAC attributes.","Reload the EDAC module and re-check that all ch*_ce_count files are fully populated.","Upgrade kernel/driver if your memory controller lacks complete channel counter support."],"exampleFix":null,"handlingStrategy":"validation","validationCode":"const fs = require('fs');\nconst glob = (dir) => fs.readdirSync(dir).filter(f => /^ch\\d+_ce_count$/.test(f));\nconst csrowDir = '/sys/devices/system/edac/mc/mc0/csrow0';\nif (fs.existsSync(csrowDir)) {\n  for (const f of glob(csrowDir)) {\n    const v = fs.readFileSync(`${csrowDir}/${f}`, 'utf8').trim();\n    if (isNaN(parseInt(v, 10))) console.warn(`non-numeric channel counter: ${csrowDir}/${f}`);\n  }\n}","typeGuard":null,"tryCatchPattern":"try {\n  await scrapeNodeExporter();\n} catch (e) {\n  if (String(e).includes('controller/csrow/channel')) {\n    console.warn('EDAC channel counter read failed; check driver completeness or disable --collector.edac');\n  } else throw e;\n}","preventionTips":["Confirm ch*_ce_count files exist and are readable for your memory controller driver.","Keep the EDAC module loaded and stable across scrapes.","Update kernel/drivers when the controller lacks full channel counters."],"tags":["linux","edac","sysfs","file-read"],"backgroundTag":"file-read-failed","analyzedSha":"17ddd77c59ba27e1508e9f7894b1e55b44d6aed3","analyzedAt":"2026-09-07T17:54:06.211Z","contentChangedAt":"2026-09-07T17:54:06.211Z","schemaVersion":2},"datasetVersion":"2026-09-16T04:17:20.429Z"}