LinuxQuestions.org
Help answer threads with 0 replies.
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Networking
User Name
Password
Linux - Networking This forum is for any issue related to networks or networking.
Routing, network cards, OSI, etc. Anything is fair game.

Notices


Reply
  Search this Thread
Old 11-10-2008, 07:54 AM   #1
teluguswan
Member
 
Registered: Oct 2005
Posts: 116

Rep: Reputation: 15
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

Last edited by teluguswan; 11-10-2008 at 07:55 AM. Reason: squid, dns error,
 
Old 11-10-2008, 08:10 AM   #2
acid_kewpie
Moderator
 
Registered: Jun 2001
Location: UK
Distribution: Gentoo, RHEL, Fedora, Centos
Posts: 43,417

Rep: Reputation: 1981Reputation: 1981Reputation: 1981Reputation: 1981Reputation: 1981Reputation: 1981Reputation: 1981Reputation: 1981Reputation: 1981Reputation: 1981Reputation: 1981
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?
 
Old 11-10-2008, 09:18 AM   #3
nishith
Member
 
Registered: Aug 2008
Posts: 148

Rep: Reputation: 15
Cool

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
 
Old 11-10-2008, 10:25 PM   #4
teluguswan
Member
 
Registered: Oct 2005
Posts: 116

Original Poster
Rep: Reputation: 15
thanks for the reply

Quote:
Originally Posted by acid_kewpie View Post
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.

Last edited by teluguswan; 11-10-2008 at 10:31 PM.
 
Old 11-10-2008, 10:30 PM   #5
teluguswan
Member
 
Registered: Oct 2005
Posts: 116

Original Poster
Rep: Reputation: 15
Quote:
Originally Posted by nishith View Post
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
 
Old 11-11-2008, 06:36 PM   #6
salasi
Senior Member
 
Registered: Jul 2007
Location: Directly above centre of the earth, UK
Distribution: SuSE, plus some hopping
Posts: 4,070

Rep: Reputation: 897Reputation: 897Reputation: 897Reputation: 897Reputation: 897Reputation: 897Reputation: 897
Quote:
Originally Posted by teluguswan View Post
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?)
 
Old 11-11-2008, 11:07 PM   #7
teluguswan
Member
 
Registered: Oct 2005
Posts: 116

Original Poster
Rep: Reputation: 15
Quote:
Originally Posted by salasi View Post
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 ...........
 
Old 11-12-2008, 02:14 AM   #8
acid_kewpie
Moderator
 
Registered: Jun 2001
Location: UK
Distribution: Gentoo, RHEL, Fedora, Centos
Posts: 43,417

Rep: Reputation: 1981Reputation: 1981Reputation: 1981Reputation: 1981Reputation: 1981Reputation: 1981Reputation: 1981Reputation: 1981Reputation: 1981Reputation: 1981Reputation: 1981
good grief, i keep saying just put in an ip address for a dns server... am i talking to myself?
 
Old 11-13-2008, 09:43 AM   #9
teluguswan
Member
 
Registered: Oct 2005
Posts: 116

Original Poster
Rep: Reputation: 15
Quote:
Originally Posted by acid_kewpie View Post
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
 
Old 11-13-2008, 11:33 AM   #10
acid_kewpie
Moderator
 
Registered: Jun 2001
Location: UK
Distribution: Gentoo, RHEL, Fedora, Centos
Posts: 43,417

Rep: Reputation: 1981Reputation: 1981Reputation: 1981Reputation: 1981Reputation: 1981Reputation: 1981Reputation: 1981Reputation: 1981Reputation: 1981Reputation: 1981Reputation: 1981
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.
 
Old 11-14-2008, 03:31 AM   #11
teluguswan
Member
 
Registered: Oct 2005
Posts: 116

Original Poster
Rep: Reputation: 15
Quote:
Originally Posted by acid_kewpie View Post
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
 
Old 11-14-2008, 05:13 AM   #12
salasi
Senior Member
 
Registered: Jul 2007
Location: Directly above centre of the earth, UK
Distribution: SuSE, plus some hopping
Posts: 4,070

Rep: Reputation: 897Reputation: 897Reputation: 897Reputation: 897Reputation: 897Reputation: 897Reputation: 897
...at the clear risk of not doing anything whatsoever for the OP...

Quote:
Originally Posted by acid_kewpie View Post
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.)

Last edited by salasi; 11-14-2008 at 05:18 AM. Reason: stupidity, as usual, compunded by not reading everything
 
Old 11-20-2008, 08:06 AM   #13
teluguswan
Member
 
Registered: Oct 2005
Posts: 116

Original Poster
Rep: Reputation: 15
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
 
Old 11-20-2008, 08:29 AM   #14
acid_kewpie
Moderator
 
Registered: Jun 2001
Location: UK
Distribution: Gentoo, RHEL, Fedora, Centos
Posts: 43,417

Rep: Reputation: 1981Reputation: 1981Reputation: 1981Reputation: 1981Reputation: 1981Reputation: 1981Reputation: 1981Reputation: 1981Reputation: 1981Reputation: 1981Reputation: 1981
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.
 
  


Reply


Thread Tools Search this Thread
Search this Thread:

Advanced Search

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off



Similar Threads
Thread Thread Starter Forum Replies Last Post
DNS / Squid / iptables / proxy / browsing error mcphilbrick Linux - General 0 08-21-2007 11:17 AM
squid giving error while authenticating with Microsoft ADS dsids Linux - Software 0 03-26-2007 05:20 AM
Squid and DNS problem marius_vl Linux - Server 0 02-19-2007 10:27 AM
Installation of octave giving errors dont know how to fix jwheel83 Linux - General 1 10-09-2006 04:22 AM
Getting error for DNS in squid simplyrahul Linux - General 5 07-23-2005 06:52 PM

LinuxQuestions.org > Forums > Linux Forums > Linux - Networking

All times are GMT -5. The time now is 04:58 PM.

Main Menu
Advertisement
My LQ
Write for LQ
LinuxQuestions.org is looking for people interested in writing Editorials, Articles, Reviews, and more. If you'd like to contribute content, let us know.
Main Menu
Syndicate
RSS1  Latest Threads
RSS1  LQ News
Twitter: @linuxquestions
Open Source Consulting | Domain Registration