Closed kumar-subashp closed 3 years ago
The team couldn't reproduce this.
Sorry for delay response, here are more details:
As "/query-stream" endpoint is only available when HTTP 2 is used, and the Nginx which we are using for reverse proxy in-front of ksqlDB looks like does not support http2 to the upstream services, i.e. it terminates the http2 at nginx and upstream is then invoked as http 1.1 (https://trac.nginx.org/nginx/ticket/923), in that case, how can we have Nginx proxy in front of ksqldb server ?
Our ksqlDB server setup on k8s cluster, where we are facing problem:
even same problem will persist without using k8s cluster.
Team, please help to resolve this issue.
So I ran into the same issue.
I was following the tutorial https://docs.confluent.io/cloud/current/cp-component/ksqldb-ccloud-cli.html and when I run
curl -X "POST" "https://cluster info:443/query-stream" \
--basic --user "key:private key" \
-d $'{
"sql": "SELECT * FROM 'table' EMIT CHANGES;",
"streamsProperties": {}
}'
I get:
"@type":"generic_error","error_code":40004,"message":"This endpoint is only available when using HTTP2"}
I am using the ccloud CLI from confluent. Don't know what else to do to make it work.
I have same issue.
hey folk - sorry this ticket slipped through the cracks, we'll take another look at it and see if we can reproduce on our end
Sorry for delay response, here are more details:
As "/query-stream" endpoint is only available when HTTP 2 is used, and the Nginx which we are using for reverse proxy in-front of ksqlDB looks like does not support http2 to the upstream services, i.e. it terminates the http2 at nginx and upstream is then invoked as http 1.1 (https://trac.nginx.org/nginx/ticket/923), in that case, how can we have Nginx proxy in front of ksqldb server ?
Our ksqlDB server setup on k8s cluster, where we are facing problem:
- ksqlDB server container running inside a pod and listeners listen to https.
- a service created to communicating to pod.
- an nginx-ingress controller which is reverse proxy in front of ksqlDB server, and TLS enabled at ingress level.
even same problem will persist without using k8s cluster.
Sorry @kumar-subashp but this is a problem from the Nginx side. The endpoint works as intended from our end, and only supports http2 currently at the moment unfortunately.
I have same issue.
Can you paste the commands you used? And perhaps some more context to help debug
So I ran into the same issue.
I was following the tutorial https://docs.confluent.io/cloud/current/cp-component/ksqldb-ccloud-cli.html and when I run
curl -X "POST" "https://cluster info:443/query-stream" \ --basic --user "key:private key" \ -d $'{ "sql": "SELECT * FROM 'table' EMIT CHANGES;", "streamsProperties": {} }'
I get:
"@type":"generic_error","error_code":40004,"message":"This endpoint is only available when using HTTP2"}
I am using the ccloud CLI from confluent. Don't know what else to do to make it work.
@IrvicRodriguez I got this curl command to work by adding the --http2
at the end
Describe the bug
ksqlDB java client giving error while executing pull/push queries at '/query-stream' api endpoint.
Error:
Received 400 response from server: This endpoint is only available when using HTTP2. Error code: 40004
Also tried through CURL command, hitting with same error
Command:
CURL output :
To Reproduce
Steps to reproduce the behavior, include:
Expected behavior
'/query-stream' api endpoint should return the query result stream data.
However push/pull queries are working as expected through ksqldb-cli client.