gRPC failed due to SSL handshake failure using v4

I have a cluster of weaviate nodes setup on openstack. I am able to connect to it using weaviate-client v4, using connect_to_custom() function, by specifying http port & host, as well as gRPC port and host.
It passes the “if client.is_connected() check” successfully so I assume the connection is established.
However, when i try to batch insert into it like this


I am getting the following error. What is the issue?

‘message’: ‘Failed to send all objects in a batch of 48’, ‘error’: ‘WeaviateBatchError('Query call with protocol GRPC batch failed with message <AioRpcError of RPC that terminated with:\n\tstatus = StatusCode.UNAVAILABLE\n\tdetails = “failed to connect to all addresses; last error: UNKNOWN: ipv4:1<MY_IP_HERE>:50051: Ssl handshake failed (TSI_PROTOCOL_FAILURE): SSL_ERROR_SSL: error:100000f7:SSL routines:OPENSSL_internal:WRONG_VERSION_NUMBER: Invalid certificate verification context”\n\tdebug_error_string = “UNKNOWN:Error received from peer {created_time:“2025-01-22T00:06:53.099332986+00:00”, grpc_status:14, grpc_message:“failed to connect to all addresses; last error: UNKNOWN: ipv4:<MY_IP_HERE>:50051: Ssl handshake failed (TSI_PROTOCOL_FAILURE): SSL_ERROR_SSL: error:100000f7:SSL routines:OPENSSL_internal:WRONG_VERSION_NUMBER: Invalid certificate verification context”}”\n>.')’}

{‘message’: ‘Failed to send 48 objects in a batch of 48. Please inspect client.batch.failed_objects or collection.batch.failed_objects for the failed objects.’}

{‘message’: ‘Failed to send all objects in a batch of 48’, ‘error’: ‘WeaviateBatchError('Query call with protocol GRPC batch failed with message <AioRpcError of RPC that terminated with:\n\tstatus = StatusCode.UNAVAILABLE\n\tdetails = “failed to connect to all addresses; last error: UNKNOWN: ipv4:<MY_IP_HERE>:50051: Ssl handshake failed (TSI_PROTOCOL_FAILURE): SSL_ERROR_SSL: error:100000f7:SSL routines:OPENSSL_internal:WRONG_VERSION_NUMBER: Invalid certificate verification context”\n\tdebug_error_string = “UNKNOWN:Error received from peer {created_time:“2025-01-22T00:06:53.099347418+00:00”, grpc_status:14, grpc_message:“failed to connect to all addresses; last error: UNKNOWN: ipv4:<MY_IP_HERE>50051: Ssl handshake failed (TSI_PROTOCOL_FAILURE): SSL_ERROR_SSL: error:100000f7:SSL routines:OPENSSL_internal:WRONG_VERSION_NUMBER: Invalid certificate verification context”}”\n>.')’}
{‘message’: ‘Failed to send 4 objects in a batch of 4. Please inspect client.batch.failed_objects or collection.batch.failed_objects for the failed objects.’}

Hello @AnnTade,

Could you please share with me your connection method, batch method in full, and a sample of the object? Also, could you confirm the full server version and full client version you are using? This information will help me replicate the issue.

Print out details about any failed objects during your batch operations:

failed_objects = client.batch.failed_objects
if failed_objects:
    print(f"Number of failed objects: {len(failed_objects)}")
    for i, failed_obj in enumerate(failed_objects, 1):
        print(f"Failed object {i}: {failed_obj}")
else:
    print(f"All objects successfully inserted into '{collection_name}'.")

Best regards,
Mohamed Shahin
Weaviate Support