Error while installing elasticsearch license

Recently I tried to install elastic search license for the version 5.6.8.

The error I am seeing is

Curl I ran: curl -XPUT -u elastic 'http://es-d3-logs.int.stage.tmocce.com:9200/ _xpack/license' -H "Content-Type: application/json" -d @license.json

I have replaced the downloaded JSON @license.json place.

Can someone help me.?

Welcome!

Please don't post images of text as they are hard to read, may not display correctly for everyone, and are not searchable.

Instead, paste the text and format it with </> icon or pairs of triple backticks (```), and check the preview window to make sure it's properly formatted before posting it. This makes it more likely that your question will receive a useful answer.

It would be great if you could update your post to solve this.

There's a space after :9200/ and before _xpack.
May be that's the problem?

Thanks for replying. Sure, I will avoid posting images.
It looks like there is a space but actually there is no space in between :9200/_xpack

The error message indicates a problem reading the file. Are the user permissions set correctly? Is the path correct?

Thanks, issue resolved after removing '@' symbol before license.
Infact I am facing another big issue with logstash.

` * bash[shutdown logstash] action run
    [execute] kill: usage: kill [-s sigspec | -n signum | -sigspec] pid | jobspec ... or kill -l [sigspec]

    ================================================================================
    Error executing action `run` on resource 'bash[shutdown logstash]'
    ================================================================================

    Mixlib::ShellOut::ShellCommandFailed
    ------------------------------------
    Expected process to exit with [0], but received '1'
    ---- Begin output of "bash"  "/tmp/chef-script20200409-7602-t9khsp" ----
    STDOUT:
    STDERR: kill: usage: kill [-s sigspec | -n signum | -sigspec] pid | jobspec ... or kill -l [sigspec]
    ---- End output of "bash"  "/tmp/chef-script20200409-7602-t9khsp" ----
    Ran "bash"  "/tmp/chef-script20200409-7602-t9khsp" returned 1

    Cookbook Trace:
    ---------------
    /var/chef/cache/cookbooks/compat_resource/files/lib/chef_compat/monkeypatches/chef/runner.rb:78:in `run_action'
    /var/chef/cache/cookbooks/compat_resource/files/lib/chef_compat/monkeypatches/chef/runner.rb:106:in `block (2 levels) in converge'
    /var/chef/cache/cookbooks/compat_resource/files/lib/chef_compat/monkeypatches/chef/runner.rb:106:in `each'
    /var/chef/cache/cookbooks/compat_resource/files/lib/chef_compat/monkeypatches/chef/runner.rb:106:in `block in converge'
    /var/chef/cache/cookbooks/compat_resource/files/lib/chef_compat/monkeypatches/chef/runner.rb:105:in `converge'

    Resource Declaration:
    ---------------------
    # In /var/chef/cache/cookbooks/tmo-logstash/recipes/default.rb

     36: bash 'shutdown logstash' do
     37:   action :run
     38:   code "kill -9 $(pgrep -u logstash)"
     39: end
     40:

    Compiled Resource:
    ------------------
    # Declared in /var/chef/cache/cookbooks/tmo-logstash/recipes/default.rb:36:in `from_file'

    bash("shutdown logstash") do
      action [:run]
      retries 0
      retry_delay 2
      default_guard_interpreter :default
      command "shutdown logstash"
      backup 5
      returns 0
      code "kill -9 $(pgrep -u logstash)"
      interpreter "bash"
      declared_type :bash
      cookbook_name "tmo-logstash"
      recipe_name "default"
    end

    Platform:
    ---------
    x86_64-linux

Recipe: filebeat::config
  * service[filebeat] action start (up to date)

Running handlers:
Running handlers complete
Chef Client failed. 4 resources updated in 39 seconds```

I can see logstash under cd/opt folder but still when I check for ps -ef | grep logstash. I don't see the service as running.

This topic was automatically closed 28 days after the last reply. New replies are no longer allowed.