XCP-ng
    • Categories
    • Recent
    • Tags
    • Popular
    • Users
    • Groups
    • Register
    • Login

    s3 remote error: Could not find API configuration s3-2006-03-01

    Scheduled Pinned Locked Moved Xen Orchestra
    7 Posts 4 Posters 1.1k Views 1 Watching
    Loading More Posts
    • Oldest to Newest
    • Newest to Oldest
    • Most Votes
    Reply
    • Reply as topic
    Log in to reply
    This topic has been deleted. Only users with topic management privileges can see it.
    • M Offline
      mavoff
      last edited by

      Hi all,

      We're using XO from sources and recently I was reading the archives regarding the beta feature of using s3 as remote.

      I tried to add but I get this error:

      remote.test
      {
        "id": "faa61193-495c-4ec1-be84-8c64040dde5b"
      }
      {
        "message": "Could not find API configuration s3-2006-03-01",
        "code": "MODULE_NOT_FOUND",
        "requireStack": [
          "/opt/xen-orchestra/node_modules/aws-sdk/clients/s3.js",
          "/opt/xen-orchestra/node_modules/aws-sdk/clients/all.js",
          "/opt/xen-orchestra/node_modules/aws-sdk/lib/aws.js",
          "/opt/xen-orchestra/node_modules/@sullux/aws-sdk/index.js",
          "/opt/xen-orchestra/@xen-orchestra/fs/dist/s3.js",
          "/opt/xen-orchestra/@xen-orchestra/fs/dist/index.js"
        ],
        "time": "2022-04-01T12:13:38.065Z",
        "originalError": {
          "code": "MODULE_NOT_FOUND",
          "requireStack": [
            "/opt/xen-orchestra/node_modules/aws-sdk/clients/s3.js",
            "/opt/xen-orchestra/node_modules/aws-sdk/clients/all.js",
            "/opt/xen-orchestra/node_modules/aws-sdk/lib/aws.js",
            "/opt/xen-orchestra/node_modules/@sullux/aws-sdk/index.js",
            "/opt/xen-orchestra/@xen-orchestra/fs/dist/s3.js",
            "/opt/xen-orchestra/@xen-orchestra/fs/dist/index.js"
          ],
          "message": "Cannot find module '../apis/s3-2006-03-01.min.json'
      Require stack:
      - /opt/xen-orchestra/node_modules/aws-sdk/clients/s3.js
      - /opt/xen-orchestra/node_modules/aws-sdk/clients/all.js
      - /opt/xen-orchestra/node_modules/aws-sdk/lib/aws.js
      - /opt/xen-orchestra/node_modules/@sullux/aws-sdk/index.js
      - /opt/xen-orchestra/@xen-orchestra/fs/dist/s3.js
      - /opt/xen-orchestra/@xen-orchestra/fs/dist/index.js"
        },
        "name": "MODULE_NOT_FOUND",
        "stack": "MODULE_NOT_FOUND: Could not find API configuration s3-2006-03-01
          at Function.Module._resolveFilename (node:internal/modules/cjs/loader:933:15)
          at Function.Module._load (node:internal/modules/cjs/loader:778:27)
          at Module.require (node:internal/modules/cjs/loader:1005:19)
          at require (node:internal/modules/cjs/helpers:102:18)
          at Object.get [as 2006-03-01] (/opt/xen-orchestra/node_modules/aws-sdk/clients/s3.js:11:17)
          at Object.apiLoader (/opt/xen-orchestra/node_modules/aws-sdk/lib/api_loader.js:5:33)
          at Function.defineServiceApi (/opt/xen-orchestra/node_modules/aws-sdk/lib/service.js:795:22)
          at features.constructor.getLatestServiceClass (/opt/xen-orchestra/node_modules/aws-sdk/lib/service.js:122:19)
          at features.constructor.loadServiceClass (/opt/xen-orchestra/node_modules/aws-sdk/lib/service.js:112:19)
          at features.constructor.Service [as constructor] (/opt/xen-orchestra/node_modules/aws-sdk/lib/service.js:47:29)
          at new features.constructor (/opt/xen-orchestra/node_modules/aws-sdk/lib/util.js:629:24)
          at construct (/opt/xen-orchestra/node_modules/@sullux/aws-sdk/index.js:241:13)
          at Object.NodeHttpHandler [as s3] (/opt/xen-orchestra/node_modules/@sullux/aws-sdk/index.js:246:26)
          at new S3Handler (/opt/xen-orchestra/@xen-orchestra/fs/src/s3.js:66:27)
          at getHandler (/opt/xen-orchestra/@xen-orchestra/fs/src/index.js:28:10)
          at _class2.getRemoteHandler (file:///opt/xen-orchestra/packages/xo-server/src/xo-mixins/remotes.mjs:73:17)
          at _class2.testRemote (file:///opt/xen-orchestra/packages/xo-server/src/xo-mixins/remotes.mjs:97:11)
          at Api.callApiMethod (file:///opt/xen-orchestra/packages/xo-server/src/xo-mixins/api.mjs:307:20)"
      } 
      

      XO is up to date
      xo-server 5.89.0 xo-web 5.95.0

      Thank you

      florentF 1 Reply Last reply Reply Quote 0
      • DanpD Offline
        Danp Pro Support Team
        last edited by

        Hi @maverick,

        I'm not sure if it will have any effect, but you should update to the latest source and then test it again.

        Dan

        1 Reply Last reply Reply Quote 0
        • olivierlambertO Offline
          olivierlambert Vates 🪐 Co-Founder CEO
          last edited by

          Does it ring any bell @florent ?

          1 Reply Last reply Reply Quote 0
          • florentF Offline
            florent Vates 🪐 XO Team @mavoff
            last edited by

            @maverick Hi maverick, did you also update the packages ? We did move from aws-sdk2 to aws sdk 3 recently

            M 1 Reply Last reply Reply Quote 0
            • M Offline
              mavoff
              last edited by

              Hi guys thank you for the feedback, but I guess I'm a bit lost here.

              So usually when I update XO I go to the xen-orchestra folder and do:

              git checkout .
              git pull --ff-only
              yarn
              yarn build
              

              The branch I'm in:

              # git rev-parse --abbrev-ref HEAD
              master
              

              How should I update the packages? thank you.

              1 Reply Last reply Reply Quote 0
              • M Offline
                mavoff @florent
                last edited by

                @florent this is what I have

                $ ls -la node_modules/ | grep aws
                drwxrwxr-x.    3 root root    121 Dec  8 14:04 aws4
                drwxr-xr-x.   10 root root    153 Mar 31 14:46 @aws-crypto
                drwxr-xr-x.   78 root root   4096 Mar 31 14:46 @aws-sdk
                drwxrwxr-x.    2 root root     74 Dec  8 14:04 aws-sign2
                
                1 Reply Last reply Reply Quote 0
                • M Offline
                  mavoff
                  last edited by

                  Ok so i created a symlink from @aws-sdk to was-sdk and now it works.
                  as the error was looking for node_modules/aws-sdk and not node_modules/@aws-sdk

                  1 Reply Last reply Reply Quote 0

                  Hello! It looks like you're interested in this conversation, but you don't have an account yet.

                  Getting fed up of having to scroll through the same posts each visit? When you register for an account, you'll always come back to exactly where you were before, and choose to be notified of new replies (either via email, or push notification). You'll also be able to save bookmarks and upvote posts to show your appreciation to other community members.

                  With your input, this post could be even better 💗

                  Register Login
                  • First post
                    Last post