国产 无码 综合区,色欲AV无码国产永久播放,无码天堂亚洲国产AV,国产日韩欧美女同一区二区

springboot使用elasticsearch新增時(shí)報(bào)錯(cuò)Unable to parse response body for Response{requestLine=POST

這篇具有很好參考價(jià)值的文章主要介紹了springboot使用elasticsearch新增時(shí)報(bào)錯(cuò)Unable to parse response body for Response{requestLine=POST。希望對(duì)大家有所幫助。如果存在錯(cuò)誤或未考慮完全的地方,請(qǐng)大家不吝賜教,您也可以點(diǎn)擊"舉報(bào)違法"按鈕提交疑問(wèn)。

遇到的問(wèn)題

springboot 在使用ES時(shí),主程序可以正常啟動(dòng),但是新增數(shù)據(jù)時(shí)報(bào)錯(cuò)。
此時(shí)檢查es發(fā)現(xiàn)索引已經(jīng)建立成功,但是新增數(shù)據(jù)的時(shí)候報(bào)錯(cuò)。找了很久的原因。報(bào)錯(cuò)如下所示
Unable to parse response body for Response{requestLine=POST /article/_doc?timeout=1m HTTP/1.1, host=http://127.0.0.1:9200, response=HTTP/1.1 201 Createdspringboot使用elasticsearch新增時(shí)報(bào)錯(cuò)Unable to parse response body for Response{requestLine=POST,elasticsearch,spring boot,java

原因分析

es版本迭代很快

springboot2.6.x版本使用ES7.x比較好。
SpringData官方的ElasticSearch版本支持簡(jiǎn)介

解決方法

換一個(gè)版本下載,看看自己的項(xiàng)目對(duì)應(yīng)的版本,根據(jù)spring提供的版本支持去找個(gè)適合你自己的。
我這里提供一個(gè)支持springboot2.6.x的ES7.15.x的下載鏈接
官方鏈接ES7.15.2文章來(lái)源地址http://www.zghlxwxcb.cn/news/detail-537988.html

到了這里,關(guān)于springboot使用elasticsearch新增時(shí)報(bào)錯(cuò)Unable to parse response body for Response{requestLine=POST的文章就介紹完了。如果您還想了解更多內(nèi)容,請(qǐng)?jiān)谟疑辖撬阉鱐OY模板網(wǎng)以前的文章或繼續(xù)瀏覽下面的相關(guān)文章,希望大家以后多多支持TOY模板網(wǎng)!

本文來(lái)自互聯(lián)網(wǎng)用戶投稿,該文觀點(diǎn)僅代表作者本人,不代表本站立場(chǎng)。本站僅提供信息存儲(chǔ)空間服務(wù),不擁有所有權(quán),不承擔(dān)相關(guān)法律責(zé)任。如若轉(zhuǎn)載,請(qǐng)注明出處: 如若內(nèi)容造成侵權(quán)/違法違規(guī)/事實(shí)不符,請(qǐng)點(diǎn)擊違法舉報(bào)進(jìn)行投訴反饋,一經(jīng)查實(shí),立即刪除!

領(lǐng)支付寶紅包贊助服務(wù)器費(fèi)用

相關(guān)文章

  • Es批量插入數(shù)據(jù)報(bào)異常Unable to parse response body

    Es批量插入數(shù)據(jù)報(bào)異常Unable to parse response body

    Unable to parse response body org.elasticsearch.client.ResponseException: method [POST], host [http://xx.xxx.xxx.xx:9201], URI [/_bulk?timeout=1m], status line [HTTP/1.1 413 Request Entity Too Large] 因?yàn)?批量提交 提交內(nèi)容請(qǐng)求實(shí)體太大超過(guò)了es中設(shè)置的最大值,Bulk 默認(rèn)設(shè)置批量提交的數(shù)據(jù)量不能超過(guò) ? 100M 官網(wǎng)說(shuō)明:

    2024年02月12日
    瀏覽(17)
  • ES報(bào)錯(cuò) Unable to parse response body for Response

    ES報(bào)錯(cuò) Unable to parse response body for Response

    報(bào)錯(cuò)信息: 此處是項(xiàng)目中使用 ES ,向其中插入數(shù)據(jù) 雖然項(xiàng)目報(bào)錯(cuò),但是 ES 中成功存入了數(shù)據(jù),且此處可以看到返回的是 200 OK 報(bào)錯(cuò)原因: 原因是因?yàn)?es 服務(wù)器的響應(yīng)程序解析不了,有可能是 spring-boot 版本低了,沒(méi)有做這方面的處理 我的 es 是 8.4.3 版本的,spring-boot 是 2.

    2024年02月11日
    瀏覽(20)
  • ES報(bào)錯(cuò)— Unable to parse response body for Response

    ES報(bào)錯(cuò)— Unable to parse response body for Response

    在調(diào)用es java客戶端,執(zhí)行新增es文檔時(shí)報(bào)錯(cuò):Unable to parse response body for Response ? ?? 返回201,表示插入成功 可以在kibana查詢新增數(shù)據(jù) ? 原因分析: 老版本es客戶端無(wú)法解析新版es的返回,有可能是 spring-boot 版本低了,沒(méi)有做這方面的處理(數(shù)據(jù)是能保存進(jìn) es 的,而且 e

    2024年03月27日
    瀏覽(18)
  • 使用git拉代碼時(shí)報(bào)錯(cuò): Unable to negotiate with ** port 22: no matching host key type found

    使用git拉代碼時(shí)報(bào)錯(cuò): Unable to negotiate with ** port 22: no matching host key type found

    突然使用了windows系統(tǒng) 還是有些不習(xí)慣了,但是怕什么,加油干啊,還有退路么 環(huán)境都配好了,該裝的軟件也裝了,異常的順利,這個(gè)過(guò)程不可能不出錯(cuò)啊,這不錯(cuò)誤它不就來(lái)了 使用git拉代碼報(bào)了這個(gè)錯(cuò),看了下.shh文件夾里是沒(méi)有know host文件的,然后查了下 需要在.ssh文件夾

    2024年02月04日
    瀏覽(30)
  • [已解決]使用git拉代碼時(shí)報(bào)錯(cuò): Unable to negotiate with **** port 22: no matching host key type found.

    [已解決]使用git拉代碼時(shí)報(bào)錯(cuò): Unable to negotiate with **** port 22: no matching host key type found.

    在網(wǎng)上搜一波都是讓生成ssh公鑰然后部署到服務(wù)器上,然后折騰一晚上,以為就是這個(gè)問(wèn)題,但還是不行。 后來(lái)發(fā)現(xiàn)原來(lái)是當(dāng)時(shí)本來(lái)本地已經(jīng)有生成過(guò)公鑰了,但我怕重復(fù),所以刪掉了以前的,還連著刪了幾個(gè)其他文件,無(wú)語(yǔ)! 原因可能是新的ssh客戶端不支持ssh-rsa算法,要

    2024年02月12日
    瀏覽(29)
  • Elasticsearch exception [type=mapper_parsing_exception, reason=Failed to parse mapping [properties]

    Elasticsearch exception [type=mapper_parsing_exception, reason=Failed to parse mapping [properties]

    Elasticsearch exception [type=mapper_parsing_exception, reason=Failed to parse mapping [properties]: Root mapping definition has unsupported parameters: ? 我們?cè)谑褂肦estClient創(chuàng)建索引庫(kù)時(shí)出現(xiàn)了這個(gè)錯(cuò)誤。 可以檢查一下 CreateIndexRequest 類型變量request 是否導(dǎo)入正確的包 有兩個(gè)同名的包,我們選擇: 創(chuàng)建的索引

    2024年02月11日
    瀏覽(24)
  • elasticsearch創(chuàng)建索引報(bào)[type=mapper_parsing_exception, reason=Failed to parse mapping [_doc]......

    elasticsearch創(chuàng)建索引報(bào)[type=mapper_parsing_exception, reason=Failed to parse mapping [_doc]......

    小伙伴們,你們好,我是老寇 經(jīng)過(guò)反復(fù)排查,發(fā)現(xiàn)是安裝的pinyin和ik分詞版本不對(duì),只需要修改成與es版本一致即可 es 7.6.2 舉例 1.在windows界面用壓縮軟件打開(kāi)elasticsearch-analysis-ik-7.6.2.jar 2.將pom.xml拖出到桌面 3.修改版本 4.將pom.xml放回壓縮包( 原路放回 ) 5. elasticsearch-analysis

    2024年02月13日
    瀏覽(28)
  • 【git學(xué)習(xí)】解決git提交代碼時(shí)報(bào)錯(cuò): Unable to create ‘XXX/.git/index.lock‘: File exists.

    【git學(xué)習(xí)】解決git提交代碼時(shí)報(bào)錯(cuò): Unable to create ‘XXX/.git/index.lock‘: File exists.

    使用git提交代碼的時(shí)候,出現(xiàn)了 Unable to create \\\'.git/index.lock\\\' File exists 問(wèn)題,如下所示: Git 執(zhí)行操作時(shí)會(huì)自動(dòng)生成 index.lock 文件,操作結(jié)束后會(huì)自動(dòng)刪除。這樣做的目的是避免同時(shí)操作同一個(gè)文件夾。 錯(cuò)誤提示我們: 因此,我們刪除該目錄下的 .git/index.lock 文件即可 刪除之后

    2024年02月11日
    瀏覽(16)
  • Gradle編譯時(shí)報(bào)錯(cuò) Caused by: javax.net.ssl.SSLException: No PSK available. Unable to resume.

    Gradle編譯時(shí)報(bào)錯(cuò) Caused by: javax.net.ssl.SSLException: No PSK available. Unable to resume.

    Gradle編譯時(shí)報(bào)錯(cuò) Caused by: javax.net.ssl.SSLException: No PSK available. Unable to resume. 這是 JDK 11 的一個(gè)bug, 升級(jí)到 JDK 11.0.3+ 可以解決 bug: https://bugs.openjdk.java.net/browse/JDK-8213202 不想升級(jí)的話可以手動(dòng)修改 $JAVA_HOME/conf/security/java.security 文件, 找到 jdk.tls.disabledAlgorithms=SSLv3 所在的那一行,在行

    2024年02月12日
    瀏覽(15)
  • 解決Windows安裝Rabbitmq,運(yùn)行rabbitmqctl status命令時(shí)報(bào)錯(cuò)unable to perform an operation on node ‘rabbit@…的方法

    解決Windows安裝Rabbitmq,運(yùn)行rabbitmqctl status命令時(shí)報(bào)錯(cuò)unable to perform an operation on node ‘rabbit@…的方法

    一、問(wèn)題分析 ? ?可能是rabbitqm服務(wù)出錯(cuò)導(dǎo)致的問(wèn)題,如果安裝過(guò)程沒(méi)問(wèn)題,就是運(yùn)行rabbitmqctl status命令時(shí)報(bào)錯(cuò),那可能是環(huán)境變量沒(méi)有設(shè)置對(duì),根據(jù)我本人的情況,我建議按一下步驟來(lái)解決問(wèn)題。 二、解決步驟 1,先看環(huán)境變量設(shè)置有沒(méi)有問(wèn)題 erl環(huán)境變量,沒(méi)有就新建ERL

    2024年02月02日
    瀏覽(24)

覺(jué)得文章有用就打賞一下文章作者

支付寶掃一掃打賞

博客贊助

微信掃一掃打賞

請(qǐng)作者喝杯咖啡吧~博客贊助

支付寶掃一掃領(lǐng)取紅包,優(yōu)惠每天領(lǐng)

二維碼1

領(lǐng)取紅包

二維碼2

領(lǐng)紅包