I'm having similar issues when doing a manual install. I posted a wall of text below. Maybe someone can figure out what is going on.
$ systemctl status archivematica-storage-service.service
● archivematica-storage-service.service - Archivematica Storage Service
Loaded: loaded (/lib/systemd/system/archivematica-storage-service.service; enabled; vendor preset: enabled)
Active: activating (auto-restart) (Result: resources) since Thu 2022-09-01 16:49:27 UTC; 22s ago
Main PID: 23861 (code=exited, status=3)
systemd[1]: archivematica-storage-service.service: Scheduled restart job, restart counter is at 3.
systemd[1]: Stopped Archivematica Storage Service.
systemd[1]: archivematica-storage-service.service: Failed to load environment files: No such file or directory
systemd[1]: archivematica-storage-service.service: Failed to run 'start' task: No such file or directory
systemd[1]: archivematica-storage-service.service: Failed with result 'resources'.
systemd[1]: Failed to start Archivematica Storage Service.
When uninstalling the service, I saw this error: "rm: cannot remove '/etc/default/archivematica-storage-service': No such file or directory"
When installing it again, I noticed a similar error. I included a few lines before and after for context:
"creating django secret key
sed: can't read /etc/default/archivematica-storage-service: No such file or directory
Error: The new file /etc/default/archivematica-storage-service does not exist!
/var/lib/dpkg/info/archivematica-storage-service.postinst: line 25: /etc/default/archivematica-storage-service: No such file or directory
creating symlink in /usr/lib/archivematica
configuring django database and static files"
There is a traceback with tons of information that makes no sense to me.
Traceback (most recent call last):
File "/usr/share/archivematica/virtualenvs/archivematica-storage-service/lib/python3.6/site-packages/storage_service/storage_service/settings/helpers.py", line 9, in get_env_variable
return environ[var_name]
File "/usr/share/archivematica/virtualenvs/archivematica-storage-service/lib/python3.6/os.py", line 669, in __getitem__
raise KeyError(key) from None
KeyError: 'SS_DB_NAME'
During handling of the above exception, another exception occurred:
Traceback (most recent call last):
File "manage.py", line 11, in <module>
execute_from_command_line(sys.argv)
File "/usr/share/archivematica/virtualenvs/archivematica-storage-service/lib/python3.6/site-packages/django/core/management/__init__.py", line 364, in execute_from_command_line
utility.execute()
File "/usr/share/archivematica/virtualenvs/archivematica-storage-service/lib/python3.6/site-packages/django/core/management/__init__.py", line 356, in execute
self.fetch_command(subcommand).run_from_argv(self.argv)
File "/usr/share/archivematica/virtualenvs/archivematica-storage-service/lib/python3.6/site-packages/django/core/management/__init__.py", line 206, in fetch_command
klass = load_command_class(app_name, subcommand)
File "/usr/share/archivematica/virtualenvs/archivematica-storage-service/lib/python3.6/site-packages/django/core/management/__init__.py", line 40, in load_command_class
module = import_module('%s.management.commands.%s' % (app_name, name))
File "/usr/share/archivematica/virtualenvs/archivematica-storage-service/lib/python3.6/importlib/__init__.py", line 126, in import_module
return _bootstrap._gcd_import(name[level:], package, level)
File "<frozen importlib._bootstrap>", line 994, in _gcd_import
File "<frozen importlib._bootstrap>", line 971, in _find_and_load
File "<frozen importlib._bootstrap>", line 955, in _find_and_load_unlocked
File "<frozen importlib._bootstrap>", line 665, in _load_unlocked
File "<frozen importlib._bootstrap_external>", line 678, in exec_module
File "<frozen importlib._bootstrap>", line 219, in _call_with_frames_removed
File "/usr/share/archivematica/virtualenvs/archivematica-storage-service/lib/python3.6/site-packages/django/core/management/commands/migrate.py", line 15, in <module>
from django.db.migrations.autodetector import MigrationAutodetector
File "/usr/share/archivematica/virtualenvs/archivematica-storage-service/lib/python3.6/site-packages/django/db/migrations/autodetector.py", line 13, in <module>
from django.db.migrations.questioner import MigrationQuestioner
File "/usr/share/archivematica/virtualenvs/archivematica-storage-service/lib/python3.6/site-packages/django/db/migrations/questioner.py", line 12, in <module>
from .loader import MigrationLoader
File "/usr/share/archivematica/virtualenvs/archivematica-storage-service/lib/python3.6/site-packages/django/db/migrations/loader.py", line 10, in <module>
from django.db.migrations.recorder import MigrationRecorder
File "/usr/share/archivematica/virtualenvs/archivematica-storage-service/lib/python3.6/site-packages/django/db/migrations/recorder.py", line 12, in <module>
class MigrationRecorder(object):
File "/usr/share/archivematica/virtualenvs/archivematica-storage-service/lib/python3.6/site-packages/django/db/migrations/recorder.py", line 26, in MigrationRecorder
class Migration(models.Model):
File "/usr/share/archivematica/virtualenvs/archivematica-storage-service/lib/python3.6/site-packages/django/db/migrations/recorder.py", line 27, in Migration
app = models.CharField(max_length=255)
File "/usr/share/archivematica/virtualenvs/archivematica-storage-service/lib/python3.6/site-packages/django/db/models/fields/__init__.py", line 1061, in __init__
super(CharField, self).__init__(*args, **kwargs)
File "/usr/share/archivematica/virtualenvs/archivematica-storage-service/lib/python3.6/site-packages/django/db/models/fields/__init__.py", line 172, in __init__
self.db_tablespace = db_tablespace or settings.DEFAULT_INDEX_TABLESPACE
File "/usr/share/archivematica/virtualenvs/archivematica-storage-service/lib/python3.6/site-packages/django/conf/__init__.py", line 56, in __getattr__
self._setup(name)
File "/usr/share/archivematica/virtualenvs/archivematica-storage-service/lib/python3.6/site-packages/django/conf/__init__.py", line 41, in _setup
self._wrapped = Settings(settings_module)
File "/usr/share/archivematica/virtualenvs/archivematica-storage-service/lib/python3.6/site-packages/django/conf/__init__.py", line 110, in __init__
mod = importlib.import_module(self.SETTINGS_MODULE)
File "/usr/share/archivematica/virtualenvs/archivematica-storage-service/lib/python3.6/importlib/__init__.py", line 126, in import_module
return _bootstrap._gcd_import(name[level:], package, level)
File "/usr/share/archivematica/virtualenvs/archivematica-storage-service/lib/python3.6/site-packages/storage_service/storage_service/settings/local.py", line 20, in <module>
"NAME": get_env_variable("SS_DB_NAME"),
File "/usr/share/archivematica/virtualenvs/archivematica-storage-service/lib/python3.6/site-packages/storage_service/storage_service/settings/helpers.py", line 12, in get_env_variable
raise ImproperlyConfigured(error_msg)
django.core.exceptions.ImproperlyConfigured: Set the SS_DB_NAME environment variable
Traceback (most recent call last):
File "/usr/share/archivematica/virtualenvs/archivematica-storage-service/lib/python3.6/site-packages/storage_service/storage_service/settings/helpers.py", line 9, in get_env_variable
return environ[var_name]
File "/usr/share/archivematica/virtualenvs/archivematica-storage-service/lib/python3.6/os.py", line 669, in __getitem__
raise KeyError(key) from None
KeyError: 'SS_DB_NAME'
During handling of the above exception, another exception occurred:
Traceback (most recent call last):
File "manage.py", line 11, in <module>
execute_from_command_line(sys.argv)
File "/usr/share/archivematica/virtualenvs/archivematica-storage-service/lib/python3.6/site-packages/django/core/management/__init__.py", line 364, in execute_from_command_line
utility.execute()
File "/usr/share/archivematica/virtualenvs/archivematica-storage-service/lib/python3.6/site-packages/django/core/management/__init__.py", line 356, in execute
self.fetch_command(subcommand).run_from_argv(self.argv)
File "/usr/share/archivematica/virtualenvs/archivematica-storage-service/lib/python3.6/site-packages/django/core/management/__init__.py", line 194, in fetch_command
settings.INSTALLED_APPS
File "/usr/share/archivematica/virtualenvs/archivematica-storage-service/lib/python3.6/site-packages/django/conf/__init__.py", line 56, in __getattr__
self._setup(name)
File "/usr/share/archivematica/virtualenvs/archivematica-storage-service/lib/python3.6/site-packages/django/conf/__init__.py", line 41, in _setup
self._wrapped = Settings(settings_module)
File "/usr/share/archivematica/virtualenvs/archivematica-storage-service/lib/python3.6/site-packages/django/conf/__init__.py", line 110, in __init__
mod = importlib.import_module(self.SETTINGS_MODULE)
File "/usr/share/archivematica/virtualenvs/archivematica-storage-service/lib/python3.6/importlib/__init__.py", line 126, in import_module
return _bootstrap._gcd_import(name[level:], package, level)
File "<frozen importlib._bootstrap>", line 994, in _gcd_import
File "<frozen importlib._bootstrap>", line 971, in _find_and_load
File "<frozen importlib._bootstrap>", line 955, in _find_and_load_unlocked
File "<frozen importlib._bootstrap>", line 665, in _load_unlocked
File "<frozen importlib._bootstrap_external>", line 678, in exec_module
File "<frozen importlib._bootstrap>", line 219, in _call_with_frames_removed
File "/usr/share/archivematica/virtualenvs/archivematica-storage-service/lib/python3.6/site-packages/storage_service/storage_service/settings/local.py", line 20, in <module>
"NAME": get_env_variable("SS_DB_NAME"),
File "/usr/share/archivematica/virtualenvs/archivematica-storage-service/lib/python3.6/site-packages/storage_service/storage_service/settings/helpers.py", line 12, in get_env_variable
raise ImproperlyConfigured(error_msg)
django.core.exceptions.ImproperlyConfigured: Set the SS_DB_NAME environment variable
Traceback (most recent call last):
File "/usr/share/archivematica/virtualenvs/archivematica-storage-service/lib/python3.6/site-packages/storage_service/storage_service/settings/helpers.py", line 9, in get_env_variable
return environ[var_name]
File "/usr/share/archivematica/virtualenvs/archivematica-storage-service/lib/python3.6/os.py", line 669, in __getitem__
raise KeyError(key) from None
KeyError: 'SS_DB_NAME'
During handling of the above exception, another exception occurred:
Traceback (most recent call last):
File "manage.py", line 11, in <module>
execute_from_command_line(sys.argv)
File "/usr/share/archivematica/virtualenvs/archivematica-storage-service/lib/python3.6/site-packages/django/core/management/__init__.py", line 364, in execute_from_command_line
utility.execute()
File "/usr/share/archivematica/virtualenvs/archivematica-storage-service/lib/python3.6/site-packages/django/core/management/__init__.py", line 356, in execute
self.fetch_command(subcommand).run_from_argv(self.argv)
File "/usr/share/archivematica/virtualenvs/archivematica-storage-service/lib/python3.6/site-packages/django/core/management/base.py", line 283, in run_from_argv
self.execute(*args, **cmd_options)
File "/usr/share/archivematica/virtualenvs/archivematica-storage-service/lib/python3.6/site-packages/django/core/management/base.py", line 330, in execute
output = self.handle(*args, **options)
File "/usr/share/archivematica/virtualenvs/archivematica-storage-service/lib/python3.6/site-packages/django/core/management/commands/compilemessages.py", line 67, in handle
basedirs.extend(upath(path) for path in settings.LOCALE_PATHS)
File "/usr/share/archivematica/virtualenvs/archivematica-storage-service/lib/python3.6/site-packages/django/conf/__init__.py", line 56, in __getattr__
self._setup(name)
File "/usr/share/archivematica/virtualenvs/archivematica-storage-service/lib/python3.6/site-packages/django/conf/__init__.py", line 41, in _setup
self._wrapped = Settings(settings_module)
File "/usr/share/archivematica/virtualenvs/archivematica-storage-service/lib/python3.6/site-packages/django/conf/__init__.py", line 110, in __init__
mod = importlib.import_module(self.SETTINGS_MODULE)
File "/usr/share/archivematica/virtualenvs/archivematica-storage-service/lib/python3.6/importlib/__init__.py", line 126, in import_module
return _bootstrap._gcd_import(name[level:], package, level)
File "<frozen importlib._bootstrap>", line 994, in _gcd_import
File "<frozen importlib._bootstrap>", line 971, in _find_and_load
File "<frozen importlib._bootstrap>", line 955, in _find_and_load_unlocked
File "<frozen importlib._bootstrap>", line 665, in _load_unlocked
File "<frozen importlib._bootstrap_external>", line 678, in exec_module
File "<frozen importlib._bootstrap>", line 219, in _call_with_frames_removed
File "/usr/share/archivematica/virtualenvs/archivematica-storage-service/lib/python3.6/site-packages/storage_service/storage_service/settings/local.py", line 20, in <module>
"NAME": get_env_variable("SS_DB_NAME"),
File "/usr/share/archivematica/virtualenvs/archivematica-storage-service/lib/python3.6/site-packages/storage_service/storage_service/settings/helpers.py", line 12, in get_env_variable
raise ImproperlyConfigured(error_msg)
django.core.exceptions.ImproperlyConfigured: Set the SS_DB_NAME environment variable
Traceback (most recent call last):
File "/usr/share/archivematica/virtualenvs/archivematica-storage-service/lib/python3.6/site-packages/storage_service/storage_service/settings/helpers.py", line 9, in get_env_variable
return environ[var_name]
File "/usr/share/archivematica/virtualenvs/archivematica-storage-service/lib/python3.6/os.py", line 669, in __getitem__
raise KeyError(key) from None
KeyError: 'SS_DB_NAME'
During handling of the above exception, another exception occurred:
Traceback (most recent call last):
File "manage.py", line 11, in <module>
execute_from_command_line(sys.argv)
File "/usr/share/archivematica/virtualenvs/archivematica-storage-service/lib/python3.6/site-packages/django/core/management/__init__.py", line 364, in execute_from_command_line
utility.execute()
File "/usr/share/archivematica/virtualenvs/archivematica-storage-service/lib/python3.6/site-packages/django/core/management/__init__.py", line 356, in execute
self.fetch_command(subcommand).run_from_argv(self.argv)
File "/usr/share/archivematica/virtualenvs/archivematica-storage-service/lib/python3.6/site-packages/django/core/management/__init__.py", line 194, in fetch_command
settings.INSTALLED_APPS
File "/usr/share/archivematica/virtualenvs/archivematica-storage-service/lib/python3.6/site-packages/django/conf/__init__.py", line 56, in __getattr__
self._setup(name)
File "/usr/share/archivematica/virtualenvs/archivematica-storage-service/lib/python3.6/site-packages/django/conf/__init__.py", line 41, in _setup
self._wrapped = Settings(settings_module)
File "/usr/share/archivematica/virtualenvs/archivematica-storage-service/lib/python3.6/site-packages/django/conf/__init__.py", line 110, in __init__
mod = importlib.import_module(self.SETTINGS_MODULE)
File "/usr/share/archivematica/virtualenvs/archivematica-storage-service/lib/python3.6/importlib/__init__.py", line 126, in import_module
return _bootstrap._gcd_import(name[level:], package, level)
File "<frozen importlib._bootstrap>", line 994, in _gcd_import
File "<frozen importlib._bootstrap>", line 971, in _find_and_load
File "<frozen importlib._bootstrap>", line 955, in _find_and_load_unlocked
File "<frozen importlib._bootstrap>", line 665, in _load_unlocked
File "<frozen importlib._bootstrap_external>", line 678, in exec_module
File "<frozen importlib._bootstrap>", line 219, in _call_with_frames_removed
File "/usr/share/archivematica/virtualenvs/archivematica-storage-service/lib/python3.6/site-packages/storage_service/storage_service/settings/local.py", line 20, in <module>
"NAME": get_env_variable("SS_DB_NAME"),
File "/usr/share/archivematica/virtualenvs/archivematica-storage-service/lib/python3.6/site-packages/storage_service/storage_service/settings/helpers.py", line 12, in get_env_variable
raise ImproperlyConfigured(error_msg)
django.core.exceptions.ImproperlyConfigured: Set the SS_DB_NAME environment variable
updating directory permissions
Successfully updated /usr/share/archivematica/virtualenvs/archivematica-storage-service/bin/python3
Job for archivematica-storage-service.service failed because of unavailable resources or another system error.
See "systemctl status archivematica-storage-service.service" and "journalctl -xe" for details.
Processing triggers for libc-bin (2.27-3ubuntu1.6) ...