Fatal UnboundLocalError in snmptrapd under Python 2.4
Affects | Status | Importance | Assigned to | Milestone | |
---|---|---|---|---|---|
Network Administration Visualized |
Fix Released
|
Medium
|
Morten Brekkevold |
Bug Description
NAV : 3.6.0b6
OS : RHEL 5.5
First startup of snmptrapd after upgrading from 3.6.0b5 to b6 :
[2010-09-24 08:33:26,360] [DEBUG] [pid=5494 nav.snmptrapd] Trying to load handlermodules
[2010-09-24 08:33:26,789] [DEBUG] [pid=5494 nav.snmptrapd] Going into daemon mode...
[2010-09-24 08:33:26,792] [DEBUG] [pid=5494 nav.daemon] First parent exiting. Second has pid 5495.
[2010-09-24 08:33:26,794] [DEBUG] [pid=5496 nav.daemon] Daemon started with pid 5496.
[2010-09-24 08:33:26,797] [DEBUG] [pid=5496 nav.logs] Reopening /usr/local/
[2010-09-24 08:33:26,798] [DEBUG] [pid=5496 nav.logs] Reopened /usr/local/
[2010-09-24 08:33:26,798] [DEBUG] [pid=5496 nav.logs] Reopening /usr/local/
[2010-09-24 08:33:26,799] [DEBUG] [pid=5496 nav.logs] Reopened /usr/local/
[2010-09-24 08:33:26,799] [DEBUG] [pid=5496 nav.snmptrapd] Daemonization complete; reopened log files.
[2010-09-24 08:33:26,802] [DEBUG] [pid=5496 nav.db] Invalid connection object (('nav', 'nav_user')), age=0.564680099487
[2010-09-24 08:33:26,805] [DEBUG] [pid=5495 nav.daemon] Second parent exiting. Daemon has pid 5496.
[2010-09-24 08:33:26,917] [DEBUG] [pid=5496 nav.db] Opened a new database connection, scriptName=default, dbname=nav, user=nav_user
[2010-09-24 08:33:26,917] [DEBUG] [pid=5496 nav.snmptrapd] Adding signal handler for reopening log files on SIGHUP.
[2010-09-24 08:33:26,918] [INFO] [pid=5496 nav.snmptrapd] Snmptrapd started, listening on port 162
[2010-09-24 08:33:54,180] [WARNING] [pid=5496 nav.snmptrapd] SIGTERM received: Shutting down.
[2010-09-24 08:33:54,181] [CRITICAL] [pid=5496 nav.snmptrapd] Fatal exception ocurred
Traceback (most recent call last):
File "/usr/local/
server.
File "/usr/local/
"packet from %r, ignoring trap", src)
UnboundLocalError: local variable 'src' referenced before assignment
[2010-09-24 08:33:54,183] [DEBUG] [pid=5496 nav.daemon] Daemon is exiting. Cleaning up...
[2010-09-24 08:33:54,183] [DEBUG] [pid=5496 nav.daemon] pidfile (/usr/local/
summary: |
- Invalid connection object (snmptrapd - nav3.6.0b6) + Fatal UnboundLocalError in snmptrapd |
tags: | added: snmptrapd |
Changed in nav: | |
status: | Fix Committed → Fix Released |
Macrom, could you please try the attached patch? I'm not quite sure how to reproduce the error you're seeing, but this change should the actual error message and log it.