{"record":{"id":"cb1f640399a3a2e2","repo":"risingwavelabs/risingwave","slug":"env-variable-rw-meta-addr-not-found-for-ris","errorCode":null,"errorMessage":"env variable `RW_META_ADDR` not found.\n\nFor `./risedev d` use cases, please do the following:\n* use `./risedev ctl` to use risectl.\n\nFor production use cases,\n* please set `RW_META_ADDR` to the address of the meta node.\n\nNote: the default value of `RW_META_ADDR` is 'http://127.0.0.1:5690'.","messagePattern":"env variable `RW_META_ADDR` not found\\.\n\nFor `\\./risedev d` use cases, please do the following:\n\\* use `\\./risedev ctl` to use risectl\\.\n\nFor production use cases,\n\\* please set `RW_META_ADDR` to the address of the meta node\\.\n\nNote: the default value of `RW_META_ADDR` is 'http://127\\.0\\.0\\.1:5690'\\.","errorType":"exception","errorClass":"anyhow::Error","httpStatus":null,"severity":"error","filePath":"src/ctl/src/common/meta_service.rs","lineNumber":51,"sourceCode":"    ///\n    /// * `RW_META_ADDR`: meta service address\n    pub fn from_env() -> Result<Self> {\n        let meta_addr = match env::var(\"RW_META_ADDR\") {\n            Ok(url) => {\n                tracing::info!(\"using meta addr from `RW_META_ADDR`: {}\", url);\n                url\n            }\n            Err(_) => {\n                const MESSAGE: &str = \"env variable `RW_META_ADDR` not found.\n\nFor `./risedev d` use cases, please do the following:\n* use `./risedev ctl` to use risectl.\n\nFor production use cases,\n* please set `RW_META_ADDR` to the address of the meta node.\n\nNote: the default value of `RW_META_ADDR` is 'http://127.0.0.1:5690'.\";\n                bail!(MESSAGE);\n            }\n        };\n        Ok(Self { meta_addr })\n    }\n\n    /// Create meta client from options, and register as rise-ctl worker\n    pub async fn create_meta_client(&self) -> Result<MetaClient> {\n        let (client, _) = MetaClient::register_new(\n            self.meta_addr.parse()?,\n            WorkerType::RiseCtl,\n            &get_new_ctl_identity(),\n            Property::default(),\n            Arc::new(MetaConfig::default()),\n        )\n        .await;\n        let worker_id = client.worker_id();\n        tracing::info!(\"registered as RiseCtl worker, worker_id = {}\", worker_id);\n        Ok(client)","sourceCodeStart":33,"sourceCodeEnd":69,"githubUrl":"https://github.com/risingwavelabs/risingwave/blob/6469eb736d691e8e9b8a419a57edd6429ca77417/src/ctl/src/common/meta_service.rs#L33-L69","documentation":"MetaService::from_env reads RW_META_ADDR to learn where the meta node's gRPC endpoint lives. If the variable is absent, risectl bails with guidance: local users should use `./risedev ctl` (which sets it), and production users must set RW_META_ADDR to the meta node address. The default port would be 5690 but no default is applied automatically.","triggerScenarios":"Invoking risectl binaries directly (not via ./risedev ctl) without RW_META_ADDR exported; running in an environment where the var was not propagated; meta node running on a non-default port without the env var set.","commonSituations":"Fresh terminal after starting the cluster; CI or container where env vars were not passed through; production deployment where the meta address differs from 127.0.0.1:5690 and was never exported.","solutions":["Use `./risedev ctl` instead of invoking risectl binaries directly — it sets RW_META_ADDR for you.","Export RW_META_ADDR=http://127.0.0.1:5690 (or the actual meta node address).","In production, set RW_META_ADDR to the meta node's advertised address in the deployment environment."],"exampleFix":"// before\nrisingwave risectl table list   # no RW_META_ADDR\n// after\nexport RW_META_ADDR=\"http://127.0.0.1:5690\"\nrisingwave risectl table list","handlingStrategy":"validation","validationCode":"if (!process.env.RW_META_ADDR) { throw new Error(\"RW_META_ADDR not set; use ./risedev ctl or export RW_META_ADDR=http://127.0.0.1:5690\"); }","typeGuard":null,"tryCatchPattern":"connectMeta().catch(e => {\n  if (String(e).includes(\"RW_META_ADDR\")) console.error(\"export RW_META_ADDR to your meta node address\");\n  else throw e;\n});","preventionTips":["Use `./risedev ctl` which sets RW_META_ADDR automatically","Export RW_META_ADDR in deployment manifests / shell profiles","Remember the default is http://127.0.0.1:5690 — set it explicitly if meta runs elsewhere"],"tags":["risectl","meta","env","configuration"],"backgroundTag":"missing-env-var","analyzedSha":"6469eb736d691e8e9b8a419a57edd6429ca77417","analyzedAt":"2026-09-11T21:06:21.487Z","contentChangedAt":"2026-09-11T21:06:21.487Z","schemaVersion":2},"datasetVersion":"2026-09-14T16:17:12.679Z"}