artefactual-labs / am

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

FPR server connection refused #54

Closed bruth closed 6 years ago

bruth commented 6 years ago

When running the make bootstrap-dashboard-db target, there is an external request made to FPR: https://fpr-qa.archivematica.org/fpr/api/v2/ and it appears to be refusing connections.

Full error below.

DEBUG     2018-05-03 15:55:16  archivematica.dashboard:models:create_user_agent:78:  Caught post_save signal from <class 'django.contrib.auth.models.User'> with instance <User: test>
DEBUG     2018-05-03 15:55:16  archivematica.dashboard:models:create_user_agent:85:  Agent: Archivematica user; Archivematica user pk: 1; username="test", first_name="", last_name=""; created: True
INFO      2018-05-03 15:55:16  archivematica.dashboard:steps:submit_fpr_agent:79:  FPR Server URL: https://fpr-qa.archivematica.org/fpr/api/v2/
INFO      2018-05-03 15:55:16  archivematica.dashboard:steps:download_fpr_rules:93:  FPR Server URL: https://fpr-qa.archivematica.org/fpr/api/v2/
maxLastUpdateAtStart 2000-01-01T00:00:00
resource: format
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 58, in handle
    download_fpr_rules()
  File "/src/dashboard/src/installer/steps.py", line 95, in download_fpr_rules
    resp['result'], resp['response'], error = fpr.getUpdates()
  File "/src/archivematicaCommon/lib/utilities/FPRClient/client.py", line 178, in getUpdates
    self.autoUpdateFPR()
  File "/src/archivematicaCommon/lib/utilities/FPRClient/client.py", line 152, in autoUpdateFPR
    for entry in each_record(resource, **kwargs):
  File "/src/archivematicaCommon/lib/utilities/FPRClient/getFromRestAPI.py", line 142, in each_record
    verify=verify, verbose=verbose)
  File "/src/archivematicaCommon/lib/utilities/FPRClient/getFromRestAPI.py", line 97, in _get_from_rest_api
    r = requests.get(resource_url, params=params, auth=auth, timeout=10, verify=verify)
  File "/usr/local/lib/python2.7/site-packages/requests/api.py", line 72, in get
    return request('get', url, params=params, **kwargs)
  File "/usr/local/lib/python2.7/site-packages/requests/api.py", line 58, in request
    return session.request(method=method, url=url, **kwargs)
  File "/usr/local/lib/python2.7/site-packages/requests/sessions.py", line 508, in request
    resp = self.send(prep, **send_kwargs)
  File "/usr/local/lib/python2.7/site-packages/requests/sessions.py", line 618, in send
    r = adapter.send(request, **kwargs)
  File "/usr/local/lib/python2.7/site-packages/requests/adapters.py", line 508, in send
    raise ConnectionError(e, request=request)
requests.exceptions.ConnectionError: HTTPSConnectionPool(host='fpr-qa.archivematica.org', port=443): Max retries exceeded with url: /fpr/api/v2/format/?limit=100&format=json (Caused by NewConnectionError('<urllib3.connection.VerifiedHTTPSConnection object at 0x7f506316dc10>: Failed to establish a new connection: [Errno 111] Connection refused',))
make: *** [bootstrap-dashboard-db] Error 1
ross-spencer commented 6 years ago

HI @bruth. Can I ask what version of Archivematica you are building against? - We made changes in 1.7 here: https://wiki.archivematica.org/Archivematica_1.7_and_Storage_Service_0.11_release_notes#Archivematica_decoupled_from_the_FPR_server but we might still need to address some of he old links in the source code if your version is the most recent version.

sevein commented 6 years ago

Hi @bruth. I think that this should be fixed now. The certificate wasn't renewed automatically as I expected - just a configuration problem in the machine hosting that application. It should be okay now. Thank you for your report!

sevein commented 6 years ago

@ross-spencer has mentioned that the problem persists with the solution I gave you.

If you check out the most recent version of the code (e.g. use git submodule update --init --recursive) the problem should disappear. At a minimum you want this PR to be included in the version of the code that you're running: https://github.com/artefactual/archivematica/pull/971.

An alternative is to update the value of FPR_URL to https://fpr.archivematica.org/fpr/api/v2/insettings/local.py`.

sevein commented 6 years ago

FYI I've just removed the fpr-qa.archivematica.org DNS record.