LinuxQuestions.org
Share your knowledge at the LQ Wiki.
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Server
User Name
Password
Linux - Server This forum is for the discussion of Linux Software used in a server related context.

Notices


Reply
  Search this Thread
Old 10-18-2012, 07:15 PM   #1
mrpurple
Member
 
Registered: May 2010
Posts: 50

Rep: Reputation: 2
SNMP querys to Squid not responding


Hi,
I installed squid into ubuntu 12.04 (squid v3.1.19, snmp v5.4.3, ccze v0.2.1) following:https://help.ubuntu.com/12.04/serverguide/squid.html and http://wiki.squid-cache.org/Features/Snmp and the cache is serving up http content to my network no problem.
However, when I try to query the snmp on squid with
Code:
snmpwalk -m /usr/share/squid3/mib.txt -v1 -Cc -c public localhost:3401 .1.3.6.1.4.1.3495.1.1
net-snmp will read the mib file and return a bunch of (what look like errors) and finally fail to actually connect to proxy the last OID output and the timeout error are shown below:
Code:
Cannot adopt OID in SQUID-MIB: cacheIpCache ::= { cacheNetwork 1 }
Timeout: No Response from localhost:3401
Inpection of sudo nano /var/log/squid3/cache.log reveals
Code:
2012/10/19 11:53:06| snmp_core.cc(489) snmpDecodePacket: Failed SNMP agent query from : 127.0.0.1:57876
Googling returns a bunch of people with similar error codes but not solutions for me. The only Lines I have added/edited in my squid.conf file are
Code:
acl localnet src 192.168.1.0/24
http_access allow localnet
http_port 3128
visible_hostname tango
acl snmppublic snmp_community public
snmp_port 3401
snmp_access allow snmppublic localnet
snmp_access deny all
I wish I knew where else to look. Anybody have a solution or something else to look for?
 
Old 10-19-2012, 12:45 PM   #2
acid_kewpie
Moderator
 
Registered: Jun 2001
Location: UK
Distribution: Gentoo, RHEL, Fedora, Centos
Posts: 43,417

Rep: Reputation: 1976Reputation: 1976Reputation: 1976Reputation: 1976Reputation: 1976Reputation: 1976Reputation: 1976Reputation: 1976Reputation: 1976Reputation: 1976Reputation: 1976
right so your source IP is 127.0.0.1 yet you've explicitly blocked every source outside of 192.168.1.0/24... sounds pretty simple to fix that.
 
Old 10-19-2012, 03:59 PM   #3
mrpurple
Member
 
Registered: May 2010
Posts: 50

Original Poster
Rep: Reputation: 2
Wow thanks, I think that's my stupidest mistake to date! I can instantly see a bunch of ways to fix. I'll hit solved as soon as I get in and make a fix which works.

Thanks again
 
Old 10-22-2012, 03:36 PM   #4
mrpurple
Member
 
Registered: May 2010
Posts: 50

Original Poster
Rep: Reputation: 2
Quote:
right so your source IP is 127.0.0.1 yet you've explicitly blocked every source outside of 192.168.1.0/24... sounds pretty simple to fix that.
Absolutely.
Code:
snmp_access allow snmppublic localnet
should have read
Code:
snmp_access allow snmppublic localhost
with an associated localhost acl of course.

However I still get 30 odd lines which look like
Code:
Cannot adopt OID in SQUID-MIB: cacheIpCache ::= { cacheNetwork 1 }
Is this right?
Quote:
Cannot adopt
certainly sounds like an error to me.
 
Old 10-22-2012, 05:11 PM   #5
acid_kewpie
Moderator
 
Registered: Jun 2001
Location: UK
Distribution: Gentoo, RHEL, Fedora, Centos
Posts: 43,417

Rep: Reputation: 1976Reputation: 1976Reputation: 1976Reputation: 1976Reputation: 1976Reputation: 1976Reputation: 1976Reputation: 1976Reputation: 1976Reputation: 1976Reputation: 1976
Google suggests this is because squid can't access to parent MIB files. this isn't squid specific, but it doesn't look like it's actually a squid issue in itself... http://net-snmp.sourceforge.net/tuto...b-options.html
 
Old 10-22-2012, 06:42 PM   #6
mrpurple
Member
 
Registered: May 2010
Posts: 50

Original Poster
Rep: Reputation: 2
Thanks.
At the top of the "cannot adopt" errors were a list of MIB dependancies which i didnt have. So I imported them into one of the mib path locations with:
Code:
sudo mkdir ~/.snmp/mibs
cd ~/.snmp/mibs
sudo wget ftp://ftp.cisco.com/pub/mibs/v2/SNMPv2-SMI.my
sudo wget ftp://ftp.cisco.com/pub/mibs/v2/SNMPv2-TC.my
sudo wget ftp://ftp.cisco.com/pub/mibs/v2/INET-ADDRESS-MIB.my
I'm a little surprised I havent seen any mention of these MIB dependancies in ANY tutorial for squid/SNMP.
Hopefully anyone googling up "squid/snmp/Cannot adopt" will find this tread and solve their error nice and easy

Last edited by mrpurple; 10-23-2012 at 06:31 PM. Reason: Wrong about initial solution
 
  


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
Squid stops responding dlbear Linux - Server 2 07-24-2009 11:17 AM
cacheUptime Format (Squid+SNMP) msivasakthi Linux - Software 1 05-31-2008 06:41 PM
some computers responding slowly to dansguardian/squid sohmc Linux - Networking 3 09-06-2006 11:04 AM
Squid with Snmp startup error xrtc Linux - Networking 0 11-22-2005 06:22 PM
dns not responding to out side querys bradyc Linux - Newbie 1 10-16-2003 12:18 PM

LinuxQuestions.org > Forums > Linux Forums > Linux - Server

All times are GMT -5. The time now is 05:54 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
Facebook: linuxquestions Google+: linuxquestions
Open Source Consulting | Domain Registration