Project

General

Profile

Actions

Bug #2756

closed
CB

SNMPD problems when binding pppoe interface

Bug #2756: SNMPD problems when binding pppoe interface

Added by Claudius Badmind over 13 years ago. Updated over 13 years ago.

Status:
Closed
Priority:
Normal
Assignee:
-
Category:
SNMP
Target version:
Start date:
01/15/2013
Due date:
% Done:

100%

Estimated time:
Plus Target Version:
Release Notes:
Affected Version:
2.1
Affected Architecture:

Description

snmd stop working after a while
i restart the service and its working fine

All modules loaded
Modules
SNMP Modules MibII
Netgraph
PF
Host Resources (Requires MibII)
UCD
Regex

syslog.log:

Jan 2 17:18:40 winits snmpd35289: /etc/snmpd.conf: No such file or directory
Jan 2 17:18:40 winits snmpd35289: error in config file
Jan 3 17:18:47 winits snmpd80003: /etc/snmpd.conf: No such file or directory
Jan 3 17:18:47 winits snmpd80003: error in config file
Jan 4 17:18:56 winits snmpd93755: /etc/snmpd.conf: No such file or directory
Jan 4 17:18:56 winits snmpd93755: error in config file
Jan 5 17:19:01 winits snmpd69747: /etc/snmpd.conf: No such file or directory
Jan 5 17:19:01 winits snmpd69747: error in config file
Jan 6 17:19:08 winits snmpd56845: /etc/snmpd.conf: No such file or directory
Jan 6 17:19:08 winits snmpd56845: error in config file
Jan 7 17:19:17 winits snmpd1070: /etc/snmpd.conf: No such file or directory
Jan 7 17:19:17 winits snmpd1070: error in config file
Jan 8 17:19:23 winits snmpd75394: /etc/snmpd.conf: No such file or directory
Jan 8 17:19:23 winits snmpd75394: error in config file
Jan 9 17:19:28 winits snmpd74784: /etc/snmpd.conf: No such file or directory
Jan 9 17:19:28 winits snmpd74784: error in config file
Jan 10 17:19:35 winits snmpd55107: /etc/snmpd.conf: No such file or directory
Jan 10 17:19:35 winits snmpd55107: error in config file
Jan 11 17:19:45 winits snmpd71911: /etc/snmpd.conf: No such file or directory
Jan 11 17:19:45 winits snmpd71911: error in config file
Jan 12 17:19:57 winits snmpd4221: /etc/snmpd.conf: No such file or directory
Jan 12 17:19:57 winits snmpd4221: error in config file
Jan 13 17:19:58 winits snmpd71001: /etc/snmpd.conf: No such file or directory
Jan 13 17:19:58 winits snmpd71001: error in config file
Jan 13 19:01:07 winits snmpd89646: /etc/snmpd.conf: No such file or directory
Jan 13 19:01:07 winits snmpd89646: error in config file
Jan 13 19:23:50 winits snmpd96872: /etc/snmpd.conf: No such file or directory
Jan 13 19:23:50 winits snmpd96872: error in config file
Jan 14 19:00:56 winits snmpd82740: /etc/snmpd.conf: No such file or directory
Jan 14 19:00:56 winits snmpd82740: error in config file
Jan 15 19:01:05 winits snmpd50942: /etc/snmpd.conf: No such file or directory
Jan 15 19:01:05 winits snmpd50942: error in config file

RB Updated by Renato Botelho over 13 years ago Actions #1

Are you seeing this on recent snapshots?

snmpd.conf is located on /var/etc and not on /etc, do you have any custom patch applied?

CB Updated by Claudius Badmind over 13 years ago Actions #2

i use the latest snapshot.
and yes i know the config is in /var/etc thats why i dont get why i see in system.log "/etc/snmpd.conf: No such file or directory"
is there anyway i can see why the process dies?

i will try this now
http://forum.pfsense.org/index.php?topic=24478.0

RB Updated by Renato Botelho over 13 years ago Actions #3

If it doesn't help, please attach the content of /var/etc/snmpd.conf.

