archivematica-storage-service does not run

441 views
Skip to first unread message

Fernando Freire

unread,
Sep 1, 2022, 11:05:01 AM9/1/22
to archivematica
Hi everyone, I'm new to archivematica.
I installed archivematica on a VM using VM VirtualBox 6.1.
I followed the manual installation guide on ubuntu 18.04 as it is on the archivematica page.
---->https://www.archivematica.org/en/docs/archivematica-1.13/admin-manual/installation-setup/installation/install-ubuntu/#install-pkg-ubuntu

The installation is apparently successful, but in the post-installation configuration when I try to access the storage-service at "http://localhost:8000 the browser returns this:
---->502 Bad Gateway
nginx/1.14.0 (Ubuntu).

I don't have fairewall active

I read in another conversation that the archivematica-estorage-service service might not have gone up, so I did the check and indeed the service did not go up.

fernando@archivematica:~$ service archivematica-storage-service status
● archivematica-storage-service.service - Archivematica Storage Service
   Loaded: loaded (/lib/systemd/system/archivematica-storage-service.service; enabled; vendor preset: enabled)
   Active: failed (Result: exit-code) since Wed 2022-08-31 09:42:19 -03; 24h ago
  Process: 3043 ExecStart=/usr/share/archivematica/virtualenvs/archivematica-storage-service/bin/gunicorn --config /etc/archivematica/storage-service.gunicorn-config.py storage_service.wsgi:application
 Main PID: 3043 (code=exited, status=3)

ago 31 09:42:19 archivematica systemd[1]: archivematica-storage-service.service: Service hold-off time over, scheduling restart.
ago 31 09:42:19 archivematica systemd[1]: archivematica-storage-service.service: Scheduled restart job, restart counter is at 10.
ago 31 09:42:19 archivematica systemd[1]: Stopped Archivematica Storage Service.
ago 31 09:42:19 archivematica systemd[1]: archivematica-storage-service.service: Start request repeated too quickly.
ago 31 09:42:19 archivematica systemd[1]: archivematica-storage-service.service: Failed with result 'exit-code'.
ago 31 09:42:19 archivematica systemd[1]: Failed to start Archivematica Storage Service.

Has anyone had this problem, I need help.
Thank you all in advance for your attention.

Forgive me for any spelling errors, I don't have a good command of the English language, so I use google translator, which may not make a very accurate translation.

Joseph Collard

unread,
Sep 1, 2022, 1:32:38 PM9/1/22
to archivematica
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) ...

Susan Borda

unread,
Sep 1, 2022, 4:02:15 PM9/1/22
to archivematica
I had a similar issue with doing the manual install on Ubuntu 18.04 it seems that mysql is missing from the install package. I found this and it helped, if you already have the storage-service installed you'll need purge it then go through this.

-susan
-------
Nov 5, 2021, 6:30:04 PM
to archivematica
Hello, 
I had the same issue while trying to install the storage service after 0.18.1 update.
The .deb install package is broken after they made the storage service using a mysql database as default database.

Here is what i've done to get past it: 

1 - you first need a local mysql installl 

sudo apt-get install -y mysql-server-5.7 libmysqlclient-dev

2 - You must create the SS database and a user called archivematica and password demo:

        #note o sudo obrigatório aqui
        sudo mysql -u root

        CREATE DATABASE SS CHARACTER SET utf8 COLLATE utf8_general_ci;

        create user archivematica@'%' identified by 'demo';
        GRANT ALL PRIVILEGES ON SS.* TO 'archivematica'@'%';
        flush privileges;
        quit;

3 - continue installing the storage service and the other packages as intended.

sudo apt-get install -y archivematica-storage-service
best regards, 
Guilherme Campos
---------

Susan Borda

unread,
Sep 1, 2022, 4:20:09 PM9/1/22
to archivematica
Try this it helped me, however if you have already installed storage-system you'll need to purge that first do this process below then reinstall it.


-susan

On Thursday, September 1, 2022 at 11:05:01 AM UTC-4 freita...@gmail.com wrote:

Joseph Collard

unread,
Sep 2, 2022, 7:59:36 AM9/2/22
to archivematica
That worked.  Thanks. 

Fernando Freire

unread,
Sep 9, 2022, 6:25:04 AM9/9/22
to archivematica
I restarted the whole installation, the storage-service worked. Thank you Susan.
But now Archivematica Dashboard returns "Internal server error".
I suspect it has to do with the database user, but I'm not sure.
Does anyone have any ideas ?
Thanks in advance.

susan borda

unread,
Sep 9, 2022, 8:05:37 AM9/9/22
to archiv...@googlegroups.com
Hi Fernando-
Can you provide a screenshot of the error?

Thanks,
susan

Sent from my iPhone

On Sep 9, 2022, at 6:25 AM, Fernando Freire <freita...@gmail.com> wrote:

I restarted the whole installation, the storage-service worked. Thank you Susan.
--
You received this message because you are subscribed to a topic in the Google Groups "archivematica" group.
To unsubscribe from this topic, visit https://groups.google.com/d/topic/archivematica/6hpLUQz4qZo/unsubscribe.
To unsubscribe from this group and all its topics, send an email to archivematic...@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/archivematica/ec0a4b80-e0b8-4394-b76c-83e997955c88n%40googlegroups.com.

Fernando Freire

unread,
Sep 9, 2022, 8:35:38 AM9/9/22
to archivematica
Hello Susan!


dashboard_internal_serevr_error.png

Susan Borda

unread,
Sep 9, 2022, 10:13:04 AM9/9/22
to archiv...@googlegroups.com
Hmmm, is your Archivematica front-end/dashboard connected to the Storage Service? Did you get this message after setting up an account?



--
Susan Borda
Digital Preservation Projects Manager
Digital Preservation Unit
University of Michigan Libraries
Buhr Building
My office phone number is temporarily disconnected while I work remotely due to COVID-19. Please contact me via email.
 

Fernando Freire

unread,
Sep 9, 2022, 10:48:48 AM9/9/22
to archivematica
I didn't get to set up an account. I just finished the installation/post installation sequence.
What I have on sgbd is this:
databases&users.png

Susan Borda

unread,
Sep 9, 2022, 11:31:50 AM9/9/22
to archiv...@googlegroups.com
In the "Administration" tab do you have a user set up? Are you able to get to the Storage Service? You have to do some API copying pasting between the two parts of Archivematica to get these connected.


Reply all
Reply to author
Forward
0 new messages