# Repository poudriere has a wrong packagesite



## awenger (Mar 27, 2015)

I have come across this issue when actually installing packages with Poudriere (see below).
What action should be performed on Poudriere to get this working ?

FreeBSD 10.1 client running pkg-1.4.12:

```
# pkg install wget
Updating poudriere repository catalogue...
pkg: Repository poudriere has a wrong packagesite, need to re-create database
pkg: http://poudriere.vm.dom/packages/freebsd_10-1x64-HEAD//meta.txz: Gateway Time-out
pkg: repository poudriere has no meta file, using default settings
pkg: http://poudriere.vm.dom/packages/freebsd_10-1x64-HEAD//packagesite.txz: Gateway Time-out
pkg: Unable to update repository poudriere
All repositories are up-to-date.
pkg: Repository poudriere has a wrong packagesite, need to re-create database
pkg: Repository poudriere cannot be opened. 'pkg update' required
pkg: No packages available to install matching 'wget' have been found in the repositories
```

Poudriere:

```
# pkg -vv
Version  : 1.4.12
PKG_DBDIR = "/var/db/pkg";
PKG_CACHEDIR = "/var/cache/pkg";
PORTSDIR = "/usr/ports";
INDEXDIR = "";
INDEXFILE = "INDEX-10";
HANDLE_RC_SCRIPTS = false;
ASSUME_ALWAYS_YES = false;
REPOS_DIR [
  "/etc/pkg/",
  "/usr/local/etc/pkg/repos/",
]
PLIST_KEYWORDS_DIR = "";
SYSLOG = true;
ABI = "FreeBSD:10:amd64";
ALTABI = "freebsd:10:x86:64";
DEVELOPER_MODE = false;
VULNXML_SITE = "http://vuxml.freebsd.org/freebsd/vuln.xml.bz2";
FETCH_RETRY = 3;
PKG_PLUGINS_DIR = "/usr/local/lib/pkg/";
PKG_ENABLE_PLUGINS = true;
PLUGINS [
]
DEBUG_SCRIPTS = false;
PLUGINS_CONF_DIR = "/usr/local/etc/pkg/";
PERMISSIVE = false;
REPO_AUTOUPDATE = true;
NAMESERVER = "";
EVENT_PIPE = "";
FETCH_TIMEOUT = 30;
UNSET_TIMESTAMP = false;
SSH_RESTRICT_DIR = "";
PKG_ENV {
}
PKG_SSH_ARGS = "";
DEBUG_LEVEL = 0;
ALIAS {
}
CUDF_SOLVER = "";
SAT_SOLVER = "";
RUN_SCRIPTS = true;
CASE_SENSITIVE_MATCH = false;
LOCK_WAIT = 1;
LOCK_RETRIES = 5;
SQLITE_PROFILE = false;
WORKERS_COUNT = 0;
READ_LOCK = false;
PLIST_ACCEPT_DIRECTORIES = false;
IP_VERSION = 0;
AUTOMERGE = true;
VERSION_SOURCE = "";
CONSERVATIVE_UPGRADE = false;


Repositories:
  poudriere: {
  url  : "file:///data/poudriere/data/packages/freebsd_10-1x64-HEAD",
  enabled  : yes,
  priority  : 0,
  mirror_type  : "SRV",
  signature_type  : "PUBKEY",
  pubkey  : "/usr/local/etc/ssl/certs/poudriere.cert"
  }
```


----------



## SirDice (Mar 27, 2015)

Mirror type shouldn't be SRV as that uses DNS to find a repository. And looking at the output of the pkg(8) commands the repository it tries to use doesn't relate to the repository definition you posted (your posted repository uses file:// whereas pkg(8) uses http://).

Post the output of `pkg -vv` on the client.


----------



## awenger (Mar 27, 2015)

Here is the `pkg -vv` output on the client:

```
# pkg -vv
Version  : 1.4.12
PKG_DBDIR = "/var/db/pkg";
PKG_CACHEDIR = "/var/cache/pkg";
PORTSDIR = "/usr/ports";
INDEXDIR = "";
INDEXFILE = "INDEX-10";
HANDLE_RC_SCRIPTS = false;
ASSUME_ALWAYS_YES = false;
REPOS_DIR [
  "/etc/pkg/",
  "/usr/local/etc/pkg/repos/",
]
PLIST_KEYWORDS_DIR = "";
SYSLOG = true;
ABI = "FreeBSD:10:amd64";
ALTABI = "freebsd:10:x86:64";
DEVELOPER_MODE = false;
VULNXML_SITE = "http://vuxml.freebsd.org/freebsd/vuln.xml.bz2";
FETCH_RETRY = 3;
PKG_PLUGINS_DIR = "/usr/local/lib/pkg/";
PKG_ENABLE_PLUGINS = true;
PLUGINS [
]
DEBUG_SCRIPTS = false;
PLUGINS_CONF_DIR = "/usr/local/etc/pkg/";
PERMISSIVE = false;
REPO_AUTOUPDATE = true;
NAMESERVER = "";
EVENT_PIPE = "";
FETCH_TIMEOUT = 30;
UNSET_TIMESTAMP = false;
SSH_RESTRICT_DIR = "";
PKG_ENV {
}
PKG_SSH_ARGS = "";
DEBUG_LEVEL = 0;
ALIAS {
}
CUDF_SOLVER = "";
SAT_SOLVER = "";
RUN_SCRIPTS = true;
CASE_SENSITIVE_MATCH = false;
LOCK_WAIT = 1;
LOCK_RETRIES = 5;
SQLITE_PROFILE = false;
WORKERS_COUNT = 0;
READ_LOCK = false;
PLIST_ACCEPT_DIRECTORIES = false;
IP_VERSION = 0;
AUTOMERGE = true;
VERSION_SOURCE = "";
CONSERVATIVE_UPGRADE = false;


Repositories:
  poudriere: {
  url  : "http://poudriere.vm.dom/packages/freebsd_10-1x64-HEAD/",
  enabled  : yes,
  priority  : 0,
  mirror_type  : "SRV",
  signature_type  : "PUBKEY",
  pubkey  : "/usr/local/etc/ssl/certs/poudriere.cert"
  }
```


----------



## SirDice (Mar 27, 2015)

Right, the server that's hosting http://poudriere.vm.dom/packages/freebsd_10-1x64-HEAD/ seems to have a problem. It's returning a "Gateway timeout".


----------



## awenger (Mar 27, 2015)

What is the appropriate action after a "Gateway timeout" error ?
Delete and recreate the jail and the port tree?


----------



## SirDice (Mar 27, 2015)

The issue is not related to poudriere, it's an issue with the web server that's hosting the repository.


----------