RB Updated by Renato Botelho over 13 years ago Actions #4

  • Status changed from New to Feedback
  • Assignee set to Renato Botelho

CB Updated by Claudius Badmind over 13 years ago Actions #5

okay it sill stops working so here is my /var/etc/snmpd.conf

location := "wints" 
contact := "wints" 
read := "public" 
# SNMP Trap support.
traphost := 192.168.0.2
trapport := 162
trap := "PFSENSE" 

system := 1     # pfSense
%snmpd
begemotSnmpdDebugDumpPdus       = 2
begemotSnmpdDebugSyslogPri      = 7
begemotSnmpdCommunityString.0.1 = $(read)
begemotTrapSinkStatus.[$(traphost)].$(trapport) = 4
begemotTrapSinkVersion.[$(traphost)].$(trapport) = 2
begemotTrapSinkComm.[$(traphost)].$(trapport) = $(trap)
begemotSnmpdCommunityDisable    = 1
begemotSnmpdPortStatus.192.168.0.1.161 = 1
begemotSnmpdLocalPortStatus."/var/run/snmpd.sock" = 1
begemotSnmpdLocalPortType."/var/run/snmpd.sock" = 4

# These are bsnmp macros not php vars.
sysContact      = $(contact)
sysLocation     = $(location)
sysObjectId     = 1.3.6.1.4.1.12325.1.1.2.1.$(system)

snmpEnableAuthenTraps = 2
begemotSnmpdModulePath."mibII"  = "/usr/lib/snmp_mibII.so" 
begemotSnmpdModulePath."netgraph" = "/usr/lib/snmp_netgraph.so" 
%netgraph
begemotNgControlNodeName = "snmpd" 
begemotSnmpdModulePath."pf"     = "/usr/lib/snmp_pf.so" 
begemotSnmpdModulePath."hostres"     = "/usr/lib/snmp_hostres.so" 
begemotSnmpdModulePath."ucd"     = "/usr/local/lib/snmp_ucd.so" 
begemotSnmpdModulePath."regex"     = "/usr/local/lib/snmp_regex.so" 

RB Updated by Renato Botelho over 13 years ago Actions #6

Could you please collect snmpd process information when it starts?

  1. ps auxwww | grep -i snmp

And send the output.

CB Updated by Claudius Badmind over 13 years ago Actions #7

root 68740 0.0 1.4 8368 6760 ?? Ss 3:27PM 0:00.05 /usr/sbin/bsnmpd -c /var/etc/snmpd.conf -p /var/run/snmpd.pid
root 91968 0.0 0.1 1884 720 0 R+ 3:27PM 0:00.00 grep -i snmp

sorry for late reply

JP Updated by Jim Pingle over 13 years ago Actions #8

Can you try removing the trap host/port and see if it stays up longer?

CB Updated by Claudius Badmind over 13 years ago Actions #9

Okay i will remove it and see what will happens

CB Updated by Claudius Badmind over 13 years ago Actions #10

Still the same ... maybe i should reinstall it ...

CB Updated by Claudius Badmind over 13 years ago Actions #11

snmp doesnt even work right data for pppoe and some vlan interfaces are not available ! even after re install with old config

RB Updated by Renato Botelho over 13 years ago Actions #12

You still have same problems or it's a different one?

CB Updated by Claudius Badmind over 13 years ago Actions #13

still the same problem after reboot it wont start, i have to start it manual

2.1-BETA1 (i386)
built on Wed Feb 6 19:40:53 EST 2013

RB Updated by Renato Botelho over 13 years ago Actions #14

Could you please create a file called test_snmpd.php with the following content:

<?php

require_once("services.inc");

services_snmpd_configure();

?>

After just execute:

# php test_snmpd.php

And send me output

CB Updated by Claudius Badmind over 13 years ago Actions #15

that is the output :

Fatal error: Call to undefined function sigkillbypid() in /etc/inc/services.inc on line 1633

/etc/inc/services.inc line 1633 is :

Sigkillbypid("{$g['varrun_path']}/snmpd.pid", "TERM");

RB Updated by Renato Botelho over 13 years ago Actions #16

