Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Upgrade requires new fermentrack-tools #727

Open
thorrak opened this issue Jun 24, 2023 · 4 comments
Open

Upgrade requires new fermentrack-tools #727

thorrak opened this issue Jun 24, 2023 · 4 comments

Comments

@thorrak
Copy link
Owner

thorrak commented Jun 24, 2023

The latest version of Fermentrack requires that you use an updated version of the fermentrack-tools scripts in order to function as expected. To fully upgrade (and eliminate the error message) log into your Raspberry Pi via SSH, and run the following commands:

  • cd fermentrack-tools
  • git fetch
  • git pull
  • ./install.sh
@cdnninja
Copy link

I received a large number of permission errors. I suspect related to the initial install encouraging the use of sudo but the above doesn't.

rm: cannot remove './compose/production/django/entrypoint': Permission denied rm: cannot remove './compose/production/django/Dockerfile': Permission denied rm: cannot remove './compose/production/django/nsswitch.conf': Permission denied rm: cannot remove './compose/production/django/pip.conf': Permission denied rm: cannot remove './compose/production/django/start': Permission denied rm: cannot remove './compose/production/redis/Dockerfile': Permission denied rm: cannot remove './compose/production/redis/redis.conf': Permission denied rm: cannot remove './compose/production/postgres/Dockerfile': Permission denied rm: cannot remove './compose/production/postgres/maintenance/backup': Permission denied rm: cannot remove './compose/production/postgres/maintenance/backups': Permissio n denied rm: cannot remove './compose/production/postgres/maintenance/_sourced/countdown. sh': Permission denied rm: cannot remove './compose/production/postgres/maintenance/_sourced/messages.s h': Permission denied rm: cannot remove './compose/production/postgres/maintenance/_sourced/yes_no.sh' : Permission denied rm: cannot remove './compose/production/postgres/maintenance/_sourced/constants. sh': Permission denied rm: cannot remove './compose/production/postgres/maintenance/restore': Permissio n denied rm: cannot remove './compose/production/nginx/Dockerfile': Permission denied rm: cannot remove './compose/production/nginx/nginx.conf': Permission denied

It seems to complete install but fails to bring it online:

::: Waiting for Fermentrack install to initialize and become responsive. ::: Fermentrack may take up to 3 minutes to first boot as the database is being initialized. ..........................................................................................missing. *** ERROR: Unable to find an initialized, responsive instance of Fermentrack

All containers are running and logs on them don't have errors.

@thorrak
Copy link
Owner Author

thorrak commented Jun 26, 2023

You are almost certainly right about that! Try running sudo chown pi ../fermentrack-tools to correct for that. If that doesn't work, let me know.

Also, if you haven't, once you've done that, run git pull to update fermentrack-tools

@cdnninja
Copy link

cdnninja commented Jun 26, 2023

For better or worse prior to this above I ran sudo ./install.sh and that resolved the issue. I noticed the main github still encourages the use of sudo but the docs say not to. I think this may cause a few others some issues too.

Thanks for all the work on this by the way! It is a great tool.

@rpreston99
Copy link

Successfully ran the new install using sudo but when loading fermentrack in my browser, get the following error:

Environment:

Request Method: GET
Request URL: http://192.168.1.200/

Django Version: 3.2.20
Python Version: 3.9.17
Installed Applications:
['django.contrib.admin',
'django.contrib.auth',
'django.contrib.contenttypes',
'django.contrib.sessions',
'django.contrib.messages',
'django.contrib.staticfiles',
'app.apps.AppConfig',
'firmware_flash.apps.AppConfig',
'gravity.apps.GravityAppConfig',
'external_push.apps.AppConfig',
'backups.apps.BackupsConfig',
'constance',
'constance.backends.database',
'huey.contrib.djhuey']
Installed Middleware:
['django.middleware.security.SecurityMiddleware',
'whitenoise.middleware.WhiteNoiseMiddleware',
'django.contrib.sessions.middleware.SessionMiddleware',
'django.middleware.common.CommonMiddleware',
'django.middleware.csrf.CsrfViewMiddleware',
'django.contrib.auth.middleware.AuthenticationMiddleware',
'django.contrib.messages.middleware.MessageMiddleware',
'django.middleware.clickjacking.XFrameOptionsMiddleware']

