# No handler found for uri curl -XPOST

**URL:** https://discuss.elastic.co/t/no-handler-found-for-uri-curl-xpost/57920
**Category:** Elasticsearch
**Created:** [August 12, 2016, 12:28pm UTC](https://discuss.elastic.co/t/no-handler-found-for-uri-curl-xpost/57920 "2016-08-12T12:28:46Z")
**Posts on this page:** 6
**Page:** 1

<div class="post-metadata">

### Author: ![dev\_tomas](https://avatars.discourse-cdn.com/v4/letter/d/74df32/32.png) [@dev\_tomas](https://discuss.elastic.co/u/dev_tomas)
#### Post date: [August 12, 2016, 12:28pm UTC](https://discuss.elastic.co/t/no-handler-found-for-uri-curl-xpost/57920/1 "2016-08-12T12:28:46Z")

</div>

Hi,

I'm having problems closing snapshot.

I'm going by [https://github.com/elastic/examples/tree/master/kibana\_nyc\_restaurants](https://github.com/elastic/examples/tree/master/kibana_nyc_restaurants)  
The command curl -XPOST "localhost:9200/\_snapshot/restaurants\_backup/snapshot\_1/\_restore" works fine  
and returns me that cannot restore index because it's open

So I tried to close it  
curl -XPOST "localhost:9200/\_snapshot/restaurants\_backup/snapshot\_1/\_close"  
But I got: No handler found for uri[/snapshot/restaurants\_backup/snapshot\_1/\_close] and method [POST]

Can't find any solution or information and this thing keeps bugging me.

---

<div class="post-metadata">

### Author: ![polyfractal](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/polyfractal/32/48162_2.png) [@polyfractal](https://discuss.elastic.co/u/polyfractal)
#### Post date: [August 12, 2016, 3:55pm UTC](https://discuss.elastic.co/t/no-handler-found-for-uri-curl-xpost/57920/2 "2016-08-12T15:55:13Z")

</div>

You have to close the index itself, not the `_snapshot` endpoint. Try this to close:

```auto
curl -XPOST "localhost:9200/restaurants_backup/_close"

```

---

<div class="post-metadata">

### Author: ![dev\_tomas](https://avatars.discourse-cdn.com/v4/letter/d/74df32/32.png) [@dev\_tomas](https://discuss.elastic.co/u/dev_tomas)
#### Post date: [August 15, 2016, 11:00am UTC](https://discuss.elastic.co/t/no-handler-found-for-uri-curl-xpost/57920/3 "2016-08-15T11:00:00Z")

</div>

Hmmm. Commands works but in the end I'm getting this.

$ curl -XPOST "localhost:9200/restaurants\_backup/\_close"  
% Total % Received % Xferd Average Speed Time Time Time Current  
Dload Upload Total Spent Left Speed  
100 355 100 355 0 0 355 0 0:00:01 --:--:-- 0:00:01 346k{"error":{"root\_cause":[{"type":"index\_not\_found\_exception","reason":"no such index","resource.type":"index\_or\_alias","[resource.id](http://resource.id)":"restaurants\_backup","index":"restaurants\_backup"}],"type":"index\_not\_found\_exception","reason":"no such index","resource.type":"index\_or\_alias","[resource.id](http://resource.id)":"restaurants\_backup","index":"restaurants\_backup"},"status":404}

---

<div class="post-metadata">

### Author: ![cbuescher](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/cbuescher/32/60402_2.png) [@cbuescher](https://discuss.elastic.co/u/cbuescher)
#### Post date: [August 15, 2016, 11:11am UTC](https://discuss.elastic.co/t/no-handler-found-for-uri-curl-xpost/57920/4 "2016-08-15T11:11:36Z")

</div>

> [@dev\_tomas](#):
>
> "index\_not\_found\_exception"

This tells you that the index you are trying to close doesn't exist. If it should (maybe you just used it), the next step would be to figure out why. But maybe its just a typo? You can check the names (and the open/closed) status of the indices using the `_cat/indices` endpoint:

```auto
curl -XGET localhost:9200/_cat/indices

```

---

<div class="post-metadata">

### Author: ![dev\_tomas](https://avatars.discourse-cdn.com/v4/letter/d/74df32/32.png) [@dev\_tomas](https://discuss.elastic.co/u/dev_tomas)
#### Post date: [August 15, 2016, 11:19am UTC](https://discuss.elastic.co/t/no-handler-found-for-uri-curl-xpost/57920/5 "2016-08-15T11:19:48Z")

</div>

Aaaah. Got it now. Yea, was wrong name.

$ curl 'localhost:9200/\_cat/indices?v'  
% Total % Received % Xferd Average Speed Time Time Time Current  
Dload Upload Total Spent Left Speed  
100 267 100 267 0 0 16687 0 --:--:-- --:--:-- --:--:-- 16687health status index pri rep docs.count docs.deleted store.size pri.store.size  
yellow open .kibana 1 1 18 1 58.8kb 58.8kb  
yellow open nyc\_restaurants 5 1 473039 0 176.9mb 176.9mb

So this worked:  
curl -XPOST "localhost:9200/nyc\_restaurants/\_close"

---

<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: [July 5, 2017, 10:27pm UTC](https://discuss.elastic.co/t/no-handler-found-for-uri-curl-xpost/57920/6 "2017-07-05T22:27:47Z")

</div>


