# Invalid NEST response built from a unsuccessful () low level call on PUT:

**URL:** <https://discuss.elastic.co/t/invalid-nest-response-built-from-a-unsuccessful-low-level-call-on-put/212202>\
**Category:** Elasticsearch\
**Created:** [December 17, 2019, 5:27pm UTC](https://discuss.elastic.co/t/invalid-nest-response-built-from-a-unsuccessful-low-level-call-on-put/212202 "2019-12-17T17:27:21Z")\
**Posts on this page:** 11\
**Page:** 1

<div class="post-metadata">

**Author:** ![Ilyoskhuja](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/ilyoskhuja/32/47524_2.png) [@Ilyoskhuja](https://discuss.elastic.co/u/Ilyoskhuja)\
**Post date:** [December 17, 2019, 5:27pm UTC](https://discuss.elastic.co/t/invalid-nest-response-built-from-a-unsuccessful-low-level-call-on-put/212202/1 "2019-12-17T17:27:21Z")

</div>

I have this error "Invalid NEST response built from a unsuccessful () low level call on PUT:/ nameOfIndex". I use [Elasticsearch.Net/7.1.0](http://Elasticsearch.Net/7.1.0) and ElasticSearch Cloud 7.5

BadRequest: Node: [https://f3bf622c3-----------------a99a39.europe-west1.gcp.cloud.es.io:9243/](https://f3bf622c3-----------------a99a39.europe-west1.gcp.cloud.es.io:9243/) Took: 00:00:00.0026775

# OriginalException: System.Net.Http.HttpRequestException: An attempt was made to access a socket in a way forbidden by its access permissions ---\> System.Net.Sockets.SocketException: An attempt was made to access a socket in a way forbidden by its access permissions

at System.Net.Http.ConnectHelper.ConnectAsync(String host, Int32 port, CancellationToken cancellationToken).  
Is this problem from different version of elasticSearch?, because it worked with older version cloud elastic.

---

<div class="post-metadata">

**Author:** ![forloop](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/forloop/32/9021_2.png) [@forloop](https://discuss.elastic.co/u/forloop)\
**Post date:** [December 19, 2019, 8:06am UTC](https://discuss.elastic.co/t/invalid-nest-response-built-from-a-unsuccessful-low-level-call-on-put/212202/2 "2019-12-19T08:06:11Z")

</div>

Do you have more detail about how you're constructing the client e.g. `ConnectionSettings` and `IConnectionPool` used?

> [@Ilyoskhuja](#):
>
> I use [Elasticsearch.Net/7.1.0](http://Elasticsearch.Net/7.1.0) and Elasticsearch Cloud 7.5

You may want to [update the client to 7.5.1](https://www.nuget.org/packages/Elasticsearch.Net/), and use the [`CloudConnectionPool`](https://www.elastic.co/guide/en/elasticsearch/client/net-api/current/connection-pooling.html#cloud-connection-pool).

---

<div class="post-metadata">

**Author:** ![Ilyoskhuja](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/ilyoskhuja/32/47524_2.png) [@Ilyoskhuja](https://discuss.elastic.co/u/Ilyoskhuja)\
**Post date:** [December 19, 2019, 2:34pm UTC](https://discuss.elastic.co/t/invalid-nest-response-built-from-a-unsuccessful-low-level-call-on-put/212202/3 "2019-12-19T14:34:14Z")

</div>

[Reindexing data to elasticSearch cloud](https://discuss.elastic.co/t/reindexing-data-to-elasticsearch-cloud/212397) , I am so sorry but for this issue I already opened 2 question. You can find all details in link above.

---

<div class="post-metadata">

**Author:** ![Ilyoskhuja](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/ilyoskhuja/32/47524_2.png) [@Ilyoskhuja](https://discuss.elastic.co/u/Ilyoskhuja)\
**Post date:** [December 20, 2019, 11:31am UTC](https://discuss.elastic.co/t/invalid-nest-response-built-from-a-unsuccessful-low-level-call-on-put/212202/4 "2019-12-20T11:31:10Z")

</div>

I used GeoLocation for Elasticsearch Model. is any changes on GeoLocation for elasticSearch version 7.5?

> ```
> namespace pz.Models
> {
> public class ElasticSearchModel : Model<Building>
> {     
> public ElasticSearchModel()
> {
> BuildingRooms = new List<BuildingRoomViewModel>();
> BuildingPhotos = new List<BuildingPhotoViewModel>();
>          
> }
> public GeoLocation Location { get; set;}
> public int Id { get; set; }
> public string BuildTitle { get; set; }
> public DateTime CreatedDate { get; set; }
> 
> public int TotalRooms { get; set; }
> public string Description { get; set; }
> public decimal? OwnerPrice { get; set; }
> public double? Size { get; set; }
> public string SizeName { get; set; }
> public string MoneyType { get; set; }
> public int BuildAction { get; set; }
> public bool? Payed { get; set; }
> public int BuildType { get; set; }
> public string Address { get; set; }
> public string DistrictUz { get; set; }
>         
> public string DistrictRu { get; set; }
>         
> public IList<BuildingRoomViewModel> BuildingRooms { get; set; }
> public IList<BuildingPhotoViewModel> BuildingPhotos { get; set; }
> 
> public override void LoadEntity(Building t)
> {
> base.LoadEntity(t);
> 
> SizeName = t.SizeName?.Localizations?.GetSingleOrDefaultByCurrentCulture().Name;
> MoneyType = t.MoneyType?.Localizations?.GetSingleOrDefaultByCurrentCulture().Name;
> BuildAction = t.BuildAction.Id;//.Localizations.GetSingleOrDefaultByCurrentCulture().Id;
> BuildType = t.BuildType.Id;//Localizations.GetSingleOrDefaultByCurrentCulture().Name;
> DistrictUz = t.District?.Localizations?.GetByCulture(1).Name;
> DistrictRu = t.District?.Localizations?.GetByCulture(2).Name;
> }
>      
> 
> }
> }
> 
> ```

---

<div class="post-metadata">

**Author:** ![Ilyoskhuja](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/ilyoskhuja/32/47524_2.png) [@Ilyoskhuja](https://discuss.elastic.co/u/Ilyoskhuja)\
**Post date:** [December 22, 2019, 4:15pm UTC](https://discuss.elastic.co/t/invalid-nest-response-built-from-a-unsuccessful-low-level-call-on-put/212202/5 "2019-12-22T16:15:12Z")

</div>

After using CloudConnectionPool elastingsearch works,Thank you. But still have problem with search, sometime it return invalid status.

> [Warning] Invalid NEST response built from a unsuccessful (400) low level call on POST: /honadonz12/\_search?typed\_keys=true
> 
> # Audit trail of this API call:
> 
> - [1] BadResponse: Node: [https://f3b=========================a99a39.europe-west1.gcp.cloud.es.io/](https://f3b=========================a99a39.europe-west1.gcp.cloud.es.io/) Took: 00:00:00.0159086
> 
> # OriginalException: Elasticsearch.Net.ElasticsearchClientException: Request failed to execute. Call: Status code 400 from: POST /honadonz12/\_search?typed\_keys=true. ServerError: Type: search\_phase\_execution\_exception Reason: "all shards failed"

---

<div class="post-metadata">

**Author:** ![forloop](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/forloop/32/9021_2.png) [@forloop](https://discuss.elastic.co/u/forloop)\
**Post date:** [December 23, 2019, 6:02am UTC](https://discuss.elastic.co/t/invalid-nest-response-built-from-a-unsuccessful-low-level-call-on-put/212202/6 "2019-12-23T06:02:45Z")

</div>

The response is a 400 HTTP response, which implies that there is something wrong with the request being sent. What is the exception and error that comes back from Elasticsearch? All these details should be on the response

---

<div class="post-metadata">

**Author:** ![Ilyoskhuja](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/ilyoskhuja/32/47524_2.png) [@Ilyoskhuja](https://discuss.elastic.co/u/Ilyoskhuja)\
**Post date:** [December 23, 2019, 7:50am UTC](https://discuss.elastic.co/t/invalid-nest-response-built-from-a-unsuccessful-low-level-call-on-put/212202/7 "2019-12-23T07:50:58Z")

</div>

reason":{"type":"query\_shard\_exception","reason":"failed to find geo\_point field [location]","index\_uuid":"uSLE-------M218wZKnHsEYg","index":"honadonz12"}}]},"status":400

---

<div class="post-metadata">

**Author:** ![forloop](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/forloop/32/9021_2.png) [@forloop](https://discuss.elastic.co/u/forloop)\
**Post date:** [December 24, 2019, 6:03am UTC](https://discuss.elastic.co/t/invalid-nest-response-built-from-a-unsuccessful-low-level-call-on-put/212202/8 "2019-12-24T06:03:35Z")

</div>

> [@Ilyoskhuja](#):
>
> {"type":"query\_shard\_exception","reason":"failed to find geo\_point field [location]","index\_uuid":"uSLE-------M218wZKnHsEYg","index":"honadonz12"}}]}

The error message indicates that there is no `geo_point` field called `location` in the mapping in index `"honadonz12"`. There _may_ be a `location` field, but it's not mapped as a `geo_point` data type.

---

<div class="post-metadata">

**Author:** ![Ilyoskhuja](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/ilyoskhuja/32/47524_2.png) [@Ilyoskhuja](https://discuss.elastic.co/u/Ilyoskhuja)\
**Post date:** [December 24, 2019, 6:06am UTC](https://discuss.elastic.co/t/invalid-nest-response-built-from-a-unsuccessful-low-level-call-on-put/212202/9 "2019-12-24T06:06:28Z")

</div>

```
 public class ElasticSearchModel : Model<Building>
    {     
         public ElasticSearchModel()
        {
            BuildingRooms = new List<BuildingRoomViewModel>();
            BuildingPhotos = new List<BuildingPhotoViewModel>();
         
        }
        public int Id { get; set; }
        public string BuildTitle { get; set; }
        public DateTime CreatedDate { get; set; }

        public GeoLocation Location { get; set;}
        public DateTime EndTopAdsDate { get; set; }
        public bool TopAds { get; set; }
        public int TotalRooms { get; set; }
        public string Description { get; set; }
        public decimal? OwnerPrice { get; set; }
        public double? Size { get; set; }
        public string SizeName { get; set; }
        public string MoneyType { get; set; }
        public int BuildAction { get; set; }
        public int BuildType { get; set; }
        public string Address { get; set; }
        public string DistrictUz { get; set; }
        
        public string DistrictRu { get; set; }
        
        public IList<BuildingRoomViewModel> BuildingRooms { get; set; }
        public IList<BuildingPhotoViewModel> BuildingPhotos { get; set; }

         public override void LoadEntity(Building t)
        {
            base.LoadEntity(t);

            SizeName = t.SizeName?.Localizations?.GetSingleOrDefaultByCurrentCulture().Name;
            MoneyType = t.MoneyType?.Localizations?.GetSingleOrDefaultByCurrentCulture().Name;
            BuildAction = t.BuildAction.Id;//.Localizations.GetSingleOrDefaultByCurrentCulture().Id;
            BuildType = t.BuildType.Id;//Localizations.GetSingleOrDefaultByCurrentCulture().Name;
            DistrictUz = t.District?.Localizations?.GetByCulture(1).Name;
            DistrictRu = t.District?.Localizations?.GetByCulture(2).Name;
            
        }
     
    }

```

This is my elasticsearch model, I use GeoLocation for location, but it worked older version of elasticsearch , now when I use version 7.5 I have this kind of error

---

<div class="post-metadata">

**Author:** ![forloop](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/forloop/32/9021_2.png) [@forloop](https://discuss.elastic.co/u/forloop)\
**Post date:** [December 24, 2019, 6:23am UTC](https://discuss.elastic.co/t/invalid-nest-response-built-from-a-unsuccessful-low-level-call-on-put/212202/10 "2019-12-24T06:23:35Z")

</div>

Is it possible that a document has been indexed _before_ a mapping with a `geo_point` has been created? In its default configuration, Elasticsearch will infer the mapping for a new index from the first document it sees. this inferred mapping will not infer a `geo_point` mapping for a JSON object with `lat` and `lon` properties however, but will infer an `object` mapping, so you need to explicitly create the mapping, either

1. whilst creating the index

or

1. after the index is created and before any documents have been indexed.

---

<div class="post-metadata">

**Author:** ![system](https://us1.discourse-cdn.com/elastic/original/3X/1/a/1ac57faf039f6b580b3f104ef42a2a89e41014de.png) [@system](https://discuss.elastic.co/u/system)\
**Post date:** [January 21, 2020, 6:23am UTC](https://discuss.elastic.co/t/invalid-nest-response-built-from-a-unsuccessful-low-level-call-on-put/212202/11 "2020-01-21T06:23:36Z")

</div>

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