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

change default timeout #73

Open
molander opened this issue Jul 30, 2024 · 12 comments · Fixed by #112
Open

change default timeout #73

molander opened this issue Jul 30, 2024 · 12 comments · Fixed by #112

Comments

@molander
Copy link

TL;DR DROPPING CONNECTION, GETTING 'Unregistered subdomain' CONSTANTLY on client. Have to restart client and comes back up.

The longer version:
First of all, thank you for your project! It is EXACTLY what I was had in mind. Yay!
I have used ngrok since before it was ngrok and ssh tunnels for Xen, bhyve, and other virt hosts before that.
And this is SO MUCH BETTER than the horrible script(s) I wrote in zsh that I used for a couple of years.

So, thanks for open sourcing your project, it is awesome and I really appreciate it! <3
FYI: I had some issues getting set up and I figured that if I am having issues, you can definitely assume others are or will be, too.

Least I can do is take some time to report in with my thoughts and nitpicks :P

Couple of things (both with the binary and building the project, didn't try on mac as I am assuming that's what you dev on and prob works solid I'm guessing):

  • docs were nice and unexpected! kudos!
  • portr config = I am logged in via ssh to a remote server without X, I think you are trying to open a file manager or browser or something, yeah? If you could do a check first or even just dump WHERE the file is supposed to be/go, but I appreciate what you are trying to do, make it easier. Ideally, it would do an X/Wayland check (I use FreeBSD primarily which is a whole nother story)/DISPLAY env var check, and if no DISPLAY, check for EDITOR/vi/nano, if none, print /path/to/file. Actually, I suggest you have the /path/to/config print anyway, why not right?
  • missing portr config file = the only other 'major' issue at that point was that the config file was blank, whereas it seemed like it was not supposed to be based on my understanding at that point. That took me a bit of hair pulling as while your docs are great, going from blank file to connecting remotely to my server portr endpoint successfully was a jump. Not only blank on the server but also the 4 or 5 clients I installed to as well.

Now, some 'get off my lawn' gripes:

  • Docker Dependency (Ok ok, I am a FreeBSD guy, one of the few ppl on Earth that can't run a Docker container (well, we can on FreeBSD, using bhyve to run a container host, which ironically is what EVERYONE will be doing soon, including Linux (that's what Docker Desktop is). If I can figure it out, I will usually try fairly hard to shake the Docker dependency so I can run it on FreeBSD easily.
  • Cloudflare ? How can I shake that one? We don't use Cloudflare and if it's for personal, I'm on afraid.org. Cloudflare is pretty cool, no doubt, but is there a not super difficult way for me to NOT use it? That would be killer.
  • Github Auth: I love that you are security focused but ssh tunnels, I'm good with it. It would be SUPER NICE to just have a brute force login method. A simple hash. I mean, I am root, it's ok. Is that harder than OAUTH, I honestly have no idea, I'm a sysadmin (old, before 'devops'). Having been stuck a few times here and there, not able to 2-factor auth while at a datacenter really sucks so that is just an FYI, too.

Out of those 3, Github auteh dependency would be my REALLY want to have. Then Cloudflare, then docker.

++++++++++++++++++++++++++++++++
Alrighty then, now for my ACTUAL problem lol:
** Unregistered Subdomain =Timeout Too Soon? **
++++++++++++++++++++++++++++++++

So, I have a flaky service on a flaky box at a flaky location (only half-kidding!) and so I have Supervisor kicking the service constantly to keep it available. It seems like the portr server endpoint drops it in a hot microsecond.

Is that adjustable anywhere somewhere? Like, it's not a big deal for me if it doesn't check for a minute or 3, you know? It would be extra sweet if that was a knob that was tunnel adjustable! Like tunnel1 is high availability if it isn't there in 5s, it's already spinning up elsewhere and trying to connect but tunnel2 is my sad offsite server in the desert on a satlink. Shady. It can wait 5m.

Anyway, I am also most likely 'doing it wrong', so feel free to educate me :D

Along those lines, can I easily turn a knob to quiet the logging too?

Once again, thanks for open sourcing, it was the right choice.

Maybe you will be bigger ngrok one day.

ciao,
-matt

@jacobhallenborgprototyp
Copy link

jacobhallenborgprototyp commented Aug 5, 2024

I'm having the same problem with connections closing after a couple of minutes.
The client does not report any error.
Are there any logs on the server where we can find details about why this happens?

We're running the server using Docker with the images of version 0.0.12-beta and Cloudflare

Thanks for a great product/project 🙏

Kind regards,
Jacob

@amalshaji
Copy link
Owner

@molander

docs were nice and unexpected! kudos!

Thanks

portr config = I am logged in via ssh to a remote server without X, I think you are trying to open a file manager or browser or something, yeah? If you could do a check first or even just dump WHERE the file is supposed to be/go, but I appreciate what you are trying to do, make it easier. Ideally, it would do an X/Wayland check (I use FreeBSD primarily which is a whole nother story)/DISPLAY env var check, and if no DISPLAY, check for EDITOR/vi/nano, if none, print /path/to/file. Actually, I suggest you have the /path/to/config print anyway, why not right?

The auto-config file creation is only tested locally. I can add the check, but you can manually create the configuration file. Use this template

server_url: example.org
ssh_url: example.org:2222
secret_key:
tunnels:
  - name: portr
    subdomain: portr
    port: 4321
  • Docker was used to make it easy to set up with a few commands. If you want to install it without docker, feel free to do so; there shouldn't be any issues. I will add a section to the documentation for it.
  • Cloudflare (or any other DNS provider) is used to set up wildcard SSL for subdomains. Could you check if Caddy supports your DNS provider?
  • Github Auth will soon be made optional, and email/password login will become the default.

@amalshaji
Copy link
Owner

@jacobhallenborgprototyp Does the disconnect issue happen too frequently? I have faced the issue, but not frequently; upon re-connecting, it works fine. Nevertheless, it is something I will look into.

@jacobhallenborgprototyp
Copy link

jacobhallenborgprototyp commented Aug 6, 2024

@amalshaji Thanks for your reply :)

We've upgraded to amalshaji/portr-admin:0.0.15-beta but it's still an issue for us, now they disconnect after as little as 2 minutes, sometimes.

It's ofc easy to restart the tunnels, but we'd really like to have them running continuously, since we're using them to receive webhooks.

Let us know if we can gather more info somehow, like in the logs?

@amalshaji
Copy link
Owner

@amalshaji
Copy link
Owner

@jacobhallenborgprototyp Does it happen too frequently? Like you connect and after some time you see the Unregistered subdomain screen, you reconnect and the pages comes back again?

@amalshaji
Copy link
Owner

@molander

missing portr config file

The setup script should auto download the config file into your clients.

@jacobhallenborgprototyp

@jacobhallenborgprototyp Does it happen too frequently? Like you connect and after some time you see the Unregistered subdomain screen, you reconnect and the pages comes back again?

I my opinion it happens too frequently. The manual reconnection works, but it would be smoother not having to worry at all about the tunnels once they are started.

@amalshaji
Copy link
Owner

amalshaji commented Aug 25, 2024

@jacobhallenborgprototyp This is most likely a connection drop; we will implement re-connections.

@jacobhallenborgprototyp

@jacobhallenborgprototyp This is most likely a connection drop; we will implement re-connections.

That would be awesome :)

@molander
Copy link
Author

+1 :D

@amalshaji
Copy link
Owner

@jacobhallenborgprototyp @molander The latest release should auto reconnect on connection drop

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.

3 participants