Elastic

Using an Elastic Load Balancer for SSH traffic

匿名 (未验证) 提交于 2019-12-03 01:45:01
可以将文章内容翻译成中文,广告屏蔽插件可能会导致该功能失效(如失效,请关闭广告屏蔽插件后再试): 问题: I am wanting to setup an AWS Elastic Load Balancer in front of a Phabricator installation. I would like the ELB to balance HTTP, HTTPS and SSH traffic. Is this possible or do I need to run my own SSH load balancer with HAProxy or similar? To clarify, I am aiming to load balance git operations which occur over SSH, as distinct from administrative SSH. 回答1: In my case of Phabricator + AWS ELB setup Allowed ELB port for phab instances. Configured VirtualHost redirection from HTTP to HTTPS in apache sites-enable configuration file. First rules

jpa @Transactional + ElasticSearchEventListener (PostInsertEventListener…)

匿名 (未验证) 提交于 2019-12-03 01:45:01
可以将文章内容翻译成中文,广告屏蔽插件可能会导致该功能失效(如失效,请关闭广告屏蔽插件后再试): 问题: I am having a problem related to JPA & some hibernate listeners I configured to index/deindex the Db entities into Elastic Search. The problem is basically that the listener onPostInsert method is called even if I throw an exception in the method where I am persisting an entity and this method is marked as @Transactional(rollbackFor = {Throwable.class}). My configuration is as follows. The listener class: public class ElasticSearchEventListener implements PostDeleteEventListener, PostInsertEventListener, PostUpdateEventListener { @Override

HTTPS on Elastic Beanstalk Flask application

匿名 (未验证) 提交于 2019-12-03 01:44:01
可以将文章内容翻译成中文,广告屏蔽插件可能会导致该功能失效(如失效,请关闭广告屏蔽插件后再试): 问题: I have been trying get SSL enabled on my AWS Elastic Beanstalk(eb) application with not much luck so far. After following the documentation for configuring https access on eb , I created a self-signed certificate which I believe to be enough if one just wants encryption. I created a eb environment which used a load balancer and after uploading the certificate, I was able to use it and pick the secure listening port (8443). On the EC2 load balancer, I created a listener for HTTPS 8443 HTTP 80 <cert file> I then gave the load balancer and the

Error loading sample dataset in Elastic search

匿名 (未验证) 提交于 2019-12-03 01:35:01
可以将文章内容翻译成中文,广告屏蔽插件可能会导致该功能失效(如失效,请关闭广告屏蔽插件后再试): 问题: Hi I am trying to load a sample data set referring elastic search docs but when I am trying to run the instructed command, I am getting the below error. I have read all documents but I am unable to resolve it. $ curl -XPOST 'localhost:9200/bank/account/_bulk?pretty' --data-binary @accounts.json Warning: Couldn't read data from file "accounts.json", this makes an empty Warning: POST. { "error" : { "root_cause" : [ { "type" : "parse_exception", "reason" : "Failed to derive xcontent" } ], "type" : "parse_exception", "reason" : "Failed to derive

Logstash 5.1.1 “bad URI(is not URI?)\&quot;

匿名 (未验证) 提交于 2019-12-03 01:34:02
可以将文章内容翻译成中文,广告屏蔽插件可能会导致该功能失效(如失效,请关闭广告屏蔽插件后再试): 问题: Error: 回答1: The error that you are getting is because you are running logstash in Program Files and logstash doesn't work with the space in the folder name. You should copy the logstash folder to another location that doesn't contain a space and run it from there. 回答2: I had the same fundamental error message. $ bin/logstash -f sample.conf An unexpected error occurred! :error => bad URI(is not URI?): file:///Users/user_name/Downloads/elastic stack/logstash-5.1.1/config/log4j2.properties, :backtrace => ["/Users/user_name/Downloads/elastic

Proper access policy for Amazon Elastic Search Cluster

匿名 (未验证) 提交于 2019-12-03 01:23:02
可以将文章内容翻译成中文,广告屏蔽插件可能会导致该功能失效(如失效,请关闭广告屏蔽插件后再试): 问题: I've recently started using the new Amazon Elasticsearch Service and I can't seem to figure out the access policy I need so that I can only access the services from my EC2 instances that have a specific IAM role assigned to them. Here's an example of the access policy I currently have assigned for the ES domain: { "Version": "2012-10-17", "Statement": [ { "Sid": "", "Effect": "Allow", "Principal": { "AWS": [ "arn:aws:iam::[ACCOUNT_ID]:role/my_es_role", ] }, "Action": "es:*", "Resource": "arn:aws:es:us-east-1:[ACCOUNT_ID]:domain/[ES_DOMAIN]/*

Spring Data Elastic Search with Nested Fields and mapping

匿名 (未验证) 提交于 2019-12-03 01:10:02
可以将文章内容翻译成中文,广告屏蔽插件可能会导致该功能失效(如失效,请关闭广告屏蔽插件后再试): 问题: I am using spring-data-elasticsearch and elasticsearch together to query documents. I'd like to do nested queries on nested documents. I have this in java : @Document(indexName = "as", type = "a", indexStoreType = "memory", shards = 1, replicas = 0, refreshInterval = "-1") class A { @Id private String Id; @Field(type = String, index = analyzed, store = true) private String field1; // ... Many more Fields. @NestedField(type = FieldType.Object, index = analyzed, store = true, dotSuffix = "accounts") private List bs; // ... getters and setters

Log Structured data to Elastic Search by using NLog 4.5 doesn&#039;t provide the ability to query in the fields

匿名 (未验证) 提交于 2019-12-03 01:05:01
可以将文章内容翻译成中文,广告屏蔽插件可能会导致该功能失效(如失效,请关闭广告屏蔽插件后再试): 问题: Using NLog, when I log object/"structured data" to Elastic Search it stored in away that I can not make query on it, Please look to below image: <target xsi:type="ElasticSearch" name="MyElasticTarget" uri="url" requireAuth="true" username="MyUser" password="MyPass" Index="MyIndex-${date:format=yyyy.MM.dd}" > <layout xsi:type="JsonLayout" type='JsonLayout' IncludeAllProperties='true'> <attribute name='LogMessage' layout='${MySimpleClass:raw=true}' /> </layout> </target> </targets> And the code is: var _simpleObj = new MySimpleClass(5, "my

Elastic Search - java api for inner hit

匿名 (未验证) 提交于 2019-12-03 01:03:01
可以将文章内容翻译成中文,广告屏蔽插件可能会导致该功能失效(如失效,请关闭广告屏蔽插件后再试): 问题: I made some query like below. "query" : { "nested" : { "path" : "comments.votes", "query" : { ... }, "inner_hits" : {} } } and I convert it as java api QueryBuilders.boolQuery().must( boolQuery ) .must( // error here if i changed as '.innerHit()' QueryBuilders.nestedQuery("comments.votes", QueryBuilders.boolQuery().must( ... ) ) .innerHit( new QueryInnerHitBuilder()) // error here ) It's how I made java code on ES version 2.x. Since I changed ES version 5.x, It's not functional at all. How should I changed it as ES 5.x version code? 文章来源:

Elastic Search(ES)使用笔记

匿名 (未验证) 提交于 2019-12-03 00:36:02
ElasticSearch介绍: 使用 ① maven依赖导入: <dependency> <groupId>org.elasticsearch</groupId> <artifactId>elasticsearch</artifactId> <version>6.2.2</version> </dependency> <dependency> <groupId>org.elasticsearch.client</groupId> <artifactId>transport</artifactId> <version>6.2.2</version> </dependency> ② 工具类编写: package com.mvs.utils; import java.net.InetAddress; import java.net.UnknownHostException; import java.util.ArrayList; import java.util.List; import java.util.Map; import java.util.Set; import java.util.Stack; import org.apache.commons.lang3.StringUtils; import org.elasticsearch.action.deletebyquery