Ingeborg Hellemo Ingeborg.Hellemo@cc.uit.no writes:
The module is where it is supposed to be,
PYTHONPATH=/usr/local/nav/lib/python. Other python-parts of NAV is
working as expected (or at least not complaining about missing
modules...).
Morten, you have a user on po.uit.no. Feel free to poke around.
Thanks, I had a poke, and now I know what the problem is.
Your immediate fix is to do the following as root:
touch /usr/local/nav/lib/python/nav/snmptrapd/__init__.py
which will make Python actually recognize nav.snmptrapd as a proper
Python package.
The reason I was unable to reproduce the problem on my end was that I
assumed this occurred when you started the daemon, but it seems it
actually occurs every time a trap is received (and I had nothing
configured to send traps to my daemon). The problem being that
snmptrapd imports the handler modules every time it receives a trap,
and not just once at the start of the process (which I think it
should).
I've filed this as two separate bugs in the tracker:
1. http://sourceforge.net/tracker/index.php?func=detail&aid=1822650&gro...
2. http://sourceforge.net/tracker/index.php?func=detail&aid=1822651&gro...
--
mvh
Morten Brekkevold
UNINETT
>From morten.brekkevold at uninett.no Tue Oct 30 11:07:04 2007
From: morten.brekkevold at uninett.no (Morten Brekkevold)
Date: Tue Oct 30 11:07:07 2007
Subject: [Nav-users] Nagios+lampp
In-Reply-To:
Pine.LNX.4.64.0710261910340.3828@tyholt.uninett.no (Vidar
Faltinsen's message of "Fri, 26 Oct 2007 19:11:39 +0200 (CEST)")
References:
20071026092109.wzj2jfan2c08084s@charlie.vbnet.com.br
Pine.LNX.4.64.0710261910340.3828@tyholt.uninett.no
Message-ID:
yylabq0x6ev.fsf@voldsminde.uninett.no
Vidar Faltinsen
vidar.faltinsen@uninett.no writes:
> On Fri, 26 Oct 2007, marcos.sandrini@embryo.com.br wrote:
>
>> Bom dia!
>
> Bom dia, to you, too!
Hi Marcos,
I think what Vidar is trying to say, is that nobody on this list can
read Portugese, so if you really want an answer, you should try again
in English :-)
--
mvh
Morten Brekkevold
UNINETT
>From morten.brekkevold at uninett.no Tue Oct 30 11:13:59 2007
From: morten.brekkevold at uninett.no (Morten Brekkevold)
Date: Tue Oct 30 11:14:01 2007
Subject: [Nav-users] PHP-errors from AlertProfiles
In-Reply-To:
200710260823.l9Q8N64N014697@barnetv.cc.uit.no (Ingeborg
Hellemo's message of "Fri, 26 Oct 2007 10:23:06 +0200")
References:
200710260823.l9Q8N64N014697@barnetv.cc.uit.no
Message-ID:
yyl3avsx63c.fsf@voldsminde.uninett.no
Ingeborg Hellemo
Ingeborg.Hellemo@cc.uit.no writes:
> NAV 3.3.0 and php5
>
>
> If I try to add a new profile I get:
>
> AlertProfiles PHP Errorhandler
[snip]
> Any ideas?
I had a chat with Arne, one of the original developers of the alert
system (since I haven't touched PHP in many years now), as we tried to
upgrade to PHP5. He suggested that these errors had been present all
along, but that previous php versions suppressed them by default.
I think he based this on the fact that whatever error messages Alert
Profiles spat at us under PHP5, anything we did in the Alert Profiles
interface would still work as before.
Are your changes saved properly, despite the errors?
--
mvh
Morten Brekkevold
UNINETT
>From morten.brekkevold at uninett.no Tue Oct 30 11:35:18 2007
From: morten.brekkevold at uninett.no (Morten Brekkevold)
Date: Tue Oct 30 11:35:43 2007
Subject: [Nav-users] smsd is throwing exceptions at me
In-Reply-To:
200710300901.l9U91Pvl076327@barnetv.cc.uit.no (Ingeborg
Hellemo's message of "Tue, 30 Oct 2007 10:01:25 +0100")
References:
200710300901.l9U91Pvl076327@barnetv.cc.uit.no
Message-ID:
yylve8ovqjd.fsf@voldsminde.uninett.no
Ingeborg Hellemo
Ingeborg.Hellemo@cc.uit.no writes:
> Ingeborg.Hellemo@cc.uit.no said:
>> How can I turn on more debugging?
>
> I have put
> loglevel: DEBUG
> into etc/smsd.conf, but this only makes a difference in logging from
> /usr/local/nav/bin/smsd.py. I still don't see any log messages from
> dispatcher.py
You have of course:
1. Set loglevel: DEBUG
2. Restarted smsd?
3. Watched smsd.log until a message has been attempted dispatched?
I do get log messages from nav.smsd.dispatcher here when debug logging
is turned on.
--
mvh
Morten Brekkevold
UNINETT
>From Ingeborg.Hellemo at cc.uit.no Tue Oct 30 12:01:08 2007
From: Ingeborg.Hellemo at cc.uit.no (Ingeborg Hellemo)
Date: Tue Oct 30 12:01:14 2007
Subject: [Nav-users] snmptrapd with ImportError
In-Reply-To: Your message of "Tue, 30 Oct 2007 11:03:16 +0100."
yylfxzsx6l7.fsf@voldsminde.uninett.no
Message-ID:
200710301101.l9UB18tK078731@barnetv.cc.uit.no
morten.brekkevold@uninett.no said:
> Your immediate fix is to do the following as root:
> touch /usr/local/nav/lib/python/nav/snmptrapd/__init__.py
> which will make Python actually recognize nav.snmptrapd as a proper Python
> package.
Cool! Then we immediately move on to new interesting errors.
Now we have a "TypeError":
[2007-10-30 11:54:14,375] [DEBUG] [pid=1422 nav.snmptrapd.linkupdown] Module
linkupdown got trap .1.3.6.1.6.3.1.1.5.3 LINKDOWN
[2007-10-30 11:54:14,376] [DEBUG] [pid=1422 nav.snmptrapd.linkupdown] SELECT
netboxid, vendorid
FROM netbox
LEFT JOIN type USING (typeid)
WHERE ip = %s
[2007-10-30 11:54:14,377] [DEBUG] [pid=1422 nav.snmptrapd.linkupdown] SELECT
swportid, module.deviceid, module.module,
swport.interface
FROM netbox
LEFT JOIN module USING (netboxid)
LEFT JOIN swport USING (moduleid)
WHERE ip=%s AND ifindex = %s
[2007-10-30 11:54:14,379] [ERROR] [pid=1422 nav.snmptrapd] Error when handling
trap with nav.snmptrapd.handlers.linkupdown: unsubscriptable object
Traceback (most recent call last):
File "/usr/local/nav/bin/snmptrapd.py", line 300, in trapHandler
accepted = mod.handleTrap(trap, config=config)
File "/usr/local/nav/lib/python/nav/snmptrapd/handlers/linkupdown.py", line
110, in handleTrap
subid = idres['swportid']
TypeError: unsubscriptable object