Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Failed to download http://download.ni.com/ni-linux-rt/feeds/2022Q3/ni-main/Packages.gz headers: Couldn't resolve host name #275

Closed
DengkeDu opened this issue Jun 7, 2024 · 3 comments

Comments

@DengkeDu
Copy link

DengkeDu commented Jun 7, 2024

my build machine: x86-64
build branch: nilrt/master/kirkstone
build target: nilrt-base-system-image
my error:

ERROR: nilrt-runmode-rootfs-1.0-r0 do_rootfs: Unable to update the package index files. Command '/media/ucas/yocto/ni/nilrt/build-x86-64/tmp-glibc/work/x64-nilrt-linux/nilrt-runmode-rootfs/1.0-r0/recipe-sysroot-native/usr/bin/opkg --volatile-cache -f /media/ucas/yocto/ni/nilrt/build-x86-64/tmp-glibc/work/x64-nilrt-linux/nilrt-runmode-rootfs/1.0-r0/opkg.conf -t /media/ucas/yocto/ni/nilrt/build-x86-64/tmp-glibc/work/x64-nilrt-linux/nilrt-runmode-rootfs/1.0-r0/temp/ipktemp/ -o /media/ucas/yocto/ni/nilrt/build-x86-64/tmp-glibc/work/x64-nilrt-linux/nilrt-runmode-rootfs/1.0-r0/rootfs  --force_postinstall --prefer-arch-to-version  --add-exclude rauc --add-exclude rauc-mark-good update' returned 1:
 * opkg_validate_cached_file: Failed to download http://download.ni.com/ni-linux-rt/feeds/2022Q3/ni-main/Packages.gz headers: Couldn't resolve host name.
Downloading file:///media/ucas/yocto/ni/nilrt/build-x86-64/tmp-glibc/deploy/ipk/all/Packages.gz.
Updated source 'NIOE-all'.
Downloading file:///media/ucas/yocto/ni/nilrt/build-x86-64/tmp-glibc/deploy/ipk/x64/Packages.gz.
Updated source 'NIOE-x64'.
Downloading file:///media/ucas/yocto/ni/nilrt/build-x86-64/tmp-glibc/deploy/ipk/core2-64/Packages.gz.
Updated source 'NIOE-core2-64'.
Downloading http://download.ni.com/ni-linux-rt/feeds/2022Q3/ni-main/Packages.gz.

I run ping download.ni.com fine in my host

PING download.ni.com (60.9.4.70) 56(84) bytes of data.
64 bytes from 60.9.4.70: icmp_seq=1 ttl=49 time=20.8 ms
64 bytes from 60.9.4.70: icmp_seq=2 ttl=49 time=23.5 ms
64 bytes from 60.9.4.70: icmp_seq=3 ttl=49 time=23.0 ms

I run wget fine in my host

--2024-06-07 06:39:52--  http://download.ni.com/ni-linux-rt/feeds/2022Q3/ni-main/Packages.gz
Resolving download.ni.com (download.ni.com)... 60.9.4.70, 2408:871a:8810:205:3d4b:e240:6811:fffe
Connecting to download.ni.com (download.ni.com)|60.9.4.70|:80... connected.
HTTP request sent, awaiting response... 200 OK
Length: 74375 (73K) [application/x-gzip]
Saving to: ‘Packages.gz’

Packages.gz                           100%[========================================================================>]  72.63K   177KB/s    in 0.4s

2024-06-07 06:39:55 (177 KB/s) - ‘Packages.gz’ saved [74375/74375]

why opkg update failed?

@DengkeDu DengkeDu changed the title opkg_validate_cached_file: Failed to download http://download.ni.com/ni-linux-rt/feeds/2022Q3/ni-main/Packages.gz headers: Couldn't resolve host name Failed to download http://download.ni.com/ni-linux-rt/feeds/2022Q3/ni-main/Packages.gz headers: Couldn't resolve host name Jun 7, 2024
@DengkeDu
Copy link
Author

DengkeDu commented Jun 7, 2024

I tried many many times.

@amstewart
Copy link
Contributor

Hey. Assuming you're using the normal build workflow, your bitbake actions are run within the pyrex docker container. It's possible that DNS resolution within the container environment is messed up.

After sourcing the ni-oe-init-build-env script, try running

pyrex-run wget 'http://download.ni.com/ni-linux-rt/feeds/2022Q3/ni-main/Packages.gz'

or your ping command again.

The pyrex-run wrapper script will pass your command into the docker execution environment. If it fails in that context, then there is something off with your docker configuration. I can't help too much with that, since it is specific to your build machine.

But you might have to add this to your host machine's /etc/docker/daemon.json file.

{
    "dns": ["8.8.8.8"]
}

@DengkeDu
Copy link
Author

DengkeDu commented Jun 9, 2024

Hey. Assuming you're using the normal build workflow, your bitbake actions are run within the pyrex docker container. It's possible that DNS resolution within the container environment is messed up.

After sourcing the ni-oe-init-build-env script, try running

pyrex-run wget 'http://download.ni.com/ni-linux-rt/feeds/2022Q3/ni-main/Packages.gz'

This is ok for me

or your ping command again.

and this

The pyrex-run wrapper script will pass your command into the docker execution environment. If it fails in that context, then there is something off with your docker configuration. I can't help too much with that, since it is specific to your build machine.

But you might have to add this to your host machine's /etc/docker/daemon.json file.

{
    "dns": ["8.8.8.8"]
}

still failed update, maybe something with my docker environment

@DengkeDu DengkeDu closed this as completed Jun 9, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants