@starrynight (starrynight) posted a new topic, subject "Json parse exception with status 500 post upgrade to 7.4.0". It read:

   I've upgraded from 7.3.2 to 7.4.0 and in attempting to follow the rolling upgrades document -- I've issued a:
    [code] 
        [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
        >   }
        > }
        > '
        
    [/code]
    
    I've then received the following output upon issuing the password:
    [code] 
        {
          "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
        }
        
    [/code]
    
    Help?

Then @DavidTurner (David Turner) said

    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:
    [code] 
        $ curl -X PUT "localhost:9200/_cluster/settings?pretty" -H 'Content-Type: application/json' -d'
        {
          "persistent": {
            "cluster.routing.allocation.enable": null
          }
        }
        '
        {
          "acknowledged" : true,
          "persistent" : { },
          "transient" : { }
        }
        
    [/code]
    
    Try copying it again, or try typing it out if you cannot get copy/paste to work.

After which, @starrynight (starrynight) added

    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...)

So @system (system) replied

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


{'source': 'discourse', 'url': 'https://discuss.elastic.co/t/json-parse-exception-with-status-500-post-upgrade-to-7-4-0/201936', 'title': 'Json parse exception with status 500 post upgrade to 7.4.0', 'views': 967, 'has_accepted_answer': False, 'word_count': 233, 'like_count': 1, 'reply_count': 1, 'participant_count': 2, 'posts': 4, 'tags': '', 'author': '@starrynight (starrynight)', 'participants': '@starrynight (starrynight), @DavidTurner (David Turner), @system (system)', 'image_url': [None], 'created_at': '2019-10-02T10:11:06.396Z', 'last_posted_at': '2019-10-30T12:06:09.884Z'}