Connection failed in ReadOnly operational mode

Description

I set OPERATIONAL_MODE: ‘ReadOnly’ and started server . Then tried to connect to python client raise WeaviateGRPCUnavailableError.

Server Setup Information

  • Weaviate Server Version: 1.39.12
  • Deployment Method: docker
  • Multi Node? Number of Running Nodes: 3
  • Client Language and Version: python , 4.23.1
  • Multitenancy?: None

Docker config (node1 only)
weaviate-node-1:
init: true
command:
- --host
- 0.0.0.0
- --port
- ‘8080’
- --scheme
- http
image: weaviate:1.39.12
ports:
- 8080:8080
- 50051:50051
restart: on-failure:0
volumes:
- ./data-node-1:/var/lib/weaviate
environment:
LOG_LEVEL: ‘debug’
QUERY_DEFAULTS_LIMIT: 25
AUTHENTICATION_ANONYMOUS_ACCESS_ENABLED: ‘true’
PERSISTENCE_DATA_PATH: ‘/var/lib/weaviate’
CLUSTER_HOSTNAME: ‘node1’
CLUSTER_GOSSIP_BIND_PORT: ‘7100’
CLUSTER_DATA_BIND_PORT: ‘7101’
RAFT_JOIN: ‘node1,node2,node3’
RAFT_BOOTSTRAP_EXPECT: 3
OPERATIONAL_MODE : ‘ReadOnly’
AUTHENTICATION_APIKEY_ENABLED : ‘false’

Error logs

Traceback (most recent call last):
  File "/opt/miniconda3/envs/myenv/lib/python3.13/site-packages/weaviate/connect/v4.py", line 313, in _ping_grpc
    res = self._grpc_channel.unary_unary(
    ...<2 lines>...
        response_deserializer=health_weaviate_pb2.WeaviateHealthCheckResponse.FromString,
    )(health_weaviate_pb2.WeaviateHealthCheckRequest(), timeout=self.timeout_config.init)
  File "/opt/miniconda3/envs/myenv/lib/python3.13/site-packages/grpc/_channel.py", line 1159, in __call__
    return _end_unary_response_blocking(state, call, False, None)
  File "/opt/miniconda3/envs/myenv/lib/python3.13/site-packages/grpc/_channel.py", line 990, in _end_unary_response_blocking
    raise _InactiveRpcError(state)  # pytype: disable=not-instantiable
    ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
grpc._channel._InactiveRpcError: <_InactiveRpcError of RPC that terminated with:
        status = StatusCode.UNAVAILABLE
        details = "read-only mode is enabled temporally at the config level: write operations are not allowed during this time"
        debug_error_string = "UNKNOWN:Error received from peer  {grpc_message:"read-only mode is enabled temporally at the config level: write operations are not allowed during this time", grpc_status:14}"
>

The above exception was the direct cause of the following exception:

