Download issue - Getting 404 from script

Hey All,

Just wanted to check in and see if anyone else is having issues downloading the latest binary via script? We have built a script to process our nexus updates but for some reason, it always gets a 404 response. But if I try the same URL in a browser it will sometimes time out and sometimes work. This is an issue as our nexus isn’t somewhere that it’s very easy to use a browser to get the binary than transfer it to the server running nexus. Tried clearing all caches along with DNS and all that. Tested via cli at home and on the remote server so multiple IP’s and if I use Wget it fails every time with the 404. This is only recent ou update script was working just 2 months ago when we last updated.

  ❯ wget https://download.sonatype.com/nexus/3/latest-unix-tar.gz
--2021-05-20 10:27:35--  https://download.sonatype.com/nexus/3/latest-unix-tar.gz
Resolving download.sonatype.com (download.sonatype.com)... 52.52.65.176, 54.67.16.41
Connecting to download.sonatype.com (download.sonatype.com)|52.52.65.176|:443... connected.
HTTP request sent, awaiting response... 302 Moved Temporarily
Location: https://sonatype-download.global.ssl.fastly.net/repository/downloads-prod-group/3/nexus-3.30.1-01-unix-tar.gz [following]
--2021-05-20 10:27:36--  https://sonatype-download.global.ssl.fastly.net/repository/downloads-prod-group/3/nexus-3.30.1-01-unix-tar.gz
Resolving sonatype-download.global.ssl.fastly.net (sonatype-download.global.ssl.fastly.net)... 151.101.1.194, 151.101.65.194, 151.101.129.194, ...
Connecting to sonatype-download.global.ssl.fastly.net (sonatype-download.global.ssl.fastly.net)|151.101.1.194|:443... connected.
HTTP request sent, awaiting response... 404 Not Found
2021-05-20 10:27:36 ERROR 404: Not Found.

The URL isn’t right, there should be a “.” after “unix”:

wget https://download.sonatype.com/nexus/3/latest-unix.tar.gz

Regards,

Rich

sweet that worked, thank you. Not sure where I got the other file name from but that was my issue.