Error when trying to connect

The title mentions "Error when trying to connect" but no specific error is displayed. What happens is that connection attempt logs appear in the Zrok terminal, but the page remains inaccessible, resulting in a continuous loop of attempts. I haven't been able to identify the cause of the problem, and I don't believe it's a usage limit, as I haven't reached that restriction yet.

Could anyone help me?

Hi @Half, welcome to the community and to zrok. Those all look to me like the attempts are making it through properly. My hunch/expectation is the target is rejecting the request for whatever reason. If you were hitting a usage limit, you'd get a clear error popping out in those logs.

Can you describe what you're trying to do, what command you ran, and where the "error when trying to connect" occurs? It'll help us help you better.

First of all, thank you for the warm welcome and for trying to help me. I’m running a Django system and using Zrok to share local access with friends for testing purposes. Until yesterday, everything was working perfectly. My average data usage is around 100 MB per day, so I believe I haven’t reached any limits, based on what I’ve read about Zrok.

I usually run Zrok with the following command: zrok share reserved 8gn9sblh86gr

The terminal opens normally, but when I try to access the generated link to connect to my local server, the page no longer loads. Additionally, the Zrok terminal enters an infinite loop, making it impossible to establish a connection with the server. This issue wasn’t happening before.

I suspected that a recent update might have caused this, so I updated Zrok to the latest version, but the problem persists.

Interesting. It's always a possibility! You're doing development too, so (not to point fingers) I need to ask, did your side change at all? Maybe the Django app is making an infinite loop of requests?

Could you start by changing from a reserved share back to an ephemeral one? I think that makes sense from a troubleshooting perspective. Also, maybe run with --headless and maybe use --verbose to get additional logs. Something might show up then. (I'm on my mobile but I think those are the right flag names)

If the ephemeral share works, then I'd make a new reserved share. If THAT works (and only then) I'd release your old share and recreate it if you want to use the same reserved name.

When I run the project only on localhost, everything works normally. The issue occurs when trying to route access to my local IP. My local IP remains the same as the one registered in Zrok, so that shouldn't be the cause of the problem.

In any case, I’ll apply the modifications you suggested and run some tests. I’ll be back soon with feedback.

Thanks again!

Hi again, I found the problem!

Some time ago, I attempted to use a custom domain that I had purchased for my project. The idea was to configure Zrok's DNS to point to this domain and use it directly. During my testing, one of the steps I tried was creating a local SSL certificate to make everything work.

However, I was never able to successfully configure it. Since the certificates were registered in the system and weren't causing any apparent errors, I left them as they were. But starting yesterday, an error began to appear, and I didn’t suspect that it could be related to this issue.

After running new tests, I got the following error when executing the command: zrok share reserved 8gn9sblh86gr

Error message in the terminal:
[ 9.047] ERROR zrok/endpoints/proxy.newReverseProxy.func2: error proxying: tls: failed to verify certificate:
x509: certificate is valid for desolararpg.com, www.desolararpg.com, not localhost

This indicated that the issue was related to the previously configured SSL certificate.

To test, I ran the following command: zrok share reserved 8gn9sblh86gr --insecure

After doing this, everything started working again.

Since I just remembered this DNS-related issue, I’d like to ask: is there currently an official way to configure Zrok to point directly to a custom domain?

If this functionality is available, could you point me to any relevant topics or documentation where this has been discussed?

Thanks in advance for the support!

It's actually just about to roll out very soon. Glad you figured out your issue! Stay tuned for the announcement wrt custom domains

1 Like

We're in the midst of rolling out support for custom domains for the zrok.io service. You need to be on a PRO plan, see Custom Domains | Zrok

1 Like

Thank you, guys! I'll be following closely and will definitely subscribe to the PRO plan. See you soon. Much gratitude!

Yes... you're receiving his error message because your zrok share command is attempting to connect to your private web server using a https://localhost address, and your local private web server is returning a certificate that identifies it as "desolararpg.com", so the names do not match, and the TLS client in the zrok share command is (rightly) refusing to connect.

When you use --insecure with zrok share, it tells the zrok share client to ignore issues with TLS certificates when connecting to the shared private web server.

1 Like

The provided link does not mention any date for when this feature will be available, which implies that it is already functional. However, you mentioned that it is still in the finalization process. Where will the official announcement be made once this option becomes available?

It's deployed and functional right now for a set of hand-picked users. So far this has gone very well, and we expect to remove the "coming soon" banner from the pricing page this week. We also are planning a blog post. I'll try to remember to post back to this thread at that point

1 Like

Custom domains feature is now fully available in the PRO tier. Here's the blog post I mentioned: zrok Custom Domains

1 Like