Zrok stopped working (401 Unauthorized error)

I'm running Windows 10.

I use Zrok for testing purposes, I run my usual command:

zrok share public localhost:8000

It usually works, but today it gives me:

[ERROR]: unable to create share (unable to create share: [POST /share][401] shareUnauthorized)

How do I fix this?

I fixed it simply by running:

zrok disable

Then:

zrok enable <my token>

Just in case anyone encounters the same problem!

Hi @simplisticallysimple, welcome to the community and to zrok (and OpenZiti)! Congratulations, I think that's the quickest self answer ever! :smile: Glad you got it sorted.

If you find that is necessary to do again, please let us know. You certainly shouldn't need to do that. Cheers!

1 Like

I tried to disable and enable again but it does not work.
may be since I deleted envi from api.zrok.io?
What can I do next

1 Like

I was using zrok-share.service (zrok frontdoor) and I had this error.

I uninstalled (purge) zrok-share and then I removed /var/lib/private/zrok-share and /var/lib/zrok-share too. I'm not sure what exactly was the problem. I also did zrok disable, changed account token, changed environment name...

Then everything worked again.

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

If you get this issue again, could you let us know so we can try to figure out what happened and why? Were there any logs captured you could show us? That sort of issue should not happen without a good reason.

Are you willing to share (through DM here or email) your zrok account and IP that had this issue so we can try to look through out logs?

Hi @TheLumberjack
I'm so sorry I forgot to copy the error and I cleared the log because it was repeated many times.

The error was the same from this topic (reserve command worked fine, it was the share command that failed)

zrok-share worked well the first time, but then I deleted the environment because I wanted to use an environment I had already created manually with the commands (not using the zrok-share.service). Now I know it is not necessary, zrok-share service does everything automatically.
Then, the problem happened, I changed the zrok target to the existing environment in the zrok-share.env file and it didn't work. Then I tried changing target, token, etc and nothing.

I think it only worked after I removed /var/lib/private/zrok-share because I tried uninstalling and removing other files before and it didn't work.

I am using a Raspberry Bookworm OS.

Greetings :smiley:

I have encountered this issue too.
I could share details to help investigate the issue.

here's the address:
o4h90owezixt

Hi @softdev45, welcome to the community and to zrok (and OpenZiti and BrowZer). I'll see if I can get someone to reply back with the issue. This is often due to tripping the usage limits in some way. I don't have great visibility there so I'll have to ask around and get someone better versed than me to reply.

@Deme94 I'm so sorry I lost sight of your reply! :frowning: Did you ever get this sorted?

@softdev45 ... it looks like you might have 5 shares allocated currently, and this is the limit of the number of shares you can have with a free account. If you remove one or more of the shares, you'll be able to create new ones.