For the Juniper EX2300, EX3400, EX4100, EX4300 and EX4400 switches running Junos 20.4 and above, we have optimized the image download step in the software upgrade process. This enhancement increases the image download speed. However, for the software upgrade to be successful, please ensure the following URL is added the allow-list on the firewall.
cdn.juniper.net (TCP 443)
If the switch is currently running Junos OS 20.4 and the upgrade still fails, be aware that Junos 20.4 is End of Engineering and End of Support. Because of this, automated upgrades from Mist may not be supported. In this scenario, perform a manual upgrade directly on the switch.
Start by downloading a supported Junos OS package from the Juniper Support Portal, selecting a suggested release appropriate for your EX Series model. Next, transfer the downloaded package file to the switch’s /var/tmp directory using a secure file transfer tool such as SCP or WinSCP.
Once the file is present on the switch, connect to the CLI and initiate the software installation manually. From operational mode, run the following command, adjusting the filename to match the image you uploaded:
user@switch> request system software add /var/tmp/package.tgz no-validate
Allow the installation to complete and reboot the switch when prompted. After the switch comes back online, verify the Junos OS version and confirm that the switch reconnects to Mist successfully. Once upgraded to a supported release and with proper HTTPS connectivity in place, future upgrades from Mist should function as expected.
Note: As alternate option, once the above is checked regarding cdn.juniper.net if fails , try disabling the protect routing-engine filter from device and try upgrade from Mist , this could help as well to upgrade!