Git Product home page Git Product logo

Comments (8)

namishelex01 avatar namishelex01 commented on July 18, 2024 3

I got the same error for different signature versions. It was a silly mistake where I put extra '/' at the end of URL 'https://search-your-domain-cvhaefuivhsduinhrciudgmvr.your-aws-region-1.es.amazonaws.com'.

from fluent-plugin-aws-elasticsearch-service.

AndreLouisCaron avatar AndreLouisCaron commented on July 18, 2024 1

I was also bit by this bug sometime ago. There is a comment about this in the "troubleshooting" section in the README. It would honestly be very cool if the plugin could detect and account for it automatically (e.g. by removing the trailing slash, if present). Semantically, http://es.example.org and http://es.example.org/ are the same, so users don't expect this to cause an error.

from fluent-plugin-aws-elasticsearch-service.

braybaut avatar braybaut commented on July 18, 2024

some update about this?

from fluent-plugin-aws-elasticsearch-service.

cosmo0920 avatar cosmo0920 commented on July 18, 2024

I couldn't get reproducing this issue with:

  • Elasticsearch version 7.1
% bundle                                                                                                             (git)[master][Fail]
Fetching gem metadata from https://rubygems.org/.........
Fetching gem metadata from https://rubygems.org/.
Resolving dependencies...
Using rake 10.5.0
Using aws-eventstream 1.0.1
Using aws-partitions 1.141.0
Using aws-sigv4 1.0.3
Using jmespath 1.4.0
Using aws-sdk-core 3.46.2
Using bundler 1.17.2
Using cool.io 1.5.3
Using diff-lcs 1.3
Using dig_rb 1.0.1
Using multi_json 1.13.1
Using elasticsearch-api 6.1.0
Using multipart-post 2.0.0
Using faraday 0.15.4
Using elasticsearch-transport 6.1.0
Using elasticsearch 6.1.0
Using excon 0.62.0
Fetching faraday_middleware-aws-sigv4 0.3.0 (was 0.2.4)
Installing faraday_middleware-aws-sigv4 0.3.0 (was 0.2.4)
Using http_parser.rb 0.6.0
Using msgpack 1.2.7
Using sigdump 0.2.4
Using serverengine 2.1.0
Using strptime 0.2.3
Using thread_safe 0.3.6
Using tzinfo 1.2.5
Using tzinfo-data 1.2018.9
Using yajl-ruby 1.4.1
Using fluentd 1.4.0
Using fluent-plugin-elasticsearch 3.3.0
Using fluent-plugin-aws-elasticsearch-service 2.3.0 (was 2.0.1) from source at `.`
Using power_assert 1.1.3
Using rspec-support 3.8.0
Using rspec-core 3.8.0
Using rspec-expectations 3.8.2
Using rspec-mocks 3.8.0
Using rspec 3.8.0
Using test-unit 3.3.0
Bundle complete! 8 Gemfile dependencies, 37 gems now installed.
Bundled gems are installed into `./vendor/bundle`
  <source>
    @type forward
    port 24225
  </source>
  <filter **>
    @type stdout
  </filter>
  <match test.**>
    @type copy
    <store>
      @type "stdout"
    </store>
    <store>
      @type "aws-elasticsearch-service"
      @log_level "info"
      with_transporter_log true
      type_name "_doc"
      logstash_format true
      include_tag_key true
      <buffer>
        flush_interval 1s
      </buffer>
      <endpoint>
        url "https://search-your-domain-cvhaefuivhsduinhrciudgmvr.your-aws-region-1.es.amazonaws.com"
        region "us-east-1"
        assume_role_arn "arn:aws:es:your-aws-region-1:123456789000:domain/yourdomain"
        assume_role_session_name "fluentd"
        access_key_id "secretstring"
        secret_access_key xxxxxx
      </endpoint>
    </store>
  </match>

can bulk insert:

2020-01-28 16:12:51 +0900 [info]: #0 POST https://search-your-domain-cvhaefuivhsduinhrciudgmvr.your-aws-region-1.es.amazonaws.com:443/_bulk [status:200, request:0.716s, query:0.007s]

Access policy is:

{
  "Version": "2012-10-17",
  "Statement": [
    {
      "Effect": "Allow",
      "Principal": {
        "AWS": "arn:aws:iam::123456789000:user/fluentd-testing"
      },
      "Action": "es:*",
      "Resource": "arn:aws:es:your-aws-region-1:123456789000:domain/yourdomain/*"
    }
  ]
}

from fluent-plugin-aws-elasticsearch-service.

cosmo0920 avatar cosmo0920 commented on July 18, 2024

Hmm..., we should raise error or make warning log when specifying trailing slash....

from fluent-plugin-aws-elasticsearch-service.

cosmo0920 avatar cosmo0920 commented on July 18, 2024

Oh, thanks for the detailed information.
I'll consider to display warn or error for tailing slash("/").

from fluent-plugin-aws-elasticsearch-service.

cosmo0920 avatar cosmo0920 commented on July 18, 2024

I'd registered a fix to handle this issue: #67

from fluent-plugin-aws-elasticsearch-service.

AndreLouisCaron avatar AndreLouisCaron commented on July 18, 2024

Thanks a lot for the fix!

from fluent-plugin-aws-elasticsearch-service.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.