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

Error when enabling TLS + Nodeport #83

Open
VictorBac opened this issue Jul 10, 2021 · 1 comment
Open

Error when enabling TLS + Nodeport #83

VictorBac opened this issue Jul 10, 2021 · 1 comment

Comments

@VictorBac
Copy link

VictorBac commented Jul 10, 2021

Hello,

I deployed a yugabyte cluster using the helm chart v2.7.1.

I added NodePort, so that I an connect clients using a node_ip:nodePort
Everything worked fine until I tried to deploy with TLS. I get errors when trying to write data. (Complete new deployment)

tls:
    # Set to true to enable the TLS.
    enabled: true
    nodeToNode: true
    clientToServer: true
    # Set to false to disallow any service with unencrypted communication from joining this cluster
    insecure: false
    rootCA:
      cert: "......"
      key: "....."

  serviceEndpoints:
    - name: "yb-master-ui"
      type: NodePort
      app: "yb-master"
      ports:
        http-ui: "7000"

    - name: "yb-tserver-service"
      type: NodePort
      app: "yb-tserver"
      ports:
        tcp-yql-port: "9042"
        tcp-yedis-port: "6379"
        tcp-ysql-port: "5433"

And I am also using the image:

Component: "yugabytedb"
  Image:
    tag: 2.7.1.1-b1

When I try to connect with the python psycopg2 and following the doc here:
https://docs.yugabyte.com/latest/quick-start/build-apps/python/ysql-psycopg2/

I can successfully create the table employee, but impossible to insert any data, I get an error:
InternalError: Network error: Handshake failed: Network error (yb/rpc/secure_stream.cc:1108): Endpoint does not match, address: 172.23.171.61, hostname: 172.23.171.61
The IP displayed here change.

Apparently this is a pod IP

Any idea ?

@VictorBac
Copy link
Author

It seems when enabling SSL, and inserting data using:
conn.set_session(autocommit=False) (following https://docs.yugabyte.com/latest/quick-start/build-apps/python/ysql-psycopg2/)

I get the error. Apparently the tservers can't communicate with each other.

InternalError: Network error: Handshake failed: Network error (yb/rpc/secure_stream.cc:1108): Endpoint does not match, address: 172.23.171.61, hostname: 172.23.171.61

And if I set autocommit=True, I can write data. Probably because the nodes don't need to communicate with each others then.

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

No branches or pull requests

1 participant