The commit commit:1b7ec6ba16 should address this. Could you make this change to services.inc and test it again?

CB Updated by Claudius Badmind over 13 years ago Actions #17

ok i did it

php test_snmpd.php without error

so i will let u know after 24h

thanks

CB Updated by Claudius Badmind over 13 years ago Actions #18

after restart the service doesn't start

RB Updated by Renato Botelho over 13 years ago Actions #19

Can you post your config.xml here or send it direct to me ()?

CB Updated by Claudius Badmind over 13 years ago Actions #20

send u an email

RB Updated by Renato Botelho over 13 years ago Actions #21

I couldn't find anything wrong on your config and couldn't reproduce it locally. Let me just ask you some questions to be sure I understood the issue right:

- Are you using recent snapshot?
- snmpd doesn't start during the boot, but it works fine if you start it manually after that?

CB Updated by Claudius Badmind over 13 years ago Actions #22

yes i use the snapshot from today

after boot the service wont start
but the worst problem is after a while it just dies and i have to restart it manually

RB Updated by Renato Botelho over 13 years ago Actions #23

It seems to be a local issue instead of a bug on pfSense since there are no other users reporting the same issue and I couldn't reproduce it locally. Is it possible for you to test it on other installation?

CB Updated by Claudius Badmind over 13 years ago Actions #24

hmm its hard to test it on another machine i will do a complete new install of the system next week and i try to install it on another machine

CB Updated by Claudius Badmind over 13 years ago Actions #25

I figured out that every time my ISP reconnect me snmpd stop working that's why it wont start from the beginning also
because the pppoe starts connecting

RB Updated by Renato Botelho over 13 years ago Actions #26

Could you please change "Bind Interface" to All to see if the error persists?

CB Updated by Claudius Badmind over 13 years ago Actions #27

very nice! i tested it right now

after a reconnect the snmp stoped working

then i bind it to all interfaces and it was working even after a reboot it stats

but now i have to be careful with the firewall rules because because its also bind on WAN interface ... but thats okay for now

RB Updated by Renato Botelho over 13 years ago Actions #28

  • Subject changed from SNMPD stop working after a while to SNMPD problems when binding pppoe interface
  • Status changed from Feedback to New
  • Assignee deleted (Renato Botelho)

The problem is when snmpd starts the interface doesn't have the IP address set yet. And when it reconnect it crashes because it cannot bind the ip. I adjusted the Subject and we will keep it open to investigate a possible fix.

RB Updated by Renato Botelho over 13 years ago Actions #29

  • Status changed from New to Feedback
  • % Done changed from 0 to 100

Applied in changeset commit:7790196644a3cc38cc2ec7d0df01f164479b43be.

RB Updated by Renato Botelho over 13 years ago Actions #30

  • Status changed from Feedback to New
  • % Done changed from 100 to 0

This last change should fix the issue, please gitsync it or update to the next released snapshot, back snmp Bind Interface to the same it was configured before and give it a try.

RB Updated by Renato Botelho over 13 years ago Actions #31

  • Status changed from New to Feedback
  • % Done changed from 0 to 100

CB Updated by Claudius Badmind over 13 years ago Actions #32

hmm after update still the same .... any idea

RB Updated by Renato Botelho over 13 years ago Actions #33

  • Status changed from Feedback to New
  • % Done changed from 100 to 0

RB Updated by Renato Botelho over 13 years ago Actions #34

  • Status changed from New to Feedback
  • % Done changed from 0 to 100

I did a lot of testing here, with snmp configured to bind a pppoe interface, every time pppoe disconnects and reconnect, with a different IP snmpd is reconfigured and run again without any problems.

There was an issue, fixed by commit:7790196644. But now I believe you should ask for help on forum or mailing list, since it seems to be a local problem and not a product bug.

CB Updated by Claudius Badmind over 13 years ago Actions #35

Okay after finding 2 bugs u send me to a forum ... okay noted

btw i use 2 wan interfaces

RB Updated by Renato Botelho over 13 years ago Actions #36

  • Status changed from Feedback to Closed
Actions

Also available in: Atom