Squid giving problem with DNS error where i dont have
Linux - NetworkingThis forum is for any issue related to networks or networking.
Routing, network cards, OSI, etc. Anything is fair game.
Notices
Welcome to LinuxQuestions.org, a friendly and active Linux Community.
You are currently viewing LQ as a guest. By joining our community you will have the ability to post topics, receive our newsletter, use the advanced search, subscribe to threads and access many other special features. Registration is quick, simple and absolutely free. Join our community today!
Note that registered members see fewer ads, and ContentLink is completely disabled once you log in.
since 3 days iam trying to install squid in my server where as previously on my Suse linux it worked fine, but when coming to my
Redhat 9 system it is giving problem
i.e
when i check the /var/log/squid/cache.log it is showing following errors
-----------------------------------------------------------
2008/11/10 19:18:45| Process ID 7069
2008/11/10 19:18:45| With 1024 file descriptors available
2008/11/10 19:18:45| DNS Socket created at 0.0.0.0, port 32769, FD 4
FATAL: Could not find any nameservers.
Please check your /etc/resolv.conf file
or use the 'dns_nameservers' option in squid.conf.
Squid Cache (Version 2.5.STABLE3): Terminated abnormally.
CPU Usage: 0.000 seconds = 0.000 user + 0.000 sys
Maximum Resident Size: 0 KB
Page faults with physical i/o: 429
-----------------------------------------------------------
Where as i dont have any DNS Servers in my network purely based on static ip addresses my entire network
even when i checked /etc/resolv.conf file there are no entries, no file
so i created one file resolv.conf with commented line
I try to use the option
squid -z
squid -D
service squid start
Iam getting the same lines of errors in cache.log
give the solution what may be the problem
also
my squid.conf file contents
http_port 8080
cache_peer 192.8.100.34 parent 8080 3130 no-query default no-digest
hierarchy_stoplist cgi-bin ?
acl QUERY urlpath_regex cgi-bin \?
no_cache deny QUERY
cache_mem 16 MB
maximum_object_size 8192 KB
cache_dir ufs /var/spool/squid 200 16 256
cache_store_log /var/log/squid/store.log
auth_param basic children 5
auth_param basic realm Squid proxy-caching web server
auth_param basic credentialsttl 2 hours
auth_param basic casesensitive off
refresh_pattern ^ftp: 1440 20% 10080
refresh_pattern ^gopher: 1440 0% 1440
refresh_pattern . 0 20% 4320
acl all src 0.0.0.0/0.0.0.0
acl user src 192.8.100.224/255.255.255.255
acl manager proto cache_object
acl localhost src 127.0.0.1/255.255.255.255
acl to_localhost dst 127.0.0.0/8
acl SSL_ports port 443 563
acl Safe_ports port 80 # http
acl Safe_ports port 21 # ftp
acl Safe_ports port 443 563 # https, snews
acl Safe_ports port 70 # gopher
acl Safe_ports port 210 # wais
acl Safe_ports port 1025-65535 # unregistered ports
acl Safe_ports port 280 # http-mgmt
acl Safe_ports port 488 # gss-http
acl Safe_ports port 591 # filemaker
acl Safe_ports port 777 # multiling http
acl CONNECT method CONNECT
http_access allow manager localhost
http_access deny manager
http_access deny !Safe_ports
http_access deny CONNECT !SSL_ports
http_access allow user
http_access deny all
http_reply_access allow all
icp_access allow all
never_direct allow all
cache_effective_user squid
cache_effective_group squid
visible_hostname backup-proxy.com
unique_hostname backup-proxy.com
coredump_dir /var/spool/squid
The same worked in SUSE
When i dont have the DNS why is this giving problem.
any info
Last edited by teluguswan; 11-10-2008 at 08:55 AM..
Reason: squid, dns error,
Try to use dns suffix in your /etc/squid.conf file. Whatever DNS IP Address entries you have got from your ISP,just enable below line.
dns_nameservers <your DNS ip address>
Service squid restart
As i shown previously the file content of squid.conf
Already iam getting the internet from another proxy i.e this system is child proxy, trying to establish another proxy with in network.
Was it exactly the same version (and build) of Squid? Well, you wouldn't necesarily expect it to work, would you?
(Note; it won't be exactly the same build. You have, by implication, included that information. You could be really lucky, and have it work, but you really shouldn't be even slightly surprised if it doesn't.)
Quote:
what is the problem with the command squid -D why i.e not working.
It probably is working. Its just that its doing what the man page says it does and that's not what you think that it ought to do. If it follows the man page, it disables the initial check, but still falls over at the first occasion at which you need a DNS resolution. This is expected behaviour and what you have asked for.
BTW, do you get exactly the same error message with the -D switch, or does that change the error message?
Note that the solution suggested by nisith should work; you don't have to 'set up DNS' for this; did you try it?
Quote:
tell my squid not to use DNS
Difficult. DNS is the method that the internet uses to resolve human-friendly names to IP adresses (not human friendly). Therefore, if you want not to use this, either you have to enter web site addresses as IP addresses, or give up using the internet. I wouldn't consider either of those as tolerable, but YMMV.
(DNS can also be optionally be used on your internal network; there it is easier to give up on the use of DNS, but, I assume (please correct me if I am wrong) you are not using squid to cache web pages that are entirely on your internal network, are you?)
Note that the solution suggested by nisith should work; you don't have to 'set up DNS' for this; did you try it?
(DNS can also be optionally be used on your internal network; there it is easier to give up on the use of DNS, but, I assume (please correct me if I am wrong) you are not using squid to cache web pages that are entirely on your internal network, are you?)
In my entire network i dont use the DNS this for your information.
192.8.100.34 8080 is my original Proxy server currently using.
Now my ip is 192.8.100.204 8080 (currently configuring on) going to setup as child proxy which will receive the internet from 192.8.100.34 8080
So, in my total network there is no DNS in picture.
When i dont have DNS what ipaddress i should provide. I tried this suggestion just by putting the 127.0.0.1 (localhost). But no success.
I have another proxy which is in SUSE i have provided its content on squid.conf in my first thread it is working fine without any problems.
----------------------------------------
Any suggestions to solve the problem any thing wrong what iam doing. May be small but ...........
good grief, i keep saying just put in an ip address for a dns server... am i talking to myself?
Sorry friend
My dear chris came here to learn squid and now i need to learn how to setup the dns server
Dont know how to setup dns and do the stuff, searching for that on the web.... i.e the problem and unable to make dns server on my own. As i said previously we use only static ip in our network
no, i didn't say implement a DNS server, i said just put in an IP address for one, valid or not. just placate it. i don't *think* it actually checks it works.
no, i didn't say implement a DNS server, i said just put in an IP address for one, valid or not. just placate it. i don't *think* it actually checks it works.
Wow, sorry for the delay it started working and iam able to browse
dns_nameservers 127.0.0.1
and very good speed when seeing the mms://
but Iam getting problem with the websites i.e the home page is coming very fast but when i click the links in that it is showing
The remote host or network may be down. Please try the request again.
Your cache administrator is root.
Generated Fri, 14 Nov 2008 09:23:43 GMT by yourbuddy.com (squid/2.5.STABLE3)
--------------------------------------------
...at the clear risk of not doing anything whatsoever for the OP...
Quote:
Originally Posted by acid_kewpie
good grief, i keep saying just put in an ip address for a dns server... am i talking to myself?
Quote:
i don't *think* it actually checks it works.
read the friendly man page -
Quote:
-D Disable initial DNS tests.
So, assuming that I have understood correctly, if you specify -D, it disables the initial DNS tests. Thus, if you don't specify -D, it does do initial DNS tests. If the DNS test doesn't work, it posts an error message and exits.
Synopsis
If DNS isn't working properly, Squid will not be able to service requests, so it will refuse to start, with a brief message regarding why in the cache.log.
and, for the definition of the parameter dns_nameservers
Quote:
Normally defaults to resolve.conf, which simply means that Squid's parent DNS servers will be drawn from the /etc/resolve.conf file found on the system Squid runs on. It is possible to select other DNS servers if needed, for example to choose a more local caching DNS server, or a remote internet connected server.
(I'm sorry about the glaring error in there; it should be resolv, not resolve; I'd tell them about it, if there was an obvious way to that.)
And http://www.squid-cache.org/ is probably an easier-to-follow tutorial for neophytes than the visolve one, but either will work...
(Edit: one apology. The links I have given are for Squid 3; you seem to have 2.5. 2.5 is a bit old by now; 2.6 is what is usually used by people who think that 3 is still a bit too bleeding edge. The directives may be sightly different, particularly between 3 and earlier versions.)
Last edited by salasi; 11-14-2008 at 06:18 AM..
Reason: stupidity, as usual, compunded by not reading everything
Also i want to remind you. This may be help you to get the solution (so you can help me)
that already one more child proxy already running in my network for the parent is this troubles me. (I dont think so because by turning off also i tried) but still iam unable to browse further like loading xml files and above links.
any one has the solution if you want more information iam ready to provide
what happens when you try to go further? personally *MY* angle would be, after looking in log files like the squid access log to see what traffic is passing through the squid box with wireshark and see where things fall over. as you have a chain of things, it can be pretty confusing, so i find breaking things out to network traffic level is useful. you may well see traffic between yours and the upstream box, or attempts to bypass the upstream altogether.
LinuxQuestions.org is looking for people interested in writing
Editorials, Articles, Reviews, and more. If you'd like to contribute
content, let us know.