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.