Advertisement
Guest User

Untitled

a guest
Feb 26th, 2014
79
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 24.23 KB | None | 0 0
  1. UNHANDLED EXCEPTION (2014-02-25 21:11:29.110075) Working directory: /opt/noc <class 'psycopg2.OperationalError'> ?????: ??????? ??? ?????? ??????????? ?????: ??????? ??? ?????? ??????????? START OF TRACEBACK ------------------------------------------------------------------------ File: /opt/noc/lib/python2.7/site-packages/psycopg2/__init__.py (Line: 164) Function: connect 157 if dsn is None: 158 if not items: 159 raise TypeError('missing dsn and no parameters') 160 else: 161 dsn = " ".join(["%s=%s" % (k, _param_escape(str(v))) 162 for (k, v) in items]) 163 164 ==> conn = _connect(dsn, connection_factory=connection_factory, async=async) 165 if cursor_factory is not None: 166 conn.cursor_factory = cursor_factory 167 168 return conn Variables: database = 'noc' items = [('dbname', 'noc'), ('user', 'noc'), ('password', 'thenocproject'), ('host', '127.0.0.1')] k = 'host' v = '127.0.0.1' port = None dsn = 'dbname=noc user=noc password=thenocproject host=127.0.0.1' host = '127.0.0.1' user = 'noc' kwargs = {} async = False password = 'thenocproject' connection_factory = None cursor_factory = None ------------------------------------------------------------------------ File: /opt/noc/lib/python2.7/site-packages/django/db/backends/postgresql_psycopg2/base.py (Line: 177) Function: _cursor 170 conn_params['user'] = settings_dict['USER'] 171 if settings_dict['PASSWORD']: 172 conn_params['password'] = settings_dict['PASSWORD'] 173 if settings_dict['HOST']: 174 conn_params['host'] = settings_dict['HOST'] 175 if settings_dict['PORT']: 176 conn_params['port'] = settings_dict['PORT'] 177 ==> self.connection = Database.connect(**conn_params) 178 self.connection.set_client_encoding('UTF8') 179 tz = 'UTC' if settings.USE_TZ else settings_dict.get('TIME_ZONE') 180 if tz: 181 try: 182 get_parameter_status = self.connection.get_parameter_status 183 except AttributeError: Variables: conn_params = {'database': 'noc', 'host': '127.0.0.1', 'password': 'thenocproject', 'user': 'noc'} self = <django.contrib.gis.db.backends.postgis.base.DatabaseWrapper object at 0x21bb3d0> settings_dict = {'ENGINE': 'django.contrib.gis.db.backends.postgis', 'HOST': '127.0.0.1', 'NAME': 'noc', 'OPTIONS': {}, 'PASSWORD': 'thenocproject', 'PORT': '', 'TEST_CHARSET': None, 'TEST_COLLATION': None, 'TEST_MIRROR': None, 'TEST_NAME': 'test_noc', 'TIME_ZONE': 'Etc/UTC', 'USER': 'noc'} ------------------------------------------------------------------------ File: /opt/noc/lib/python2.7/site-packages/django/contrib/gis/db/backends/postgis/operations.py (Line: 406) Function: _get_postgis_func 399 400 return placeholder 401 402 def _get_postgis_func(self, func): 403 """ 404 Helper routine for calling PostGIS functions and returning their result. 405 """ 406 ==> cursor = self.connection._cursor() 407 try: 408 try: 409 cursor.execute('SELECT %s()' % func) 410 row = cursor.fetchone() 411 except: 412 # Responsibility of callers to perform error handling. Variables: self = <django.contrib.gis.db.backends.postgis.operations.PostGISOperations object at 0x2287490> func = 'postgis_lib_version' ------------------------------------------------------------------------ File: /opt/noc/lib/python2.7/site-packages/django/contrib/gis/db/backends/postgis/operations.py (Line: 425) Function: postgis_lib_version 418 419 def postgis_geos_version(self): 420 "Returns the version of the GEOS library used with PostGIS." 421 return self._get_postgis_func('postgis_geos_version') 422 423 def postgis_lib_version(self): 424 "Returns the version number of the PostGIS library used with PostgreSQL." 425 ==> return self._get_postgis_func('postgis_lib_version') 426 427 def postgis_proj_version(self): 428 "Returns the version of the PROJ.4 library used with PostGIS." 429 return self._get_postgis_func('postgis_proj_version') 430 431 def postgis_version(self): Variables: self = <django.contrib.gis.db.backends.postgis.operations.PostGISOperations object at 0x2287490> ------------------------------------------------------------------------ File: /opt/noc/lib/python2.7/site-packages/django/contrib/gis/db/backends/postgis/operations.py (Line: 445) Function: postgis_version_tuple 438 439 def postgis_version_tuple(self): 440 """ 441 Returns the PostGIS version as a tuple (version string, major, 442 minor, subminor). 443 """ 444 # Getting the PostGIS version 445 ==> version = self.postgis_lib_version() 446 m = self.version_regex.match(version) 447 448 if m: 449 major = int(m.group('major')) 450 minor1 = int(m.group('minor1')) 451 minor2 = int(m.group('minor2')) Variables: self = <django.contrib.gis.db.backends.postgis.operations.PostGISOperations object at 0x2287490> ------------------------------------------------------------------------ File: /opt/noc/lib/python2.7/site-packages/django/contrib/gis/db/backends/postgis/operations.py (Line: 91) Function: __init__ 84 # The user-supplied PostGIS version. 85 version = vtup 86 else: 87 # This was the old documented way, but it's stupid to 88 # include the string. 89 version = vtup[1:4] 90 else: 91 ==> vtup = self.postgis_version_tuple() 92 version = vtup[1:] 93 94 # Getting the prefix -- even though we don't officially support 95 # PostGIS 1.2 anymore, keeping it anyway in case a prefix change 96 # for something else is necessary. 97 if version >= (1, 2, 2): Variables: connection = <django.contrib.gis.db.backends.postgis.base.DatabaseWrapper object at 0x21bb3d0> e = OperationalError('?????: ??????? ??? ?????? ???????????\n?????: ??????? ??? ?????? ???????????\n',) self = <django.contrib.gis.db.backends.postgis.operations.PostGISOperations object at 0x2287490> ------------------------------------------------------------------------ File: /opt/noc/lib/python2.7/site-packages/django/contrib/gis/db/backends/postgis/base.py (Line: 11) Function: __init__ 4 from django.contrib.gis.db.backends.postgis.introspection import PostGISIntrospection 5 from django.contrib.gis.db.backends.postgis.operations import PostGISOperations 6 7 class DatabaseWrapper(Psycopg2DatabaseWrapper): 8 def __init__(self, *args, **kwargs): 9 super(DatabaseWrapper, self).__init__(*args, **kwargs) 10 self.creation = PostGISCreation(self) 11 ==> self.ops = PostGISOperations(self) 12 self.introspection = PostGISIntrospection(self) Variables: self = <django.contrib.gis.db.backends.postgis.base.DatabaseWrapper object at 0x21bb3d0> args = ({'ENGINE': 'django.contrib.gis.db.backends.postgis', 'HOST': '127.0.0.1', 'NAME': 'noc', 'OPTIONS': {}, 'PASSWORD': 'thenocproject', 'PORT': '', 'TEST_CHARSET': None, 'TEST_COLLATION': None, 'TEST_MIRROR': None, 'TEST_NAME': 'test_noc', 'TIME_ZONE': 'Etc/UTC', 'USER': 'noc'}, 'default') kwargs = {} ------------------------------------------------------------------------ File: /opt/noc/lib/python2.7/site-packages/django/db/utils.py (Line: 93) Function: __getitem__ 86 def __getitem__(self, alias): 87 if hasattr(self._connections, alias): 88 return getattr(self._connections, alias) 89 90 self.ensure_defaults(alias) 91 db = self.databases[alias] 92 backend = load_backend(db['ENGINE']) 93 ==> conn = backend.DatabaseWrapper(db, alias) 94 setattr(self._connections, alias, conn) 95 return conn 96 97 def __setitem__(self, key, value): 98 setattr(self._connections, key, value) 99 Variables: alias = 'default' self = <django.db.utils.ConnectionHandler object at 0x203ab90> db = {'ENGINE': 'django.contrib.gis.db.backends.postgis', 'HOST': '127.0.0.1', 'NAME': 'noc', 'OPTIONS': {}, 'PASSWORD': 'thenocproject', 'PORT': '', 'TEST_CHARSET': None, 'TEST_COLLATION': None, 'TEST_MIRROR': None, 'TEST_NAME': 'test_noc', 'TIME_ZONE': 'Etc/UTC', 'USER': 'noc'} backend = <module 'django.contrib.gis.db.backends.postgis.base' from '/opt/noc/lib/python2.7/site-packages/django/contrib/gis/db/backends/postgis/base.pyc'> ------------------------------------------------------------------------ File: /opt/noc/lib/python2.7/site-packages/django/db/__init__.py (Line: 34) Function: __getattr__ 27 class DefaultConnectionProxy(object): 28 """ 29 Proxy for accessing the default DatabaseWrapper object's attributes. If you 30 need to access the DatabaseWrapper object itself, use 31 connections[DEFAULT_DB_ALIAS] instead. 32 """ 33 def __getattr__(self, item): 34 ==> return getattr(connections[DEFAULT_DB_ALIAS], item) 35 36 def __setattr__(self, name, value): 37 return setattr(connections[DEFAULT_DB_ALIAS], name, value) 38 39 connection = DefaultConnectionProxy() 40 backend = load_backend(connection.settings_dict['ENGINE']) Variables: item = 'settings_dict' self = <django.db.DefaultConnectionProxy object at 0x203add0> ------------------------------------------------------------------------ File: /opt/noc/lib/python2.7/site-packages/django/db/__init__.py (Line: 40) Function: <module> 33 def __getattr__(self, item): 34 return getattr(connections[DEFAULT_DB_ALIAS], item) 35 36 def __setattr__(self, name, value): 37 return setattr(connections[DEFAULT_DB_ALIAS], name, value) 38 39 connection = DefaultConnectionProxy() 40 ==> backend = load_backend(connection.settings_dict['ENGINE']) 41 42 # Register an event that closes the database connection 43 # when a Django request is finished. 44 def close_connection(**kwargs): 45 # Avoid circular imports 46 from django.db import transaction Variables: utils = None load_backend = None connections = None __path__ = None DEFAULT_DB_ALIAS = None __all__ = None __package__ = None signals = None backends = None __doc__ = None DefaultConnectionProxy = None __builtins__ = {'ArithmeticError': <type 'exceptions.ArithmeticError'>, 'AssertionError': <type 'exceptions.AssertionError'>, 'AttributeError': <type 'exceptions.AttributeError'>, 'BaseException': <type 'exceptions.BaseException'>, 'BufferError': <type 'exceptions.BufferError'>, 'BytesWarning': <type 'exceptions.BytesWarning'>, 'DeprecationWarning': <type 'exceptions.DeprecationWarning'>, 'EOFError': <type 'exceptions.EOFError'>, 'Ellipsis': Ellipsis, 'EnvironmentError': <type 'exceptions.EnvironmentError'>, 'Exception': <type 'exceptions.Exception'>, 'False': False, 'FloatingPointError': <type 'exceptions.FloatingPointError'>, 'FutureWarning': <type 'exceptions.FutureWarning'>, 'GeneratorExit': <type 'exceptions.GeneratorExit'>, 'IOError': <type 'exceptions.IOError'>, 'ImportError': <type 'exceptions.ImportError'>, 'ImportWarning': <type 'exceptions.ImportWarning'>, 'IndentationError': <type 'exceptions.IndentationError'>, 'IndexError': <type 'exceptions.IndexError'>, 'KeyError': <type 'exceptions.KeyError'>, 'KeyboardInterrupt': <type 'exceptions.KeyboardInterrupt'>, 'LookupError': <type 'exceptions.LookupError'>, 'MemoryError': <type 'exceptions.MemoryError'>, 'NameError': <type 'exceptions.NameError'>, 'None': None, 'NotImplemented': NotImplemented, 'NotImplementedError': <type 'exceptions.NotImplementedError'>, 'OSError': <type 'exceptions.OSError'>, 'OverflowError': <type 'exceptions.OverflowError'>, 'PendingDeprecationWarning': <type 'exceptions.PendingDeprecationWarning'>, 'ReferenceError': <type 'exceptions.ReferenceError'>, 'RuntimeError': <type 'exceptions.RuntimeError'>, 'RuntimeWarning': <type 'exceptions.RuntimeWarning'>, 'StandardError': <type 'exceptions.StandardError'>, 'StopIteration': <type 'exceptions.StopIteration'>, 'SyntaxError': <type 'exceptions.SyntaxError'>, 'SyntaxWarning': <type 'exceptions.SyntaxWarning'>, 'SystemError': <type 'exceptions.SystemError'>, 'SystemExit': <type 'exceptions.SystemExit'>, 'TabError': <type 'exceptions.TabError'>, 'True': True, 'TypeError': <type 'exceptions.TypeError'>, 'UnboundLocalError': <type 'exceptions.UnboundLocalError'>, 'UnicodeDecodeError': <type 'exceptions.UnicodeDecodeError'>, 'UnicodeEncodeError': <type 'exceptions.UnicodeEncodeError'>, 'UnicodeError': <type 'exceptions.UnicodeError'>, 'UnicodeTranslateError': <type 'exceptions.UnicodeTranslateError'>, 'UnicodeWarning': <type 'exceptions.UnicodeWarning'>, 'UserWarning': <type 'exceptions.UserWarning'>, 'ValueError': <type 'exceptions.ValueError'>, 'Warning': <type 'exceptions.Warning'>, 'ZeroDivisionError': <type 'exceptions.ZeroDivisionError'>, '__debug__': True, '__doc__': "Built-in functions, exceptions, and other objects.\n\nNoteworthy: None is the `nil' object; Ellipsis represents `...' in slices.", '__import__': <built-in function __import__>, '__name__': '__builtin__', '__package__': None, 'abs': <built-in function abs>, 'all': <built-in function all>, 'any': <built-in function any>, 'apply': <built-in function apply>, 'basestring': <type 'basestring'>, 'bin': <built-in function bin>, 'bool': <type 'bool'>, 'buffer': <type 'buffer'>, 'bytearray': <type 'bytearray'>, 'bytes': <type 'str'>, 'callable': <built-in function callable>, 'chr': <built-in function chr>, 'classmethod': <type 'classmethod'>, 'cmp': <built-in function cmp>, 'coerce': <built-in function coerce>, 'compile': <built-in function compile>, 'complex': <type 'complex'>, 'copyright': Copyright (c) 2001-2012 Python Software Foundation. All Rights Reserved. Copyright (c) 2000 BeOpen.com. All Rights Reserved. Copyright (c) 1995-2001 Corporation for National Research Initiatives. All Rights Reserved. Copyright (c) 1991-1995 Stichting Mathematisch Centrum, Amsterdam. All Rights Reserved., 'credits': Thanks to CWI, CNRI, BeOpen.com, Zope Corporation and a cast of thousands for supporting Python development. See www.python.org for more information., 'delattr': <built-in function delattr>, 'dict': <type 'dict'>, 'dir': <built-in function dir>, 'divmod': <built-in function divmod>, 'enumerate': <type 'enumerate'>, 'eval': <built-in function eval>, 'execfile': <built-in function execfile>, 'exit': Use exit() or Ctrl-D (i.e. EOF) to exit, 'file': <type 'file'>, 'filter': <built-in function filter>, 'float': <type 'float'>, 'format': <built-in function format>, 'frozenset': <type 'frozenset'>, 'getattr': <built-in function getattr>, 'globals': <built-in function globals>, 'hasattr': <built-in function hasattr>, 'hash': <built-in function hash>, 'help': Type help() for interactive help, or help(object) for help about object., 'hex': <built-in function hex>, 'id': <built-in function id>, 'input': <built-in function input>, 'int': <type 'int'>, 'intern': <built-in function intern>, 'isinstance': <built-in function isinstance>, 'issubclass': <built-in function issubclass>, 'iter': <built-in function iter>, 'len': <built-in function len>, 'license': Type license() to see the full license text, 'list': <type 'list'>, 'locals': <built-in function locals>, 'long': <type 'long'>, 'map': <built-in function map>, 'max': <built-in function max>, 'memoryview': <type 'memoryview'>, 'min': <built-in function min>, 'next': <built-in function next>, 'object': <type 'object'>, 'oct': <built-in function oct>, 'open': <built-in function open>, 'ord': <built-in function ord>, 'pow': <built-in function pow>, 'print': <built-in function print>, 'property': <type 'property'>, 'quit': Use quit() or Ctrl-D (i.e. EOF) to exit, 'range': <built-in function range>, 'raw_input': <built-in function raw_input>, 'reduce': <built-in function reduce>, 'reload': <built-in function reload>, 'repr': <built-in function repr>, 'reversed': <type 'reversed'>, 'round': <built-in function round>, 'set': <type 'set'>, 'setattr': <built-in function setattr>, 'slice': <type 'slice'>, 'sorted': <built-in function sorted>, 'staticmethod': <type 'staticmethod'>, 'str': <type 'str'>, 'sum': <built-in function sum>, 'super': <type 'super'>, 'tuple': <type 'tuple'>, 'type': <type 'type'>, 'unichr': <built-in function unichr>, 'unicode': <type 'unicode'>, 'vars': <built-in function vars>, 'xrange': <type 'xrange'>, 'zip': <built-in function zip>} __file__ = None IntegrityError = None __name__ = None transaction = None settings = None ImproperlyConfigured = None connection = None ConnectionRouter = None router = None ConnectionHandler = None DatabaseError = None ------------------------------------------------------------------------ File: /opt/noc/lib/nosql.py (Line: 13) Function: <module> 6 ## See LICENSE for details 7 ##---------------------------------------------------------------------- 8 9 ## Python modules 10 import logging 11 import sys 12 ## Django modules 13 ==> from django.db.models import Model 14 from django.db import IntegrityError 15 import django.db.models.signals 16 ## Third-party modules 17 import pymongo 18 from mongoengine.base import * 19 from mongoengine import * Variables: logging = None __builtins__ = {'ArithmeticError': <type 'exceptions.ArithmeticError'>, 'AssertionError': <type 'exceptions.AssertionError'>, 'AttributeError': <type 'exceptions.AttributeError'>, 'BaseException': <type 'exceptions.BaseException'>, 'BufferError': <type 'exceptions.BufferError'>, 'BytesWarning': <type 'exceptions.BytesWarning'>, 'DeprecationWarning': <type 'exceptions.DeprecationWarning'>, 'EOFError': <type 'exceptions.EOFError'>, 'Ellipsis': Ellipsis, 'EnvironmentError': <type 'exceptions.EnvironmentError'>, 'Exception': <type 'exceptions.Exception'>, 'False': False, 'FloatingPointError': <type 'exceptions.FloatingPointError'>, 'FutureWarning': <type 'exceptions.FutureWarning'>, 'GeneratorExit': <type 'exceptions.GeneratorExit'>, 'IOError': <type 'exceptions.IOError'>, 'ImportError': <type 'exceptions.ImportError'>, 'ImportWarning': <type 'exceptions.ImportWarning'>, 'IndentationError': <type 'exceptions.IndentationError'>, 'IndexError': <type 'exceptions.IndexError'>, 'KeyError': <type 'exceptions.KeyError'>, 'KeyboardInterrupt': <type 'exceptions.KeyboardInterrupt'>, 'LookupError': <type 'exceptions.LookupError'>, 'MemoryError': <type 'exceptions.MemoryError'>, 'NameError': <type 'exceptions.NameError'>, 'None': None, 'NotImplemented': NotImplemented, 'NotImplementedError': <type 'exceptions.NotImplementedError'>, 'OSError': <type 'exceptions.OSError'>, 'OverflowError': <type 'exceptions.OverflowError'>, 'PendingDeprecationWarning': <type 'exceptions.PendingDeprecationWarning'>, 'ReferenceError': <type 'exceptions.ReferenceError'>, 'RuntimeError': <type 'exceptions.RuntimeError'>, 'RuntimeWarning': <type 'exceptions.RuntimeWarning'>, 'StandardError': <type 'exceptions.StandardError'>, 'StopIteration': <type 'exceptions.StopIteration'>, 'SyntaxError': <type 'exceptions.SyntaxError'>, 'SyntaxWarning': <type 'exceptions.SyntaxWarning'>, 'SystemError': <type 'exceptions.SystemError'>, 'SystemExit': <type 'exceptions.SystemExit'>, 'TabError': <type 'exceptions.TabError'>, 'True': True, 'TypeError': <type 'exceptions.TypeError'>, 'UnboundLocalError': <type 'exceptions.UnboundLocalError'>, 'UnicodeDecodeError': <type 'exceptions.UnicodeDecodeError'>, 'UnicodeEncodeError': <type 'exceptions.UnicodeEncodeError'>, 'UnicodeError': <type 'exceptions.UnicodeError'>, 'UnicodeTranslateError': <type 'exceptions.UnicodeTranslateError'>, 'UnicodeWarning': <type 'exceptions.UnicodeWarning'>, 'UserWarning': <type 'exceptions.UserWarning'>, 'ValueError': <type 'exceptions.ValueError'>, 'Warning': <type 'exceptions.Warning'>, 'ZeroDivisionError': <type 'exceptions.ZeroDivisionError'>, '__debug__': True, '__doc__': "Built-in functions, exceptions, and other objects.\n\nNoteworthy: None is the `nil' object; Ellipsis represents `...' in slices.", '__import__': <built-in function __import__>, '__name__': '__builtin__', '__package__': None, 'abs': <built-in function abs>, 'all': <built-in function all>, 'any': <built-in function any>, 'apply': <built-in function apply>, 'basestring': <type 'basestring'>, 'bin': <built-in function bin>, 'bool': <type 'bool'>, 'buffer': <type 'buffer'>, 'bytearray': <type 'bytearray'>, 'bytes': <type 'str'>, 'callable': <built-in function callable>, 'chr': <built-in function chr>, 'classmethod': <type 'classmethod'>, 'cmp': <built-in function cmp>, 'coerce': <built-in function coerce>, 'compile': <built-in function compile>, 'complex': <type 'complex'>, 'copyright': Copyright (c) 2001-2012 Python Software Foundation. All Rights Reserved. Copyright (c) 2000 BeOpen.com. All Rights Reserved. Copyright (c) 1995-2001 Corporation for National Research Initiatives. All Rights Reserved. Copyright (c) 1991-1995 Stichting Mathematisch Centrum, Amsterdam. All Rights Reserved., 'credits': Thanks to CWI, CNRI, BeOpen.com, Zope Corporation and a cast of thousands for supporting Python development. See www.python.org for more information., 'delattr': <built-in function delattr>, 'dict': <type 'dict'>, 'dir': <built-in function dir>, 'divmod': <built-in function divmod>, 'enumerate': <type 'enumerate'>, 'eval': <built-in function eval>, 'execfile': <built-in function execfile>, 'exit': Use exit() or Ctrl-D (i.e. EOF) to exit, 'file': <type 'file'>, 'filter': <built-in function filter>, 'float': <type 'float'>, 'format': <built-in function format>, 'frozenset': <type 'frozenset'>, 'getattr': <built-in function getattr>, 'globals': <built-in function globals>, 'hasattr': <built-in function hasattr>, 'hash': <built-in function hash>, 'help': Type help() for interactive help, or help(object) for help about object., 'hex': <built-in function hex>, 'id': <built-in function id>, 'input': <built-in function input>, 'int': <type 'int'>, 'intern': <built-in function intern>, 'isinstance': <built-in function isinstance>, 'issubclass': <built-in function issubclass>, 'iter': <built-in function iter>, 'len': <built-in function len>, 'license': Type license() to see the full license text, 'list': <type 'list'>, 'locals': <built-in function locals>, 'long': <type 'long'>, 'map': <built-in function map>, 'max': <built-in function max>, 'memoryview': <type 'memoryview'>, 'min': <built-in function min>, 'next': <built-in function next>, 'object': <type 'object'>, 'oct': <built-in function oct>, 'open': <built-in function open>, 'ord': <built-in function ord>, 'pow': <built-in function pow>, 'print': <built-in function print>, 'property': <type 'property'>, 'quit': Use quit() or Ctrl-D (i.e. EOF) to exit, 'range': <built-in function range>, 'raw_input': <built-in function raw_input>, 'reduce': <built-in function reduce>, 'reload': <built-in function reload>, 'repr': <built-in function repr>, 'reversed': <type 'reversed'>, 'round': <built-in function round>, 'set': <type 'set'>, 'setattr': <built-in function setattr>, 'slice': <type 'slice'>, 'sorted': <built-in function sorted>, 'staticmethod': <type 'staticmethod'>, 'str': <type 'str'>, 'sum': <built-in function sum>, 'super': <type 'super'>, 'tuple': <type 'tuple'>, 'type': <type 'type'>, 'unichr': <built-in function unichr>, 'unicode': <type 'unicode'>, 'vars': <built-in function vars>, 'xrange': <type 'xrange'>, 'zip': <built-in function zip>} __file__ = None __package__ = None sys = None __name__ = None __doc__ = None ------------------------------------------------------------------------ File: /opt/noc/main/web.py (Line: 136) Function: children_loop 129 def children_loop(self): 130 self.t_children = None 131 # Initialize pending sockets 132 sockets = self.server._pending_sockets 133 self.server._pending_sockets = [] 134 self.server.add_sockets(sockets) 135 # Connect to mongodb 136 ==> import noc.lib.nosql 137 # Initialize site 138 logging.info("Registering web applications") 139 from noc.lib.app import site 140 site.autodiscover() 141 # Run children's I/O loop 142 logging.info("Starting to serve requests") Variables: self = <noc.main.web.Web object at 0x7fae226f6450> sockets = [<socket._socketobject object at 0x1feae50>] ------------------------------------------------------------------------ File: /opt/noc/main/web.py (Line: 111) Function: run 104 nc = cpu_count() 105 self.t_children = set() 106 while True: 107 # Run children 108 while len(self.t_children) < nc: 109 pid = os.fork() 110 if pid == 0: 111 ==> self.children_loop() 112 elif pid < 0: 113 logging.error("Unable to fork child") 114 else: 115 logging.info("Running child %d" % pid) 116 self.t_children.add(pid) 117 # Wait for status Variables: status = 0 vi = sys.version_info(major=2, minor=7, micro=3, releaselevel='final', serial=0) self = <noc.main.web.Web object at 0x7fae226f6450> nc = 4 pid = 0 noc_wsgi = <tornado.wsgi.WSGIContainer object at 0x1c35150> application = <tornado.web.Application object at 0x1c35190> address = '127.0.0.1' port = 8000 listen = '127.0.0.1:8000' ------------------------------------------------------------------------ File: /opt/noc/lib/daemon.py (Line: 364) Function: guarded_run 357 358 def guarded_run(self): 359 """ 360 Run daemon and catch common exceptions 361 :return: 362 """ 363 try: 364 ==> self.run() 365 except KeyboardInterrupt: 366 pass 367 except MemoryError: 368 logging.error("Out of memory. Exiting.") 369 except SystemExit: 370 logging.info("Exiting") Variables: self = <noc.main.web.Web object at 0x7fae226f6450> ------------------------------------------------------------------------ END OF TRACEBACK
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement