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

no tofu token but not in correct session state #2414

Closed
EasyNV opened this issue Aug 31, 2022 · 4 comments · Fixed by #2369
Closed

no tofu token but not in correct session state #2414

EasyNV opened this issue Aug 31, 2022 · 4 comments · Fixed by #2369

Comments

@EasyNV
Copy link

EasyNV commented Aug 31, 2022

Describe the bug
Hello, I tried to use boundary to connect to the postgresql server using this command

boundary connect -target-id $target_id -listen-port 5432

And when I tried to connect by using psql client it will show this

Proxy listening information:
  Address:             127.0.0.1
  Connection Limit:    -1
  Expiration:          Wed, 31 Aug 2022 20:21:38 WIB
  Port:                5432
  Protocol:            tcp
  Session ID:          s_plkWXBdEe6

  Credentials:
    Credential Source ID:   clvlt_LLQxVJDeQv
    Credential Source Name: Engineer Credentials
    Credential Store ID:    csvlt_GUOLnIH4y5
    Credential Store Type:  vault
    Secret:
        {
              "password": "NPfKcYcXsgIxPjS7Ta4-",
              "username": "v-token-v-dev-en-qlZFSfgRGrNbv6kceQOy-1661923298"
        }

error reading handshake result: failed to read protobuf message: failed to get reader: received close frame: status = StatusInternalError and reason = "refusing to activate session"

Currently I use this version of boundary on the client, server and worker

boundary version

Version information:
  Git Revision:        d9eba38993eb70820a396894f2f1e28601d13c3d
  Version Number:      0.10.3

To Reproduce
Steps to reproduce the behavior:

  1. Run boundary connect -target-id $target_id -listen-port 5432
  2. Run psql -h 127.0.0.1 -d postgres -U $boundary_token_username
  3. See error

Expected behavior
The boundary agent is able to serve the connections. This worked fine with version 0.9.1

controller-1.log
controller-2.log
worker.log

@EasyNV
Copy link
Author

EasyNV commented Aug 31, 2022

I see that v0.10.2 should have fixed the issue as mentioned here #2362.

But somehow I still got the issue in the v0.10.3 😕

Running with boundary connect postgres -target-id $target_id -dbname postgres works fine. But If I tried to connect by using psql client it will show the tofu error.

@matheusmgon
Copy link

I see that error on try connection in SSH too :/

The problem with migration was fixed ( when trying to upgrade the version 0.10.1 to 0.10.2), but the error when trying to use the same session to connect multiple times did not occur well yet :/

boundary-screenshot-error-bd
boundary-screenshot-error-ssh

PS: Yeah, I configured on the target to not limit multiple connections, and I have one worker for each environment (on the version 0.8 ~ 0.9 worked fine)

@ap-vishal
Copy link

ap-vishal commented Aug 31, 2022

Also getting the same error even after upgrading to 0.10.3 but it is only happening when the worker count is more than 1, if we have just 1 worker then the error is not happening even if we connect with some psql client, which was the case with 0.10.2 or 0.10.1.

@irenarindos
Copy link
Collaborator

Hi all- thank you so much for reporting this. The fix for this issue (#2369) will be included in 10.4

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

Successfully merging a pull request may close this issue.

4 participants