File "/usr/local/nav/apache/webroot/status/status.py", line 107, in indexInternal
prefs = HandleStatusPrefs.loadPrefs(req)
File "/usr/local/nav/apache/webroot/status/StatusPrefs.py", line 340, in loadPrefs
prefs = cPickle.loads(data)
File "/usr/lib/python2.4/site-packages/mod_python/importer.py", line 991, in load_module
return _global_modules_cache.import_module(self.__file)
File "/usr/lib/python2.4/site-packages/mod_python/importer.py", line 488, in import_module
assert(file != parent_info.file), "Import cycle in %s." % file
AssertionError: Import cycle in /usr/local/nav/apache/webroot/status/StatusPrefs.py.
I'm not sure what happens here, noone has ever reported such a problem before.
It looks like Python somehow thinks there is an import cycle when unpickling
a data structure, although I don't really understand why.
I would like to know which versions you run of Apache, mod_python and Python
itself, it might give some clues in a Google search.
--
mvh
Morten Brekkevold
UNINETT
>From ghitzacatalin at yahoo.com Wed May 2 07:53:20 2007
From: ghitzacatalin at yahoo.com (Gheorghe Limboi)
Date: Wed May 2 15:55:36 2007
Subject: ***SPAM*** Re: [Nav-users] ***SPAM*** cant't get /status/ work
Message-ID:
860423.11993.qm@web50002.mail.re2.yahoo.com
Hi Morten,
thank you for your response.
I was looking like crazy for some clue ....Google, pyhon user lists etc...but nothing to help me. (unfortunatly I'm not a pyhon expert so..).
The only thing I found about mod_python error --- " AssertionError: Import cycle in ...." is on
http://archive.netbsd.se/?ml=viewcvs-users&a=2007-02&t=3231282
but even seems to be a close issue is not the same.
Apache 2.0.59
Python 2.4.1
mod_python-3.3.1
Thanks,
Gheorghe
----- Original Message ----
From: Morten Brekkevold
morten.brekkevold@uninett.no
To: Gheorghe Limboi
ghitzacatalin@yahoo.com
Cc: nav-users@itea.ntnu.no
Sent: Wednesday, May 2, 2007 5:58:05 AM
Subject: Re: [Nav-users] ***SPAM*** cant't get /status/ work
Gheorghe Limboi wrote, On 28-04-2007 17:37:
> I managed to install nav 3.2.1 on a slackware box.
>
> Seems that everything is ok except /status
>
> when I try to access status I get the error:
>
> any help is appreciated
Hi Gheorghe!
> File "/usr/local/nav/apache/webroot/status/status.py", line 107, in indexInternal
> prefs = HandleStatusPrefs.loadPrefs(req)
>
> File "/usr/local/nav/apache/webroot/status/StatusPrefs.py", line 340, in loadPrefs
> prefs = cPickle.loads(data)
>
> File "/usr/lib/python2.4/site-packages/mod_python/importer.py", line 991, in load_module
> return _global_modules_cache.import_module(self.__file)
>
> File "/usr/lib/python2.4/site-packages/mod_python/importer.py", line 488, in import_module
> assert(file != parent_info.file), "Import cycle in %s." % file
>
> AssertionError: Import cycle in /usr/local/nav/apache/webroot/status/StatusPrefs.py.
I'm not sure what happens here, noone has ever reported such a problem before.
It looks like Python somehow thinks there is an import cycle when unpickling
a data structure, although I don't really understand why.
I would like to know which versions you run of Apache, mod_python and Python
itself, it might give some clues in a Google search.
--
mvh
Morten Brekkevold
UNINETT
__________________________________________________
Do You Yahoo!?
Tired of spam? Yahoo! Mail has the best spam protection around
http://mail.yahoo.com
>From werner at debian.org Fri May 4 10:13:14 2007
From: werner at debian.org (Morten Werner Olsen)
Date: Fri May 4 09:13:18 2007
Subject: [Nav-users] Announcement: NAV 3.2.2 released
In-Reply-To:
463715E9.7090003@uninett.no
References:
463715E9.7090003@uninett.no
Message-ID:
y8stmz0loyd1.fsf@debra.uio.no
Morten Brekkevold
morten.brekkevold@uninett.no writes:
> NAV 3.2.2 is now available for download at SourceForge, see
>
http://sourceforge.net/projects/nav :-)
>
> This is mainly a bugfix release. If you discover more bugs, please
> report them on this list or at
http://sourceforge.net/projects/nav .
>
> Binary packages for Debian will be available soon. The Debian
> package is maintained by Morten Werner Olsen, on commission from
> UNINETT.
The Debian package for Debian GNU/Linux 3.1 (aka sarge) is now
available from the archive on pkg-nav.alioth.debian.org. Use this
entry in your /etc/apt/sources.list
deb
http://pkg-nav.alioth.debian.org/debian sarge local
to install or upgrade to NAV 3.2.2.
- Werner
>From morten.brekkevold at uninett.no Fri May 4 11:01:57 2007
From: morten.brekkevold at uninett.no (Morten Brekkevold)
Date: Fri May 4 10:02:00 2007
Subject: [Nav-users] Announcement: NAV 3.2.2 released
In-Reply-To:
y8stmz0loyd1.fsf@debra.uio.no
References:
463715E9.7090003@uninett.no y8stmz0loyd1.fsf@debra.uio.no
Message-ID:
463AE875.2080807@uninett.no
Morten Werner Olsen wrote, On 04-05-2007 09:13:
>> Binary packages for Debian will be available soon. The Debian
>> package is maintained by Morten Werner Olsen, on commission from
>> UNINETT.
>
> The Debian package for Debian GNU/Linux 3.1 (aka sarge) is now
> available from the archive on pkg-nav.alioth.debian.org. Use this
> entry in your /etc/apt/sources.list
>
> deb
http://pkg-nav.alioth.debian.org/debian sarge local
>
> to install or upgrade to NAV 3.2.2.
I thought I'd throw in a few comments about Debian GNU/Linux 4.0 (a.k.a. etch).
There is no package available for this Debian release yet, and if I understand
Morten Werner correctly, he might not have time to look at this issue properly
until July.
Werner, anything further you would like to add? Maybe someone else would like
to volunteer some time to work on adapting Werner's sarge package to etch
before July?
--
mvh
Morten Brekkevold
UNINETT
>From caciano at gmail.com Fri May 4 12:58:23 2007
From: caciano at gmail.com (Caciano Machado)
Date: Fri May 4 16:58:29 2007
Subject: [Nav-users] NAV 3.2.2 - Debian Etch
Message-ID:
4226a8f0705040758k41f18026g3a2e62d980c4b373@mail.gmail.com
Hi,
I'm trying to compile and install NAV 3.2.2 in Debian Etch with the
following software.
- PostgreSQL 7.4
- JDK 6
- Tomcat 5
- Apache 2
- Cricket 1.0.3
- Westhawk SNMP Stack 5.1 for Java
- IPy 0.42
- PHP4
- Python 2.4
Almost everything seems to start fine but there are some details.
- servicemon and alertengine don't start with "nav start"
- servicemon start only with servicemon.py
- alertengine shows the following when run and exit after
####
root@blabla:~# nav start
Starting: cricket eventengine getDeviceData iptrace logengine mactrace
maintengine networkDiscovery pping smsd thresholdMon
Failed: alertengine servicemon
root@blabla:~# servicemon.py
root@blabla:~# alertengine.pl
Fri May 4 11:02:54 2007 alertEngine NewAlerts-7-collectInfo: found 0
new alertsFri May 4 11:02:59 2007 alertEngine
QueuedAlerts-7-collectInfo: collecting info about queued alerts
Fri May 4 11:03:00 2007 alertEngine User-7-checkAlertQueue: admin(1);
Checking queued alerts for user
root@blabla:~#
####
Another question is about the web interface.
With "Edit Database" I've created two locations, each of which with
one room. One room with one router, and the other with one router and
one switch. After, I tried to use some NAV tools but I haven't success
in my attemps.
- Network Explorer: The "Search the Network" form seems to be correct
but the network tree view that is supposed to be generated don't
appear.
- Traffic Map: The left collumn appear but the network graphics don't.
Someone have any idea if these things could be bugs or only misconfigurations?
Regards,
Caciano Machado
>From morten.brekkevold at uninett.no Tue May 8 10:55:24 2007
From: morten.brekkevold at uninett.no (Morten Brekkevold)
Date: Tue May 8 09:55:47 2007
Subject: [Nav-users] Re: cant't get /status/ work
In-Reply-To:
860423.11993.qm@web50002.mail.re2.yahoo.com
References:
860423.11993.qm@web50002.mail.re2.yahoo.com
Message-ID:
46402CEC.2040106@uninett.no
Gheorghe Limboi wrote, On 02-05-2007 15:53:
> thank you for your response.
> I was looking like crazy for some clue ....Google, pyhon user lists etc...but nothing to help me. (unfortunatly I'm not a pyhon expert so..).
>
> The only thing I found about mod_python error --- " AssertionError: Import cycle in ...." is on
>
>
>
http://archive.netbsd.se/?ml=viewcvs-users&a=2007-02&t=3231282
>
> but even seems to be a close issue is not the same.
> Apache 2.0.59
> Python 2.4.1
> mod_python-3.3.1
I think Python only started checking for import cycles in version 2.4, which
might explain why we haven't seen this error message before (we mostly run NAV
on Debian Sarge, which has Python 2.3.5). But I'm certain several others run
NAV on Python 2.4 without having reported such an error.
The original author of the status subsystem seems to have thought it would be
a good idea to store the default status page preferences for all users as a
pickle (a serialized Python object). It looks like, when unpickling this
pickle string, the unpickler attempts to import a module, which in turn causes
Python's import cycle detector to kick in.
It might be easier to figure it all out if the default preferences weren't
stored as a pickle string. The problem for me is that I don't know how to
reproduce the error message you are getting :-/
If I try to change the way the default preferences are stored and send you a
couple of updated files, would you be willing to test them on your system?
--
mvh
Morten Brekkevold
UNINETT
>From morten.brekkevold at uninett.no Tue May 8 11:05:46 2007
From: morten.brekkevold at uninett.no (Morten Brekkevold)
Date: Tue May 8 10:05:50 2007
Subject: ***SPAM*** Re: [Nav-users] ***SPAM*** cant't get /status/ work
In-Reply-To:
860423.11993.qm@web50002.mail.re2.yahoo.com
References:
860423.11993.qm@web50002.mail.re2.yahoo.com
Message-ID:
46402F5A.5050108@uninett.no
Gheorghe Limboi wrote, On 02-05-2007 15:53:
> thank you for your response.
> I was looking like crazy for some clue ....Google, pyhon user lists etc...but nothing to help me. (unfortunatly I'm not a pyhon expert so..).
>
> The only thing I found about mod_python error --- " AssertionError: Import cycle in ...." is on
Heh, I just dug a little more into this, and it looked to be mod_python
specific. Then I found this thread, which you also posted :)
http://www.modpython.org/pipermail/mod_python/2007-May/023548.html
The mod_python guys know what they're talking about, at least. The hint from
Graham Dumpleton is a good one, although it looks to me that this is an issue
with newer versions of mod_python than the one we're running on.
Anyway, I think the pickle-route that the status page takes is a bad one, I'll
see if I can whip up something better that doesn't involve pickles.
--
mvh
Morten Brekkevold
UNINETT
>From morten.brekkevold at uninett.no Tue May 8 11:48:22 2007
From: morten.brekkevold at uninett.no (Morten Brekkevold)
Date: Tue May 8 10:48:26 2007
Subject: [Nav-users] NAV 3.2.2 - Debian Etch
In-Reply-To:
4226a8f0705040758k41f18026g3a2e62d980c4b373@mail.gmail.com
References:
4226a8f0705040758k41f18026g3a2e62d980c4b373@mail.gmail.com
Message-ID:
46403956.9030709@uninett.no
Caciano Machado wrote, On 04-05-2007 16:58:
> Hi,
Hi Caciano!
> I'm trying to compile and install NAV 3.2.2 in Debian Etch with the
> following software.
>
> - PostgreSQL 7.4
> - JDK 6
> - Tomcat 5
> - Apache 2
> - Cricket 1.0.3
> - Westhawk SNMP Stack 5.1 for Java
> - IPy 0.42
> - PHP4
> - Python 2.4
Ack, we haven't used the Westhawk SNMP stack for a very long time now. I
searched the MetaNAV site, and it appears the NAVFAQ is quite outdated. I've
updated several parts of the FAQ page now.
In any case, there is a NAV Debian package for Sarge (I've previously
mentioned that there will be a wait for an Etch package), you should check out
the dependencies/contents of this package to make sure you've got a good setup
for Debian. See
http://pkg-nav.alioth.debian.org/ for more.
> Almost everything seems to start fine but there are some details.
>
> - servicemon and alertengine don't start with "nav start"
> - servicemon start only with servicemon.py
> - alertengine shows the following when run and exit after
Servicemon and pping share a lot of common code, and they both seem to be a
bit unstable on startup. I have my suspicions about why, and I think Stein
Magnus Jodal will look into it within the next couple of months. Usually it
helps to restart it a few times until the process stays alive.
When it comes to finding out why alertengine disappears, you should have a
look at what's in the logs, check alertengine.log and alertengine.err.log. If
they don't look useful to you, please paste some of the last lines in the log
here and I'll take a look at it.
> - Network Explorer: The "Search the Network" form seems to be correct
> but the network tree view that is supposed to be generated don't
> appear.
>
> - Traffic Map: The left collumn appear but the network graphics don't.
>
> Someone have any idea if these things could be bugs or only
> misconfigurations?
Well, if you installed the Westhawk SNMP stack instead of the JavaSNMP stack
from drexel.edu, NAV won't be able to collect any information from your devices.
If you go to Reports and click on the "All IP Devices" report, you should be
able to confirm that NAV has not found any compatible SNMP OIDs (the snmp
column is empty) or discovered any modules or ports for any of your devices.
The only data you will se in this report, is the data you have entered
yourself through EditDB.
Install the correct JavaSNMP package and restart NAV. Verify that data begins
to appear in the above mentioned report, and possibly perform a tail on
getDeviceData.log to see that getDeviceData is actually collecting information
from your devices.
Good luck!
--
mvh
Morten Brekkevold
UNINETT
>From ghitzacatalin at yahoo.com Tue May 8 11:56:06 2007
From: ghitzacatalin at yahoo.com (Gheorghe Limboi)
Date: Tue May 8 19:56:11 2007
Subject: ***SPAM*** Re: ***SPAM*** Re: [Nav-users] ***SPAM*** cant't get
/status/ work
Message-ID:
889330.87329.qm@web50002.mail.re2.yahoo.com
Hi
Yes you /they are right
I instaled mod_python/3.2.8 and the status is working now.
I'm ok with testing on my system .with any mod_python version you need ...it's only a testing machine right now ..
thank you for you help..
Gheorghe
----- Original Message ----
From: Morten Brekkevold
morten.brekkevold@uninett.no
To: Gheorghe Limboi
ghitzacatalin@yahoo.com
Cc: nav-users@itea.ntnu.no
Sent: Tuesday, May 8, 2007 4:05:46 AM
Subject: Re: ***SPAM*** Re: [Nav-users] ***SPAM*** cant't get /status/ work
Gheorghe Limboi wrote, On 02-05-2007 15:53:
> thank you for your response.
> I was looking like crazy for some clue ....Google, pyhon user lists etc...but nothing to help me. (unfortunatly I'm not a pyhon expert so..).
>
> The only thing I found about mod_python error --- " AssertionError: Import cycle in ...." is on
Heh, I just dug a little more into this, and it looked to be mod_python
specific. Then I found this thread, which you also posted :)
http://www.modpython.org/pipermail/mod_python/2007-May/023548.html
The mod_python guys know what they're talking about, at least. The hint from
Graham Dumpleton is a good one, although it looks to me that this is an issue
with newer versions of mod_python than the one we're running on.
Anyway, I think the pickle-route that the status page takes is a bad one, I'll
see if I can whip up something better that doesn't involve pickles.
--
mvh
Morten Brekkevold
UNINETT
__________________________________________________
Do You Yahoo!?
Tired of spam? Yahoo! Mail has the best spam protection around
http://mail.yahoo.com
>From caciano at gmail.com Wed May 9 10:15:29 2007
From: caciano at gmail.com (Caciano Machado)
Date: Wed May 9 14:15:37 2007
Subject: [Nav-users] NAV 3.2.2 - Debian Etch
In-Reply-To:
46403956.9030709@uninett.no
References:
4226a8f0705040758k41f18026g3a2e62d980c4b373@mail.gmail.com
46403956.9030709@uninett.no
Message-ID:
4226a8f0705090515v2cba7babra6022a55af51bc69@mail.gmail.com
Morten,
On 5/8/07, Morten Brekkevold
morten.brekkevold@uninett.no wrote:
> Caciano Machado wrote, On 04-05-2007 16:58:
> > Hi,
>
> Hi Caciano!
>
> > I'm trying to compile and install NAV 3.2.2 in Debian Etch with the
> > following software.
> >
> > - PostgreSQL 7.4
> > - JDK 6
> > - Tomcat 5
> > - Apache 2
> > - Cricket 1.0.3
> > - Westhawk SNMP Stack 5.1 for Java
> > - IPy 0.42
> > - PHP4
> > - Python 2.4
>
> Ack, we haven't used the Westhawk SNMP stack for a very long time now. I
> searched the MetaNAV site, and it appears the NAVFAQ is quite outdated. I've
> updated several parts of the FAQ page now.
>
> In any case, there is a NAV Debian package for Sarge (I've previously
> mentioned that there will be a wait for an Etch package), you should check out
> the dependencies/contents of this package to make sure you've got a good setup
> for Debian. See
http://pkg-nav.alioth.debian.org/ for more.
In parallel, I'm installing the debian package on a sarge box.
>
> > Almost everything seems to start fine but there are some details.
> >
> > - servicemon and alertengine don't start with "nav start"
> > - servicemon start only with servicemon.py
> > - alertengine shows the following when run and exit after
>
> Servicemon and pping share a lot of common code, and they both seem to be a
> bit unstable on startup. I have my suspicions about why, and I think Stein
> Magnus Jodal will look into it within the next couple of months. Usually it
> helps to restart it a few times until the process stays alive.
>
> When it comes to finding out why alertengine disappears, you should have a
> look at what's in the logs, check alertengine.log and alertengine.err.log. If
> they don't look useful to you, please paste some of the last lines in the log
> here and I'll take a look at it.
Sadly alertengine.log and alertengine.err.log were not generated in
$NAVHOME/var/log and nowhere in my box :-(.
>
> > - Network Explorer: The "Search the Network" form seems to be correct
> > but the network tree view that is supposed to be generated don't
> > appear.
> >
> > - Traffic Map: The left collumn appear but the network graphics don't.
> >
> > Someone have any idea if these things could be bugs or only
> > misconfigurations?
>
> Well, if you installed the Westhawk SNMP stack instead of the JavaSNMP stack
> from drexel.edu, NAV won't be able to collect any information from your devices.
>
Ok, I had already installed the debian package "libsnmp1.4-java" too,
I forgot to list it in my first email. Now I've removed the Westhawk
SNMP, updated CLASSPATH and -Djava.ext.dirs of tomcat, compiled and
installed NAV again, copied the webapps to Tomcat directories, and
finally restarted all services. But, the problems persists.
> If you go to Reports and click on the "All IP Devices" report, you should be
> able to confirm that NAV has not found any compatible SNMP OIDs (the snmp
> column is empty) or discovered any modules or ports for any of your devices.
> The only data you will se in this report, is the data you have entered
> yourself through EditDB.
The "All IP Devices" reports section show the information correctly
for my switches (#modules, #ports and SNMP OID) so I think that I have
other problem.
The most visible problems that I have are:
- Traffic Map - display the left panel but don't show the traffic map
- Network Explorer - display the search forms but show don't show the
network explorer tree.
>
> Install the correct JavaSNMP package and restart NAV. Verify that data begins
> to appear in the above mentioned report, and possibly perform a tail on
> getDeviceData.log to see that getDeviceData is actually collecting information
> from your devices.
>
The collect of devices was logged in getDeviceData.log.
> Good luck!
>
Thanks :-)
> --
> mvh
> Morten Brekkevold
> UNINETT
>
Caciano Machado
MSc Student - Computer Science - UFRGS
>From morten.brekkevold at uninett.no Tue May 15 10:15:02 2007
From: morten.brekkevold at uninett.no (Morten Brekkevold)
Date: Tue May 15 09:15:06 2007
Subject: ***SPAM*** Re: ***SPAM*** Re: [Nav-users] ***SPAM*** cant't get
/status/ work
In-Reply-To:
889330.87329.qm@web50002.mail.re2.yahoo.com
References:
889330.87329.qm@web50002.mail.re2.yahoo.com
Message-ID:
46495DF6.8040809@uninett.no
Gheorghe Limboi wrote, On 08-05-2007 19:56:
> Yes you /they are right
> I instaled mod_python/3.2.8 and the status is working now.
Glad to hear it! :)
> I'm ok with testing on my system .with any mod_python version you need ...it's only a testing machine right now ..
If you'd like, apply the attached patch to the file StatusPrefs.py. This will
load the default status page preferences from a pre-initialized data
structure, instead of unpickling a premade string.
--
mvh
Morten Brekkevold
UNINETT