我已经使用virtualenv在apache + mod_wsgi + python2.7下设置了一个最小的python-eve,它启动并运行良好。但是我偶尔会在错误日志中收到500错误,并显示以下错误。如果发生这种情况,则需要重新启动apache httpd。我想知道是否有人看到这种行为,是否有解决方法。
谢谢
ERROR in app: Exception on /techsite/featuretechs [GET] Traceback (most recent call last): File "/data/t2api-eve/venv/lib/python2.7/site-packages/flask/app.py", line 2292, in wsgi_app response = self.full_dispatch_request() File "/data/t2api-eve/venv/lib/python2.7/site-packages/flask/app.py", line 1815, in full_dispatch_request rv = self.handle_user_exception(e) File "/data/t2api-eve/venv/lib/python2.7/site-packages/flask/app.py", line 1718, in handle_user_exception reraise(exc_type, exc_value, tb) File "/data/t2api-eve/venv/lib/python2.7/site-packages/flask/app.py", line 1813, in full_dispatch_request rv = self.dispatch_request() File "/data/t2api-eve/venv/lib/python2.7/site-packages/flask/app.py", line 1799, in dispatch_request return self.view_functions[rule.endpoint](**req.view_args) File "/data/t2api-eve/venv/lib/python2.7/site-packages/eve/endpoints.py", line 56, in collections_endpoint response = get(resource, lookup) File "/data/t2api-eve/venv/lib/python2.7/site-packages/eve/methods/common.py", line 297, in rate_limited return f(*args, **kwargs) File "/data/t2api-eve/venv/lib/python2.7/site-packages/eve/auth.py", line 78, in decorated return f(*args, **kwargs) File "/data/t2api-eve/venv/lib/python2.7/site-packages/eve/methods/common.py", line 1181, in decorated r = f(resource, **combined_args) File "/data/t2api-eve/venv/lib/python2.7/site-packages/eve/methods/get.py", line 39, in get return get_internal(resource, **lookup) File "/data/t2api-eve/venv/lib/python2.7/site-packages/eve/methods/get.py", line 112, in get_internal return _perform_find(resource, lookup) File "/data/t2api-eve/venv/lib/python2.7/site-packages/eve/methods/get.py", line 203, in _perform_find cursor = app.data.find(resource, req, lookup) File "/data/t2api-eve/venv/lib/python2.7/site-packages/eve/io/mongo/mongo.py", line 278, in find return self.pymongo(resource).db[datasource].find(**args) File "/data/t2api-eve/venv/lib/python2.7/site-packages/eve/io/mongo/mongo.py", line 907, in pymongo self.driver[px] = PyMongo(self.app, px) File "/data/t2api-eve/venv/lib/python2.7/site-packages/eve/io/mongo/flask_pymongo.py", line 99, in __init__ db.authenticate(username, password, **auth_kwargs) File "/data/t2api-eve/venv/lib/python2.7/site-packages/pymongo/database.py", line 1274, in authenticate connect=True) File "/data/t2api-eve/venv/lib/python2.7/site-packages/pymongo/mongo_client.py", line 614, in _cache_credentials sock_info.authenticate(credentials) File "/data/t2api-eve/venv/lib/python2.7/site-packages/pymongo/pool.py", line 688, in authenticate auth.authenticate(credentials, self) File "/data/t2api-eve/venv/lib/python2.7/site-packages/pymongo/auth.py", line 542, in authenticate auth_func(credentials, sock_info) File "/data/t2api-eve/venv/lib/python2.7/site-packages/pymongo/auth.py", line 519, in _authenticate_default return _authenticate_scram(credentials, sock_info, 'SCRAM-SHA-1') File "/data/t2api-eve/venv/lib/python2.7/site-packages/pymongo/auth.py", line 238, in _authenticate_scram (("%s" % (SystemRandom().random(),))[2:]).encode("utf-8")) File "/opt2/asani/apache/lib/python2.7/random.py", line 817, in random return (long(_hexlify(_urandom(7)), 16) >> 3) * RECIP_BPF NotImplementedError: /dev/urandom (or equivalent) not found