07-31-2017 12:07 PM
Thanks for the Putty tip.
admin@NI-sbRIO-9607-030d69b0:~# opkg info ntp
Package: ntp
Version: 4.2.8p8-r0.1
Depends: ntp-tickadj, libcap2 (>= 2.24), libc6 (>= 2.23), base-files, shadow, initscripts-functions, base-passwd
Recommends: update-rc.d
Suggests: iana-etc
Provides: ntp-systemd
Replaces: ntp-systemd
Conflicts: ntp-systemd
Status: unknown ok not-installed
Section: net
Architecture: cortexa9-vfpv3
Maintainer: NI Linux Real-Time Maintainers <nilrt@ni.com>
MD5Sum: 5d433bc8ed1e9cb6be1a1b05db49fda0
Size: 321074
Filename: ntp_4.2.8p8-r0.1_cortexa9-vfpv3.ipk
Source: http://www.eecis.udel.edu/~ntp/ntp_spool/ntp4/ntp-4.2/ntp-4.2.8p8.tar.gz file://ntp-4.2.4_p6-nano.patch file://ntpd file://ntp.conf file://ntpdate file://ntpdate.default file://ntpdate.service file://ntpd.service file://sntp.service file://sntp file://ntpd.list
Description: Network Time Protocol daemon and utilities The Network Time Protocol
(NTP) is used to synchronize the time of a computer client or server to
another server or reference time source, such as a radio or satellite
receiver or modem.
Package: ntp
Version: 4.2.8-r0.4
Depends: libgcc1 (>= 4.9.2), ntp-tickadj, libcap2 (>= 2.24), libc6 (>= 2.21), base-files, shadow, initscripts-functions, base-passwd
Recommends: update-rc.d
Suggests: iana-etc
Provides: ntp-systemd
Replaces: ntp-systemd
Conflicts: ntp-systemd
Status: install ok not-installed
Architecture: cortexa9-vfpv3
admin@NI-sbRIO-9607-030d69b0:~#
07-31-2017 01:24 PM
Hmm, try just downloading the package but not installing it: opkg install --download-only ntp, check to make sure that this command is able to download the package file
08-01-2017 12:43 PM
Output below
admin@NI-sbRIO-9607-030d69b0:~# opkg install --download-only ntp
Collected errors:
* get_pkg_url: Package libevent is not available from any configured src.
* opkg_install_pkg: Failed to download libevent. Perhaps you need to run 'opkg update'?
* get_pkg_url: Package ntp-tickadj is not available from any configured src.
* opkg_install_pkg: Failed to download ntp-tickadj. Perhaps you need to run 'opkg update'?
* get_pkg_url: Package libperl5 is not available from any configured src.
* opkg_install_pkg: Failed to download libperl5. Perhaps you need to run 'opkg update'?
* get_pkg_url: Package ntpdate is not available from any configured src.
* opkg_install_pkg: Failed to download ntpdate. Perhaps you need to run 'opkg update'?
* get_pkg_url: Package ntp is not available from any configured src.
* opkg_install_pkg: Failed to download ntp. Perhaps you need to run 'opkg update'?
* get_pkg_url: Package perl is not available from any configured src.
* opkg_install_pkg: Failed to download perl. Perhaps you need to run 'opkg update'?
* get_pkg_url: Package ntp-utils is not available from any configured src.
* opkg_install_pkg: Failed to download ntp-utils. Perhaps you need to run 'opkg update'?
admin@NI-sbRIO-9607-030d69b0:~# opkg update
Downloading http://download.ni.com/ni-linux-rt/feeds/2017/arm/ipk/all/Packages.gz.
Updated source 'uri-all-0'.
Downloading http://download.ni.com/ni-linux-rt/feeds/2017/arm/ipk/cortexa9-vfpv3/Packages.gz.
Updated source 'uri-cortexa9-vfpv3-0'.
Downloading http://download.ni.com/ni-linux-rt/feeds/2017/arm/ipk/xilinx-zynq/Packages.gz.
Updated source 'uri-xilinx-zynq-0'.
admin@NI-sbRIO-9607-030d69b0:~# opkg install --download-only ntp
Collected errors:
* get_pkg_url: Package libevent is not available from any configured src.
* opkg_install_pkg: Failed to download libevent. Perhaps you need to run 'opkg update'?
* get_pkg_url: Package ntp-tickadj is not available from any configured src.
* opkg_install_pkg: Failed to download ntp-tickadj. Perhaps you need to run 'opkg update'?
* get_pkg_url: Package libperl5 is not available from any configured src.
* opkg_install_pkg: Failed to download libperl5. Perhaps you need to run 'opkg update'?
* get_pkg_url: Package ntpdate is not available from any configured src.
* opkg_install_pkg: Failed to download ntpdate. Perhaps you need to run 'opkg update'?
* get_pkg_url: Package ntp is not available from any configured src.
* opkg_install_pkg: Failed to download ntp. Perhaps you need to run 'opkg update'?
* get_pkg_url: Package perl is not available from any configured src.
* opkg_install_pkg: Failed to download perl. Perhaps you need to run 'opkg update'?
* get_pkg_url: Package ntp-utils is not available from any configured src.
* opkg_install_pkg: Failed to download ntp-utils. Perhaps you need to run 'opkg update'?
admin@NI-sbRIO-9607-030d69b0:~#
08-01-2017 02:40 PM
OK, we're rounding the home stretch here. Try the following from the target:
admin@crispus-attux:~# wget http://download.ni.com/ni-linux-rt/feeds/2017/arm/ipk/cortexa9-vfpv3/Packages.gz
Connecting to download.ni.com (130.164.81.30:80)
Packages.gz 100% |*******************************| 582k 0:00:00 ETA
admin@crispus-attux:~# zcat Packages.gz | grep ^"Package: libevent"
Package: libevent-dbg
Package: libevent-dev
Package: libevent-staticdev
Package: libevent
Here, I'm downloading the architecture-specific (not machine-specific) Package.gz file from the target, then checking the contents of the package listing to ensure that I see a listing for the libevent package (since that's the first one that is complained-about).
If this works correctly, the next step would be to check (using tcpdump or wireshark) what's going on from the network-side of things.
Another question that I posed some time back and I still haven't gotten an answer to is "what does the network look like where this target is located?" I'm just trying to rule-out that your IT dept. isn't doing something to foul things up...
08-02-2017 03:03 PM
We have a very plain vanilla network. No IT department. I have 3 sbRIO-9607s running LV 2016 and using NTP for time sync. I upgraded one to the LV2017 CRIO package last week. I think I'll keep the others at 2016. 😉
admin@NI-sbRIO-9607-030d69b0:~# wget http://download.ni.com/ni-linux-rt/feeds/2017/arm/ipk/cortexa9-vfpv3/Packages.gz
Connecting to download.ni.com (23.218.156.66:80)
Packages.gz 100% |*******************************| 582k 0:00:00 ETA
admin@NI-sbRIO-9607-030d69b0:~# zcat Packages.gz | grep ^"Package: libevent"
Package: libevent-dbg
Package: libevent-dev
Package: libevent-staticdev
Package: libevent
admin@NI-sbRIO-9607-030d69b0:~#
08-02-2017 03:22 PM
What this is telling me is that opkg is downloading the appropriate feed package listings, there must be some issue when you're attempting to download the actual .ipk files for installation. I would recommend trying to use tcpdump to get a dump of what the traffic looks like when attempting to install ntp from the target's POV. This, however, kinda presents a chicken-and-egg problem: you'll need to install the tcpdump package to your target using the very process that seemingly is broken. And I suppose this gets at the heart of the issue: if you care about getting to the bottom of the problem, downloading the packages for tcpdump (which would be laborious task of tracking down all of the dependencies, downloading them, and making all of the needed packages available on the target's filesystem for a direct installation. Of course, you can use this same methodology to simply install the ntp stack, which is the end-game anyway. It really kinda depends on how often you intend on installing software to the controller with 2017 on it.
Another simple test that will tell us something would be to try to use wget to download a .ipk that is failing to install in your testing:
08-02-2017 03:39 PM
Thanks Brad. I guess I have some new Linux skills to learn. Can you point me to a resource to get me started with the direct installation?
Thanks,
Richard
08-02-2017 04:20 PM
RichardJennings,
There are a few times this has come up in discussions on these forums, e.g. here.
The basic process is:
Basically, you're doing an expansion of the tree of dependencies for the packages that you need, playing the part of the packagemanager since it's having difficulties installing packages for some reason.
08-03-2017 03:57 PM
Thanks Brad. I eventually worked around the problem. I used wget to download and opkg install and ran into the following issues for several ipk.
admin@NI-sbRIO-9607-030d69b0:~# wget http://download.ni.com/ni-linux-rt/feeds/2017/arm/ipk/cortexa9-vfpv3/ntp_4.2.8p8-r0.1_cortexa9-vfpv3...
Connecting to download.ni.com (23.215.99.40:80)
ntp_4.2.8p8-r0.1_cor 100% |***************************************| 313k 0:00:00 ETA
admin@NI-sbRIO-9607-030d69b0:~# opkg install ntp_4.2.8p8-r0.1_cortexa9-vfpv3.ipk
Solver encountered 1 problem(s):
Problem 1/1:
- package ntp-4.2.8-r0.4.cortexa9-vfpv3 conflicts with ntp-systemd provided by ntp-4.2.8p8-r0.1.cortexa9-vfpv3
Solution 1:
- do not ask to install ntp-4.2.8-r0.4.cortexa9-vfpv3
Solution 2:
- do not ask to install ntp-4.2.8p8-r0.1.cortexa9-vfpv3
admin@NI-sbRIO-9607-030d69b0:~#
My workaround was to roll back to cRIO 2016 and reinstall ntp. It worked.
Thanks for all your help.
Richard
02-15-2018 08:29 AM
@BradMFixFrom a shell, execute the following command:
sed -i 's#nickdanger\.amer\.corp\.natinst\.com/feeds/\([^/]\+\)/\([^/]\+\)/#download.ni.com/ni-linux-rt/feeds/\1/\2/ipk/#' /etc/opkg/base-feeds.conf
This didn't work. I get the following error:
sed: can't create temp file '/etc/opkg/base-feeds.confVKCB4E': Permission denied
I have actually previously manually fixed this myself, as discussed in my service request 7720981, but I don't have my notes immediately on hand how I did it. So I thought I would try the "official fix" which doesn't work.
Has this been fixed in an update or patch? I would prefer to just install a later version of NI CompactRIO than have to deal with this.