tproxy icon indicating copy to clipboard operation
tproxy copied to clipboard

Getting "use of closed connection" error

Open digi0pz opened this issue 1 year ago • 3 comments

Hello!

I'm just trying to set this up for the first time and see how my TCP connection pooling is working. But I'm getting this error regardless of whether I trying to hit from the Postman or my golang application:

[4] CLIENT error, read tcp 127.0.0.1:8005->127.0.0.1:52963: use of closed network connection

Here's the command I'm running:

tproxy -p 8005 -r <private_host>.amazonaws.com:80 -t http2

I fear I'm missing out on something basic. Can you help me out here? Thanks in advance.

digi0pz avatar Sep 27 '24 18:09 digi0pz

Thanks for using tproxy!

Is your service serving with HTTP2? And would you please take a screenshot on how you used postman if possible?

kevwan avatar Sep 28 '24 07:09 kevwan

Thanks for your reply!

I'm using tproxy in front of OpenSearch and afaik it doesn't support HTTP2. Attaching the screenshot of Postman along with the console error. image

digi0pz avatar Sep 28 '24 19:09 digi0pz

Here's how the tproxy logs look as well (removing the URL/request body content):

01:18:32.895 from CLIENT [1]
grpc:(http2:preface)
[...]

01:18:32.895 from CLIENT [1]
grpc:(http2:unknown_frame_type_47 stream:774966538 len:5526608)
[...]

01:18:32.921 [1] Client connection closed
01:18:32.921 [1] Server connection closed
01:18:32.921 [1] CLIENT error, read tcp 127.0.0.1:8005->127.0.0.1:50367: use of closed network connection

I'm passing the -t http2 flag but I'm still getting grpc in the logs. Am I doing something wrong?

digi0pz avatar Sep 28 '24 19:09 digi0pz