How to use OpenDistro for ElasticSearch? - elasticsearch

I am trying to use OpenDistro for authentication on AWS:
https://opendistro.github.io/for-elasticsearch-docs/docs/security-configuration/api/
tried:
https://1.2.3.4.us-east-1.es.amazonaws.com/_opendistro/_security/api/internalusers/
but getting:
{
"error": "no handler found for uri [/_opendistro/_security/api/internalusers/] and method [GET]"
}
What is the proper URL/test just to see users or basic authentication?

From the URL, it looks as though you are using Amazon Elasticsearch Service. Open Distro for Elasticsearch is an open source project with distributions of Elasticsearch OSS, and plugins. You must deploy and run Open Distro yourself.
See our main page here: https://opendistro.github.io/for-elasticsearch/
You can also have a look at this post for a simple way to run Open Distro: https://opendistro.github.io/for-elasticsearch/blog/open%20distro%20for%20elasticsearch%20updates/2019/03/Get-Up-and-Running-with-Open-Distro-for-Elasticsearch/

Related

Open distro for elasticsearch Document-level security

First of all, I apologize for my weakness in English.
I'm developing Open Distro for Elasticsearch (V7.9).
I have set Document-level security for Role, but I get an error.
The sample code in the Open Distro documentation also shows the error.
{"statusCode":404,"error":"Not Found","message":"Saved object [config/7.9.1] not found"}

couldn't connect to ElasticSearch inside GetCandy

As am following the documentation in the site here https://getcandy.io/docs/master/guides/introduction/01-installation
but when got to point to set this code:
php artisan candy:search:index
having exception error listed here:
Elastica\Exception\Connection\HttpException : Couldn't connect to host, Elasticsearch down?
Sounds most likely that Elasticsearch isn't running properly, rather than an issue with GetCandy.
If you run the following you should be able to determine if Elasticsearch is up.
curl localhost:9200
If you get a response with the Elasticsearch version etc, it is running. If it's not running, you'll need to check the Elasticsearch logs, normally found somewhere like /var/log/elasticsearch/

Openwhisk: Unable to obtain the API list

I setup Apache Openwhisk locally following this guide: http://jamesthom.as/blog/2018/01/19/starting-openwhisk-in-sixty-seconds/. In general it seems to work correctly, but whenever I'm trying to execute any commands related to api, e.g.
wsk -i api list
it gives me an error,
Unable to obtain the API list: The requested resource does not exist. (code 153)
Any idea how to fix this?
This is unfortunately a temporary issue with docker-compose, and work is in progress to fix this.

Elastic Search JDBC River Plugin SQL Server Integrated Security

So I've been working on implementing elastic search using the JDBC River plugin to get data from our SQL Server DB into elastic search.
I've got it working fine using the SQL Server credentials, but trying to use integrated security doesn't work. It will create the index, but it doesn't have data in it.
The parameters I've been using are:
PUT /_river/test_river/_meta
{
"type":"jdbc",
"jdbc":
{
"driver":"com.microsoft.sqlserver.jdbc.SQLServerDriver",
"url":"jdbc:sqlserver://testServer:1433;databaseName=TestDb;
integratedSecurity=true;",
"user":"",
"password":"",
"sql": "select * from users",
"poll":"30s",
"index":"testindex",
"type":"testusers"
}
}
I've tried quite a few things, including removing the user and password fields completely, removing integratedSecurity=true, but it gave the same result.
I've checked on their github for the river plugin and it says this issue was fixed back in January, but it still doesn't seem to be working.
Also I'm using elastic search version: 1.5.1
and jdbc river plugin version : 1.4.0.10
Any help would be much appreciated
Get rid of the user and password options. You're not gonna need them.
Check the console when running elasticserch.bat, you should see an error message when it tries to update the river. I'm going to go out on a limb and assume you're probably seeing an error stating that the file sqljdbc_auth.dll can't be found. If this is the case, you can download this file from here and copy the x64 version of sqljdbc_auth.dll to your java lib folder. For me, this folder is C:\ProgramData\Oracle\Java\javapath but you can type echo %path% in a console window to find yours.
Once you have followed these steps, restart elasticsearch.bat, and it should start processing your river. If not, post back with the output you're seeing when running elasticsearch.bat.

Installing Elasticsearch

I try to index data on Elasticsearch, my problem is;after run the "elasticsearch.bat" command, I able to connect to the server, all process well done.but after that I cant write anything to the command line.Do you have any idea what is wrong?
Thats Ok, you see the ElasticSearch console output. Just open an other console to make some input. Or start ElasticSearch as a service (http://www.elastic.co/guide/en/elasticsearch/reference/1.3/setup-service-win.html)
There is no command-line input available for Elasticsearch. You can do operations on Elasticsearch by REST commands (or with a Client API in for example JAVA).
You can use CURL (application) to do REST operations in a command line.
You can use the the internet browser to do some HTTP-GET commands. You can also do other REST commands (PUT, POST, DELETE) with some Chrome plugins like POSTMAN.
There are some Elasticsearch plugins available to enable monitoring and management tooling that becomes available via the browser.
Please read the Elasticsearch documentation!
For all operations on indexes, mappings, querying, etc, the Marvel plugin has the Sense REST API interface which is fabulous. Sense is wrapped within the Marvel plugin which is free for development.
It allows you to execute all possible ES API commands as JSON. We use it both as a way to prototype commands before implementing them in our ES client, and as a way to test very specific/boundary search scenarios.
There are lots of other cool plugins to help you manage your ElasticSearch, some of which are described here.
Good luck!
When you type only elasticsearch.bat, it means you are starting Elasticsearch server in the foreground, that´s why you are seeing real-time logs in your terminal and hence you can´t type anything.
Now, leave that unclosed and open another terminal (no need to go to the Elasticsearch directory again) and just type
curl 'http://localhost:9200/?pretty' but first make sure that curl is supported in your terminal, if not, you need to use another terminal that supports it, for example Git Shell for Windows.
Afterwards you can use this second terminal to do your indexing.
Via terminal with command curl + XGET (or XPUT, XDELETE, XPOST) you can send commands to elasticsearch:
curl -XGET 'http://localhost:9200/your_index' -d '{
"query":
{
"filtered":
{
"query":
{
"match_all": {}
}
}
}
}';
You can also use the Chrome extension Sense, which can handle JSON configs (with handy history, nice highlighting).
I think you have misunderstood something:
ElasticSearch runs as a http service, that the reason why you cant still using that console.
Solution: just open another console.
But, keep in mind you dont need to use a console, you can access it using any REST Client. Take a look at "Postman - REST Client" and "Sense (Beta)". Both are Chrome extensions.

Resources