# Elasticsearch not creating index via jdbc river

**URL:** <https://discuss.elastic.co/t/elasticsearch-not-creating-index-via-jdbc-river/24865>\
**Category:** Elasticsearch\
**Created:** [July 3, 2015, 11:24am UTC](https://discuss.elastic.co/t/elasticsearch-not-creating-index-via-jdbc-river/24865 "2015-07-03T11:24:46Z")\
**Posts on this page:** 6\
**Page:** 1

<div class="post-metadata">

**Author:** ![PavanRGowda](https://avatars.discourse-cdn.com/v4/letter/p/ce73a5/32.png) [@PavanRGowda](https://discuss.elastic.co/u/PavanRGowda)\
**Post date:** [July 3, 2015, 11:24am UTC](https://discuss.elastic.co/t/elasticsearch-not-creating-index-via-jdbc-river/24865/1 "2015-07-03T11:24:46Z")

</div>

Elasticsearch was indexing my mysql data previously. I recently installed shield plugin from then it's not getting created.  
Below is my configuration -

```
http://pavan:password@localhost:9200/_river/sample/_meta

{
    			"type" : "jdbc",
    			"jdbc" : {
        				"url" : "jdbc:mysql://localhost:3306/test",
        				"user" : "root",
        				"password" : "password",
        				"sql" : "select username from user",
                 		        "index" : "sample"
                        
                  		
				 }
}

```

When I run the following code in POSTMAN and look for existing indices, it only shows **\_river** but not `sample` and when I see the logs at terminal I get the following error -

```
[2015-07-03 16:40:11,682][WARN][river.routing] [Grim Hunter] failed to get/parse _meta for [sample]
org.elasticsearch.shield.authz.AuthorizationException: action [indices:data/read/get] is unauthorized for user [__es_system_user]
	at org.elasticsearch.shield.authz.InternalAuthorizationService.denial(InternalAuthorizationService.java:256)
	at org.elasticsearch.shield.authz.InternalAuthorizationService.authorize(InternalAuthorizationService.java:111)
	at org.elasticsearch.shield.action.ShieldActionFilter.apply(ShieldActionFilter.java:112)
	at org.elasticsearch.action.support.TransportAction$RequestFilterChain.proceed(TransportAction.java:165)
	at org.elasticsearch.action.support.TransportAction.execute(TransportAction.java:82)
	at org.elasticsearch.client.node.NodeClient.execute(NodeClient.java:98)
	at org.elasticsearch.client.support.AbstractClient.get(AbstractClient.java:193)
	at org.elasticsearch.action.get.GetRequestBuilder.doExecute(GetRequestBuilder.java:201)
	at org.elasticsearch.action.ActionRequestBuilder.execute(ActionRequestBuilder.java:91)
	at org.elasticsearch.action.ActionRequestBuilder.execute(ActionRequestBuilder.java:65)
	at org.elasticsearch.action.ActionRequestBuilder.get(ActionRequestBuilder.java:73)
	at org.elasticsearch.river.routing.RiversRouter.updateRiverClusterState(RiversRouter.java:137)
	at org.elasticsearch.river.routing.RiversRouter$1.execute(RiversRouter.java:108)
	at org.elasticsearch.river.cluster.RiverClusterService$1.run(RiverClusterService.java:110)
	at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1142)
	at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:617)
	at java.lang.Thread.run(Thread.java:745)
```

---

<div class="post-metadata">

**Author:** ![warkolm](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/warkolm/32/39224_2.png) [@warkolm](https://discuss.elastic.co/u/warkolm)\
**Post date:** [July 4, 2015, 3:44am UTC](https://discuss.elastic.co/t/elasticsearch-not-creating-index-via-jdbc-river/24865/2 "2015-07-04T03:44:38Z")

</div>

> [@PavanRGowda](#):
>
> action [indices:data/read/get] is unauthorized for user [\_\_es\_system\_user]

That'd be why.  
Did you set up this `pavan` user in Shield correctly?

---

<div class="post-metadata">

**Author:** ![jprante](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/jprante/32/44941_2.png) [@jprante](https://discuss.elastic.co/u/jprante)\
**Post date:** [July 4, 2015, 1:15pm UTC](https://discuss.elastic.co/t/elasticsearch-not-creating-index-via-jdbc-river/24865/3 "2015-07-04T13:15:30Z")

</div>

Shield does not support JDBC plugin/river.

---

<div class="post-metadata">

**Author:** ![PavanRGowda](https://avatars.discourse-cdn.com/v4/letter/p/ce73a5/32.png) [@PavanRGowda](https://discuss.elastic.co/u/PavanRGowda)\
**Post date:** [July 6, 2015, 5:44am UTC](https://discuss.elastic.co/t/elasticsearch-not-creating-index-via-jdbc-river/24865/4 "2015-07-06T05:44:53Z")

</div>

Thank you jprante. Are there any alternatives to overcome this? I want something which is similar to JDBC river. I came across Logstash JDBC input plugin, will that work ?

---

<div class="post-metadata">

**Author:** ![warkolm](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/warkolm/32/39224_2.png) [@warkolm](https://discuss.elastic.co/u/warkolm)\
**Post date:** [July 6, 2015, 5:47am UTC](https://discuss.elastic.co/t/elasticsearch-not-creating-index-via-jdbc-river/24865/5 "2015-07-06T05:47:33Z")

</div>

That should work, as Logstash is supported by Shield.

---

<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 6, 2017, 12:03am UTC](https://discuss.elastic.co/t/elasticsearch-not-creating-index-via-jdbc-river/24865/6 "2017-07-06T00:03:30Z")

</div>


