CI can't reach internet to fetch rust packages

Andrew Bartlett abartlet at samba.org
Mon Aug 12 21:37:59 UTC 2024


On Mon, 2024-08-12 at 15:29 -0600, David Mulder via samba-technical
wrote:
> I'm getting this failure when doing a `cargo test` via samba test in
> CI:
>      Updating crates.io indexwarning: spurious network error (3 tries
> remaining): [7] Couldn't connect to server (Failed to connect to
> index.crates.io port 443 after 42 ms: Couldn't connect to
> server)warning: spurious network error (2 tries remaining): [7]
> Couldn't connect to server (Failed to connect to index.crates.io port
> 443 after 0 ms: Couldn't connect to server)warning: spurious network
> error (1 tries remaining): [7] Couldn't connect to server (Failed to
> connect to index.crates.io port 443 after 0 ms: Couldn't connect to
> server)error: failed to get `libc` as a dependency of package `config
> v4.21.0 (/builds/samba-testbase/samba-o3/rust/config)`
> Caused by:   download of config.json failed
> Caused by:   failed to download from `
> https://index.crates.io/config.json`
> 
> Caused by:   [7] Couldn't connect to server (Failed to connect to
> index.crates.io port 443 after 0 ms: Couldn't connect to server)
> Doing `cargo build` during the build phase does not fail to download
> dependencies. Any one know what's causing this?
> https://gitlab.com/samba-team/devel/samba/-/jobs/7566611520

It will be socker_wrapper, I think we now have code to stop our tests
leaking out.  
If you want access to the real internet, remove the socket wrapper
environment variables or otherwise disable it. 
But also, don't do that.  At least in the past, the autobuild host does
not permit outbound access, so you will need to work with the
sysadmins. 
The preferred pattern from our C model of software development is to
encode dependencies at image generation time, and manually install on
the autobuild host.
Andrew Bartlett

-- 
Andrew Bartlett (he/him)       https://samba.org/~abartlet/Samba Team Member (since 2001) https://samba.orgSamba Team Lead                https://catalyst.net.nz/services/sambaCatalyst.Net Ltd
Proudly developing Samba for Catalyst.Net Ltd - a Catalyst IT group
company
Samba Development and Support: https://catalyst.net.nz/services/samba
Catalyst IT - Expert Open Source Solutions


More information about the samba-technical mailing list