CSIRT-MU / Stream4Flow

A framework for the real-time network traffic analysis based on world-leading technologies for distributed stream processing, network traffic monitoring, and visualization.
https://csirt.muni.cz/?lang=en
MIT License
101 stars 36 forks source link

Install web application from a git #10

Closed tomjirsa closed 7 years ago

tomjirsa commented 7 years ago

A web application in now installed from .tar file in task install in web role.

This should be installed directly from the git repository.

simkosvorad commented 7 years ago

Everything is set, currently not working probably because file attributes are not set properly.

simkosvorad commented 7 years ago

Everything works as intended.

tomjirsa commented 7 years ago

After attempt to login to web portal, following error occurs:

Traceback (most recent call last):
  File "/var/www/web2py/gluon/restricted.py", line 227, in restricted
    exec ccode in environment
  File "/var/www/web2py/applications/Stream4Flow/controllers/default.py", line 155, in <module>
  File "/var/www/web2py/gluon/globals.py", line 417, in <lambda>
    self._caller = lambda f: f()
  File "/var/www/web2py/applications/Stream4Flow/controllers/default.py", line 60, in login
    db(db.users_logins.user_id == session.user_id).update(last_login=datetime.now())
  File "/var/www/web2py/gluon/packages/dal/pydal/objects.py", line 2054, in update
    ret = db._adapter.update("%s" % table._tablename, self.query, fields)
  File "/var/www/web2py/gluon/packages/dal/pydal/adapters/base.py", line 1031, in update
    raise e
OperationalError: unable to open database file

Probably wrong settings of user rights - all in web files needs to have following user rights : user: www-data, group: www-data

tomjirsa commented 7 years ago

Seems we need to use recurse: yes in install_web file.

viz. stackoverflow

- name: Set application attributes
  file:
     path: /var/www/web2py/applications/Stream4Flow
     owner: www-data
     group: www-data
tomjirsa commented 7 years ago

Fixed, merged with master. #17