Uploaded image for project: 'eZ Publish / Platform'
  1. eZ Publish / Platform
  2. EZP-27553

Error when creating images/files/videos in cluster environment

    Details

    • Type: Bug Bug
    • Status: Closed
    • Priority: High High
    • Resolution: Fixed
    • Affects Version/s: 1.7.3, 1.9.1, 1.7.4-rc, 1.10.0-rc1
    • Fix Version/s: QA tracked issues, 1.7.4, 1.10.0
    • Labels:
    • Environment:

      Description

      When creating any image|file|media, a An error occurred while publishing the draft notification is raised when we press the publish button.
      There is no error in apache log.

      The response error is

      {"ErrorMessage":{"_media-type":"application\/vnd.ez.api.ErrorMessage+json","errorCode":406,"errorMessage"
      :"Not Acceptable","errorDescription":"Argument '$binaryFileCreateStruct' is invalid: Property 'mtime'
       must be a DateTime"}}
      

      This issue does not happen if the installation is not configured for cluster environment

      Nevertheless, despite the object not being created in ezplatform, the image/file/video is created in the shared $mnt folder.

      Doing exactly the same cluster configuration and sequence of steps in ezplatform 1.9.1, I don't have any of these problems, so the issue seems to be specific to 1.10.0.

      Steps to reproduce
      • Configure your environment to cluster accordingly cluster setup
      • Login into admin
      • Create one image or file
      • Publish it

      Just in case, this is my ezplatform.yml

      ezpublish:
          # Repositories configuration, setup default repository to support solr if enabled
          repositories:
              default:
                  storage: ~
                  search:
                      engine: %search_engine%
                      connection: default
       
          # Siteaccess configuration, with one siteaccess per default
          siteaccess:
              list: [site]
              groups:
                  site_group: [site]
              default_siteaccess: site
              match:
                  URIElement: 1
       
          # System settings, grouped by siteaccess and/or siteaccess group
          http_cache:
              # As of 5.4 only use "http"
              # "single_http" and "multiple_http" are deprecated but will still work.
              purge_type: http
          system:
              default:
                  io:
                      metadata_handler: dfs
                      binarydata_handler: nfs
                      url_prefix: "storage"
              site_group:
                  # Pool to use for cache, needs to be differant per repository (database).
                  cache_pool_name: '%cache_pool%'
                  # These reflect the current installers, complete installation before you change them. For changing var_dir
                  # it is recommended to install clean, then change setting before you start adding binary content, otherwise you'll
                  # need to manually modify your database data to reflect this to avoid exceptions.
                  var_dir: var/site
                  # System languages. Note that by default, content, content types, and other data are in eng-GB locale,
                  # so removing eng-GB from this list may lead to errors or content not being shown, unless you change
                  # all eng-GB data to other locales first.
                  languages: [eng-GB]
                  http_cache:
                      # Fill in your Varnish server(s) address(es).
                      purge_servers: [http://192.168.2.201:6081]
                  session:
                      name: ~
       
       
       
      # new doctrine connection for the dfs legacy_dfs_cluster metadata handler.
      doctrine:
          dbal:
              connections:
                  dfs:
                      driver: pdo_mysql
                      host: 10.0.5.4
                      port: 3306
                      dbname: ezplatform
                      user: ezp
                      password: "ezp"
                      charset: UTF8
       
      # declare the handlers
      ez_io:
          binarydata_handlers:
              nfs:
                  flysystem:
                      adapter: nfs_adapter
          metadata_handlers:
              dfs:
                  legacy_dfs_cluster:
                      connection: doctrine.dbal.dfs_connection
       
      oneup_flysystem:
          adapters:
              nfs_adapter:
                  local:
                      # The last part, $var_dir$/$storage_dir$, is required for legacy compatibility
                      directory: "/mnt/ezdfs/$var_dir$/$storage_dir$"
       
      stash:
          caches:
              default:
                  drivers: [ Memcache ]
                  inMemory: true
                  registerDoctrineAdapter: false
                  Memcache:
                      prefix_key: ezdemo_
                      retry_timeout: 1
                      servers:
                          -
                              server: 10.0.5.2
                              port: 11211
                          -
                              server: 10.0.5.3
                              port: 11211
      

        Issue Links

          Activity

          Show
          Gunnstein Lye added a comment - PR: https://github.com/ezsystems/ezpublish-kernel/pull/2033
          Hide
          Bertrand Dunogier added a comment -

          Does anybod have the stacktrace for the error ? You should get it in dev environment.

          Show
          Bertrand Dunogier added a comment - Does anybod have the stacktrace for the error ? You should get it in dev environment.
          Hide
          Paulo Nunes (Inactive) added a comment -

          QA Verified.
          The PR solves the problem

          Show
          Paulo Nunes (Inactive) added a comment - QA Verified. The PR solves the problem
          Hide
          Gunnstein Lye added a comment -

          Follow-up for adding test: https://jira.ez.no/browse/EZP-27555

          Show
          Gunnstein Lye added a comment - Follow-up for adding test: https://jira.ez.no/browse/EZP-27555
          Show
          Gunnstein Lye added a comment - - edited Merged (master, v6.10.0-rc3, 6.9.2): https://github.com/ezsystems/ezpublish-kernel/commit/38e1ad9c8f4b32eca809e709f5b5f95881b6ba18 Backport to 6.7 branch (6.7.4) as that was missing: https://github.com/ezsystems/ezpublish-kernel/commit/8d5066b56241dce06824598bbd0e8c96558f8220
          Hide
          Paulo Nunes (Inactive) added a comment -

          QA Approved

          Show
          Paulo Nunes (Inactive) added a comment - QA Approved

            People

            • Assignee:
              Unassigned
              Reporter:
              Paulo Nunes (Inactive)
            • Votes:
              0 Vote for this issue
              Watchers:
              3 Start watching this issue

              Dates

              • Created:
                Updated:
                Resolved: