Hi,
I'm installed nav 3.8.1 on Ubuntu 9.10. Reading and followed all instructed on INSTALL.rst. I think I've configure all the dependencies correctly. Starting nav without error. I can see the frontpage Welcome Page. But when I click on login link , it generated error like this :
Exception Type: ImportError Exception Value:
No module named oid
Exception Location: /usr/local/nav/lib/python/nav/Snmp/pysnmp_se.py in <module>, line 22 Python Executable: /usr/bin/python
another lines that contain about the same error :
/usr/lib/pymodules/python2.6/django/core/handlers/base.py in get_response
85. # Apply view middleware 86. for middleware_method in self._view_middleware: 87. response = middleware_method(request, callback, callback_args, callback_kwargs) 88. if response: 89. return response 90. 91. try:
92. response = callback(request, *callback_args, **callback_kwargs) ...
93. except Exception, e: 94. # If the view raised an exception, run it through exception 95. # middleware, and if the exception middleware returns a 96. # response, use that. Otherwise, reraise the exception. 97. for middleware_method in self._exception_middleware: 98. response = middleware_method(request, e)
▼ Local vars Variable Value callback <function login at 0xba588e9c> callback_args () callback_kwargs {} e ImportError('No module named oid',) exc_info (<type 'exceptions.ImportError'>, ImportError('No module named oid',), <traceback object at 0xbaabb84c>) exceptions <module 'django.core.exceptions' from '/usr/lib/pymodules/python2.6/django/core/exceptions.pyc'>
Maybe I missed something here about OID, but can't figure it out where ... Any help/hint is much appreciated.
Thks.
On Thu, 10 Mar 2011 04:04:37 +0100 (CET) rk4k royke4k@cbn.net.id wrote:
I can see the frontpage Welcome Page. But when I click on login link , it generated error like this :
Exception Type: ImportError Exception Value:
No module named oid
Exception Location: /usr/local/nav/lib/python/nav/Snmp/pysnmp_se.py in <module>, line 22 Python Executable: /usr/bin/python
[snip]
Maybe I missed something here about OID, but can't figure it out where ... Any help/hint is much appreciated.
Try "aptitude remove python-pysnmp4".
Ubuntu has a bug in its pysnmp packages. You've likely installed the package python-pysnmp-se, which depends on python-pysnmp-common, which recommends python-pysnmp4, so all of these get installed.
The python-pysnmp4 Ubuntu package conflicts with the other pysnmp packages, causing it to overwrite parts of python-pysnmp-se, rendering it unavailable for use.
Let me know how it goes :-)
On 03/10/2011 02:43 PM, Morten Brekkevold wrote:
On Thu, 10 Mar 2011 04:04:37 +0100 (CET) rk4kroyke4k@cbn.net.id wrote:
I can see the frontpage Welcome Page. But when I click on login link , it generated error like this :
Exception Type: ImportError Exception Value:
No module named oid
Exception Location: /usr/local/nav/lib/python/nav/Snmp/pysnmp_se.py in <module>, line 22 Python Executable: /usr/bin/python
[snip]
Maybe I missed something here about OID, but can't figure it out where ... Any help/hint is much appreciated.
Try "aptitude remove python-pysnmp4".
Ubuntu has a bug in its pysnmp packages. You've likely installed the package python-pysnmp-se, which depends on python-pysnmp-common, which recommends python-pysnmp4, so all of these get installed.
The python-pysnmp4 Ubuntu package conflicts with the other pysnmp packages, causing it to overwrite parts of python-pysnmp-se, rendering it unavailable for use.
Let me know how it goes :-)
Hi Morten,
Still no luck .. same error message.
This is left installed for package with snmp python related :
dpkg -l | grep snmp ii libsnmp-base 5.4.1~dfsg-12ubuntu7 SNMP (Simple Network Management Protocol) MI ii libsnmp-perl 5.4.1~dfsg-12ubuntu7 SNMP (Simple Network Management Protocol) Pe ii libsnmp-python 5.4.1~dfsg-12ubuntu7 SNMP (Simple Network Management Protocol) Py ii libsnmp-session-perl 1.12-1 Perl support for accessing SNMP-aware device ii libsnmp1.4-java 1.4.2-2 Open Source implementation of the SNMP proto ii libsnmp15 5.4.1~dfsg-12ubuntu7 SNMP (Simple Network Management Protocol) li ii php5-snmp 5.2.10.dfsg.1-2ubuntu6.5 SNMP module for php5 ii python-pynetsnmp 0.28.13-1 Python ctypes bindings for NET-SNMP with Twi ii python-pysnmp-common 4.1.9a-1 Python SNMP library for agents and managers ii python-pysnmp-se 3.5.2-4 speed enhanced Python SNMP library for agent ii python-pysnmp2 2.0.9-2 Python SNMP library for agents and managers ii python-twisted-snmp 0.3.13-3 SNMP implementation for the Twisted networki ii snmp 5.4.1~dfsg-12ubuntu7 SNMP (Simple Network Management Protocol) ap ii snmpd 5.4.1~dfsg-12ubuntu7 SNMP (Simple Network Management Protocol) ag ii snmptrapfmt 1.14ubuntu1 A configurable snmp trap handler daemon for ii snmptt 1.2-3 SNMP trap handler for use with snmptrapd
I can navigate back to the Welcome Page and the admin status link showed "Admin Logout" but the Preference menu gave me same error message. Any hint ?
Thks for the reply.
Regards
On Thu, 10 Mar 2011 15:35:19 +0700 Royke royke4k@cbn.net.id wrote:
Hi Morten,
Still no luck .. same error message.
This is left installed for package with snmp python related :
ii python-pysnmp-se 3.5.2-4 speed enhanced Python SNMP library for agent ii python-pysnmp2 2.0.9-2 Python SNMP library for agents and managers
I don't usually work with NAV on Ubuntu, so I might remember this issue incorrectly. It could have been the python-pysnmp2 package that was to blame.
Also, the damage caused by the offending package (since it overlaps with the other packages' files) might not be reparable without a reinstall.
I'd try "aptitude remove python-pysnmp2", then "aptitude -R reinstall python-pysnmp-se". The `-R` option tells aptitude to not treat recommendations as dependencies.
Also, don't forget to restart Apache after this, so all the modules are properly reloaded.
On 03/10/2011 04:16 PM, Morten Brekkevold wrote:
On Thu, 10 Mar 2011 15:35:19 +0700 Roykeroyke4k@cbn.net.id wrote:
Hi Morten,
Still no luck .. same error message.
This is left installed for package with snmp python related :
ii python-pysnmp-se 3.5.2-4 speed enhanced Python SNMP library for agent ii python-pysnmp2 2.0.9-2 Python SNMP library for agents and managers
I don't usually work with NAV on Ubuntu, so I might remember this issue incorrectly. It could have been the python-pysnmp2 package that was to blame.
Also, the damage caused by the offending package (since it overlaps with the other packages' files) might not be reparable without a reinstall.
I'd try "aptitude remove python-pysnmp2", then "aptitude -R reinstall python-pysnmp-se". The `-R` option tells aptitude to not treat recommendations as dependencies.
Also, don't forget to restart Apache after this, so all the modules are properly reloaded.
Appreciate your help. That commands generate another error. And I think it will occuring again.
I thing I'll try to install NAV from scratch again and pay attention for the installing order of python snmp package closely. Also I will try the newest release of 3.8.2. Will inform later.
Thks. Regards
Hi,
I installed NAV 3.8.2 and the error persist. I think I can find the culprit. Service ipdevpoll won't start with the error below (the other service start well) :
nav start ipdevpoll
2011-03-15 03:04:28,762 [ERROR plugins] Failed to import plugin nav.ipdevpoll.plugins.arp.Arp Traceback (most recent call last): File "/usr/local/nav/lib/python/nav/ipdevpoll/plugins/__init__.py", line 57, in import_plugin [module_name]) File "/usr/local/nav/lib/python/nav/ipdevpoll/plugins/arp.py", line 44, in <module> from nav.mibs.ip_mib import IpMib File "/usr/local/nav/lib/python/nav/mibs/__init__.py", line 19, in <module> import mibretriever File "/usr/local/nav/lib/python/nav/mibs/mibretriever.py", line 35, in <module> from pysnmp.asn1.oid import OID ImportError: No module named oid Traceback (most recent call last): File "/usr/local/nav/bin/ipdevpolld", line 21, in <module> main() File "/usr/local/nav/lib/python/nav/ipdevpoll/daemon.py", line 187, in main processor.run() File "/usr/local/nav/lib/python/nav/ipdevpoll/daemon.py", line 125, in run self.start_ipdevpoll() File "/usr/local/nav/lib/python/nav/ipdevpoll/daemon.py", line 182, in start_ipdevpoll process.run() File "/usr/local/nav/lib/python/nav/ipdevpoll/daemon.py", line 54, in run plugins.import_plugins() File "/usr/local/nav/lib/python/nav/ipdevpoll/plugins/__init__.py", line 40, in import_plugins import_plugin(ipdevpoll_conf, alias) File "/usr/local/nav/lib/python/nav/ipdevpoll/plugins/__init__.py", line 61, in import_plugin raise PluginImportError(error) nav.ipdevpoll.plugins.PluginImportError: Failed to import plugin: No module named oid
Did I miss something here ?
If I remove the offending package ( I guess ) :
aptitude remove python-pysnmp2
It generate another error :
2011-03-15 04:15:44,443 [ERROR plugins] Failed to import plugin nav.ipdevpoll.plugins.arp.Arp Traceback (most recent call last): File "/usr/local/nav/lib/python/nav/ipdevpoll/plugins/__init__.py", line 57, in import_plugin [module_name]) File "/usr/local/nav/lib/python/nav/ipdevpoll/plugins/arp.py", line 44, in <module> from nav.mibs.ip_mib import IpMib File "/usr/local/nav/lib/python/nav/mibs/__init__.py", line 19, in <module> import mibretriever File "/usr/local/nav/lib/python/nav/mibs/mibretriever.py", line 35, in <module> from pysnmp.asn1.oid import OID ImportError: No module named asn1.oid Traceback (most recent call last): File "/usr/local/nav/bin/ipdevpolld", line 21, in <module> main() File "/usr/local/nav/lib/python/nav/ipdevpoll/daemon.py", line 187, in main processor.run() File "/usr/local/nav/lib/python/nav/ipdevpoll/daemon.py", line 125, in run self.start_ipdevpoll() File "/usr/local/nav/lib/python/nav/ipdevpoll/daemon.py", line 182, in start_ipdevpoll process.run() File "/usr/local/nav/lib/python/nav/ipdevpoll/daemon.py", line 54, in run plugins.import_plugins() File "/usr/local/nav/lib/python/nav/ipdevpoll/plugins/__init__.py", line 40, in import_plugins import_plugin(ipdevpoll_conf, alias) File "/usr/local/nav/lib/python/nav/ipdevpoll/plugins/__init__.py", line 61, in import_plugin raise PluginImportError(error) nav.ipdevpoll.plugins.PluginImportError: Failed to import plugin: No module named asn1.oid
Is that any relation to python-pyasn1 package ?
dpkg -l | grep asn ii libtasn1-3 2.2-1 Manage ASN.1 structures (runtime) ii libtasn1-3-dev 2.2-1 Manage ASN.1 structures (development) ii python-pyasn1 0.0.8a-1 ASN.1 library for Python
The rest of python-pysnmp left :
dpkg -l | grep pysnmp ii python-pysnmp-common 4.1.9a-1 Python SNMP library for agents and managers ii python-pysnmp-se 3.5.2-4 speed enhanced Python SNMP library for agent
Thanks. Regards Royke
On 03/10/2011 04:16 PM, Morten Brekkevold wrote:
On Thu, 10 Mar 2011 15:35:19 +0700 Roykeroyke4k@cbn.net.id wrote:
Hi Morten,
Still no luck .. same error message.
This is left installed for package with snmp python related :
ii python-pysnmp-se 3.5.2-4 speed enhanced Python SNMP library for agent ii python-pysnmp2 2.0.9-2 Python SNMP library for agents and managers
I don't usually work with NAV on Ubuntu, so I might remember this issue incorrectly. It could have been the python-pysnmp2 package that was to blame.
Also, the damage caused by the offending package (since it overlaps with the other packages' files) might not be reparable without a reinstall.
I'd try "aptitude remove python-pysnmp2", then "aptitude -R reinstall python-pysnmp-se". The `-R` option tells aptitude to not treat recommendations as dependencies.
Also, don't forget to restart Apache after this, so all the modules are properly reloaded.
On Tue, 15 Mar 2011 10:22:02 +0700 Royke royke4k@cbn.net.id wrote:
If I remove the offending package ( I guess ) :
aptitude remove python-pysnmp2
It generate another error :
Royke,
I tried a quick hands-on session on a virtual Ubuntu 9.10 install and found the following:
* `aptitude install python-pysnmp-se` pulls in the `python-pysnmp4` package, but everything seems to work as expected.
* If I then do `aptitude install python-pysnmp2`, things stop working. I.e. the bug is in the python-pysnmp2 package.
I found that removing the python-pysnmp2 package alone does not fix the problem, since it overwrote files that belong to the python-pysnmp-common package.
I followed up with `aptitude reinstall python-pysnmp-common`, and the problem was solved.
Can you get things to work by repeating my steps?
On 03/15/2011 07:14 PM, Morten Brekkevold wrote:
On Tue, 15 Mar 2011 10:22:02 +0700 Roykeroyke4k@cbn.net.id wrote:
If I remove the offending package ( I guess ) :
aptitude remove python-pysnmp2
It generate another error :
Royke,
I tried a quick hands-on session on a virtual Ubuntu 9.10 install and found the following:
`aptitude install python-pysnmp-se` pulls in the `python-pysnmp4` package, but everything seems to work as expected.
If I then do `aptitude install python-pysnmp2`, things stop working. I.e. the bug is in the python-pysnmp2 package.
I found that removing the python-pysnmp2 package alone does not fix the problem, since it overwrote files that belong to the python-pysnmp-common package.
I followed up with `aptitude reinstall python-pysnmp-common`, and the problem was solved.
Can you get things to work by repeating my steps?
Hi Morten,
Great. It works !!
Much appreciation. Thks.
Regards Royke
On 03/15/2011 07:14 PM, Morten Brekkevold wrote:
Royke,
I tried a quick hands-on session on a virtual Ubuntu 9.10 install and found the following:
`aptitude install python-pysnmp-se` pulls in the `python-pysnmp4` package, but everything seems to work as expected.
If I then do `aptitude install python-pysnmp2`, things stop working. I.e. the bug is in the python-pysnmp2 package.
I found that removing the python-pysnmp2 package alone does not fix the problem, since it overwrote files that belong to the python-pysnmp-common package.
I followed up with `aptitude reinstall python-pysnmp-common`, and the problem was solved.
Can you get things to work by repeating my steps?
Additional information to help other Ubuntu user installation,
For some unknown reason, python-pysnmp-se didn't pull the python-pysnmp4 package but installing python-pysnmp2 package. So , this is what I did :
aptitude remove python-pysnmp2 aptitude install python-pysnmp4 aptitude reinstall python-pysnmp-common
Regards Royke