Closed stb1337 closed 2 years ago
Hi @sTb1337,
according to this line failed connecting to localhost on port 80 scheme tcp error="dial tcp [::1]:80: connect: connection refused"
it seems like your local machine is not listening on port 80... are you listening on a different port locally?
Hi @sTb1337 is this still an issue?
i am so sry for answering you so late. I will have a look. Thank you for your patience.
@sTb1337 hi, this issue seems stale, is it still relevant?
@omrikiei sry for keeping you wanting so long.
Yes the problem still exists with version 1.4.8 and I am running an http server on my local port 80.
ktunnel inject deployment broker 80:80 -n cluster-base-integration INFO[0000] Injecting tunnel sidecar to cluster-base-integration/broker INFO[0000] ProgressDeadlineInSeconds is currently 600s. It may take this long to detect a deployment failure. INFO[0000] Waiting for deployment to be ready INFO[0001] deployment "broker" successfully rolled out INFO[0001] port forwarding to https://api.....com/api/v1/namespaces/cluster-base-integration/pods/broker-86554d5467-zbrd6/portforward INFO[0001] Waiting for port forward to finish INFO[0002] Forwarding from 127.0.0.1:28688 -> 28688 Forwarding from [::1]:28688 -> 28688 INFO[2022-09-16 10:55:58.443] starting tcp tunnel from source 80 to target 80 ERRO[2022-09-16 10:55:58.666] failed parsing session uuid from stream, skipping error="invalid UUID length: 0" session= INFO[2022-09-16 10:55:58.666] new connection port=80 session= INFO[2022-09-16 10:55:58.667] closing listener on 80 error="context canceled"
Also with only exposing a k8s service is failing:
ktunnel expose -n cluster-base-integration broker 80:80 INFO[0000] Exposed service's cluster ip is: 100.108.39.241 .INFO[0000] waiting for deployment to be ready .. INFO[0001] port forwarding to https://api.....com/api/v1/namespaces/cluster-base-integration/pods/broker-64c5c64444-87wn9/portforward INFO[0001] Waiting for port forward to finish INFO[0001] Forwarding from 127.0.0.1:28688 -> 28688 Forwarding from [::1]:28688 -> 28688 INFO[2022-09-16 10:49:08.801] starting tcp tunnel from source 80 to target 80 ERRO[2022-09-16 10:49:08.977] failed parsing session uuid from stream, skipping error="invalid UUID length: 0" session= INFO[2022-09-16 10:49:08.978] new connection port=80 session= INFO[2022-09-16 10:49:08.978] closing listener on 80 error="context canceled"
Error within the started ktunnel pod:
INFO[2022-09-16 09:04:39.237] Starting to listen on port 28688 INFO[2022-09-16 09:04:39.679] opening connection port=80 schema=TCP ERRO[2022-09-16 09:04:39.679] Failed listening on port 80 error="listen tcp :80: bind: permission denied"
I was able to resolve this problem by NOT using port 80 to be exposed within the cluster.
ktunnel expose broker 8080:80 -n cluster-base-integration INFO[0000] Exposed service's cluster ip is: 100.111.230.107 .INFO[0000] waiting for deployment to be ready .... INFO[0001] port forwarding to https://api.....com/api/v1/namespaces/cluster-base-integration/pods/broker-67554bf68d-f2zxw/portforward INFO[0001] Waiting for port forward to finish INFO[0001] Forwarding from 127.0.0.1:28688 -> 28688 Forwarding from [::1]:28688 -> 28688 INFO[2022-09-16 11:07:50.846] starting tcp tunnel from source 8080 to target 80 INFO[2022-09-16 11:08:23.488] new connection port=80 session=f9699c99-7a73-4a15-9aec-755f29239cfe
i have changed my k8s ingress from 80 to 8080. Now its working.
I have a K8s Deployment which declares containerPort 80 for an REST Server.
I want to redirect all ingress traffic from this K8s Deployment (POD) to my local machine.
I am using version 1.4.0