Advertisement
Guest User

Untitled

a guest
Apr 23rd, 2013
55
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
Python 13.93 KB | None | 0 0
  1. ==> /var/log/noc/noc-web.log <==
  2. 2013-04-23 13:20:13,308 UNHANDLED EXCEPTION (2013-04-23 13:20:13.297456)
  3. Working directory: /opt/noc
  4. <type 'exceptions.ImportError'>
  5. cannot import name DNS
  6. START OF TRACEBACK
  7. ------------------------------------------------------------------------
  8. File: /opt/noc/cm/apps/dns/views.py (Line: 9)
  9. Function: <module>
  10.     2     ##----------------------------------------------------------------------
  11.     3     ## DNS Manager
  12.     4     ##----------------------------------------------------------------------
  13.     5     ## Copyright (C) 2007-2010 The NOC Project
  14.     6     ## See LICENSE for details
  15.     7     ##----------------------------------------------------------------------
  16.     8     from django.contrib import admin
  17.     9 ==> from noc.cm.models import DNS
  18.    10     from noc.cm.repoapp import RepoApplication
  19.    11     ##
  20.    12     ## DNS admin
  21.    13     ##
  22.    14     class DNSAdmin(admin.ModelAdmin):
  23.    15         list_display=["repo_path","last_modified","status"]
  24. Variables:
  25.         __builtins__ =
  26. {'ArithmeticError': <type 'exceptions.ArithmeticError'>,
  27.  'AssertionError': <type 'exceptions.AssertionError'>,
  28.  'AttributeError': <type 'exceptions.AttributeError'>,
  29.  'BaseException': <type 'exceptions.BaseException'>,
  30.  'BufferError': <type 'exceptions.BufferError'>,
  31.  'BytesWarning': <type 'exceptions.BytesWarning'>,
  32.  'DeprecationWarning': <type 'exceptions.DeprecationWarning'>,
  33.  'EOFError': <type 'exceptions.EOFError'>,
  34.  'Ellipsis': Ellipsis,
  35.  'EnvironmentError': <type 'exceptions.EnvironmentError'>,
  36.  'Exception': <type 'exceptions.Exception'>,
  37.  'False': False,
  38.  'FloatingPointError': <type 'exceptions.FloatingPointError'>,
  39.  'FutureWarning': <type 'exceptions.FutureWarning'>,
  40.  'GeneratorExit': <type 'exceptions.GeneratorExit'>,
  41.  'IOError': <type 'exceptions.IOError'>,
  42.  'ImportError': <type 'exceptions.ImportError'>,
  43.  'ImportWarning': <type 'exceptions.ImportWarning'>,
  44.  'IndentationError': <type 'exceptions.IndentationError'>,
  45.  'IndexError': <type 'exceptions.IndexError'>,
  46.  'KeyError': <type 'exceptions.KeyError'>,
  47.  'KeyboardInterrupt': <type 'exceptions.KeyboardInterrupt'>,
  48.  'LookupError': <type 'exceptions.LookupError'>,
  49.  'MemoryError': <type 'exceptions.MemoryError'>,
  50.  'NameError': <type 'exceptions.NameError'>,
  51.  'None': None,
  52.  'NotImplemented': NotImplemented,
  53.  'NotImplementedError': <type 'exceptions.NotImplementedError'>,
  54.  'OSError': <type 'exceptions.OSError'>,
  55.  'OverflowError': <type 'exceptions.OverflowError'>,
  56.  'PendingDeprecationWarning': <type 'exceptions.PendingDeprecationWarning'>,
  57.  'ReferenceError': <type 'exceptions.ReferenceError'>,
  58.  'RuntimeError': <type 'exceptions.RuntimeError'>,
  59.  'RuntimeWarning': <type 'exceptions.RuntimeWarning'>,
  60.  'StandardError': <type 'exceptions.StandardError'>,
  61.  'StopIteration': <type 'exceptions.StopIteration'>,
  62.  'SyntaxError': <type 'exceptions.SyntaxError'>,
  63.  'SyntaxWarning': <type 'exceptions.SyntaxWarning'>,
  64.  'SystemError': <type 'exceptions.SystemError'>,
  65.  'SystemExit': <type 'exceptions.SystemExit'>,
  66.  'TabError': <type 'exceptions.TabError'>,
  67.  'True': True,
  68.  'TypeError': <type 'exceptions.TypeError'>,
  69.  'UnboundLocalError': <type 'exceptions.UnboundLocalError'>,
  70.  'UnicodeDecodeError': <type 'exceptions.UnicodeDecodeError'>,
  71.  'UnicodeEncodeError': <type 'exceptions.UnicodeEncodeError'>,
  72.  'UnicodeError': <type 'exceptions.UnicodeError'>,
  73.  'UnicodeTranslateError': <type 'exceptions.UnicodeTranslateError'>,
  74.  'UnicodeWarning': <type 'exceptions.UnicodeWarning'>,
  75.  'UserWarning': <type 'exceptions.UserWarning'>,
  76.  'ValueError': <type 'exceptions.ValueError'>,
  77.  'Warning': <type 'exceptions.Warning'>,
  78.  'ZeroDivisionError': <type 'exceptions.ZeroDivisionError'>,
  79.  '__debug__': True,
  80.  '__doc__': "Built-in functions, exceptions, and other objects.\n\nNoteworthy: None is the `nil' object; Ellipsis represents `...' in slices.",
  81.  '__import__': <built-in function __import__>,
  82.  '__name__': '__builtin__',
  83.  '__package__': None,
  84.  'abs': <built-in function abs>,
  85.  'all': <built-in function all>,
  86.  'any': <built-in function any>,
  87.  'apply': <built-in function apply>,
  88.  'basestring': <type 'basestring'>,
  89.  'bin': <built-in function bin>,
  90.  'bool': <type 'bool'>,
  91.  'buffer': <type 'buffer'>,
  92.  'bytearray': <type 'bytearray'>,
  93.  'bytes': <type 'str'>,
  94.  'callable': <built-in function callable>,
  95.  'chr': <built-in function chr>,
  96.  'classmethod': <type 'classmethod'>,
  97.  'cmp': <built-in function cmp>,
  98.  'coerce': <built-in function coerce>,
  99.  'compile': <built-in function compile>,
  100.  'complex': <type 'complex'>,
  101.  'copyright': Copyright (c) 2001-2010 Python Software Foundation.
  102. All Rights Reserved.
  103.  
  104. Copyright (c) 2000 BeOpen.com.
  105. All Rights Reserved.
  106.  
  107. Copyright (c) 1995-2001 Corporation for National Research Initiatives.
  108. All Rights Reserved.
  109.  
  110. Copyright (c) 1991-1995 Stichting Mathematisch Centrum, Amsterdam.
  111. All Rights Reserved.,
  112.  'credits':     Thanks to CWI, CNRI, BeOpen.com, Zope Corporation and a cast of thousands
  113.     for supporting Python development.  See www.python.org for more information.,
  114.  'delattr': <built-in function delattr>,
  115.  'dict': <type 'dict'>,
  116.  'dir': <built-in function dir>,
  117.  'divmod': <built-in function divmod>,
  118.  'enumerate': <type 'enumerate'>,
  119.  'eval': <built-in function eval>,
  120.  'execfile': <built-in function execfile>,
  121.  'exit': Use exit() or Ctrl-D (i.e. EOF) to exit,
  122.  'file': <type 'file'>,
  123.  'filter': <built-in function filter>,
  124.  'float': <type 'float'>,
  125.  'format': <built-in function format>,
  126.  'frozenset': <type 'frozenset'>,
  127.  'getattr': <built-in function getattr>,
  128.  'globals': <built-in function globals>,
  129.  'hasattr': <built-in function hasattr>,
  130.  'hash': <built-in function hash>,
  131.  'help': Type help() for interactive help, or help(object) for help about object.,
  132.  'hex': <built-in function hex>,
  133.  'id': <built-in function id>,
  134.  'input': <built-in function input>,
  135.  'int': <type 'int'>,
  136.  'intern': <built-in function intern>,
  137.  'isinstance': <built-in function isinstance>,
  138.  'issubclass': <built-in function issubclass>,
  139.  'iter': <built-in function iter>,
  140.  'len': <built-in function len>,
  141.  'license': Type license() to see the full license text,
  142.  'list': <type 'list'>,
  143.  'locals': <built-in function locals>,
  144.  'long': <type 'long'>,
  145.  'map': <built-in function map>,
  146.  'max': <built-in function max>,
  147.  'min': <built-in function min>,
  148.  'next': <built-in function next>,
  149.  'object': <type 'object'>,
  150.  'oct': <built-in function oct>,
  151.  'open': <built-in function open>,
  152.  'ord': <built-in function ord>,
  153.  'pow': <function _gmpy_pow at 0x30c6938>,
  154.  'print': <built-in function print>,
  155.  'property': <type 'property'>,
  156.  'quit': Use quit() or Ctrl-D (i.e. EOF) to exit,
  157.  'range': <built-in function range>,
  158.  'raw_input': <built-in function raw_input>,
  159.  'reduce': <built-in function reduce>,
  160.  'reload': <built-in function reload>,
  161.  'repr': <built-in function repr>,
  162.  'reversed': <type 'reversed'>,
  163.  'round': <built-in function round>,
  164.  'set': <type 'set'>,
  165.  'setattr': <built-in function setattr>,
  166.  'slice': <type 'slice'>,
  167.  'sorted': <built-in function sorted>,
  168.  'staticmethod': <type 'staticmethod'>,
  169.  'str': <type 'str'>,
  170.  'sum': <built-in function sum>,
  171.  'super': <type 'super'>,
  172.  'tuple': <type 'tuple'>,
  173.  'type': <type 'type'>,
  174.  'unichr': <built-in function unichr>,
  175.  'unicode': <type 'unicode'>,
  176.  'vars': <built-in function vars>,
  177.  'xrange': <type 'xrange'>,
  178.  'zip': <built-in function zip>}
  179.             __file__ = None
  180.          __package__ = None
  181.                admin = None
  182.             __name__ = None
  183.              __doc__ = None
  184. ------------------------------------------------------------------------
  185. File: /opt/noc/lib/app/site.py (Line: 447)
  186. Function: autodiscover
  187.   440                 # Initialize application
  188.   441                 for f in glob.glob("%s/apps/*/views.py" % m):
  189.   442                     d = os.path.split(f)[0]
  190.   443                     # Skip application loading if denoted by DISABLED file
  191.   444                     if os.path.isfile(os.path.join(d, "DISABLED")):
  192.   445                         continue
  193.   446                     __import__(".".join(["noc"] + f[:-3].split(os.path.sep)),
  194.   447 ==>                            {}, {}, "*")
  195.   448                 # Try to install dynamic menus
  196.   449                 menu = None
  197.   450                 try:
  198.   451                     menu = __import__(app + ".menu", {}, {}, "DYNAMIC_MENUS")
  199.   452                 except ImportError:
  200.   453                     continue
  201. Variables:
  202.                    a = 'noc.kb'
  203.                   dm =
  204. {'children': [],
  205.  'iconCls': 'icon_page_go',
  206.  'id': 'd56557e8f3964333d508405e7e1f0ac42b4a3bf0',
  207.  'title': 'Snippets'}
  208.                    d = 'cm/apps/dns'
  209.                    f = 'cm/apps/dns/views.py'
  210.                 menu = None
  211.                  app = 'noc.cm'
  212.                    m = 'cm'
  213.                 root =
  214. {'children': [{'children': [{'access': <function <lambda> at 0x451ee60>,
  215.                              'app': <noc.cm.apps.objectnotify.views.ObjectNotifyApplication object at 0x451f610>,
  216.                              'iconCls': 'icon_application',
  217.                              'id': 'c0da3f7b4495d19c33027ac8f0bf0981e0cfe837',
  218.                              'title': 'Object Notifies'}],
  219.                'iconCls': 'icon_wrench_orange',
  220.                'id': '9d249574faf88b3b8169e2c7be14e075c3bcd5cb',
  221.                'title': 'Setup'},
  222.               {'children': [{'access': <function <lambda> at 0x45271b8>,
  223.                              'app': <noc.cm.apps.reportlatestchanges.views.ReportreportLatestChanges object at 0x451fe90>,
  224.                              'iconCls': 'icon_application',
  225.                              'id': '4096dc6b9077c086d3c123dcfd0b07ab90f41021',
  226.                              'title': u'Latest Changes'}],
  227.                'iconCls': 'icon_report',
  228.                'id': '1ca347a8fe30349ab00ba7d42d8c8db79a2079bf',
  229.                'title': u'Reports'},
  230.               {'access': <function <lambda> at 0x46296e0>,
  231.                'app': <noc.cm.apps.config.views.ConfigApplication object at 0x4628950>,
  232.                'iconCls': 'icon_application',
  233.                'id': '7f1b495d9363bd5fed89d4197ea5a87d213352d4',
  234.                'title': 'Configs'},
  235.               {'access': <function <lambda> at 0x4629ed8>,
  236.                'app': <noc.cm.apps.rpsl.views.RPSLApplication object at 0x4628b90>,
  237.                'iconCls': 'icon_application',
  238.                'id': '1bda33685876420e7da4103225b0bf35309d11b9',
  239.                'title': 'RPSL Objects'},
  240.               {'access': <function <lambda> at 0x4635758>,
  241.                'app': <noc.cm.apps.prefixlist.views.PrefixListApplication object at 0x4631310>,
  242.                'iconCls': 'icon_application',
  243.                'id': 'c7603fc339ee516f05006f84c3f4766549b9d15d',
  244.                'title': 'Prefix Lists'}],
  245.  'id': 'fe686b697b9298ae09bdccc01026926f53395b49',
  246.  'title': 'Configuration Management'}
  247.                 path = ['sa', 'Snippets']
  248.               d_menu = <noc.sa.menu.SnippetsMenu object at 0x43fc850>
  249.                 self = <noc.lib.app.site.Site object at 0x267a150>
  250. ------------------------------------------------------------------------
  251. File: /opt/noc/main/web.py (Line: 139)
  252. Function: children_loop
  253.   132             self.server._pending_sockets = []
  254.   133             self.server.add_sockets(sockets)
  255.   134             # Connect to mongodb
  256.   135             import noc.lib.nosql
  257.   136             # Initialize site
  258.   137             logging.info("Registering web applications")
  259.   138             from noc.lib.app import site
  260.   139 ==>         site.autodiscover()
  261.   140             # Run children's I/O loop
  262.   141             logging.info("Starting to serve requests")
  263.   142             tornado.ioloop.IOLoop.instance().start()
  264.   143
  265.   144         def at_exit(self):
  266.   145             if self.t_children:
  267. Variables:
  268.                 self = <noc.main.web.Web object at 0x7ffd5a431f10>
  269.              sockets = [<socket._socketobject object at 0x232e600>]
  270.                 site = <noc.lib.app.site.Site object at 0x267a150>
  271.                  noc = <module 'noc' from '/opt/noc/__init__.pyc'>
  272. ------------------------------------------------------------------------
  273. File: /opt/noc/main/web.py (Line: 110)
  274. Function: run
  275.   103                 nc = cpu_count()
  276.   104             self.t_children = set()
  277.   105             while True:
  278.   106                 # Run children
  279.   107                 while len(self.t_children) < nc:
  280.   108                     pid = os.fork()
  281.   109                     if pid == 0:
  282.   110 ==>                     self.children_loop()
  283.   111                     elif pid < 0:
  284.   112                         logging.error("Unable to fork child")
  285.   113                     else:
  286.   114                         logging.info("Running child %d" % pid)
  287.   115                         self.t_children.add(pid)
  288.   116                 # Wait for status
  289. Variables:
  290.                 self = <noc.main.web.Web object at 0x7ffd5a431f10>
  291.                   nc = 2
  292.                  pid = 0
  293.             noc_wsgi = <tornado.wsgi.WSGIContainer object at 0x2128590>
  294.          application = <tornado.web.Application object at 0x2128f10>
  295.              address = '127.0.0.1'
  296.                 port = 8000
  297.               listen = '127.0.0.1:8000'
  298. ------------------------------------------------------------------------
  299. File: /opt/noc/lib/daemon.py (Line: 364)
  300. Function: guarded_run
  301.   357
  302.   358         def guarded_run(self):
  303.   359             """
  304.  360             Run daemon and catch common exceptions
  305.  361             :return:
  306.  362             """
  307.   363             try:
  308.   364 ==>             self.run()
  309.   365             except KeyboardInterrupt:
  310.   366                 pass
  311.   367             except MemoryError:
  312.   368                 logging.error("Out of memory. Exiting.")
  313.   369             except SystemExit:
  314.   370                 logging.info("Exiting")
  315. Variables:
  316.                 self = <noc.main.web.Web object at 0x7ffd5a431f10>
  317. ------------------------------------------------------------------------
  318. END OF TRACEBACK
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement