Add a gateway to an existing repository


Is it possible to add a gateway to an existing repository ? In the documentation it is only indicated how to create a gateway on a new repository.

Thanks !

Hi Martin,

Yes this is possible. As described in the docu you just have to create a gateway key /etc/cvmfs/keys/<myrepo>.gw and add the repo to the repo.json in /etc/cvmfs/gateway/. As an extra step you now have to restart cvmfs-gateway service. And then you create on your publisher node the repo linked to the gateway-repo as described in the docu.

Let me know if that doesnt work.

Hi Laura,

Thanks for your response. It fails on the publisher node (gateway is running on the stratum0) :

Creating Configuration Files... done
Importing CernVM-FS Master Key and Certificate from '/tmp/repo_keys'... done
Creating CernVM-FS Server Infrastructure... done
Creating Initial Repository... done
Mounting CernVM-FS Storage... (overlayfs) Failed to initialize root file catalog (16 - file catalog failure)

Hi Martin,

Could you please provide the command you are running to create the repo on the publisher? Do you use S3 as storage backend?
And how does your /etc/cvmfs/repo.json look like?

And please double check if:

  • The repo is healthy on the stratum 0 << this in particular
  • The keys (.gw/.crt/.pub) are the same on publisher and stratum 0
  • The ports are open on the stratum 0 (4929 and 80)

I’m still new, but as far as I understood this does not seem directly connected to the gateway.
If I understand the order of code execution correctly: from the publisher you are able to connect to the gateway/apache server for the specified repo but afterwards when trying to create the mountpoint the init fails.

Hi Laura,

Command used to create the repo :

sudo cvmfs_server mkfs -w http://stratum0/cvmfs/repo                          -u gw,/srv/cvmfs/repo/data/txn,http://stratum0:4929/api/v1                          -k /tmp/repo_keys -o `whoami` repo

We don’t use S3. Here is the json file :

    "version": 2,
    "repos" : [

Repo is healthy, keys are ok and 4929/80 port are open and reachable.


Hi Martin,

We think the most likely problem is that your public key is incorrect. Could you double check that the public key on the publisher is equal to the public key of the repo on the gateway?

Other, rather unlikely, alternative is that you do not have enough disk space on the publisher (root catalog is only couple of MBs max).

(In case you want to check if you have access to the repo from the publisher you can always try out curl http://stratum0/cvmfs/repo/.cvmfspublished independent of mkfs)

Hi Laure,

You are right, sorry for the waste of time :face_with_diagonal_mouth: