The officially official Devuan Forum!

You are not logged in.

#1 2020-04-17 18:40:18

tlathm
Member
Registered: 2017-11-25
Posts: 78  

What would cause wget to work and apt to get "Connection failed"?

On a Devuan Jessie server at a customer they have an issue that has me stumped:

The apt command is failing with "Connection failed", yet wget against the same IPs works fine. For example:

apt update
Ign http://deb.devuan.org jessie InRelease
Ign http://deb.devuan.org jessie-security InRelease
Err http://deb.devuan.org jessie Release.gpg
  Connection failed [IP: 5.196.38.18 80]
Err http://deb.devuan.org jessie-security Release.gpg
  Connection failed [IP: 46.4.50.2 80]
Ign http://deb.devuan.org jessie Release
Ign http://deb.devuan.org jessie-security Release
Err http://deb.devuan.org jessie/main amd64 Packages
  Connection failed [IP: 5.196.38.18 80]
Err http://deb.devuan.org jessie/non-free amd64 Packages
  Connection failed [IP: 46.4.50.2 80]

...etc. However using those failed IPs thing like the following all work:

wget http://5.196.38.18

That works perfectly and will download an index.html file.

I'm thinking they've reconfigured something that they're not telling us about. The only things I can think of that could cause this might include:

1. Some global proxy was configured(?) that wget is using, but apt isn't, or

2. Someone broke the apt configuration somehow...maybe by incorrectly adding some proxy configuration.

Is anyone aware of any other scario that could cause this? Thanks!

Tom

Last edited by tlathm (2020-04-17 18:43:48)

Offline

#2 2020-04-17 19:49:34

rolfie
Member
Registered: 2017-11-25
Posts: 1,047  

Re: What would cause wget to work and apt to get "Connection failed"?

According to this page https://devuan.org/os/ you should use:

deb http://auto.mirror.devuan.org/merged jessie          main

Give it a try.

rolfie

Online

#3 2020-04-17 21:46:39

tlathm
Member
Registered: 2017-11-25
Posts: 78  

Re: What would cause wget to work and apt to get "Connection failed"?

rolfie wrote:

According to this page https://devuan.org/os/ you should use:

deb http://auto.mirror.devuan.org/merged jessie          main

Give it a try.

rolfie

Whoa...Not according to this:

https://dev1galaxy.org/viewtopic.php?id=3276

That also mentions jessie in addition to the others. All our other jessie installs are using deb.devuan.org and are working perfectly. If I recall I believe I tried the auto.mirror URLs and had issues. That configuration does in fact work...this customer clearly has something else configured in a very odd manner.

Tom

Offline

#4 2020-04-18 00:01:12

ralph.ronnquist
Administrator
From: Clifton Hill, Victoria, AUS
Registered: 2016-11-30
Posts: 1,106  

Re: What would cause wget to work and apt to get "Connection failed"?

That's right.

Use deb.devuan.org in your sources list. That name will resolve in DNS for each request to go to the one or the other of the repository mirrors. That domain name is associated with the whole range of mirror IP addresses in "random" order, and the DNS resolution system will pick the one looking "best" at the time (aka "first one").

The name auto.mirror.devuan.org resolves in DNS to the previous main repository, which nowadays may and might not be maintained.

Though you might, on occasion, temporarily use pkgmaster.devuan.org which resolves in DNS to the current main repository. The repository mirrors "rsyncs" their content from this. However, it has quite limited network bandwidh so having a lot of people going there will be detrimental for all. It's thus better community-wise to use the mirror domain deb.devuan.org even though this slightly increases the risk of random network failure.

Online

#5 2020-04-18 13:55:14

tlathm
Member
Registered: 2017-11-25
Posts: 78  

Re: What would cause wget to work and apt to get "Connection failed"?

Thanks for the clarification! Given that that's set up correctly in this case, I still can't imagine what's going on where apt fails while wget using either the name or the failed IP addresses works. They've clearly got something really strange going on. I'll post back if/when we figure out what's going on there.

Tom

Offline

#6 2020-04-23 17:17:52

minusfroot
Member
Registered: 2020-04-23
Posts: 1  

Re: What would cause wget to work and apt to get "Connection failed"?

I've certainly had this sort of error when there was a proxy set up  (e.g. in /etc/apt/apt.conf.d/... or similar). Or NOT set up, and you're using one for wget.

FYI, apt proxy config looks something like:

Acquire::http { Proxy "http://127.0.0.1:3142"; };

Other nastier options:
a) they're behind some kind of firewall proxy that drops/rejects connections without a password.
b) Someone got creative with IPtables and they've got per-user firewalling rules... (I can't remember... doesn't apt(-get) drop privs for fetches?)

David

Offline

#7 2020-04-27 14:54:30

tlathm
Member
Registered: 2017-11-25
Posts: 78  

Re: What would cause wget to work and apt to get "Connection failed"?

minusfroot wrote:

I've certainly had this sort of error when there was a proxy set up  (e.g. in /etc/apt/apt.conf.d/... or similar). Or NOT set up, and you're using one for wget.

Didn't see this until today. Thanks for the details...that gives us several things to check.

Tom

Offline

Board footer