Skip to content

Troubleshooting

Tim Middleton edited this page May 28, 2025 · 7 revisions

Overview

The purpose of this page is to list troubleshooting guides and work-arounds for issues that you may run into when using the Coherence Go Client. This page will be updated and maintained over time to include common issues we see from customers.

Receiving "first record does not look like a TLS handshake"

Problem

You receive the following error trying to create a session using coherence.NewSession:

code = Unavailable desc = connection error: desc = "transport: authentication handshake failed: 
    tls: first record does not look like a TLS handshake"

Solution

You are trying to connect to a non TLS enabled gRPC Proxy using TLS. You should either specify coherence.WithPlainText() or correctly enable TLS. See NewSession for more information.

Receiving the error "Method not found: coherence.NamedCacheService/isReady" when calling IsReady()

Problem

The following error is returned when calling IsReady() on a NamedMap or NamedCache:

Method not found: coherence.NamedCacheService/isReady

Solution

This message means that the gRPC proxy version does not support the IsReady() call. You must have CE versions 22.06.5+ or 23.03.1+ or commercial version 14.1.1-2206-5+ which support IsReady().

Issues using NamedMap with Aggregators

Problem

If you have something similar to this and you are seeing compilation errors:

namedCache, err := coherence.GetNamedCache[int, Person](session, "aggregation-test")
...
values, err := coherence.Aggregate(ctx, namedMap, aggregators.Distinct(extractors.Extract[string]("department")))

Solution

Due to limitations with Go generics, you must sometimes include all the type parameters for Aggregate and Invoke methods.

values, err := coherence.Aggregate[int, Person, []string](ctx, namedMap, aggregators.Distinct(extractors.Extract[string]("department")))

Reconnecting after a gRPC proxy restarts

Problem

If you are connecting via the coherence:///host:port server address, and you see the message in your logs:

2025/05/28 02:58:04 INFO Session [54759539-cffc-4dde-83ed-9f1c1cf95429] re-connected to address host:port (READY)
2025/05/28 02:58:31 INFO Session [54759539-cffc-4dde-83ed-9f1c1cf95429] closed

This can indicate the re-connection attempt failed.

Solution

If you receive a non-nil error from an API call, you should check if the session is closed via session.IsClosed() and if it is, you re-create the session with coherence.NewSession and re-initialize any caches via coherence.GetNamedCache().