cube-js/cube · error

Meta store remote addr is not defined

Error message

Meta store remote addr is not defined

What it means

A hard expect() panic in the meta store transport: meta_store_call was invoked, which requires forwarding to a remote meta store, but CUBESTORE_METASTORE_REMOTE_ADDRESS (the config's metastore_remote_address) is not set. The node is trying to act as a router proxy to a meta store it was never told about.

Source

Thrown at rust/cubestore/cubestore/src/cluster/transport.rs:128

    config: Arc<dyn ConfigObj>,
}

crate::di_service!(MetaStoreTransportImpl, [MetaStoreTransport]);

impl MetaStoreTransportImpl {
    pub fn new(config: Arc<dyn ConfigObj>) -> Arc<Self> {
        Arc::new(Self { config })
    }
}

#[async_trait]
impl MetaStoreTransport for MetaStoreTransportImpl {
    async fn meta_store_call(&self, m: NetworkMessage) -> Result<NetworkMessage, CubeError> {
        let meta_remote_addr = self
            .config
            .metastore_remote_address()
            .as_ref()
            .expect("Meta store remote addr is not defined")
            .to_string();
        let mut stream = tokio::time::timeout(
            Duration::from_secs(self.config.connection_timeout()),
            TcpStream::connect(&meta_remote_addr),
        )
        .await
        .map_err(|_| {
            CubeError::internal(format!(
                "Connection timeout to {}. Please check your meta connection env variables (CUBESTORE_META_ADDR, CUBESTORE_META_PORT, etc.).",
                meta_remote_addr
            ))
        })?
        .map_err(|e| {
            CubeError::internal(format!("Can't connect to {}: {}", meta_remote_addr, e))
        })?;
        m.send(&mut stream).await?;
        let message = NetworkMessage::receive(&mut stream).await?;
        Ok(message)

View on GitHub (pinned to 7d981676b3)

Solutions

  1. Set the meta store remote address in the node's configuration when it must route to a remote meta store
  2. Ensure only the designated router node forwards meta store calls, or run the meta store locally on this node
Defensive patterns

Strategy: validation

When it happens

Trigger: Thrown at rust/cubestore/cubestore/src/cluster/transport.rs:128 when the library encounters an invalid state.

Common situations: See trigger scenarios.


AI-assisted analysis of cube-js/cube@7d981676b3 (2026-09-02). Data as JSON: /api/errors/80ef38e5f3ca8f62. Report an issue: GitHub.