Musicbrainz-server-2016-08-15-beta1.ova / Provided access token is invalid / Replication fails

I have downloaded and started the newest VM beta version from
ftp://ftp.eu.metabrainz.org/pub/musicbrainz-vm/
If I use exact the same access token which still works fine with the last official VM with the command bin/replicate now, I get the error:
Provided access token is invalid!
I’m sure that the correct access token is saved in the file
/musicbrainz/musicbrainz-docker/musicbrainz-dockerfiles/DBDefs.pm

Where else should I check the presence of this access token?

https://github.com/metabrainz/musicbrainz-vm#replication--live-data-feed says to use a set-token command. That script, in turn, runs something in/through docker, which I don’t know how to follow, so I don’t know if set-token does more than set a value in DBDefs.pm.

@Rob might know more.

Thanks @Freso
I used the command
docker exec musicbrainzdocker_musicbrainz_1 /set-token.sh <replication token>
and double checked the value in the DBDefs.pm.

Where or what should I check additionally?

For the records, that’s the content of the set-token.sh:

#!/bin/bash
if [[ $# != 1 ]]; then
echo "Usage: $0 <access token>"
    exit -1
fi

grep -v REPLICATION_ACCESS_TOKEN /musicbrainz-server/lib/DBDefs.pm > /tmp/DBDefs.pm
echo -n "sub REPLICATION_ACCESS_TOKEN { \"" >> /tmp/DBDefs.pm
echo -n $1 >> /tmp/DBDefs.pm >> /tmp/DBDefs.pm
echo "\" }" >> /tmp/DBDefs.pm
mv /tmp/DBDefs.pm /musicbrainz-server/lib/DBDefs.pm`

In the VM simply do:

cd
bin/set-token
bin/replicate now

There is never any need for anyone to deal with docker containers. This is documented here:

If you’re using the VM directly and not vagrant, you can skip the “vagrant ssh --” prefix for all the commands. Not sure why it insists that the given token is invalid. Try using the scripts without using docker and see if that improves things.

Thanks for your answer @rob
Please have a look at the printscreen. Maybe you can see what I’m doing wrong?

How can I make the replication step more verbose when using my access token?

Please read the Troubleshooting section here:

https://github.com/metabrainz/musicbrainz-vm/blob/master/VM-USAGE.md

Thank you for your time and the new VM-USAGE document.

BTW:
I found the solution for my “provided access token is invalid” problem.

4 Likes

@Freso: No need to worry, I’m the only one using VMWare with your *.OVA and I learned from @rob

“VMWare is not a supported environment. Please use VirtualBox.”

:wink:

For everyone else googling this thread and using VMWare anyway:
If you copy & paste your access token from outside VMWare into the running ubuntu console of the imported *.OVA, you may detect one or more switched y and z letters.
Even if your access token looks the same at first sight: Only 1 false Y at the position of a Z results in the above error message. So check every single of the 40 letters of your access token. The devil’s in the detail. :smiling_imp:

1 Like

I have an ESX server with some spare capacity. I’ve run the MB VM on it in the past, and may again in the future.

Rule #387 of the Internet: You’re never the only one on the planet doing a particular thing.

German keyboard? ssh-ing into your VM should protect you from this kind of problems…

2 Likes

Yes. Next time I try it with PuTTY :bulb: