tzmfreedom / fluent-plugin-sforce

Salesforce input plugin for Fluentd data collector
Apache License 2.0
3 stars 1 forks source link

[error]: #0 unexpected error error_class=CookieJar::InvalidCookieError error="Domain is inappropriate based on request URI hostname" #3

Open Mattue opened 3 years ago

Mattue commented 3 years ago

Looks like a have made progress with #2 but don't want to close it before full understanding what is happening

I have managed to log into SalesForce but now getting whit error on start of fluentd

[error]: #0 unexpected error error_class=CookieJar::InvalidCookieError error="Domain is inappropriate based on request URI hostname"

Environment: cat /etc/os-release PRETTY_NAME="Debian GNU/Linux 10 (buster)" NAME="Debian GNU/Linux" VERSION_ID="10" VERSION="10 (buster)" VERSION_CODENAME=buster ID=debian HOME_URL="https://www.debian.org/" SUPPORT_URL="https://www.debian.org/support" BUG_REPORT_URL="https://bugs.debian.org/"

gem --version 2.7.6.2

gem list --local fluent-plugin-sforce (0.0.6) fluentd (1.11.5)

full log:

root@mattue-VirtualBox:/etc/td-agent# td-agent
2020-12-03 22:53:57 +0300 [info]: parsing config file is succeeded path="/etc/td-agent/td-agent.conf"
2020-12-03 22:53:58 +0300 [info]: gem 'fluent-plugin-elasticsearch' version '4.2.2'
2020-12-03 22:53:58 +0300 [info]: gem 'fluent-plugin-elasticsearch' version '4.1.1'
2020-12-03 22:53:58 +0300 [info]: gem 'fluent-plugin-kafka' version '0.15.2'
2020-12-03 22:53:58 +0300 [info]: gem 'fluent-plugin-kafka' version '0.14.1'
2020-12-03 22:53:58 +0300 [info]: gem 'fluent-plugin-prometheus' version '1.8.5'
2020-12-03 22:53:58 +0300 [info]: gem 'fluent-plugin-prometheus' version '1.8.2'
2020-12-03 22:53:58 +0300 [info]: gem 'fluent-plugin-prometheus_pushgateway' version '0.0.2'
2020-12-03 22:53:58 +0300 [info]: gem 'fluent-plugin-record-modifier' version '2.1.0'
2020-12-03 22:53:58 +0300 [info]: gem 'fluent-plugin-rewrite-tag-filter' version '2.3.0'
2020-12-03 22:53:58 +0300 [info]: gem 'fluent-plugin-s3' version '1.4.0'
2020-12-03 22:53:58 +0300 [info]: gem 'fluent-plugin-sforce' version '0.0.6'
2020-12-03 22:53:58 +0300 [info]: gem 'fluent-plugin-systemd' version '1.0.2'
2020-12-03 22:53:58 +0300 [info]: gem 'fluent-plugin-td' version '1.1.0'
2020-12-03 22:53:58 +0300 [info]: gem 'fluent-plugin-webhdfs' version '1.3.2'
2020-12-03 22:53:58 +0300 [info]: gem 'fluent-plugin-webhdfs' version '1.2.5'
2020-12-03 22:53:58 +0300 [info]: gem 'fluentd' version '1.11.5'
2020-12-03 22:53:58 +0300 [info]: gem 'fluentd' version '1.11.2'
2020-12-03 22:53:58 +0300 [info]: using configuration file: <ROOT>
  <source>
    tag "test.access"
    @type sforce
    username "test-1bb1vn3nhn1o@example.com"
    password "_)^*3RL9p2PJaIWAb5UKuTqxLZjr0EZNSQ"
    topic "/event/Log__e"
    version "49.0"
    login_endpoint "test.salesforce.com"
  </source>
</ROOT>
2020-12-03 22:53:58 +0300 [info]: starting fluentd-1.11.5 pid=22982 ruby="2.7.1"
2020-12-03 22:53:58 +0300 [info]: spawn command to main:  cmdline=["/opt/td-agent/bin/ruby", "-Eascii-8bit:ascii-8bit", "/usr/sbin/td-agent", "--under-supervisor"]
2020-12-03 22:54:00 +0300 [info]: adding source type="sforce"
2020-12-03 22:54:01 +0300 [info]: #0 starting fluentd worker pid=22987 ppid=22982 worker=0
2020-12-03 22:54:01 +0300 [info]: #0 login is successful. instance_url = 'https://enterprise-enterprise-16922-dev-ed.cs128.my.salesforce.com'
2020-12-03 22:54:01 +0300 [info]: #0 suscribe: /event/Log__e
2020-12-03 22:54:02 +0300 [error]: #0 unexpected error error_class=CookieJar::InvalidCookieError error="Domain is inappropriate based on request URI hostname"
  2020-12-03 22:54:02 +0300 [error]: #0 /opt/td-agent/lib/ruby/gems/2.7.0/gems/cookiejar-0.3.3/lib/cookiejar/cookie_validation.rb:276:in `validate_cookie'
  2020-12-03 22:54:02 +0300 [error]: #0 /opt/td-agent/lib/ruby/gems/2.7.0/gems/cookiejar-0.3.3/lib/cookiejar/cookie.rb:96:in `from_set_cookie'
  2020-12-03 22:54:02 +0300 [error]: #0 /opt/td-agent/lib/ruby/gems/2.7.0/gems/cookiejar-0.3.3/lib/cookiejar/jar.rb:61:in `block in set_cookie'
  2020-12-03 22:54:02 +0300 [error]: #0 /opt/td-agent/lib/ruby/gems/2.7.0/gems/cookiejar-0.3.3/lib/cookiejar/jar.rb:60:in `each'
  2020-12-03 22:54:02 +0300 [error]: #0 /opt/td-agent/lib/ruby/gems/2.7.0/gems/cookiejar-0.3.3/lib/cookiejar/jar.rb:60:in `set_cookie'
  2020-12-03 22:54:02 +0300 [error]: #0 /opt/td-agent/lib/ruby/gems/2.7.0/gems/faye-1.4.0/lib/faye/transport/transport.rb:124:in `block in store_cookies'
  2020-12-03 22:54:02 +0300 [error]: #0 /opt/td-agent/lib/ruby/gems/2.7.0/gems/faye-1.4.0/lib/faye/transport/transport.rb:123:in `each'
  2020-12-03 22:54:02 +0300 [error]: #0 /opt/td-agent/lib/ruby/gems/2.7.0/gems/faye-1.4.0/lib/faye/transport/transport.rb:123:in `store_cookies'
  2020-12-03 22:54:02 +0300 [error]: #0 /opt/td-agent/lib/ruby/gems/2.7.0/gems/faye-1.4.0/lib/faye/transport/http.rb:19:in `block in request'
  2020-12-03 22:54:02 +0300 [error]: #0 /opt/td-agent/lib/ruby/gems/2.7.0/gems/eventmachine-1.2.7/lib/em/deferrable.rb:151:in `set_deferred_status'
  2020-12-03 22:54:02 +0300 [error]: #0 /opt/td-agent/lib/ruby/gems/2.7.0/gems/eventmachine-1.2.7/lib/em/deferrable.rb:191:in `succeed'
  2020-12-03 22:54:02 +0300 [error]: #0 /opt/td-agent/lib/ruby/gems/2.7.0/gems/em-http-request-1.1.7/lib/em-http/client.rb:113:in `unbind'
  2020-12-03 22:54:02 +0300 [error]: #0 /opt/td-agent/lib/ruby/gems/2.7.0/gems/em-http-request-1.1.7/lib/em-http/client.rb:71:in `on_request_complete'
  2020-12-03 22:54:02 +0300 [error]: #0 /opt/td-agent/lib/ruby/gems/2.7.0/gems/em-http-request-1.1.7/lib/em-http/http_connection.rb:204:in `block in post_init'
  2020-12-03 22:54:02 +0300 [error]: #0 /opt/td-agent/lib/ruby/gems/2.7.0/gems/em-http-request-1.1.7/lib/em-http/http_connection.rb:219:in `<<'
  2020-12-03 22:54:02 +0300 [error]: #0 /opt/td-agent/lib/ruby/gems/2.7.0/gems/em-http-request-1.1.7/lib/em-http/http_connection.rb:219:in `receive_data'
  2020-12-03 22:54:02 +0300 [error]: #0 /opt/td-agent/lib/ruby/gems/2.7.0/gems/em-http-request-1.1.7/lib/em-http/http_connection.rb:26:in `receive_data'
  2020-12-03 22:54:02 +0300 [error]: #0 /opt/td-agent/lib/ruby/gems/2.7.0/gems/eventmachine-1.2.7/lib/eventmachine.rb:195:in `run_machine'
  2020-12-03 22:54:02 +0300 [error]: #0 /opt/td-agent/lib/ruby/gems/2.7.0/gems/eventmachine-1.2.7/lib/eventmachine.rb:195:in `run'
  2020-12-03 22:54:02 +0300 [error]: #0 /opt/td-agent/lib/ruby/gems/2.7.0/gems/fluent-plugin-sforce-0.0.6/lib/fluent/plugin/in_sforce.rb:57:in `start'
  2020-12-03 22:54:02 +0300 [error]: #0 /opt/td-agent/lib/ruby/gems/2.7.0/gems/fluentd-1.11.5/lib/fluent/root_agent.rb:200:in `block in start'
  2020-12-03 22:54:02 +0300 [error]: #0 /opt/td-agent/lib/ruby/gems/2.7.0/gems/fluentd-1.11.5/lib/fluent/root_agent.rb:189:in `block (2 levels) in lifecycle'
  2020-12-03 22:54:02 +0300 [error]: #0 /opt/td-agent/lib/ruby/gems/2.7.0/gems/fluentd-1.11.5/lib/fluent/root_agent.rb:188:in `each'
  2020-12-03 22:54:02 +0300 [error]: #0 /opt/td-agent/lib/ruby/gems/2.7.0/gems/fluentd-1.11.5/lib/fluent/root_agent.rb:188:in `block in lifecycle'
  2020-12-03 22:54:02 +0300 [error]: #0 /opt/td-agent/lib/ruby/gems/2.7.0/gems/fluentd-1.11.5/lib/fluent/root_agent.rb:175:in `each'
  2020-12-03 22:54:02 +0300 [error]: #0 /opt/td-agent/lib/ruby/gems/2.7.0/gems/fluentd-1.11.5/lib/fluent/root_agent.rb:175:in `lifecycle'
  2020-12-03 22:54:02 +0300 [error]: #0 /opt/td-agent/lib/ruby/gems/2.7.0/gems/fluentd-1.11.5/lib/fluent/root_agent.rb:199:in `start'
  2020-12-03 22:54:02 +0300 [error]: #0 /opt/td-agent/lib/ruby/gems/2.7.0/gems/fluentd-1.11.5/lib/fluent/engine.rb:248:in `start'
  2020-12-03 22:54:02 +0300 [error]: #0 /opt/td-agent/lib/ruby/gems/2.7.0/gems/fluentd-1.11.5/lib/fluent/engine.rb:147:in `run'
  2020-12-03 22:54:02 +0300 [error]: #0 /opt/td-agent/lib/ruby/gems/2.7.0/gems/fluentd-1.11.5/lib/fluent/supervisor.rb:607:in `block in run_worker'
  2020-12-03 22:54:02 +0300 [error]: #0 /opt/td-agent/lib/ruby/gems/2.7.0/gems/fluentd-1.11.5/lib/fluent/supervisor.rb:845:in `main_process'
  2020-12-03 22:54:02 +0300 [error]: #0 /opt/td-agent/lib/ruby/gems/2.7.0/gems/fluentd-1.11.5/lib/fluent/supervisor.rb:598:in `run_worker'
  2020-12-03 22:54:02 +0300 [error]: #0 /opt/td-agent/lib/ruby/gems/2.7.0/gems/fluentd-1.11.5/lib/fluent/command/fluentd.rb:361:in `<top (required)>'
  2020-12-03 22:54:02 +0300 [error]: #0 /opt/td-agent/lib/ruby/2.7.0/rubygems/core_ext/kernel_require.rb:72:in `require'
  2020-12-03 22:54:02 +0300 [error]: #0 /opt/td-agent/lib/ruby/2.7.0/rubygems/core_ext/kernel_require.rb:72:in `require'
  2020-12-03 22:54:02 +0300 [error]: #0 /opt/td-agent/lib/ruby/gems/2.7.0/gems/fluentd-1.11.5/bin/fluentd:8:in `<top (required)>'
  2020-12-03 22:54:02 +0300 [error]: #0 /opt/td-agent/bin/fluentd:23:in `load'
  2020-12-03 22:54:02 +0300 [error]: #0 /opt/td-agent/bin/fluentd:23:in `<top (required)>'
  2020-12-03 22:54:02 +0300 [error]: #0 /usr/sbin/td-agent:7:in `load'
  2020-12-03 22:54:02 +0300 [error]: #0 /usr/sbin/td-agent:7:in `<main>'
2020-12-03 22:54:02 +0300 [error]: #0 unexpected error error_class=CookieJar::InvalidCookieError error="Domain is inappropriate based on request URI hostname"
  2020-12-03 22:54:02 +0300 [error]: #0 suppressed same stacktrace
2020-12-03 22:54:02 +0300 [info]: Worker 0 finished unexpectedly with status 1
Mattue commented 3 years ago

I have fixed it by whiting my own in_sforce plugin based on this source code plus installing fixed ruby gem

sudo gem install specific_install
sudo gem specific_install https://github.com/MissionCapital/cookiejar.git

maybe will work with this plugin also.