artefactual-labs / am

Development environment for Archivematica
https://archivematica.org
GNU Affero General Public License v3.0
10 stars 20 forks source link

Problem : make bootstrap fails with Service unavailable. #77

Closed Lasith-Niro closed 3 years ago

Lasith-Niro commented 5 years ago

I tried to deploy a am instance on centos. This is what I got for make bootstrap step.

docker-compose run \
    --rm \
    --entrypoint /src/dashboard/src/manage.py \
        archivematica-dashboard \
            install \
                --username="test" \
                --password="test" \
                --email="test@test.com" \
                --org-name="test" \
                --org-id="test" \
                --api-key="test" \
                --ss-url="http://archivematica-storage-service:8000" \
                --ss-user="test" \
                --ss-api-key="test" \
                --site-url="http://archivematica-dashboard:8000"
Starting compose_elasticsearch_1 ... done
Starting compose_redis_1         ... done
Starting compose_mysql_1         ... done
Starting compose_gearmand_1      ... done
Starting compose_archivematica-storage-service_1 ... done
DEBUG     2019-03-31 09:19:21  archivematica.dashboard:models:create_user_agent:78:  Caught post_save signal from <class 'django.contrib.auth.models.User'> with instance <User: test>
DEBUG     2019-03-31 09:19:21  archivematica.dashboard:models:create_user_agent:90:  Agent: Archivematica user; Archivematica user pk: 1; username="test", first_name="", last_name=""; created: True
WARNING   2019-03-31 09:19:21  archivematica.common:storageService:get_pipeline:149:  Error fetching pipeline
Traceback (most recent call last):
  File "/src/archivematicaCommon/lib/storageService.py", line 147, in get_pipeline
    response.raise_for_status()
  File "/usr/local/lib/python2.7/site-packages/requests/models.py", line 940, in raise_for_status
    raise HTTPError(http_error_msg, response=self)
HTTPError: 503 Server Error: Service Unavailable for url: http://archivematica-storage-service:8000/api/v2/pipeline/072850f0-1835-48d2-b85a-910f4e5feb39/
WARNING   2019-03-31 09:19:21  archivematica.dashboard:steps:setup_pipeline_in_ss:84:  SS inaccessible or pipeline not registered.
INFO      2019-03-31 09:19:21  archivematica.common:storageService:create_pipeline:123:  Creating pipeline in storage service with {'remote_name': u'http://archivematica-dashboard:8000', 'api_key': u'test', 'uuid': u'072850f0-1835-48d2-b85a-910f4e5feb39', 'shared_path': '/var/archivematica/sharedDirectory/', 'api_username': u'test', 'create_default_locations': True, 'description': 'Archivematica on 0161a2229661'}
WARNING   2019-03-31 09:19:21  archivematica.common:storageService:create_pipeline:133:  Unable to create Archivematica pipeline in storage service from {'remote_name': u'http://archivematica-dashboard:8000', 'api_key': u'test', 'uuid': u'072850f0-1835-48d2-b85a-910f4e5feb39', 'shared_path': '/var/archivematica/sharedDirectory/', 'api_username': u'test', 'create_default_locations': True, 'description': 'Archivematica on 0161a2229661'} because 503 Server Error: Service Unavailable for url: http://archivematica-storage-service:8000/api/v2/pipeline/
Traceback (most recent call last):
  File "/src/archivematicaCommon/lib/storageService.py", line 127, in create_pipeline
    response.raise_for_status()
  File "/usr/local/lib/python2.7/site-packages/requests/models.py", line 940, in raise_for_status
    raise HTTPError(http_error_msg, response=self)
HTTPError: 503 Server Error: Service Unavailable for url: http://archivematica-storage-service:8000/api/v2/pipeline/
Traceback (most recent call last):
  File "/src/dashboard/src/manage.py", line 10, in <module>
    execute_from_command_line(sys.argv)
  File "/usr/local/lib/python2.7/site-packages/django/core/management/__init__.py", line 354, in execute_from_command_line
    utility.execute()
  File "/usr/local/lib/python2.7/site-packages/django/core/management/__init__.py", line 346, in execute
    self.fetch_command(subcommand).run_from_argv(self.argv)
  File "/usr/local/lib/python2.7/site-packages/django/core/management/base.py", line 394, in run_from_argv
    self.execute(*args, **cmd_options)
  File "/usr/local/lib/python2.7/site-packages/django/core/management/base.py", line 445, in execute
    output = self.handle(*args, **options)
  File "/src/dashboard/src/installer/management/commands/install.py", line 70, in handle
    setup_pipeline_in_ss(use_default_config=True)
  File "/src/dashboard/src/installer/steps.py", line 116, in setup_pipeline_in_ss
    api_key=api_key.key,
  File "/src/archivematicaCommon/lib/storageService.py", line 127, in create_pipeline
    response.raise_for_status()
  File "/usr/local/lib/python2.7/site-packages/requests/models.py", line 940, in raise_for_status
    raise HTTPError(http_error_msg, response=self)
requests.exceptions.HTTPError: 503 Server Error: Service Unavailable for url: http://archivematica-storage-service:8000/api/v2/pipeline/
make: *** [bootstrap-dashboard-db] Error 1

I can login to the am dashboard but it is not showing any transfer item.

Gaadek commented 4 years ago

Hi, I got the same kind of issue, but my error code is 404, not 503:

HTTPError: 404 Server Error: Service Unavailable for url: http://archivematica-storage-service:8000/api/v2/pipeline/

I ran again the command make bootstrap and despite the same error appearing in the log, the dashboard is available and seems functional (http://localhost:62080)

sevein commented 3 years ago

A 404 is normal, but that 503 shouldn't happen I believe. Is it still occurring? Let me know! Often I see this to be an issue in environments with less resources, e.g. not enough memory or running out of disk space.