aliyun / elasticsearch-repository-oss

75 stars 35 forks source link

"Failed to check if blob [master.dat] exists" when create repository #14

Open VanessaLi917 opened 5 years ago

VanessaLi917 commented 5 years ago

I used to running elasticsearch 6.3.2 with elasticsearch-repository-oss 5.5.3 version(Updated the elasticsearch_version to 6.3.2 on config file ) and recently upgraded elasticsearch from 6.3.2 to 6.7.0 and want to use elasticsearch-repository-oss 6.7.0 version.

I'm using elasticsearch docker image and elasticsearch 6.7.0 using jdk 12.

With the released elasticsearch-repository-oss 6.7.0 version, get java.lang.ClassNotFoundException: javax.xml.bind.JAXBException as javax.xml.bind no longer available on jdk 12.

Add following dependency to pom.xml can avoid the error.

        <dependency>
            <groupId>javax.xml.bind</groupId>
            <artifactId>jaxb-api</artifactId>
            <version>2.3.1</version>
        </dependency>

But after using "mvn clean package " to build the elasticsearch-reposiotry-oss, I couldn't add repository and then create snapshot. The access key and oss bucket works well before.

PUT _snapshot/test/
{
  "type" : "oss",
  "settings" : {
    "bucket" : "test-backup",
    "base_path" : "elasticsearch/aliyun/test",
    "chunk_size" : "100mb",
    "endpoint" : "oss-cn-shanghai-internal.aliyuncs.com",
    "region" : "oss-cn-shanghai",
    "compress" : "true",
    "access_key_id": "xxxxxxxxxx",
    "secret_access_key":"xxxxxxxxx"
  }
}
{
  "error": {
    "root_cause": [
      {
        "type": "o_s_s_exception",
        "reason": "o_s_s_exception: Failed to parse the response result.\n[ErrorCode]: InvalidResponse\n[RequestId]: 5DBAA1ETV852D223331B5736B\n[HostId]: null\n[ResponseError]:\n<?xml version=\"1.0\" encoding=\"UTF-8\"?>\n<Error>\n  <Code>NoSuchKey</Code>\n  <Message>The specified key does not exist.</Message>\n  <RequestId>5DBAA1ETV852D223331B5736B</RequestId>\n  <HostId>test-backup.oss-cn-shanghai-internal.aliyuncs.com</HostId>\n  <Key>elasticsearch/aliyun/test/tests-wcRX5QzZRNqW2nZ2o-npJA/master.dat</Key>\n</Error>\n"
      }
    ],
    "type": "blob_store_exception",
    "reason": "Failed to check if blob [master.dat] exists",
    "caused_by": {
      "type": "o_s_s_exception",
      "reason": "o_s_s_exception: Failed to parse the response result.\n[ErrorCode]: InvalidResponse\n[RequestId]: 5DBAA1ETV852D223331B5736B\n[HostId]: null\n[ResponseError]:\n<?xml version=\"1.0\" encoding=\"UTF-8\"?>\n<Error>\n  <Code>NoSuchKey</Code>\n  <Message>The specified key does not exist.</Message>\n  <RequestId>5DBAA1ETV852D223331B5736B</RequestId>\n  <HostId>test-backup.oss-cn-shanghai-internal.aliyuncs.com</HostId>\n  <Key>elasticsearch/aliyun/test/tests-wcRX5QzZRNqW2nZ2o-npJA/master.dat</Key>\n</Error>\n"
    }
  },
  "status": 500
}

Anyone has an idea why this happen?

thinalai commented 4 years ago

Alter endpoint to <bucket>.oss-cn-shanghai-internal.aliyuncs.com

oldthreefeng commented 3 years ago

Alter endpoint to <bucket>.oss-cn-shanghai-internal.aliyuncs.com

do not fix any more