YunoHost-Apps / fittrackee_ynh

FitTrackee package for YunoHost 🚴
https://samr1.github.io/FitTrackee
GNU Affero General Public License v3.0
4 stars 1 forks source link

Service does not start after successful install #53

Closed Toxlen closed 7 months ago

Toxlen commented 7 months ago

Describe the bug

After installing the app I couldn't access the app because the service is not started and when I watch the logs I saw this message. Error: Error: '/var/log/fittrackee/fittrackee.log' isn't writable [PermissionError(13, 'Permission denied')]

Context

Steps to reproduce

Install the app.

Expected behavior

The service launch without problems after install.

Logs

In the fittrackee service :

Error: Error: '/var/log/fittrackee/fittrackee.log' isn't writable [PermissionError(13, 'Permission denied')]

In the fittrackee_workers service :

Traceback (most recent call last):
  File "/var/www/fittrackee/venv/bin/flask", line 8, in <module>
    sys.exit(main())
  File "/var/www/fittrackee/venv/lib/python3.9/site-packages/flask/cli.py", line 1107, in main
    cli.main()
  File "/var/www/fittrackee/venv/lib/python3.9/site-packages/click/core.py", line 1078, in main
    rv = self.invoke(ctx)
  File "/var/www/fittrackee/venv/lib/python3.9/site-packages/click/core.py", line 1688, in invoke
    return _process_result(sub_ctx.command.invoke(sub_ctx))
  File "/var/www/fittrackee/venv/lib/python3.9/site-packages/click/core.py", line 1434, in invoke
    return ctx.invoke(self.callback, **ctx.params)
  File "/var/www/fittrackee/venv/lib/python3.9/site-packages/click/core.py", line 783, in invoke
    return __callback(*args, **kwargs)
  File "/var/www/fittrackee/venv/lib/python3.9/site-packages/click/decorators.py", line 33, in new_func
    return f(get_current_context(), *args, **kwargs)
  File "/var/www/fittrackee/venv/lib/python3.9/site-packages/flask/cli.py", line 385, in decorator
    app = ctx.ensure_object(ScriptInfo).load_app()
  File "/var/www/fittrackee/venv/lib/python3.9/site-packages/flask/cli.py", line 337, in load_app
    app = locate_app(import_name, name)
  File "/var/www/fittrackee/venv/lib/python3.9/site-packages/flask/cli.py", line 247, in locate_app
    __import__(module_name)
  File "/var/www/fittrackee/venv/lib/python3.9/site-packages/fittrackee/__init__.py", line 34, in <module>
    logging.basicConfig(
  File "/usr/lib/python3.9/logging/__init__.py", line 1999, in basicConfig
    h = FileHandler(filename, mode,
  File "/usr/lib/python3.9/logging/__init__.py", line 1142, in __init__
    StreamHandler.__init__(self, self._open())
  File "/usr/lib/python3.9/logging/__init__.py", line 1171, in _open
    return open(self.baseFilename, self.mode, encoding=self.encoding,
PermissionError: [Errno 13] Permission denied: '/var/log/fittrackee/fittrackee.log'
Thovi98 commented 7 months ago

I can confirm this issue thanks! Could you please try chmod -R 640 /var/log/fittrackee?

Toxlen commented 7 months ago

Thanks for the quick response but it doesn't function I also tried

sudo chmod 640 /var/log/fittrackee/fittrackee.log

And it didn't fix the start of the service ...

Thovi98 commented 7 months ago

Could you try again by replacing 640 wirh 750?

mchbck commented 7 months ago

I had the same issue. chmod -R 750 /var/log/fittrackee worked for me. Thanks!

Thovi98 commented 7 months ago

Thanks for confirming! I will patch this soon.

Enjoy this app 🎉

Thovi98 commented 7 months ago

Fixed in the core (for next Yunohost release) : https://github.com/YunoHost/yunohost/pull/1787

Thovi98 commented 7 months ago

New Yunohost release is out! So i close this issue, feel free to reopen if not solved.