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

Unix socket support broken in 1.9.2 #496

Open
mlafeldt opened this issue Dec 9, 2024 · 5 comments · May be fixed by #498
Open

Unix socket support broken in 1.9.2 #496

mlafeldt opened this issue Dec 9, 2024 · 5 comments · May be fixed by #498

Comments

@mlafeldt
Copy link

mlafeldt commented Dec 9, 2024

Hey, I've been using grpcurl for a while now. A few days ago, I noticed that I can no longer connect to my gRPC server over Unix domain sockets:

❯ grpcurl -unix -plaintext -authority dummy /tmp/actions.sock list
Failed to dial target host "/tmp/actions.sock": connection error: desc = "transport: error while dialing: dial tcp: address /tmp/actions.sock: missing port in address"

❯ grpcurl -version
grpcurl 1.9.2

Version 1.9.1 works fine, so this problem must have been introduced with the latest release:

❯ ~/Downloads/grpcurl_1.9.1_osx_arm64/grpcurl -unix -plaintext -authority dummy /tmp/actions.sock list
grpc.reflection.v1.ServerReflection
...
@mlafeldt
Copy link
Author

mlafeldt commented Dec 9, 2024

Looking at the changelog, #480 might be the culprit, but I'm only speculating.

@stuartcarnie
Copy link

I can confirm that reverting #480 resolves the issue

@zhyuri
Copy link

zhyuri commented Dec 19, 2024

I think the change #480 is correct. In fact, with that commit, the network parameter can be removed from BlockingDial along with the -unix option from the CLI.

This is because the grpc-go dialer can handle RFC 3986 compliant URI. Here the network type is resolved as unix if the address has unix as schema.

In the example from @mlafeldt, I believe the following should work in grpcurl 1.9.2. Note that -unix is removed and the proxy address has a schema unix://

grpcurl -plaintext -authority dummy unix:///tmp/actions.sock list

@zhyuri zhyuri linked a pull request Dec 19, 2024 that will close this issue
4 tasks
@jhump
Copy link
Contributor

jhump commented Dec 19, 2024

@zhyuri, the changes you propose (and that are in PR #498) are not backwards compatible, so I think are non-starter. It would be better to re-formulate this so it's a backwards-compatible change, in a way that also fixes the -unix flag. I left comments on the PR with more details.

@zhyuri
Copy link

zhyuri commented Dec 20, 2024

@jhump thanks for the review!

I pushed a few commits to the PR to address your comments. I also updated the PR description to reflect the change.

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