Transfer browse errors [AM 1.13.2]

175 views
Skip to first unread message

Ranjit Khera

unread,
Dec 22, 2021, 11:25:16 AM12/22/21
to archivematica
Hi,

I've just updated our test instance of Archivematica to version 1.13.2 and I'm now getting issues starting transfers. After I select a transfer source from the drop down, browsing the tree doesn't work.

The dashboard.debug.log file shows this:
ERROR     2021-12-22 15:49:57  django.request:exception:handle_uncaught_exception:135:  Internal Server Error: /filesystem/children/location/7df649da-1d7a-49f1-8912-b9dd285b6448/
Traceback (most recent call last):
  File "/usr/share/archivematica/virtualenvs/archivematica/lib/python3.6/site-packages/django/core/handlers/exception.py", line 41, in inner
    response = get_response(request)
  File "/usr/share/archivematica/virtualenvs/archivematica/lib/python3.6/site-packages/django/core/handlers/base.py", line 187, in _get_response
    response = self.process_exception_by_middleware(e, request)
  File "/usr/share/archivematica/virtualenvs/archivematica/lib/python3.6/site-packages/django/core/handlers/base.py", line 185, in _get_response
    response = wrapped_callback(request, *callback_args, **callback_kwargs)
  File "/usr/share/archivematica/dashboard/components/filesystem_ajax/views.py", line 125, in directory_children_proxy_to_storage_server
    response = storage_service.browse_location(location_uuid, path)
  File "/usr/lib/archivematica/archivematicaCommon/storageService.py", line 276, in browse_location
    browse = response.json()
  File "/usr/share/archivematica/virtualenvs/archivematica/lib/python3.6/site-packages/requests/models.py", line 900, in json
    return complexjson.loads(self.text, **kwargs)
  File "/usr/lib64/python3.6/json/__init__.py", line 354, in loads
    return _default_decoder.decode(s)
  File "/usr/lib64/python3.6/json/decoder.py", line 339, in decode
    obj, end = self.raw_decode(s, idx=_w(s, 0).end())
  File "/usr/lib64/python3.6/json/decoder.py", line 357, in raw_decode
    raise JSONDecodeError("Expecting value", s, err.value) from None
json.decoder.JSONDecodeError: Expecting value: line 1 column 1 (char 0)

The storage_service_debug.log file shows this:
INFO      2021-12-22 15:49:52  locations.models.space:space:browse:275:  path: /var/archivematica/transfer/nextcloud/cro-transfer
DEBUG     2021-12-22 15:49:52  locations.models.space:space:browse:279:  AttributeError while browsing /var/archivematica/transfer/nextcloud/cro-transfer: AttributeError("'LocalFilesystem' object has no attribute 'browse'",)
DEBUG     2021-12-22 15:49:52  locations.models.space:space:browse:280:  Falling back to default browse local

I can't see any other errors in any other logs.

Any help would be greatly appreciated. Our instances are running on RHEL 7.

Ranjit.

Sean Kalynuk

unread,
Jan 17, 2022, 11:30:14 AM1/17/22
to archiv...@googlegroups.com

Hi Ranjit,

 

Although I don’t have a proper explanation yet, we encountered this problem after upgrading to 1.13.

 

In our case, the transfer directory was “/home/transfer”, and within that directory were symbolic links to specific users’ home directories. The fix was to change the transfer directory back to the default “/home”. Oddly, you could then browse into “transfer” starting at “/home” and not get the exception. So, for some strange reason, jumping directly to “/home/transfer” to browse wouldn’t work.

One thought is that the change to Python 3 may have new behaviours regarding filesystem navigation that did not occur with Archivematica 1.12.x and Python 2.

 

--

Sean

 

From: archiv...@googlegroups.com <archiv...@googlegroups.com> on behalf of Ranjit Khera <khera....@gmail.com>
Date: Wednesday, December 22, 2021 at 10:25 AM
To: archivematica <archiv...@googlegroups.com>
Subject: [archivematica] Transfer browse errors [AM 1.13.2]

Caution: This message was sent from outside the University of Manitoba.

--
You received this message because you are subscribed to the Google Groups "archivematica" group.
To unsubscribe from this group and stop receiving emails from it, send an email to archivematic...@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/archivematica/405e888e-4df2-4365-aa30-d9de21569e43n%40googlegroups.com.

Ranjit Khera

unread,
Jan 19, 2022, 11:13:20 AM1/19/22
to archivematica
Hi,

Thanks for the response.

After some further investigation, it  seems that the issue arises if you try and navigate via symlinks. If the destination of the symlink doesn't fall in the directory structure of the location then you get an error, e.g. if there is a symlink for /opt/am/tfr/x to /var/data/x and the location is /opt/am/tfr (or even /opt/am or /opt) it fails.

This is definitely a change in behaviour from the previous version.

Ranjit.

Douglas Cerna

unread,
Jan 19, 2022, 11:24:21 AM1/19/22
to archiv...@googlegroups.com
Hello,

This is being tracked in https://github.com/archivematica/Issues/issues/1515 which provides a workaround.

A fix has been merged to the Storage Service qa/0.x branch and should be available in the next Storage Service release.



--
Douglas Cerna,
Software Developer, Artefactual Systems Inc.
http://www.artefactual.com
Reply all
Reply to author
Forward
0 new messages