AustralianSynchrotron / lightflow

A lightweight, distributed workflow system
https://australiansynchrotron.github.io/lightflow/
BSD 3-Clause "New" or "Revised" License
101 stars 18 forks source link

database error #22

Open StefanGIT opened 1 year ago

StefanGIT commented 1 year ago

``Hi, I have installed as described here: https://lightflow.readthedocs.io/en/latest/installation.html (using the ubuntu package manager for installation of MongoDB and redis). When i start a workflow, i get the following errors:

[26/04/2023 15:54:14][ERROR] ForkPoolWorker-1 | Task lightflow.queue.jobs.execute_dag[12e80c66-4754-41a6-83f7-1ce4bed9b70b] raised unexpected: TypeError('database must be an instance of Database')
Traceback (most recent call last):
  File "/exports/scratch/ana3/lib/python3.9/site-packages/celery/app/trace.py", line 385, in trace_task
    R = retval = fun(*args, **kwargs)
  File "/exports/scratch/ana3/lib/python3.9/site-packages/celery/app/trace.py", line 650, in __protected_call__
    return self.run(*args, **kwargs)
  File "/exports/scratch/ana3/lib/python3.9/site-packages/lightflow/queue/jobs.py", line 117, in execute_dag
    store_doc = DataStore(**self.app.user_options['config'].data_store,
  File "/exports/scratch/ana3/lib/python3.9/site-packages/lightflow/models/datastore.py", line 223, in get
    fs = GridFSProxy(GridFS(db.unproxied_object))
  File "/exports/scratch/ana3/lib/python3.9/site-packages/gridfs/__init__.py", line 90, in __init__
    raise TypeError("database must be an instance of Database")
TypeError: database must be an instance of Database
[26/04/2023 15:54:14][ERROR] ForkPoolWorker-8 | Task lightflow.queue.jobs.execute_workflow[feb66360-ae4e-42a9-a7b2-51a04b45f06c] raised unexpected: TypeError('database must be an instance of Database')
Traceback (most recent call last):
  File "/exports/scratch/ana3/lib/python3.9/site-packages/celery/app/trace.py", line 385, in trace_task
    R = retval = fun(*args, **kwargs)
  File "/exports/scratch/ana3/lib/python3.9/site-packages/celery/app/trace.py", line 650, in __protected_call__
    return self.run(*args, **kwargs)
  File "/exports/scratch/ana3/lib/python3.9/site-packages/lightflow/queue/jobs.py", line 69, in execute_workflow
    workflow.run(config=self.app.user_options['config'],
  File "/exports/scratch/ana3/lib/python3.9/site-packages/lightflow/models/workflow.py", line 228, in run
    data_store.remove(self._workflow_id)
  File "/exports/scratch/ana3/lib/python3.9/site-packages/lightflow/models/datastore.py", line 197, in remove
    fs = GridFSProxy(GridFS(db.unproxied_object))
  File "/exports/scratch/ana3/lib/python3.9/site-packages/gridfs/__init__.py", line 90, in __init__
    raise TypeError("database must be an instance of Database")
TypeError: database must be an instance of Database

Is there an initialization needed for the MongoDB? When i go to the http://localhost:27017/ i get: It looks like you are trying to access MongoDB over HTTP on the native driver port.

StefanGIT commented 1 year ago

The current default pymongo package (4.3.3) seems to be responsible for the problem, when i install the version 3.7.3 i do not get the error. Still i do not get any printout?