selfupdate failing with "Operation timed out"

Ryan Schmidt ryandesign at
Fri Apr 23 07:17:16 UTC 2021

On Apr 22, 2021, at 19:25, Joseph Hunkeler wrote:

> After installing MacPorts-2.6.4-10.15-Catalina.pkg I'm seeing this behavior:
> # /opt/local/bin/port -v selfupdate
> --->  Updating MacPorts base sources using rsync
> rsync: failed to connect to Operation timed out (60)
> rsync error: error in socket IO (code 10) at /AppleInternal/BuildRoot/Library/Caches/
> [receiver=2.6.9]
> Command failed: /usr/bin/rsync -rtzvl --delete-after rsync://
> /opt/local/var/macports/sources/
> Exit code: 10
> # uname -r
> 19.6.0
> # sw_vers
> ProductName:	Mac OS X
> ProductVersion:	10.15.7
> BuildVersion:	19H524
> I've tried setting "rsync_server" in /opt/local/etc/macports/macports.conf to a couple different hosts listed on but was
> met with the error above. Is there something wrong on my end? How could every rsync server be down at the same time? I'm able to download files from the HTTP
> servers for each mirror I've tried, so I'm a little baffled by this.

Sounds like the network you're on, or firewall or network filtering software installed on your computer, prevents you from accessing rsync servers. 

> Is there another sync method I can try or does MacPorts only support rsync?

rsync is the default because you only have to keep as much information on your disk as the current ports collection occupies and because rsync only needs to transfer the differences over the network, not the entire thing every time.

But yes, there are several other methods possible.

One method is to download the entire ports collection over http every time you sync. The disadvantage is that you have to transfer more data over the network every time you sync. There are two sources for such a tarball: the one we produce on our server (which comes with a portindex but which might be an hour of date w.r.t. the git repository but exactly as up to date as rsync), or one generated by github (which will be completely up to date with the git repository but which does not come with a portindex so you'll be generating it on your computer). This method is described here:

Another method is to get the ports by cloning our git repository. The disadvantage is it takes up disk space equal to the entire history of the ports collection (rather than just its current state), and the portindex gets generated on your computer rather than on our server. This method is described here:

These and other helpful guides are found in the howto section of the wiki:

More information about the macports-users mailing list