CentOS-7: curl & wget only working infrequently, but yum works fine
I originally posted this in the networking section a couple of weeks back, but I've not had any suggestions for solutions, so I've reposted here.
My problem is that curl and wget usually fail to retrieve more than just the first part of any given file, and often nothing at all. Both have worked previously on the same server, and nothing else on my network has changed - and I'm not really sure what's changed on my server to now make them not work, although very intermittently it will work just fine. I'm not exactly quite sure when this started happening, but it's been like it for a while (a few months), and I just put off doing anything about it - and also because I have no idea how to resolve, other than what I've already tried. So, my server is running CentOS Linux release 7.6.1810 My version of curl is very recent: Code:
curl 7.64.0 (x86_64-redhat-linux-gnu) libcurl/7.64.0 NSS/3.36 Code:
Download failed. cURL error 28: Operation timed out after 300000 milliseconds with 1355444 out of 5007255 bytes received Occasionally the downloads will work, but I think that tends to be with smaller files. However, even so, every now and then it will work just fine with bigger files. Code:
e.g. $ curl -O -v https://downloads.wordpress.org/plugin/nimble-builder.1.5.0.zip a) resolv.conf - previously had added: options single-request-reopen, which resolved a conflict with IPv4/IPv6 many months ago - also used several different DNS server setups b) tried fetching stuff from both http and https sites c) tried fetching using IP addresses instead of domain names, and tried downloading different stuff from different sites. d) firewall - temporarily disabled iptables and tried more curl requests, but made no difference. Re-enabled iptables. e) rebooted f) all OS updates are installed I can use yum with no problems. Sample strace output is given below: Code:
Near beginning, a lot like this: Memory: Code:
total used free shared buff/cache available Code:
$ sudo sysctl -w net.ipv6.conf.all.disable_ipv6=1 |
Quote:
How about: - This will be several GB: wget http://isoredirect.centos.org/altarc...thing-1810.iso - Several MB: wget http://isoredirect.centos.org/altarc...stall-1810.iso Also, is the time correct in BIOS? I have had similar odd issues then realized BIOS time was WAY off (this was after motherboard replacement). |
Hi,
Thanks for the comments. Yeah, I already tried lots of different stuff besides downloading WP files. (among them the test files from https://www.thinkbroadband.com/download). Your other idea with the BIOS clock was interesting: I hadn't checked that, but subsequently I've now learned about hwclock and set BIOS to system time. I've now tried a couple of downloads from different places (WP and non-WP), but it's seemed to have made no difference. Any other ideas welcome. Thx! |
|
As noted in the first line of the post, "I originally posted this in the networking section a couple of weeks back, but I've not had any suggestions for solutions, so I've reposted here." ... where at least I've had one useful response so far, even if it didn't pan out.
|
Quote:
|
Ah, okay; I didn't know that. I did deliberately mention that I'd previously posted in the other section, to avoid any annoyance on anyone's part, but I'll know for future reference; thanks.
Anyway, if anyone is able to offer some sparks of genius to help resolve the problem then I'll be hugely grateful; it seems I've tried just about everything, but to no avail. |
Quote:
Code:
wget --no-check-certificate <url> |
I think I had already checked messages in /var/log/messages before, but just cleared it out and started trying downloads again, with both curl and wget, but nothing new appeared in the log when I did try.
I hadn't previously tried wget with Code:
--no-check-certificate Code:
$ curl -O -k http://ipv4.download.thinkbroadband.com/512MB.zip |
Have you ruled out layer one issues?
|
Well, being no expert in such things I can't really rule anything out unless I can explicitly test for something. Still, with regards to physical layer stuff then I don't really think it would be (but welcome to be proven wrong), as all other network functionality seems normal from the same machine (yum works, and a web-server works on there, etc, etc), and the same firewall/router is also used by another machine (Windows) where I have no problems, and I'm not sure what else I would really check.
|
If you have any spare cables, try swapping cables, same with NICs, switch ports.
|
I can do a switcheroo with cables and ports, but not possible with NICs. I'll play around with that tomorrow when I'm back at the machine.
However, with due respect, I don't see how that could make any difference when it's already established that no other network services on the same machine have any problems with the same setup. |
Quote:
|
Well, a month later, but still no progress. I cannot think of anything else to try. Would be eternally grateful if anyone ever gets any ideas on what the problem could be.
|
All times are GMT -5. The time now is 05:46 AM. |