usnistgov / SpectrumBrowser

ITL
12 stars 11 forks source link

When I try to generate a spectrogram, I get logged out #141

Closed jkubNTIA closed 9 years ago

jkubNTIA commented 9 years ago

I select the 703967500.0, 714047500.0 band for data/LTE_UL_DL_bc17_bc13_ts109_p2.dat data. Then I generate occupancy report, and go through the screens until I click on a point to bring up the spectrogram. I get logged off and this is my stack trace:

Log Message : URL = http://localhost:8000/spectrumbrowser/generateSingleAcquisitionSpectrogramAndOccupancy/ECR16W4XS/1405050141/LTE/703967500/714047500/user-142677530195826673815 updated session ID expireTime {'SensorID': u'ECR16W4XS', 'freqRange': u'LTE:703967500:714047500', 't': 1405050141} Unexpected error: <class 'pymongo.errors.OperationFailure'> (<class 'pymongo.errors.OperationFailure'>, OperationFailure(u'database error: bad offset:0 accessing file: /home/jkub/Documents/SpectrumBrowser/flask/data/db/spectrumdb.0. See http://dochub.mongodb.org/core/data-recovery',), <traceback object at 0x7fb54dae64d0>) Traceback (most recent call last): File "/home/jkub/Documents/SpectrumBrowser/flask/flaskr.py", line 1496, in generateSingleAcquisitionSpectrogramWorker result = GenerateSpectrogram.generateSingleAcquisitionSpectrogramAndOccupancyForFFTPower(msg, sessionId) File "/home/jkub/Documents/SpectrumBrowser/flask/GenerateSpectrogram.py", line 254, in generateSingleAcquisitionSpectrogramAndOccupancyForFFTPower messageBytes = fs.get(ObjectId(msg[DATA_KEY])).read() File "/usr/lib/python2.7/dist-packages/gridfs/init.py", line 140, in get return GridOut(self.collection, file_id) File "/usr/lib/python2.7/dist-packages/gridfs/grid_file.py", line 388, in __init self._file = file_document or files.find_one({"_id": file_id}) File "/usr/lib/python2.7/dist-packages/pymongo/collection.py", line 604, in find_one for result in self.find(spec_or_id, _args, _kwargs).limit(-1): File "/usr/lib/python2.7/dist-packages/pymongo/cursor.py", line 904, in next if len(self.data) or self._refresh(): File "/usr/lib/python2.7/dist-packages/pymongo/cursor.py", line 848, in _refresh self.uuid_subtype)) File "/usr/lib/python2.7/dist-packages/pymongo/cursor.py", line 800, in __send_message self.__uuid_subtype) File "/usr/lib/python2.7/dist-packages/pymongo/helpers.py", line 100, in _unpack_response error_object["$err"]) OperationFailure: database error: bad offset:0 accessing file: /home/jkub/Documents/SpectrumBrowser/flask/data/db/spectrumdb.0. See http://dochub.mongodb.org/core/data-recovery Unexpected error: <class 'pymongo.errors.OperationFailure'> (<class 'pymongo.errors.OperationFailure'>, OperationFailure(u'database error: bad offset:0 accessing file: /home/jkub/Documents/SpectrumBrowser/flask/data/db/spectrumdb.0. See http://dochub.mongodb.org/core/data-recovery',), <traceback object at 0x7fb54dae66c8>) Traceback (most recent call last): File "/home/jkub/Documents/SpectrumBrowser/flask/flaskr.py", line 160, in testcase_decorator return original_function(_args, _kwargs) File "/home/jkub/Documents/SpectrumBrowser/flask/flaskr.py", line 1496, in generateSingleAcquisitionSpectrogramWorker result = GenerateSpectrogram.generateSingleAcquisitionSpectrogramAndOccupancyForFFTPower(msg, sessionId) File "/home/jkub/Documents/SpectrumBrowser/flask/GenerateSpectrogram.py", line 254, in generateSingleAcquisitionSpectrogramAndOccupancyForFFTPower messageBytes = fs.get(ObjectId(msg[DATA_KEY])).read() File "/usr/lib/python2.7/dist-packages/gridfs/init.py", line 140, in get return GridOut(self.collection, file_id) File "/usr/lib/python2.7/dist-packages/gridfs/grid_file.py", line 388, in __init self._file = file_document or files.find_one({"_id": file_id}) File "/usr/lib/python2.7/dist-packages/pymongo/collection.py", line 604, in find_one for result in self.find(spec_or_id, _args, *_kwargs).limit(-1): File "/usr/lib/python2.7/dist-packages/pymongo/cursor.py", line 904, in next if len(self.data) or self._refresh(): File "/usr/lib/python2.7/dist-packages/pymongo/cursor.py", line 848, in _refresh self.uuid_subtype)) File "/usr/lib/python2.7/dist-packages/pymongo/cursor.py", line 800, in __send_message self.__uuid_subtype) File "/usr/lib/python2.7/dist-packages/pymongo/helpers.py", line 100, in _unpack_response error_object["$err"]) OperationFailure: database error: bad offset:0 accessing file: /home/jkub/Documents/SpectrumBrowser/flask/data/db/spectrumdb.0. See http://dochub.mongodb.org/core/data-recovery Log Message : Error communicating with server

ranganathanm commented 9 years ago

Your storage seems to be corrupted. Please run sh clean-db.sh, clean out the database directory and repopulate the data; then try to reproduce this error.

I am not able to reproduce it.

jkubNTIA commented 9 years ago

Rather than just doing a 'purge' of the data which leaves the 'spectrumdb' collection, I instead did a rm spectrumdb.* from the disk. Now I cannot reproduce this either, even if I purge and add my data again. Something must have been left around in the database. Ranga will look at a better way of storing the data in one collection per sensor instead of all the data in the same collection.