Json parse exception with status 500 post upgrade to 7.4.0

I've upgraded from 7.3.2 to 7.4.0 and in attempting to follow the rolling upgrades document -- I've issued a:

[root@host elasticsearch]# curl -X PUT -u elastic "ipaddy:9200/_cluster/settings?pretty" -H 'Content-Type: application/json' -d'
> {
>   "persistent": {
>     "cluster.routing.allocation.enable": null
>   }
> }
> '

I've then received the following output upon issuing the password:

{
  "error" : {
    "root_cause" : [
      {
        "type" : "json_parse_exception",
        "reason" : "Invalid UTF-8 start byte 0x80\n at [Source: org.elasticsearch.transport.netty4.ByteBufStreamInput@3a3d0a5c; line: 4, column: 44]"
      }
    ],
    "type" : "json_parse_exception",
    "reason" : "Invalid UTF-8 start byte 0x80\n at [Source: org.elasticsearch.transport.netty4.ByteBufStreamInput@3a3d0a5c; line: 4, column: 44]"
  },
  "status" : 500
}

Help?

I think you might have picked up a stray unexpected character when copy-pasting the curl command somehow. I tried the command you shared and it worked for me:

$ curl -X PUT "localhost:9200/_cluster/settings?pretty" -H 'Content-Type: application/json' -d'
{
  "persistent": {
    "cluster.routing.allocation.enable": null
  }
}
'
{
  "acknowledged" : true,
  "persistent" : { },
  "transient" : { }
}

Try copying it again, or try typing it out if you cannot get copy/paste to work.

Thanks! That turned out to be the issue -- and I ended up having to hand type it. (...which is odd because I pasted the other day when I ended up doing the update to 7.3.2...)

1 Like

This topic was automatically closed 28 days after the last reply. New replies are no longer allowed.