LinuxQuestions.org

LinuxQuestions.org (/questions/)
-   Linux - Networking (https://www.linuxquestions.org/questions/linux-networking-3/)
-   -   Squid giving problem with DNS error where i dont have (https://www.linuxquestions.org/questions/linux-networking-3/squid-giving-problem-with-dns-error-where-i-dont-have-682345/)

teluguswan 11-10-2008 07:54 AM

Squid giving problem with DNS error where i dont have
 
Friends

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

acid_kewpie 11-10-2008 08:10 AM

if you're only chaining requests upstream and caching, just set a dns server. if you don't use it, who cares what the address is?

nishith 11-10-2008 09:18 AM

Dear Friend,

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

teluguswan 11-10-2008 10:25 PM

thanks for the reply
 
Quote:

Originally Posted by acid_kewpie (Post 3337083)
if you're only chaining requests upstream and caching, just set a dns server. if you don't use it, who cares what the address is?

Earlier i dont set up any,

ok can you provide the small quick info how to setup the dns. Because i dont have any idea only static ip i use always in our network.

teluguswan 11-10-2008 10:30 PM

Quote:

Originally Posted by nishith (Post 3337143)
Dear Friend,

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.

Code:

cache_peer 192.8.100.34 parent 8080 3130 no-query default no-digest
i tried dns_nameservers 127.0.0.1 for testing this also doesnot help.

what is the problem with the command squid -D why i.e not working.

tell my squid not to use DNS :Pengy:

salasi 11-11-2008 06:36 PM

Quote:

Originally Posted by teluguswan (Post 3337073)
The same worked in SUSE

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?)

teluguswan 11-11-2008 11:07 PM

Quote:

Originally Posted by salasi (Post 3338866)
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 ...........:newbie:

acid_kewpie 11-12-2008 02:14 AM

good grief, i keep saying just put in an ip address for a dns server... am i talking to myself?

teluguswan 11-13-2008 09:43 AM

Quote:

Originally Posted by acid_kewpie (Post 3339125)
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

acid_kewpie 11-13-2008 11:33 AM

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.

teluguswan 11-14-2008 03:31 AM

Quote:

Originally Posted by acid_kewpie (Post 3340828)
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

www.rediff.com -> clicked


--------------------------------------
ERROR
The requested URL could not be retrieved

While trying to retrieve the URL: http://portfolio.rediff.com/money/jsp/quote_process.jsp

The following error was encountered:

* Connection Failed

The system returned:

(110) Connection timed out

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)
--------------------------------------------


also even iam unable to get the following page

http://en-US.start2.mozilla.com/fire...en-US:official

So what is the problem, any thing bad with the configuration

salasi 11-14-2008 05:13 AM

...at the clear risk of not doing anything whatsoever for the OP...

Quote:

Originally Posted by acid_kewpie (Post 3339125)
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.

And, from http://www.visolve.com/squid/squid30/miscellaneous.php

Quote:

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.)

teluguswan 11-20-2008 08:06 AM

Any one has the idea why iam unable to browse further.

or the link below the mozilla home page

http://en-us.start2.mozilla.com/fire...en-US:official


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

acid_kewpie 11-20-2008 08:29 AM

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.


All times are GMT -5. The time now is 06:54 AM.