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

ip2unix socket unlinks immediately after creation #28

Open
leifwalsh opened this issue Jul 3, 2021 · 1 comment
Open

ip2unix socket unlinks immediately after creation #28

leifwalsh opened this issue Jul 3, 2021 · 1 comment
Labels
bug Something isn't working

Comments

@leifwalsh
Copy link

I'm trying to use ip2unix to make JetBrains Projector listen on a unix socket instead of an ip socket, as described in https://youtrack.jetbrains.com/issue/PRJ-278. I can put Projector behind an Envoy reverse proxy to terminate SSL and authentication/authorization, but I'm concerned that Projector will still be listening on the loopback address, which means on shared hosts, other users can connect to Projector directly without going through Envoy.

I tried wrapping Projector in ip2unix -r tcp,address=::ffff:127.0.0.1,port=8887,path=/tmp/projector.sock, but it appears that the process creates the socket file but then immediately unlinks it. I think maybe this has something to do with #16, possibly the JVM is binding the socket and then passing it to a child, or creating a child (I guess a thread) that then causes it to close.

As described in #16 (comment), I tried commenting out this line to prevent unlink altogether:

this->unlink_sockpath = newpath;

If I do that, it doesn't get unlinked, but then inbound connections hang forever instead of just failing to connect.

I'm not sure what to do to get more information here.

@aszlig
Copy link
Contributor

aszlig commented Jul 7, 2021

If I do that, it doesn't get unlinked, but then inbound connections hang forever instead of just failing to connect.

Can you please supply a run of ip2unix -vvvvv with that modification?

Additionally, can you provide a way to reproduce this in an automated test, eg. like this? I usually try to test with the affected software directly but I don't know anything about Projector.

@aszlig aszlig added the bug Something isn't working label Jul 7, 2021
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

No branches or pull requests

2 participants