omrikiei / ktunnel

A cli that exposes your local resources to kubernetes
GNU General Public License v3.0
975 stars 75 forks source link

Hanging at INFO[0000] waiting for deployment to be ready #45

Closed mysterybear closed 3 years ago

mysterybear commented 3 years ago

Image is v1.3.6

Kubernetes side, deployment/pod seems to start up just fine:

k get pods
NAME                       READY   STATUS    RESTARTS   AGE
ktunnel-77b65858f8-w9zg5   1/1     Running   0          35s
k get deployments
NAME      READY   UP-TO-DATE   AVAILABLE   AGE
ktunnel   1/1     1            1           37s

Edit: just tried with v1.3.3 also since I remember that working for sure last time I used this (It's me from #36 :D) issue persists just the same... I've checked I haven't got any lingering ktunnel resources server-side as well

Edit: k logs on the server pod shows:

INFO[2021-04-12 15:35:20.451] Starting to listen on port 28688          
omrikiei commented 3 years ago

hey @mysterybear can you try running ktunnel with the verbose flag to see if we can catch additional details from the logs?

mysterybear commented 3 years ago

Hi @omrikiei I was running with the verbose flag already!

I tried strace, it's pretty noisy, nothing obvious jumping out (was hoping that would hang so we could see where but instead it just keeps logging and logging)

next thing I could try is running the client and server aspects separately rather than using the expose shorthand I guess? I'll try that, pretty busy and did get a tunnel working with frp for my use case this time

omrikiei commented 3 years ago

Hey @mysterybear, on your client logs, do you see the following log message? Exposed service's cluster ip is: x.x.x.x

omrikiei commented 3 years ago

I think this is happening because of a time offset between your machine and the kubernetes node, I will start working on a fix - if you could verify it that would be great!

mysterybear commented 3 years ago

Hey @mysterybear, on your client logs, do you see the following log message? Exposed service's cluster ip is: x.x.x.x

Yes that is there, I just didn't include it, sorry for that!

I think this is happening because of a time offset between your machine and the kubernetes node, I will start working on a fix - if you could verify it that would be great!

There's a 1 hour time difference between me:

Wed 14 Apr 15:33:45 BST 2021

And the node:

Wed Apr 14 14:33:21 UTC 2021
outbounder commented 3 years ago

Hi,

jfyi: we were hit by the same issue reproduced on mac with timezone difference with v1.3.4, after updating to v1.3.7 the issue was not reproduced.

Note: on ubuntu with v1.3.3 the issue is not present.

Hope that helps, Cheers for the good work with ktunnel! 👏🙇

omrikiei commented 3 years ago

Hey @mysterybear, issue is resolved on v1.3.7, could you kindly confirm it works now?

mysterybear commented 3 years ago

Hey @mysterybear, issue is resolved on v1.3.7, could you kindly confirm it works now?

Yes, confirmed! Thanks again @omrikiei !