Traceback (most recent call last):
  File "/Users/dharan-19096/StudioProjects/warrsaou/script.py", line 3, in <module>
    client  = weaviate.connect_to_custom(
        http_host="localhost",
    ...<6 lines>...
        skip_init_checks=False
    )
  File "/opt/miniconda3/envs/myenv/lib/python3.13/site-packages/weaviate/connect/helpers.py", line 347, in connect_to_custom
    return __connect(
        WeaviateClient(
    ...<12 lines>...
        )
    )
  File "/opt/miniconda3/envs/myenv/lib/python3.13/site-packages/weaviate/connect/helpers.py", line 371, in __connect
    raise e
  File "/opt/miniconda3/envs/myenv/lib/python3.13/site-packages/weaviate/connect/helpers.py", line 367, in __connect
    client.connect()
    ~~~~~~~~~~~~~~^^
  File "/opt/miniconda3/envs/myenv/lib/python3.13/site-packages/weaviate/client_executor.py", line 152, in connect
    return executor.execute(
           ~~~~~~~~~~~~~~~~^
        response_callback=lambda _: None,
        ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
        method=self._connection.connect,
        ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
    )
    ^
  File "/opt/miniconda3/envs/myenv/lib/python3.13/site-packages/weaviate/connect/executor.py", line 99, in execute
    return cast(T, exception_callback(e))
                   ~~~~~~~~~~~~~~~~~~^^^
  File "/opt/miniconda3/envs/myenv/lib/python3.13/site-packages/weaviate/connect/executor.py", line 38, in raise_exception
    raise e
  File "/opt/miniconda3/envs/myenv/lib/python3.13/site-packages/weaviate/connect/executor.py", line 80, in execute
    call = method(*args, **kwargs)
  File "/opt/miniconda3/envs/myenv/lib/python3.13/site-packages/weaviate/connect/v4.py", line 947, in connect
    raise e
  File "/opt/miniconda3/envs/myenv/lib/python3.13/site-packages/weaviate/connect/v4.py", line 943, in connect
    executor.result(self._ping_grpc("sync"))
                    ~~~~~~~~~~~~~~~^^^^^^^^
  File "/opt/miniconda3/envs/myenv/lib/python3.13/site-packages/weaviate/connect/v4.py", line 335, in _ping_grpc
    self.__handle_ping_exception(e)
    ~~~~~~~~~~~~~~~~~~~~~~~~~~~~^^^
  File "/opt/miniconda3/envs/myenv/lib/python3.13/site-packages/weaviate/connect/v4.py", line 346, in __handle_ping_exception
    raise WeaviateGRPCUnavailableError(
        f"v{self.server_version}", self._connection_params._grpc_address
    ) from e
weaviate.exceptions.WeaviateGRPCUnavailableError: 
Weaviate v1.39.12 makes use of a high-speed gRPC API as well as a REST API.
Unfortunately, the gRPC health check against Weaviate could not be completed.

This error could be due to one of several reasons:
- The gRPC traffic at the specified port is blocked by a firewall.
- gRPC is not enabled or incorrectly configured on the server or the client.
    - Please check that the server address and port (localhost:50051) are correct.
- your connection is unstable or has a high latency. In this case you can:
    - increase init-timeout in `weaviate.connect_to_local(additional_config=wvc.init.AdditionalConfig(timeout=wvc.init.Timeout(init=X)))`
    - disable startup checks by connecting using `skip_init_checks=True`

Additional
Setting

skip_init_checks=True

in client resolves the connection failure but it look like a workaround not a solution.

I’m mat this iuess before. I checked the v1.39.12 code, and this looks like the gRPC health check is being classified as a write operation, so ReadOnly mode rejects it during client initialization—not a network issue.

For now, skip_init_checks=True is a reasonable workaround. It skips the failing startup check without disabling the server’s read-only restrictions; you can verify connectivity with a read query afterward.

The server-side fix should handle health checks separately from business reads/writes, so they remain available in ReadOnly, WriteOnly, and ScaleOut modes. Simply marking the health check as a read would fix this case but cause the opposite problem in WriteOnly mode.

Hey @Dharanish @xie_roomy

Thank you so much for all the details. I have run some checks, and it does sound like a bug.

I’ve opened this issue: gRPC health check rejected when OPERATIONAL_MODE=ReadOnly, so clients fail to connect · Issue #13618 · weaviate/weaviate · GitHub

I will inform our Core engineering team about it.

Kind regards,

Mohamed Shahin
Support Tech Lead - Weaviate Support
mohamed@weaviate.io
Weaviate & LinkedIn

I checked this PR has been merged, When do you release it to Cloud?
@Shahin

@xie_roomy It will be in the next patches, so stay tuned :tada:

If you are using our cloud, please feel free to use the Weaviate support portal anytime you need help with anything. We have it for all our cloud users and customers. It’s easier to check and troubleshoot, and it goes into our queues, so our support engineers can tackle it faster and get you help. I just wanted to make sure you are aware of it.

:right_arrow: support.weaviate.io

Mohamed Shahin
Support Tech Lead
Weaviate Support

The gRPC health check failing under ReadOnly mode is worth isolating first: does the REST port still respond on 8080 while only 50051 times out? If so, the ReadOnly setting may be blocking the health service rather than the whole node. Also check that all three nodes share the same OPERATIONAL_MODE value, since a mixed cluster during RAFT bootstrap can leave gRPC channels unresolved. I’d compare debug logs from node1 around the ping attempt before changing client timeouts.