Skip to content

"No bytes were copied", derivative generation broken #1896

@kayakr

Description

@kayakr

Happening on a local development VM (vagrant, Virtualbox, playbook via Ansible) after updating to PHP 7.4 and Drupal 9.2.5.
When adding new content, e.g. PDF as Digital document, Drupal watchdog reports:
Symfony\Component\HttpKernel\Exception\HttpException: No bytes were copied to public://2021-09/50355-Extracted Text.txt in Drupal\islandora\MediaSource\MediaSourceService->updateFile() (line 206 of /var/www/html/drupal/web/modules/contrib/islandora/src/MediaSource/MediaSourceService.php).

Previously encountered by Eli Zoller, and Jordan Dukart, discussed at https://islandora.slack.com/archives/CM5PPAV28/p1619194482331900

I encountered it on a different instance but it somehow resolved itself. I want to ensure this is logged as an issue since it has been encountered by three parties so far.

In this case, I can revert the VM to PHP 7.2, Drupal 8.9.18 and derivatives are ok. So it's something attributable or triggered by changes to PHP version, PHP config, or Drupal core and islandora* code changes (not microservices, or camel, etc. AFAICT)

The error occurs when the derivative file is sent to Drupal as an HTTP PUT. This is handled by islandora/src/MediaSource/MediaSourceService.php:

  • MediaSourceService->putToNode()

  • MediaSourceService->updateFile()

    • $content_length = stream_copy_to_stream($resource, $destination);
      • where $resource is Resource from $request->getContent(TRUE) and $destination is Resource from fopen($uri, 'wb');
  • sudo tail -f -n100 /opt/karaf/data/log/karaf.log
    claw.dev:80 127.0.0.1 - - [08/Sep/2021:20:47:30 +0000] "PUT /node/50355/media/extracted_text/500 HTTP/1.1" 400 79898 "-" "Apache-HttpClient/4.5.3 (Java/1.8.0_292)"

Metadata

Metadata

Assignees

No one assigned

    Labels

    StaleSubject: Ansible PlaybookRelated to the maintenance and upkeep associated with an Ansible Playbook for Islandora. Always alsoSubject: Docker ISLERelated to the maintenance and upkeep associated with ISLE’s docker image.Subject:Deploymentrelated to deployment of Islandora. Usually accompanied by the deployment flavour (Ansible/docker)Type: questionasks for support (asks a question)

    Type

    No type

    Projects

    Status

    Done

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions