error while send import request on kibana console - elasticsearch

I send following request on Kibana console to try to import a local dashboard to kibana version 7.2.0
POST https://dcwidavcca0085.epg.nam.gm.com:5601/api/saved_objects/_import
{
"file"="C:\Users\Documents\dashboard-prod.ndjson"
}
however, I received error response
{
"error": "no handler found for uri [/https://dcwidavcca0085.epg.nam.gm.com:5601/api/saved_objects/_import?pretty] and method [POST]"
}
I'm new to kibana API, the doc I'm following is https://www.elastic.co/guide/en/kibana/7.2/saved-objects-api-import.html
Is there any syntax/format error in my request?

Tldr;
Kibana's console in 7.2 only allow to target elasticsearch API.
You need to run the command in a terminal, using the curl command.

Related

Authorize.net Webhooks - need detailed error message

We are trying to get up to speed using Authorize.net Webhooks to connect to our Salesforce external site. Our Salesforce endpoint seems to be working OK, because I can call it using curl from the command line and pass a JSON structure that gets successfully saved to our database. This much works fine.
However when I enter the URL of our Webhook into the "Endpoint URL:" field in Authorize.net and click the "Test Webhook" button, I get the error message:
"Error: Error occured in connecting to the endpoint: (prints my endpoint URL)
I am sure that I am calling the correct URL because I have copied and pasted it from the command line into the Endpoint URL field. But I need to know why I'm getting this error. Is there a debug log for Webhooks? Or how can I get a more detailed error message from Authorize.net?
Just be clear - this is testing a webhook call from Authorize.net -> Salesforce.
Edit: the CURL call that works from the command line is:
curl -X POST -H "Content-Type: application/json" -d '{"test":"this"}' \
https://my.server.com/mysite/services/apexrest/PYMT_AuthnetHook
Thanks and Best Regards!

How to read grpc command line tool error messages from the responses?

I am using the grpc command line tool to test response for my grpc request. This is the official link to the grpc command line tool: https://github.com/grpc/grpc/blob/master/doc/command_line_tool.md (The usage guide is not updated. Kindly read ~/workspace/src/github.com/grpc/bins/opt/grpc_cli help)
I am running the command from the location where my protocol file resides. I am sending a request like this, (FYI: I am also sending the metadata. Irrespective of inclusion of the metadata or not I am getting the same error message) :
$ ~/my_workspace/src/github.com/grpc/bins/opt/grpc_cli call 0.0.0.0:50051 \
MyGrpcMethod <name_of_my_proto_file.proto> "abc : '12-34-56-78', xyz: '1234'" \
--metadata "auth:<auth_token>:space:xxx:org:xxx" --enable_ssl=false
In the response I am getting it says that there are some errors however, it does not show what the errors are. Here is the response I got from my client request:
connecting to 0.0.0.0:50051
Failed to read response.
Rpc failed with status code 12 error message unknown service my_agent.MyServiceAPI
Right now, I am not able to figure out from the documentation or otherwise on how to read the response. Did anyone face an issue like this?

Logstash 5 Alpha4 to elasticsearch5 Alpha4 communication error

