ElasticsearchStatusException[Unable to parse response body]; nested: ResponseException[method [PUT],

ElasticsearchStatusException[Unable to parse response body]; nested: ResponseException[method [PUT], host [http://marketing-ora-m-dev.gwm.com.cn], URI [/kingsland_posts/posts/11111111111?timeout=1m], status line [HTTP/1.1 405 Not Allowed]
<html>
<head><title>405 Not Allowed</title></head>
<body>
<center><h1>405 Not Allowed</h1></center>
<hr><center><b>LAFENG</b></center>
</body>
</html>
];

 

 

原因是配置的问题:创建的index 不准确。正确的配置:

  

kingsland:
  search:
    index:
      postsIndex: es/marketing_community_stream
      postsIndexType: stream
      commentsIndex: marketing_comments
      commentsIndexType: comments

elasticsearch:
  connectTimeout: 1000
  socketTimeout: 30000
  connectionRequestTimeout: 500
  maxRetryTimeoutMillis: 90000
  maxConnTotal: 100
  maxConnPerRoute: 100
  #ioThreadCount: 4
  postsIndex: k_posts_test
  postsIndexType: posts
  username: elastic
  password: Dbv6XvxL6XZJQ#@
  hosts:
    #- hostName: 10.28.128.59
    #- hostName: 10.250.61.10
    - hostName: marketing-ora-m-dev.gwm.com.cn
       #port: 9200
      #schem: http

 

posted @ 2023-02-10 14:14  Doyourself!  阅读(851)  评论(0编辑  收藏  举报