Hi. Performed a docker compose pull
earlier today and now I am getting the following error when trying to bring up the docker instance:
[ERROR]: unable to create zrok client (client version error accessing api endpoint 'https://api.zrok.io': [POST /clientVersionCheck] clientVersionCheck (status 404): {}: [POST /clientVersionCheck] clientVersionCheck (status 404):
A colleague of mine is having the same issue. Any ideas?
zrok v1.0.x
uses a different API endpoint than v0.4.x
. v0.4.x
used the endpoint https://api.zrok.io
, and v1.0.x
uses the endpoint https://api-v1.zrok.io
. To allow ease of migration, we're running both v0.4.x
and v1.0.x
in parallel in production.
zrok v1.0.0
includes a new command zrok rebase
, which is used to update an existing environment (created using zrok enable
) to point to a different API endpoint (the API endpoint is stored in the environment).
To update your environment to the new endpoint, you'll want to execute the docker equivalent of the command:
$ zrok rebase apiEndpoint https://api-v1.zrok.io
That worked for me. No need to do anything Docker related. Just executed your command and it started working again. Thank you!!!
1 Like
Excellent! We're working on getting the documentation updated.
If you needed to downgrade back to v0.4.x
for any reason, you can use the the v1.0.0
binary to issue the zrok rebase apiEndpoint https://api.zrok.io
command, and then your v0.4.x
installation will work again as it was.
Under the covers, all this is doing is altering the ${HOME}/.zrok/environment.json
file, which can also be done with any text editor. zrok rebase
just makes it easy and convenient.
There is also a zrok rebase accountToken
command, which can be used to update an environment to a new account token if you happen to regenerate your account token through the api console.
Thanks for confirming it worked! In your case, the Docker host user's zrok account environment was mounted on the container, so you were able to rebase the account environment without running any commands inside the container.
However, others will be unable to solve the same problem with the same solution. If the zrok account environment is in a Docker volume, not mounted from the Docker host, then you must run the rebase
command inside the Docker container.
For example, if you followed the zrok frontdoor guide Docker example, you can run the same command inside the zrok-share
container.
docker compose run --rm --entrypoint= zrok-share \
zrok rebase apiEndpoint https://api-v1.zrok.io
The same symptom may occur with zrok frontdoor on Linux. Then, you must run the command within the state directory of zrok-share.service
.
sudo HOME=/var/lib/private/zrok-share zrok rebase apiEndpoint https://api-v1.zrok.io