Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

With additional(route) path parameter, ksqlDB CLI is failing to connect to ksql server #6358

Open
kumar-subashp opened this issue Oct 5, 2020 · 5 comments · May be fixed by #10641
Open

Comments

@kumar-subashp
Copy link

kumar-subashp commented Oct 5, 2020

Describe the bug
CLI is failing to connect to ksqldb server if any additional(context/route) path parameter included in the url.
Scenario where additional "route" path parameter is used for ingress to take decision and forward the request to the specific service of a ksql cluster.

https://ksqldb-server:443/**route**/

To Reproduce
Steps to reproduce the behavior, include:

  1. The version of CLI version: confluentinc/ksqldb-cli:0.11.0 & 0.12.0
  2. Try connect to server using command : docker exec -it ksqldb-cli ksql https://ksqldb-server:443/route/

Expected behavior
ksqldb-cli should get connected to ksqldb-server successfully, Moreover which was working on ksqldb-cli version 0.7.1

image

Actual behaviour

  1. CLI output
    image

  2. Error messages "Error: Couldn't connect to the KSQL server: Path not found. Path='/info'. Check your ksql http url to make sure you are connecting to a ksql server."

@kumar-subashp kumar-subashp changed the title With additional path parameter ksqlDB CLI is failing to connect to ksql server With additional(route) path parameter, ksqlDB CLI is failing to connect to ksql server Oct 5, 2020
@rodesai rodesai added P1 Slightly lower priority to P0 ;) enhancement data-accessibility java-client and removed needs-triage labels Oct 7, 2020
@ofirhasbani1
Copy link

ofirhasbani1 commented Apr 8, 2021

any idea how to solve it? I'm having the same problem (my ksqldb server runs behind an ingress controller)

@eshepelyuk
Copy link
Contributor

Hi, seems the client should be refactored to support this. The code seems not complicatedtk provide a PR. Curious, why its not implemented yet, maybe there some hidden complexity behind this ?

@mjsax
Copy link
Member

mjsax commented Feb 2, 2022

Not familiar with the code, but I assume it's just a random bug.

@rochr01
Copy link

rochr01 commented Jul 31, 2022

I'm facing the same issue, but from what I understand the bug is not in the client, it's in the server - when you have it behind ingress you need to make it aware of the "/test/" part of url, but as far as i know there is no configuration parameter for passing this path. Or is there a one?

I'm considering using nginx reverse proxy to work around this.
I assume that to really fix it on sever side would require one of:

a. adding "contextPath" parameter to server configuration to make it generate links and redirects correctly

b. eliminating HTTP redirect which is now what welcomes you at root endpoint:

  • Mark bundle as not supporting multiuse
    < HTTP/1.1 307 Temporary Redirect
    < location: /info
    < content-length: 0

Why not returning the info here, instead of having separate /info path?

@boriscosic
Copy link

boriscosic commented Jan 10, 2025

This is an issue around how KsqlTarget is instantiated. Throughout initialization the full server name with path is present, but when the client is instantiated it only uses the host. I can create a PR for this and a test container can be found here boriscosic/ksqldb-cli.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging a pull request may close this issue.

7 participants