You are viewing a plain text version of this content. The canonical link for it is here.
Posted to notifications@skywalking.apache.org by ta...@apache.org on 2019/01/02 05:40:15 UTC
[incubator-skywalking-website] branch master updated: 添加关于elasticsearch 因basic验证导致skywalking无法调用问题 (#20)
This is an automated email from the ASF dual-hosted git repository.
tanjian pushed a commit to branch master
in repository https://gitbox.apache.org/repos/asf/incubator-skywalking-website.git
The following commit(s) were added to refs/heads/master by this push:
new 936d76c 添加关于elasticsearch 因basic验证导致skywalking无法调用问题 (#20)
936d76c is described below
commit 936d76c74b6fa22332ff99c1a068eb2ec790f2fc
Author: Jonathan <li...@gmail.com>
AuthorDate: Wed Jan 2 13:40:11 2019 +0800
添加关于elasticsearch 因basic验证导致skywalking无法调用问题 (#20)
* Create 2019-01-12-skywalking-elasticsearch-basic.md
添加Elasticsearch Basic验证skywalking无法调用问题。
* Update README.md
添加关于elasticsearch因basic认证导致skywalking无法正常调用接口问题的blog
* Update README.md
修改blog乱序问题
---
.../2019-01-12-skywalking-elasticsearch-basic.md | 61 ++++++++++++++++++++++
docs/zh/blog/README.md | 7 ++-
2 files changed, 67 insertions(+), 1 deletion(-)
diff --git a/docs/zh/blog/2019-01-12-skywalking-elasticsearch-basic.md b/docs/zh/blog/2019-01-12-skywalking-elasticsearch-basic.md
new file mode 100644
index 0000000..a739dcb
--- /dev/null
+++ b/docs/zh/blog/2019-01-12-skywalking-elasticsearch-basic.md
@@ -0,0 +1,61 @@
+### 关于使用elasticsearch,需要basic认证问题
+
+skywalking依赖elasticsearch集群,如果elasticsearch安装有x-pack插件的话,那么就会存在一个Basic认证,导致skywalking无法调用elasticsearch,解决方法是使用nginx做代理,让nginx来做这个Basic认证,那么这个问题就自然解决了。
+
+方法如下:
+
+1.安装nginx
+
+> yum install -y nginx
+
+
+2.配置nginx
+
+```xml
+
+
+server {
+ listen 9200 default_server;
+ server_name _;
+
+ location / {
+ proxy_set_header Host $host;
+ proxy_set_header X-Real-IP $remote_addr;
+ proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for;
+ proxy_pass http://localhost:9200;
+ #Basic字符串就是使用你的用户名(admin),密码(12345)编码后的值
+ #注意:在进行Basic加密的时候要使用如下格式如:admin 123456 注意中间有个空格,如果使用其它格式,那么结果我们是无法预知的,最起码笔者使用上诉格式没有出现问题。
+ proxy_set_header Authorization "Basic YWRtaW4gMTIzNDU2";
+ }
+ }
+
+
+```
+
+3.验证
+
+> curl localhost:9200
+
+```xml
+{
+ "name" : "Yd0rCp9",
+ "cluster_name" : "es-cn-4590xv9md0009doky",
+ "cluster_uuid" : "jAPLrqY5R6KWWgHnGCWOAA",
+ "version" : {
+ "number" : "6.3.2",
+ "build_flavor" : "default",
+ "build_type" : "tar",
+ "build_hash" : "053779d",
+ "build_date" : "2018-07-20T05:20:23.451332Z",
+ "build_snapshot" : false,
+ "lucene_version" : "7.3.1",
+ "minimum_wire_compatibility_version" : "5.6.0",
+ "minimum_index_compatibility_version" : "5.0.0"
+ },
+ "tagline" : "You Know, for Search"
+}
+
+
+```
+
+## 看到如上结果那么恭喜你成功了。
diff --git a/docs/zh/blog/README.md b/docs/zh/blog/README.md
index a15cd7c..8341594 100755
--- a/docs/zh/blog/README.md
+++ b/docs/zh/blog/README.md
@@ -3,6 +3,11 @@ layout: LayoutBlog
blog:
+- title: 关于elasticsearch因basic认证导致skywalking无法正常调用接口问题
+ name: 2019-01-12-skywalking-elasticsearch-basic.md
+ time: 刘离勇
+ short: elasticsearch basic验证
+
- title: SkyWalking源码解析合集
name: 2018-12-21-SkyWalking-source-code-read
time: 芋道源码 整理,12月21日,2018
@@ -21,4 +26,4 @@ blog:
- title: Apache SkyWalking 为.NET Core带来开箱即用的分布式追踪和应用性能监控
name: 2018-05-24-skywalking-net
time: 刘浩扬
- short: 用于SkyWalking的.NET Core SDK
\ No newline at end of file
+ short: 用于SkyWalking的.NET Core SDK