使用squid代理时出现 The requested URL could not be retrieved

本文详细解析了使用代理访问网站时遇到DNS解析错误的原因,并提供了具体的解决方案,包括检查和修改/etc/resolv.conf文件,以及重启squid服务。

摘要生成于 C知道 ,由 DeepSeek-R1 满血版支持, 前往体验 >

分享一下我老师大神的人工智能教程!零基础,通俗易懂!http://blog.youkuaiyun.com/jiangjunshow

也欢迎大家转载本篇文章。分享知识,造福人民,实现我们中华民族伟大复兴!

               

问题:
当使用代理访问网站时出现以下错误:
========================================
The requested URL could not be retrieved

While trying to retrieve the URL: http://linkhelp.clients.google.com/tbproxy/lh/fixurl?

The following error was encountered:

    Unable to determine IP address from host name for linkhelp.clients.google.com

The dnsserver returned:

    Timeout

This means that:

 The cache was not able to resolve the hostname presented in the URL.
 Check if the address is correct.

Your cache administrator is root.
========================================


解决方法:
这是由于代理服务器机器的DNS配置问题,代理服务器机器不能找到指定url的ip地址导致。检查/etc/resolv.conf文件配置是否正确,如不正确添加正确的配置信息,比如说:
nameserver ###.###.###.###
nameserver ###.###.###.###
可以配置多个DNS server。
重新启动squid服务。

           