Traceback (most recent call last):
File "/usr/local/lib/python3.9/site-packages/django/db/backends/utils.py", line 84, in _execute
return self.cursor.execute(sql, params)

The above exception (current transaction is aborted, commands ignored until end of transaction block
) was the direct cause of the following exception:
File "/usr/local/lib/python3.9/site-packages/django/core/handlers/exception.py", line 47, in inner
response = get_response(request)
File "/usr/local/lib/python3.9/site-packages/django/core/handlers/base.py", line 181, in _get_response
response = wrapped_callback(request, *callback_args, **callback_kwargs)
File "/usr/local/lib/python3.9/site-packages/sentry_sdk/integrations/django/views.py", line 84, in sentry_wrapped_callback
return callback(request, *args, **kwargs)
File "/usr/local/lib/python3.9/contextlib.py", line 79, in inner
return func(*args, **kwds)
File "/app/app/views.py", line 81, in siteroot
if not config.USER_HAS_COMPLETED_CONFIGURATION or num_users <= 0:
File "/usr/local/lib/python3.9/site-packages/django/utils/functional.py", line 247, in inner
return func(self._wrapped, *args)
File "/usr/local/lib/python3.9/site-packages/constance/base.py", line 22, in getattr
setattr(self, key, default)
File "/usr/local/lib/python3.9/site-packages/constance/base.py", line 29, in setattr
self._backend.set(key, value)
File "/usr/local/lib/python3.9/site-packages/constance/backends/database/init.py", line 97, in set
constance = queryset.get(key=key)
File "/usr/local/lib/python3.9/site-packages/django/db/models/query.py", line 431, in get
num = len(clone)
File "/usr/local/lib/python3.9/site-packages/django/db/models/query.py", line 262, in len
self._fetch_all()
File "/usr/local/lib/python3.9/site-packages/django/db/models/query.py", line 1324, in _fetch_all
self._result_cache = list(self._iterable_class(self))
File "/usr/local/lib/python3.9/site-packages/django/db/models/query.py", line 51, in iter
results = compiler.execute_sql(chunked_fetch=self.chunked_fetch, chunk_size=self.chunk_size)
File "/usr/local/lib/python3.9/site-packages/django/db/models/sql/compiler.py", line 1175, in execute_sql
cursor.execute(sql, params)
File "/usr/local/lib/python3.9/site-packages/django/db/backends/utils.py", line 98, in execute
return super().execute(sql, params)
File "/usr/local/lib/python3.9/site-packages/sentry_sdk/integrations/django/init.py", line 596, in execute
return real_execute(self, sql, params)
File "/usr/local/lib/python3.9/site-packages/django/db/backends/utils.py", line 66, in execute
return self._execute_with_wrappers(sql, params, many=False, executor=self._execute)
File "/usr/local/lib/python3.9/site-packages/django/db/backends/utils.py", line 75, in _execute_with_wrappers
return executor(sql, params, many, context)
File "/usr/local/lib/python3.9/site-packages/django/db/backends/utils.py", line 84, in _execute
return self.cursor.execute(sql, params)
File "/usr/local/lib/python3.9/site-packages/django/db/utils.py", line 90, in exit
raise dj_exc_value.with_traceback(traceback) from exc_value
File "/usr/local/lib/python3.9/site-packages/django/db/backends/utils.py", line 84, in _execute
return self.cursor.execute(sql, params)

Exception Type: InternalError at /
Exception Value: current transaction is aborted, commands ignored until end of transaction block

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants