{"record":{"id":"371a27cb3165117e","repo":"vllm-project/vllm","slug":"moriio-is-not-available-please-ensure-the-mori","errorCode":null,"errorMessage":"MoRIIO is not available. Please ensure the 'mori' package is installed and properly configured.","messagePattern":"MoRIIO is not available\\. Please ensure the 'mori' package is installed and properly configured\\.","errorType":"exception","errorClass":"RuntimeError","httpStatus":null,"severity":"critical","filePath":"vllm/distributed/kv_transfer/kv_connector/v1/moriio/moriio_connector.py","lineNumber":1082,"sourceCode":"            if now >= deadline\n        ]\n        for req_id in stale:\n            self._pending_sent_acks.pop(req_id, None)\n\n        connector_output.finished_sending = safe or None\n\n\nclass MoRIIOConnectorWorker:\n    \"\"\"Implementation of Worker side methods\"\"\"\n\n    def __init__(\n        self,\n        vllm_config: VllmConfig,\n        engine_id: str,\n        kv_cache_config: \"KVCacheConfig\",\n    ):\n        if not is_moriio_available():\n            raise RuntimeError(\n                \"MoRIIO is not available. Please ensure the 'mori' package \"\n                \"is installed and properly configured.\"\n            )\n\n        assert vllm_config.kv_transfer_config is not None\n        self.moriio_config = MoRIIOConfig.from_vllm_config(vllm_config)\n        self.mode = (\n            MoRIIOMode.READ if self.moriio_config.read_mode else MoRIIOMode.WRITE\n        )\n\n        logger.info(\"Initializing MoRIIO worker %s\", engine_id)\n\n        logging.getLogger(\"aiter\").disabled = True\n\n        # Config.\n        self.vllm_config = vllm_config\n        assert vllm_config.kv_transfer_config is not None, (\n            \"kv_transfer_config must be set for MoRIIOConnector\"","sourceCodeStart":1064,"sourceCodeEnd":1100,"githubUrl":"https://github.com/vllm-project/vllm/blob/c794754062d49a8fdb63ab3c5215b488b865030c/vllm/distributed/kv_transfer/kv_connector/v1/moriio/moriio_connector.py#L1064-L1100","documentation":"MoRIIOConnectorWorker.__init__ raises RuntimeError when the optional 'mori' package failed to import at module load (is_moriio_available() is False; module import logs 'MoRIIO is not available'). The connector cannot operate without the MoRI-IO transfer library.","triggerScenarios":"Constructing MoRIIOConnectorWorker (i.e. enabling the moriio KV connector via --kv-transfer-config) in an environment where 'import mori' (or its deps) failed.","commonSituations":"Fresh venv/container without the mori wheel; mori installed for a different Python or CUDA version; GPU/driver requirement of mori unmet so the import partially fails; only one of the P/D instances has it installed.","solutions":["Install the mori package into the same uv/.venv environment vLLM runs in and retry","Verify with a direct import in the run environment: the same .venv/bin/python must be able to import mori","Check the earlier 'MoRIIO is not available' log line / import traceback for the underlying cause (missing dep, CUDA mismatch)","Confirm mori is installed on BOTH prefill and decode instances"],"exampleFix":"# before: connector enabled but mori missing\nuv pip install -e . && vllm serve ... --kv-transfer-config kv_role=kv_producer\n\n# after\nuv pip install mori && .venv/bin/python -c \"import mori\" && vllm serve ... --kv-transfer-config ...","handlingStrategy":"validation","validationCode":"from vllm.distributed.kv_transfer.kv_connector.v1.moriio.moriio_connector import is_moriio_available\n\nif not is_moriio_available():\n    raise RuntimeError(\"install the 'mori' package before enabling the moriio KV connector\")\n\n# only after the check, build the connector / start vllm with kv_transfer_config","typeGuard":"def mori_dependency_ready() -> bool:\n    try:\n        import mori  # noqa: F401\n        return True\n    except ImportError:\n        return False","tryCatchPattern":"try:\n    worker = MoRIIOConnectorWorker(vllm_config, engine_id, kv_cache_config)\nexcept RuntimeError as e:\n    if \"mori\" in str(e):\n        fail_deployment(\"mori package missing; install it in this venv\")\n    raise","preventionTips":["Add mori to the deployment image/requirements for every P and D instance","Smoke-test `import mori` with the exact runtime interpreter during image build","Treat the 'MoRIIO is not available' log line at startup as a hard failure, not a warning"],"tags":["dependencies","mori","kv-transfer","environment"],"backgroundTag":null,"analyzedSha":"c794754062d49a8fdb63ab3c5215b488b865030c","analyzedAt":"2026-08-14T21:17:39.825Z","schemaVersion":2},"datasetVersion":"2026-08-15T22:17:37.221Z"}