Failed to connect to server (Minecraft server hosting through zrok) [SOLVED!]

Hello, I am trying to use zrok to get a minecraft server ip and I followed the steps from this video "https://www.youtube.com/watchv=Sq43hp6n9rE&lc=UgxV6L6j6depFG0m8n54AaABAg.A3VuYREI2EiA3X10aS9uTz" I followed the steps until the very end and encountered a problem where people are unable to join the world?

I first launched the minecraft server with the properties as shown at the bottom left and I followed this up by enabling zrok with "zrok enable [my private token]" and then running the script (start-server.ps1). Everyone except me (server host) are unable to join even after they input the generated + "minecraft" token. Here are their perspective is shown on the right:

Had to fit all the picture into 1 :(.

sorry for too many questions and thank you!

1 Like

Hi @Dxmola, welcome to the community and to zrok (and OpenZiti)!

Thanks for moving the conversation from that YouTube channel to here. It's dreadful trying to help using YouTube's comments! :slight_smile: And thanks for the information.

From our YouTube conversation, I'm getting the impression that zrok isn't able to connect to the minecraft server. Can we run a few simple commands and just make sure that things are setup right from the start?

  1. Start the Minecraft server (i see it's using 25565)

  2. Make sure the port is open and available on your local machine. I do that from powershell with:

    netstat -ano | findstr 25565
     TCP    0.0.0.0:25565          0.0.0.0:0              LISTENING       18588
     TCP    [::]:25565             [::]:0                 LISTENING       18588
    
  3. Then I confirm that's "java.exe" (Minecraft) by using that last number (the processid) and tasklist like this:

    tasklist | findstr 18588
    java.exe                     18588 RDP-Tcp#0                  2  1,281,128 K
    
  4. Then you can test that "other" programs can connect using powershell like this:

    Test-NetConnection -ComputerName 127.0.0.1 -Port 25565
    
    ComputerName     : 127.0.0.1
    RemoteAddress    : 127.0.0.1
    RemotePort       : 25565
    InterfaceAlias   : Loopback Pseudo-Interface 1
    SourceAddress    : 127.0.0.1
    TcpTestSucceeded : True
    

Once you are sure that port 25565 is open -- AND that you see it listening on IPv4 (like I show) 0.0.0.0:25565 then we should be good to start zrok. You can certainly use that script from my personal repo, but we could also run the zrok private share without it. It's easiest to start with an ephemeral one (one that will change every time) by simply running this from the Minecraft server: zrok share private --backend-mode tcpTunnel 127.0.0.1:25565

This creates a share that you can access with something like zrok access private w3cxzpybi2l8 --bind 127.0.0.1:25565 (that was the ephemeral token given to me when I did it just now)

In the past I've seen people report that they had issues with the version of minecraft, or the server just needed to be restarted etc. I'm happy to DM about this issue too. We also had ipv6/ipv4 issues in the past that are interesting and hard to track down.

After that is working, you would start your zrok client and run that same test connection powershell test but from a client. it should look the same. Here's what it looked like for me when I tested it form the client (left) and the server (right). Notice you see the 127.0.0.1:59305 -> ACCEPT indicating it allowed the traffic in...

Let's start with making sure your ports are open and that you can connect to them using the powershell test shown above?

1 Like

It seems the client side cant connect as the TcpTest returned false (client top image, server bottom image). The client side tried by connecting their zrok by running the clientps1 script and entering their token and finally running the command on powershell.

Here is what it looks like:

And on the client did zrok look like this?

image

I wonder if the CLIENT side is getting blocked by Windows Defender (firewall). Let me try to dig up a few commands to try on the client side that might help diagnose the issue...

Wait... does the client side have zrok.exe ui like the server side? If so it has never even showed up once?? This is the server side but its also missing the bottom half compared to the UI shown in the youtube guide.
image

Oh and also it appears that client side DOES have zrok.exe pop up for split second and closes itself instantly. Maybe the problem is related to this?

To use tcp tunnels with zrok, you must use zrok on the 'server' end of the tunnel, as well as the 'client' end of the tunnel and zrok must remain running.

Are you ok with me trying to connect to your minecraft server? I can try it from my side to eliminate that half of the equation at least.

Yes please as I'm not that familiar with TCP tunneling or Port Forwarding

Well we've established that it's a client-side issue so that's helpful. Here I am in this world...

On any client - can you run the zrok binary itself and just run:

zrok access private grasdvk8zminecraft  --bind 127.0.0.1:25565

?

I wonder if your clients don't have the execution policy set properly.

1 Like

Uhhh I have no idea what happened but the client side just joined the world without a problem running the zrok access private command you have sent me. Now they have the zrok.exe window:

Did you "doubleclick" the start-client or did you run it with execution bypass?

powershell.exe -ExecutionPolicy Bypass -File C:\temp\start-client.ps1

after running that command the zrok command DOES need to start and stay running. But it's just running that zrok command so if that's easier, just have your pals run:

zrok access private grasdvk8zminecraft  --bind 127.0.0.1:25565

:slight_smile:
good luck. have fun!!! Don't let a creeper get you! (or a warden)

1 Like

I ran the zrok access private and not the execution policy bypass and it seemed to have worked!! Thank you so so so much by going through the entire process and dedicating so much time!!

No problem. If you have a github account you and all your friends can go star the repos and help us spread the word! :slight_smile:

1 Like

Yeah definitely! And again thank you very much!! Have a great day :D!!

1 Like