Project

General

Profile

Actions

Bug #2756

closed

SNMPD problems when binding pppoe interface

Added by Claudius Badmind over 11 years ago. Updated about 11 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

Actions #1

Updated by Renato Botelho over 11 years ago

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?

Actions #2

Updated by Claudius Badmind over 11 years ago

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

Actions #3

Updated by Renato Botelho over 11 years ago

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

Actions #4

Updated by Renato Botelho over 11 years ago

  • Status changed from New to Feedback
  • Assignee set to Renato Botelho
Actions #5

Updated by Claudius Badmind over 11 years ago

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" 
Actions #6

Updated by Renato Botelho over 11 years ago

Could you please collect snmpd process information when it starts?

  1. ps auxwww | grep -i snmp

And send the output.

Actions #7

Updated by Claudius Badmind about 11 years ago

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

Actions #8

Updated by Jim Pingle about 11 years ago

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

Actions #9

Updated by Claudius Badmind about 11 years ago

Okay i will remove it and see what will happens

Actions #10

Updated by Claudius Badmind about 11 years ago

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

Actions #11

Updated by Claudius Badmind about 11 years ago

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

Actions #12

Updated by Renato Botelho about 11 years ago

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

Actions #13

Updated by Claudius Badmind about 11 years ago

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

Actions #14

Updated by Renato Botelho about 11 years ago

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

Actions #15

Updated by Claudius Badmind about 11 years ago

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

Actions #16

Updated by Renato Botelho about 11 years ago

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

Actions #17

Updated by Claudius Badmind about 11 years ago

ok i did it

php test_snmpd.php without error

so i will let u know after 24h

thanks

Actions #18

Updated by Claudius Badmind about 11 years ago

after restart the service doesn't start

Actions #19

Updated by Renato Botelho about 11 years ago

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

Actions #20

Updated by Claudius Badmind about 11 years ago

send u an email

Actions #21

Updated by Renato Botelho about 11 years ago

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?

Actions #22

Updated by Claudius Badmind about 11 years ago

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

Actions #23

Updated by Renato Botelho about 11 years ago

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?

Actions #24

Updated by Claudius Badmind about 11 years ago

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

Actions #25

Updated by Claudius Badmind about 11 years ago

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

Actions #26

Updated by Renato Botelho about 11 years ago

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

Actions #27

Updated by Claudius Badmind about 11 years ago

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

Actions #28

Updated by Renato Botelho about 11 years ago

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

Actions #29

Updated by Renato Botelho about 11 years ago

  • Status changed from New to Feedback
  • % Done changed from 0 to 100
Actions #30

Updated by Renato Botelho about 11 years ago

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

Actions #31

Updated by Renato Botelho about 11 years ago

  • Status changed from New to Feedback
  • % Done changed from 0 to 100
Actions #32

Updated by Claudius Badmind about 11 years ago

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

Actions #33

Updated by Renato Botelho about 11 years ago

  • Status changed from Feedback to New
  • % Done changed from 100 to 0
Actions #34

Updated by Renato Botelho about 11 years ago

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

Actions #35

Updated by Claudius Badmind about 11 years ago

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

btw i use 2 wan interfaces

Actions #36

Updated by Renato Botelho about 11 years ago

  • Status changed from Feedback to Closed
Actions

Also available in: Atom PDF