# Pkg hangs at "Updating repository files"



## Nasrudin (Mar 11, 2021)

```
# pkg install somepackage
Updating MyRepo repository catalogue...
(hangs for at least 30 seconds)
# grep url /usr/local/etc/pkg/repos/MyRepo.conf
 url: "ftp://myhost.org/somepkgrepo"
```

If I change this url to `pkg+ftp://myhost.org/somepkgrepo` then this happens:


```
pkg install somepkg
Updating MyRepo repository catalogue...
pkg: Repository MyRepo has a wrong packagesite, need to re-create database
pkg: packagesite URL error for pkg+ftp://myhost.org/somepkgrepo/meta.conf -- pkg+:// implies SRV mirror type
pkg: packagesite URL error for pkg+ftp://myhost.org/somepkgrepo/meta.txz -- pkg+:// implies SRV mirror type
repository MyRepo has no meta file, using default settings
pkg: packagesite URL error for pkg+ftp://myhost.org/somepkgrepo/packagesite.txz -- pkg+:// implies SRV mirror type
Unable to update repository MyRepo
Error updating repositories!
```

Now if I change the url back to `ftp://myhost.org/somepkgrepo` then I get _one_ pkg command that doesn't hang at 'Updating repository catalogue'.  After that it reverts to the previous behavior of hanging for 30 seconds. (This is not DNS that I know of, lookups come back in less than a second.)

Can someone shed any light on this behavior and how I might go about fixing it? The FTP server is on my LAN and has no delays when using ftp or fetch.  I considered a SRV record, but isn't that overkill here?


----------

