Curl: (52) Empty reply from server When trying to restart cluster ( given user/password )

i try to restart the cluster with the put command as stated in the docs:

curl -u "elastic:xxxxxxxxx" -k -X PUT "localhost:9200/_cluster/settings?pretty" -H 'Content-Type: application/json' -d'
{
  "persistent": {
    "cluster.routing.allocation.enable": "primaries"
  }
}
'

still I'm getting :

  % Total    % Received % Xferd  Average Speed   Time    Time     Time  Current
                                 Dload  Upload   Total   Spent    Left  Speed
100    80    0     0  100    80      0     83 --:--:-- --:--:-- --:--:--    83
curl: (52) Empty reply from server

it does work fine if i invoke :

curl -u "elastic:xxxxxxxxx" -k "https://localhost:9200" 

what I'm doing wrong here ?
Thanks

1 Like

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