Why does BitBake error if it can't find www.example.com?
Asked Answered
C

5

12

BitBake fails for me because it can't find https://www.example.com.

My computer is an x86-64 running native Xubuntu 18.04. Network connection is via DSL. I'm using the latest versions of the OpenEmbedded/Yocto toolchain.

This is the response I get when I run BitBake:

$ bitbake -k core-image-sato
WARNING: Host distribution "ubuntu-18.04" has not been validated with this version of the build system; you may possibly experience unexpected failures. It is recommended that you use a tested distribution.
ERROR:  OE-core's config sanity checker detected a potential misconfiguration.
Either fix the cause of this error or at your own risk disable the checker (see sanity.conf).
Following is the list of potential problems / advisories:

Fetcher failure for URL: 'https://www.example.com/'. URL https://www.example.com/ doesn't work.
Please ensure your host's network is configured correctly,
or set BB_NO_NETWORK = "1" to disable network access if
all required sources are on local disk.


Summary: There was 1 WARNING message shown.
Summary: There was 1 ERROR message shown, returning a non-zero exit code.

The networking issue, the reason why I can't access www.example.com, is a question for the SuperUser forum. My question here is, why does BitBake rely on the existence of www.example.com? What is it about that website that is so vital to BitBake's operation? Why does BitBake post an Error if it cannot find https://www.example.com?

At this time, I don't wish to set BB_NO_NETWORK = "1". I would rather understand and resolve the root cause of the problem first.

Cripps answered 18/9, 2018 at 22:37 Comment(3)
This indicates a connectivity issue, which can be anything: proxy, dns, etc.Withershins
To clarify: why does BitBake depend on www.example.com? I'll edit the question.Cripps
it doesn't; it simply uses it to check if host machine has the Internet connectionWithershins
V
18

Modifying poky.conf didn't work for me (and from what I read, modifying anything under Poky is a no-no for a long term solution).

Modifying /conf/local.conf was the only solution that worked for me. Simply add one of the two options:

#check connectivity using google
CONNECTIVITY_CHECK_URIS = "https://www.google.com/"

#skip connectivity checks
CONNECTIVITY_CHECK_URIS = ""

This solution was originally found here.

Villager answered 3/6, 2019 at 13:29 Comment(1)
This should be the accepted answer; modifying local.conf is vastly preferred over poky.conf, the latter being difficult to maintain particularly if you're working in a teamNinefold
C
11

For me, this appears to be a problem with my ISP (CenturyLink) not correctly resolving www.example.com. If I try to navigate to https://www.example.com in the browser address bar I just get taken to the ISP's "this is not a valid address" page.

Technically speaking, this isn't supposed to happen, but for whatever reason it does. I was able to work around this temporarily by modifying the CONNECTIVITY_CHECK_URIS in poky/meta-poky/conf/distro/poky.conf to something that actually resolves:

# The CONNECTIVITY_CHECK_URI's are used to test whether we can succesfully
# fetch from the network (and warn you if not). To disable the test set
# the variable to be empty.
# Git example url: git://git.yoctoproject.org/yocto-firewall-test;protocol=git;rev=master    
CONNECTIVITY_CHECK_URIS ?= "https://www.google.com/"

See this commit for more insight and discussion on the addition of the www.example.com check. Not sure what the best long-term fix is, but the change above allowed me to build successfully.

Crabbe answered 28/9, 2018 at 6:39 Comment(2)
I have the same problem with the same ISP and this solved it.Rotberg
I'm in France and my ISP is Orange, I can't access or ping example.com either. This solved the problem for me, thanks :)Subsequence
S
1

If you want to resolve this issue without modifying poky.conf or local.conf or any of the files for that matter, just do:

$touch conf/sanity.conf

It is clearly written in meta/conf/sanity.conf that:

Expert users can confirm their sanity with "touch conf/sanity.conf"

If you don't want to execute this command on every session or build, you can comment out the line INHERIT += "sanity" from meta/conf/sanity.conf, so the file looks something like this:

meta/conf/sanity.conf

Similitude answered 11/11, 2020 at 6:56 Comment(0)
C
1

Had same issue with Bell ISP when accessing example.com gave DNS error. Solved by switching ISP's DNS IP to Google's DNS (to avoid making changes to configs):
https://developers.google.com/speed/public-dns/docs/using

Cece answered 1/9, 2021 at 19:17 Comment(0)
Z
0

The easiest way to avoid the test is to do as suggested in poky.conf

...
# The CONNECTIVITY_CHECK_URI's are used to test whether we can succesfully
# fetch from the network (and warn you if not). To disable the test set
# the variable to be empty.
...

i.e in a .conf file controlled by your layer (suggested: site.conf) or of course, in local.conf: add: CONNECTIVITY_CHECK_URIS = ""

Zest answered 15/9, 2023 at 6:6 Comment(0)

© 2022 - 2024 — McMap. All rights reserved.