opkg returns wget error 5 during update
opkg returns wget error 5 during update
When updating the available packages of opkg, an error concerning wget which returned status code 5 appears and update fails.
Symptoms
On update of the opkg available packages:
The results is the following:
Downloading http://lorixone.io/yocto/feeds/2.1.2/all/Packages.gz.
Downloading http://lorixone.io/yocto/feeds/2.1.2/cortexa5hf-neon/Packages.gz.
Downloading http://lorixone.io/yocto/feeds/2.1.2/sama5d4_lorix_one/Packages.gz.
Downloading http://lorixone.io/yocto/feeds/2.1.2/sama5d4_lorix_one/Packages.gz.
Collected errors:
* opkg_download_backend: Failed to download http://lorixone.io/yocto/feeds/2.1.2/all/Packages.gz, wget returned 5.
* opkg_download_backend: Failed to download http://lorixone.io/yocto/feeds/2.1.2/cortexa5hf-neon/Packages.gz, wget returned 5.
* opkg_download_backend: Failed to download http://lorixone.io/yocto/feeds/2.1.2/sama5d4_lorix_one/Packages.gz, wget returned 5.
* opkg_download_backend: Failed to download http://lorixone.io/yocto/feeds/2.1.2/sama5d4_lorix_one/Packages.gz, wget returned 5.
CODE
Quick and temporary fix
This error is related to a SSL verification error from wget and is in fact related to a wrong time set in the LORIX One which is too far from the real time of the server.
A simple fix is to correct the actual time of the LORIX One by using the following commands:
$ sudo date -s "7 JUN 2018 14:35:10"
$ sudo hwclock -w
CODE
The first line defines the system date to the 9 june 2018 and the corrected time. The second line is to write the system time into the hardware real time clock of the LORIX One.
Please note that this is just a temporary fix since the problem is coming from the ntp daemon which doesn't update correctly the system time.
Fix
As far as we know, the time synchronisation issue related to the ntp daemon is because the port used by ntpd to contact the time server is closed. To fix this issue please verify that your company/network firewall is correctly configured to accept output connection through the port UDP 123 for the LORIX One and let us know if it doesn't fix the problem.