Re: [squid-users] Squid + MRTG Error SNMP 3401

From: Tek Bahadur Limbu <teklimbu@dont-contact.us>
Date: Mon, 12 Feb 2007 14:32:46 +0545

-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA1

On Mon, 12 Feb 2007 00:33:30 +0700
"Pratchaya Chatuphian" <pratchaya.note@gmail.com> wrote:

> Hi , Everyone :: I need your help
>
>
> i can't successful about SQUID + MRTG .
> Anyone Can help me ?
>
> i got error in /var/log/squid/cache.log
> like this.
> #############
> commBind: Cannot bind socket FD 13 to *:3401: (13) Permission denied
> FATAL: Cannot open snmp Port
> #############

Dear Pratchaya,

Did check the permissions of squid and it's related directories. Also
under which user does Squid run? If you run Squid without commenting
"snmp_port 3401", do you see port 3401 open?

It might also help to check your firewall if you have any. By the way,
which OS do you have?

>
>
> When i config /etc/squid/squid.conf
>
>
> #############
> snmp_port 3401
> acl snmppublic snmp_community public
> snmp_access allow snmppublic all
> snmp_access deny all
> snmp_incoming_address 0.0.0.0
> snmp_outgoing_address 255.255.255.0
> #############

Please try:

snmp_port 3401
acl snmppublic snmp_community public

acl localhost src 127.0.0.1/255.255.255.255
acl myhost src Your_IP_Address

snmp_access allow snmppublic localhost
snmp_access allow snmppublic myhost
snmp_access deny all

After making the appropriate changes, restart Squid and run the
following command which should give you snmp data for squid.

snmpwalk -v 1 -c public localhost:3401 1.3.6.1.4.1.3495.1

If the above works, then you should have no problem creating MRTG
graphs for squid.

Have a nice day.

>
>
> Thank you very much for advance
> Regards.,
> Pratchaya
>
>
> PS. my netstat -tanp by default ( when i comment this line
> "#snmp_port 3401" and start squid )
>
> [root@berlin selinux]# netstat -tanp
> Active Internet connections (servers and established)
> Proto Recv-Q Send-Q Local Address Foreign Address
> State PID/Program name
> tcp 0 0 0.0.0.0:199 0.0.0.0:*
> LISTEN 2763/snmpd
> tcp 0 0 0.0.0.0:3306 0.0.0.0:*
> LISTEN 11124/mysqld
> tcp 0 0 0.0.0.0:21 0.0.0.0:*
> LISTEN 2798/vsftpd
> tcp 0 0 192.168.1.2:53 0.0.0.0:*
> LISTEN 2653/named
> tcp 0 0 192.168.2.1:53 0.0.0.0:*
> LISTEN 2653/named
> tcp 0 0 127.0.0.1:53 0.0.0.0:*
> LISTEN 2653/named
> tcp 0 0 0.0.0.0:3128 0.0.0.0:*
> LISTEN 5202/(squid)
> tcp 0 0 0.0.0.0:25 0.0.0.0:*
> LISTEN 2982/master
> tcp 0 0 127.0.0.1:953 0.0.0.0:*
> LISTEN 2653/named
> tcp 0 0 :::110 :::*
> LISTEN 2919/dovecot
> tcp 0 0 :::143 :::*
> LISTEN 2919/dovecot
> tcp 0 0 :::80 :::*
> LISTEN 3005/httpd
> tcp 0 0 :::22 :::*
> LISTEN 2773/sshd
> tcp 0 0 :::443 :::*
> LISTEN 3005/httpd
> [root@berlin selinux]#
>

- --

With best regards and good wishes,

Yours sincerely,

Tek Bahadur Limbu

(TAG/TDG Group)
Jwl Systems Department

Worldlink Communications Pvt. Ltd.

Jawalakhel, Nepal

http://www.wlink.com.np
-----BEGIN PGP SIGNATURE-----
Version: GnuPG v1.4.2.2 (FreeBSD)

iD8DBQFF0CmyVrOl+eVhOvYRAl9pAJ473ChF81RN2w/RzoPXmHYy/2ILkQCePNIg
/QLYuHiZBvzZgYbWWSaJPqg=
=Jqrg
-----END PGP SIGNATURE-----
Received on Mon Feb 12 2007 - 01:48:04 MST

This archive was generated by hypermail pre-2.1.9 : Thu Mar 01 2007 - 12:00:01 MST