给我老师的人工智能教程打call!http://blog.youkuaiyun.com/jiangjunshow
这里写图片描述
{ "status_code": 403, "body": "<!DOCTYPE html PUBLIC \"-//W3C//DTD HTML 4.01//EN\" \"http://www.w3.org/TR/html4/strict.dtd\">\n<html><head>\n<meta type=\"copyright\" content=\"Copyright (C) 1996-2020 The Squid Software Foundation and contributors\">\n<meta http-equiv=\"Content-Type\" content=\"text/html; charset=utf-8\">\n<title>ERROR: The requested URL could not be retrieved</title>\n<style type=\"text/css\"><!--\n /*\n * Copyright (C) 1996-2023 The Squid Software Foundation and contributors\n *\n * Squid software is distributed under GPLv2+ license and includes\n * contributions from numerous individuals and organizations.\n * Please see the COPYING and CONTRIBUTORS files for details.\n */\n\n/*\n Stylesheet for Squid Error pages\n Adapted from design by Free CSS Templates\n http://www.freecsstemplates.org\n Released for free under a Creative Commons Attribution 2.5 License\n*/\n\n/* Page basics */\n* {\n\tfont-family: verdana, sans-serif;\n}\n\nhtml body {\n\tmargin: 0;\n\tpadding: 0;\n\tbackground: #efefef;\n\tfont-size: 12px;\n\tcolor: #1e1e1e;\n}\n\n/* Page displayed title area */\n#titles {\n\tmargin-left: 15px;\n\tpadding: 10px;\n\tpadding-left: 100px;\n\tbackground: url('/squid-internal-static/icons/SN.png') no-repeat left;\n}\n\n/* initial title */\n#titles h1 {\n\tcolor: #000000;\n}\n#titles h2 {\n\tcolor: #000000;\n}\n\n/* special event: FTP success page titles */\n#titles ftpsuccess {\n\tbackground-color:#00ff00;\n\twidth:100%;\n}\n\n/* Page displayed body content area */\n#content {\n\tpadding: 10px;\n\tbackground: #ffffff;\n}\n\n/* General text */\np {\n}\n\n/* error brief description */\n#error p {\n}\n\n/* some data which may have caused the problem */\n#data {\n}\n\n/* the error message received from the system or other software */\n#sysmsg {\n}\n\npre {\n}\n\n/* special event: FTP / Gopher directory listing */\n#dirmsg {\n font-family: courier, monospace;\n color: black;\n font-size: 10pt;\n}\n#dirlisting {\n margin-left: 2%;\n margin-right: 2%;\n}\n#dirlisting tr.entry td.icon,td.filename,td.size,td.date {\n border-bottom: groove;\n}\n#dirlisting td.size {\n width: 50px;\n text-align: right;\n padding-right: 5px;\n}\n\n/* horizontal lines */\nhr {\n\tmargin: 0;\n}\n\n/* page displayed footer area */\n#footer {\n\tfont-size: 9px;\n\tpadding-left: 10px;\n}\n\n\nbody\n:lang(fa) { direction: rtl; font-size: 100%; font-family: Tahoma, Roya, sans-serif; float: right; }\n:lang(he) { direction: rtl; }\n --></style>\n</head><body id=ERR_ACCESS_DENIED>\n<div id=\"titles\">\n<h1>ERROR</h1>\n<h2>The requested URL could not be retrieved</h2>\n</div>\n<hr>\n\n<div id=\"content\">\n<p>The following error was encountered while trying to retrieve the URL: <a href=\"http://172.25.128.1:13000/api/resume_analysis:create\">http://172.25.128.1:13000/api/resume_analysis:create</a></p>\n\n<blockquote id=\"error\">\n<p><b>Access Denied.</b></p>\n</blockquote>\n\n<p>Access control configuration prevents your request from being allowed at this time. Please contact your service provider if you feel this is incorrect.</p>\n\n<p>Your cache administrator is <a href=\"mailto:webmaster?subject=CacheErrorInfo%20-%20ERR_ACCESS_DENIED&body=CacheHost%3A%20squid-proxy-7877d5d865-z2vtt%0D%0AErrPage%3A%20ERR_ACCESS_DENIED%0D%0AErr%3A%20%5Bnone%5D%0D%0ATimeStamp%3A%20Thu,%2005%20Jun%202025%2016%3A15%3A17%20GMT%0D%0A%0D%0AClientIP%3A%2010.10.30.116%0D%0A%0D%0AHTTP%20Request%3A%0D%0APOST%20%2Fapi%2Fresume_analysis%3Acreate%20HTTP%2F1.1%0AAccept-Encoding%3A%20gzip,%20deflate,%20br,%20zstd%0D%0AConnection%3A%20keep-alive%0D%0AUser-Agent%3A%20python-httpx%2F0.27.2%0D%0AAccept%3A%20application%2Fjson%0D%0AContent-Type%3A%20application%2Fjson%0D%0AX-Locale%3A%20zh-CN%0D%0AX-Role%3A%20root%0D%0AX-Authenticator%3A%20basic%0D%0AAuthorization%3A%20Bearer%20eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9.eyJ1c2VySWQiOjEsInJvbGVOYW1lIjoicm9vdCIsImlhdCI6MTc0OTEzOTc3MywiZXhwIjoxNzUxNzMxNzczfQ.fwrzowTqH4tR6nT1QNP2AyT5cW4j_xjTwHvwR3yMzNE%0D%0AX-Timezone%3A%20+08%3A00%0D%0AX-Hostname%3A%20172.25.128.1%0D%0AX-App%3A%20main%0D%0AContent-Length%3A%2018%0D%0AHost%3A%20172.25.128.1%3A13000%0D%0A%0D%0A%0D%0A\">webmaster</a>.</p>\n<br>\n</div>\n\n<hr>\n<div id=\"footer\">\n<p>Generated Thu, 05 Jun 2025 16:15:17 GMT by squid-proxy-7877d5d865-z2vtt (squid)</p>\n<!-- ERR_ACCESS_DENIED -->\n</div>\n</body></html>\n", "headers": { "server": "squid", "mime-version": "1.0", "date": "Thu, 05 Jun 2025 16:15:17 GMT", "content-type": "text/html;charset=utf-8", "content-length": "4148", "x-squid-error": "ERR_ACCESS_DENIED 0", "vary": "Accept-Language", "content-language": "en", "x-cache": "MISS from squid-proxy-7877d5d865-z2vtt", "x-cache-lookup": "NONE from squid-proxy-7877d5d865-z2vtt:3128", "connection": "keep-alive" }, "files": [] }
最新发布
06-07
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值