Yum packages are broken (with fix)

Whilst trying to set up couchbase on AWS, I discovered an issue with the the package repos in yum. If you run the following, as referenced in this documentation and here, you’ll run into an error during the install line.

curl -O http://packages.couchbase.com/releases/couchbase-release/couchbase-release-1.0-0-x86_64.rpm
sudo rpm -i couchbase-release-1.0-0-x86_64.rpm
sudo yum -y install couchbase-server-community

The error is as follows:

http://packages.couchbase.com/releases/couchbase-server/enterprise/rpm/%25SERVER_VERSION%25/x86_64/repodata/repomd.xml: [Errno 14] PYCURL ERROR 22 - "The requested URL returned error: 403 Forbidden"
Trying other mirror.


 One of the configured repositories failed (Couchbase Server),
 and yum doesn't have enough cached data to continue. At this point the only
 safe thing yum can do is fail. There are a few ways to work "fix" this:

	 1. Contact the upstream for the repository and get them to fix the problem.

	 2. Reconfigure the baseurl/etc. for the repository, to point to a working
		upstream. This is most often useful if you are using a newer
		distribution release than is supported by the repository (and the
		packages for the previous distribution release still work).

	 3. Disable the repository, so yum won't use it by default. Yum will then
		just ignore the repository until you permanently enable it again or use
		--enablerepo for temporary usage:

			yum-config-manager --disable couchbase-server

	 4. Configure the failing repository to be skipped, if it is unavailable.
		Note that yum will try to contact the repo. when it runs most commands,
		so will have to try and fail each time (and thus. yum will be be much
		slower). If it is a very temporary problem though, this is often a nice
		compromise:

			yum-config-manager --save --setopt=couchbase-server.skip_if_unavailable=true

failure: repodata/repomd.xml from couchbase-server: [Errno 256] No more mirrors to try.

This issue is caused by an environment variable (presumably used to point to the latest version of the couchbase packages) not resolving properly. You can work around this issue by opening up /etc/yum.repos.d/couchbase-Base.repo in your favorite text editor and updating each line starting with baseurl and replacing %SERVER_VERSION% with the current couchbase version (which appears to be 7).

Example:
http://packages.couchbase.com/releases/couchbase-server/enterprise/rpm/%SERVER_VERSION%/$basearch/ would be http://packages.couchbase.com/releases/couchbase-server/enterprise/rpm/7/$basearch/

This post is just a friendly heads up for people struggling with the same issue and for whoever is maintaining these repos.

Hi - thanks for the report! I’m the current maintainer of the yum repository and I’d like to get this fixed.

What Linux version were you using on AWS when you saw this? I have tested this on at least Centos 6 and 7 and it seems to work as expected.

FYI, the missing “7” in there should refer to the Red Hat Linux version. eg., it should be 7 if you are on RHEL7 or Centos 7.

We actually noticed this issue previously and as far as I’m aware it has already been fixed. It seems that the blog may need an update.

@kommunicate could you try downloading and installing couchbase-release-1.0-2-x86_64.rpm instead?

That is: http://packages.couchbase.com/releases/couchbase-release/couchbase-release-1.0-2-x86_64.rpm