[
https://issues.apache.org/jira/browse/CASSGO-97?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=18040250#comment-18040250
]
Bohdan Siryk commented on CASSGO-97:
------------------------------------
I tried to reproduce this, but wasn't successful.
My setup:
* 2 cassandra 5.0.5 instances running in separate Docker containers
* a container in which I run zdm-proxy within the same network as both
cassandra container
My test go application:
{code:java}
func main() {
cluster := gocql.NewCluster("127.0.0.1:9999")
cluster.Logger = gocql.NewLogger(gocql.LogLevelDebug)
cluster.ProtoVersion = 0
session, err := cluster.CreateSession()
if err != nil {
fmt.Println(err)
}
var releaseVersion string
query := session.Query(`select release_version from
system.local`).Consistency(gocql.One)
if err = query.Scan(&releaseVersion); err != nil {
fmt.Println(err)
}
fmt.Println("Release version is: ", releaseVersion)
} {code}
And the output I got:
{code:java}
2025/11/24 10:39:10 DBG gocql: Discovered protocol version using host after
parsing protocol error. protocol_version=4 host_addr=127.0.0.1 host_id=
2025/11/24 10:39:10 INF gocql: Discovered protocol version. protocol_version=4
2025/11/24 10:39:10 DBG gocql: Added control host (session initialization).
host_addr=127.0.0.1 host_id=6768033e-2164-5824-bbd0-31a0a2d9876d
2025/11/24 10:39:10 INF gocql: Control connection connected to host.
host_addr=127.0.0.1 host_id=6768033e-2164-5824-bbd0-31a0a2d9876d
2025/11/24 10:39:10 INF gocql: Refreshed ring.
ring=[127.0.0.1-6768033e-2164-5824-bbd0-31a0a2d9876d:UP]
2025/11/24 10:39:10 INF gocql: Session initialized successfully.
2025/11/24 10:39:10 DBG gocql: Pool connected to node. host_addr=127.0.0.1
port=9999 host_id=6768033e-2164-5824-bbd0-31a0a2d9876d
Release version is: 5.0.5 {code}
The only thing I see here is that it discovered proto 4, but I guess it is due
max supported protocol version in the zdm-proxy itself. So it successfully
discovered proto version.
I've never worked with zdm-proxy, so I probably missed a kind of configuration
to make it respond with stream id > 0 during proto version negotiation
> Protocol version negotiation doesn't work if server replies with stream id
> different than 0
> -------------------------------------------------------------------------------------------
>
> Key: CASSGO-97
> URL: https://issues.apache.org/jira/browse/CASSGO-97
> Project: Apache Cassandra Go driver
> Issue Type: Bug
> Components: Core
> Reporter: João Reis
> Priority: Normal
> Fix For: 2.x
>
>
> If the server's ProtocolError response comes with stream id 0 then [this
> code|https://github.com/apache/cassandra-gocql-driver/blob/0326fae3617dd19b901f2e9a97479c04fc11e05a/conn.go#L685-L700]
> will create the protocol error object.
> If the response comes with a positive stream id then [this
> code|https://github.com/apache/cassandra-gocql-driver/blob/0326fae3617dd19b901f2e9a97479c04fc11e05a/conn.go#L1314-L1330]
> will create the protocol error object. This latter way of creating the error
> makes [the regex check not
> work|https://github.com/apache/cassandra-gocql-driver/blob/0326fae3617dd19b901f2e9a97479c04fc11e05a/control.go#L210-L245].
> This was found when trying to connect to
> [ZDM-Proxy|https://github.com/datastax/zdm-proxy/] but connecting to a C*
> 3.11.x cluster works fine.
--
This message was sent by Atlassian Jira
(v8.20.10#820010)
---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]