selfupdate failing with "Operation timed out"
ryandesign at macports.org
Fri Apr 23 07:21:29 UTC 2021
On Apr 23, 2021, at 02:17, Ryan Schmidt wrote:
> 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 rsync.macports.org: Operation timed out (60)
>> rsync error: error in socket IO (code 10) at /AppleInternal/BuildRoot/Library/Caches/com.apple.xbs/Sources/rsync/rsync-54.120.1/rsync/clientserver.c(106)
>> Command failed: /usr/bin/rsync -rtzvl --delete-after rsync://rsync.macports.org/macports/release/tarballs/base.tar
>> Exit code: 10
>> # uname -r
>> # 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 https://trac.macports.org/wiki/Mirrors 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:
I should add that the above applies to "sudo port sync" and has to do with updating the ports collection on your computer, which is something you'll be doing often (daily, weekly, or however often you use MacPorts).
It does not apply to "sudo port selfupdate" which applies to updating MacPorts base on your computer. (And selfupdate also does a sync for you.) Currently, MacPorts only supports rsync for selfupdate, though there is work in progress to switch this to http . Until that's implemented, if you cannot use rsync, then you cannot use selfupdate and will need to update MacPorts base by downloading the installer from our web site whenever we release a new version, which is fairly infrequently. You can subscribe to the low-traffic macports-announce mailing list if you'd like to be notified when that happens.
More information about the macports-users