Elasticsearch 5 is secured with xpack security and hooked with ldap which is working fine. Even user has admin right in role_mapping.
Logstash 5 configuration is as below
output {
elasticsearch {
hosts => ['localhost:9200']
user => 'gaurav#gmail.com'
password => 'pwd'
}
}
Getting below error and because of which logstash is not able to pass data to elasticsearch.
{:timestamp=>"2016-07-14T16:32:29.592000+0530",
:message=>"Encountered an unexpected error submitting a bulk request! Will retry.",
:error_message=>"undefined method code' for #",
:class=>"NoMethodError", :backtrace=>["/usr/share/logstash/vendor/bundle/jruby/1.9/gems/logstash-output-elasticsearch-4.1.1-java/lib/logstash/outputs/elasticsearch/common.rb:217:insafe_bulk'", "/usr/share/logstash/vendor/bundle/jruby/1.9/gems/logstash-output-elasticsearch-4.1.1-java/lib/logstash/outputs/elasticsearch/common.rb:105:in submit'", "/usr/share/logstash/vendor/bundle/jruby/1.9/gems/logstash-output-elasticsearch-4.1.1-java/lib/logstash/outputs/elasticsearch/common.rb:72:inretrying_submit'", "/usr/share/logstash/vendor/bundle/jruby/1.9/gems/logstash-output-elasticsearch-4.1.1-java/lib/logstash/outputs/elasticsearch/common.rb:23:in multi_receive'", "org/jruby/RubyArray.java:1653:ineach_slice'", "/usr/share/logstash/vendor/bundle/jruby/1.9/gems/logstash-output-elasticsearch-4.1.1-java/lib/logstash/outputs/elasticsearch/common.rb:22:in multi_receive'", "/usr/share/logstash/logstash-core/lib/logstash/output_delegator.rb:136:inthreadsafe_multi_receive'", "/usr/share/logstash/logstash-core/lib/logstash/output_
I think I may have figured it out. I am using the Logstash 5.1.1-alpine docker image. As far as I can tell, it comes with the elasticsearch-output plugin v4.5.0, which seems to have this bug. Forcing an update of that plugin to the latest (6.2) has fixed this issue.
My Dockerfile now
FROM logstash:5.1.1-alpine
RUN $LOGSTASH_PATH/logstash-plugin install --version 6.2.0 logstash-output-elasticsearch
With the updated plugin, I no longer see this error.

Can not kill a YARN application through REST api

I'm using Hadoop 2.5.0 (CDH 5.3.5).
Following this document, I tried to kill a running YARN application (whose application id is application_1438849897472_0011) through the following REST api:
curl -i -XPUT http://{rm-rest-host}:{rm-rest-port}/ws/v1/cluster/apps/application_1438849897472_0011/killed
But I got a status code of 404 and an exception message complaining about
org.apache.hadoop.yarn.webapp.WebAppException: /v1/cluster/apps/application_1438849897472_0011/killed: controller for v1 not found
So what is going wrong ?
The correct URI ends with /state, not /killed and you are missing the request body.
Try this:
curl -v -X PUT -H "Content-Type: application/json" -d '{"state": "KILLED"}' 'http://{rm-rest-host}:{rm-rest-port}/ws/v1/cluster/apps/{app-id}/state'
Try the following:
curl -v -X PUT -d '{"state": "KILLED"}''http://{rm-rest-host}:{rm-rest-port}/ws/v1/cluster/apps/application_1438849897472_0011/state'
The documentation you linked states:
With the application state API, you can query the state of a submitted app as well kill a running app by modifying the state of a running app using a PUT request with the state set to "KILLED". To perform the PUT operation, authentication has to be setup for the RM web services. In addition, you must be authorized to kill the app. Currently you can only change the state to "KILLED"; an attempt to change the state to any other results in a 400 error response. Examples of the unauthorized and bad request errors are below. When you carry out a successful PUT, the iniital response may be a 202. You can confirm that the app is killed by repeating the PUT request until you get a 200, querying the state using the GET method or querying for app information and checking the state. [...]

querying elasticsearch on ec2 ubuntu

I am following this tutorial to learn Elasticsearch, running it on EC2:
http://exploringelasticsearch.com/book/an-overview/up-and-running.html
So I am able to run the server and, using the query tool provided (http://elastichammer.exploringelasticsearch.com/) I can get the status response. However, when I try creating an index with a PUT, I get back the error:
{ "error": "IndexCreationException[[planet] failed to create index];
nested: NoClassDefFoundError[Could not initialize class
org.elasticsearch.index.codec.postingsformat.PostingFormats]; ",
"status": 500 }
The same thing happens when I use cURL...I can get the sample response with
curl -XGET http://ec2-54-218-36-27.us-west-2.compute.amazonawscom:9200/
as well as the status with:
curl -XGET http://ec2-54-218-36-27.us-west-2.compute.amazonawscom:9200/_status
Has anybody experienced this?
Thank you!

Resources