# PostgreSQL integration

**URL:** <https://discuss.elastic.co/t/postgresql-integration/8316>\
**Category:** Elasticsearch\
**Created:** [July 4, 2012, 3:32pm UTC](https://discuss.elastic.co/t/postgresql-integration/8316 "2012-07-04T15:32:31Z")\
**Posts on this page:** 20\
**Page:** 1

<div class="post-metadata">

**Author:** ![Sanx\_El\_Santo](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/sanx_el_santo/32/1990_2.png) [@Sanx\_El\_Santo](https://discuss.elastic.co/u/Sanx_El_Santo)\
**Post date:** [July 4, 2012, 3:32pm UTC](https://discuss.elastic.co/t/postgresql-integration/8316/1 "2012-07-04T15:32:31Z")

</div>

Greetings to all

Is there a process for setting up ElasticSearch to automatically index  
data in PostgreSQL and make it search-able?

I am begining a project and I'm not quite sure where I have to start

anyone have any suggestions

Thanks for your attention

---

<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, 2012, 5:37pm UTC](https://discuss.elastic.co/t/postgresql-integration/8316/2 "2012-07-04T17:37:29Z")

</div>

You can try the JDBC river plugin

> **[GitHub - jprante/elasticsearch-jdbc: JDBC importer for Elasticsearch](https://github.com/jprante/elasticsearch-jdbc)**
>
> JDBC importer for Elasticsearch. Contribute to jprante/elasticsearch-jdbc development by creating an account on GitHub.

Best regards,

Jörg

On Wednesday, July 4, 2012 5:32:31 PM UTC+2, Sanx El Santo wrote:

> Greetings to all
> 
> Is there a process for setting up Elasticsearch to automatically index  
> data in PostgreSQL and make it search-able?
> 
> I am begining a project and I'm not quite sure where I have to start
> 
> anyone have any suggestions
> 
> Thanks for your attention

---

<div class="post-metadata">

**Author:** ![DavidLR\_2](https://avatars.discourse-cdn.com/v4/letter/d/7ab992/32.png) [@DavidLR\_2](https://discuss.elastic.co/u/DavidLR_2)\
**Post date:** [August 23, 2012, 7:58pm UTC](https://discuss.elastic.co/t/postgresql-integration/8316/3 "2012-08-23T19:58:13Z")

</div>

I cannot get this going with postgresql 9.1, I only get the error "no  
suitable driver found for postgresql.  
I know nothing about java...  
I downloaded the postgresql jdbc4 driver from here:  
[http://jdbc.postgresql.org/](http://jdbc.postgresql.org/)  
extracted it and put the postgresql-9.1-902.jdbc.jar file in  
/usr/share/elasticsearch/plugins/river\_jdbc which is where the  
elasticsearch-river-jdbc-1.3.2.jar file is.  
My curl is

curl -XPUT 'localhost:9200/\_river/my\_jdbc\_river/\_meta' -d '{  
"type" : "jdbc",  
"jdbc" : {  
"driver" : "org.postgresql.Driver",  
"url" : "jdbc.postgresql://localhost:5432/test",  
"username" : "username",  
"password" : "password",  
"sql" : "select \* from everything"  
},  
"index" : {  
"index" : "jdbc",  
"type" : "jdbc"  
}  
}'

and I always get back this error

[ERROR][river.jdbc] No suitable driver found for  
postgresql://localhost:5432/nibbel  
java.sql.SQLException: No suitable driver found for  
postgresql://localhost:5432/test  
at java.sql.DriverManager.getConnection(DriverManager.java:602)  
at java.sql.DriverManager.getConnection(DriverManager.java:185)  
at  
org.elasticsearch.river.jdbc.SQLService.getConnection(SQLService.java:103)  
at  
org.elasticsearch.river.jdbc.JDBCRiver$JDBCConnector.run(JDBCRiver.java:194)

Any ideas? Again I know nothing about java but was hoping to index and  
search postgresql databases with elasticsearch.  
Thanks

--

---

<div class="post-metadata">

**Author:** ![dadoonet](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/dadoonet/32/137187_2.png) [@dadoonet](https://discuss.elastic.co/u/dadoonet)\
**Post date:** [August 23, 2012, 8:00pm UTC](https://discuss.elastic.co/t/postgresql-integration/8316/4 "2012-08-23T20:00:44Z")

</div>

Try to put postgresql jar in es lib dir. And restart ES.

--  
David 😉  
Twitter : @dadoonet / @elasticsearchfr / @scrutmydocs

Le 23 août 2012 à 21:58, DavidLR [davidlreiff@gmail.com](mailto:davidlreiff@gmail.com) a écrit :

I cannot get this going with postgresql 9.1, I only get the error "no suitable driver found for postgresql.  
I know nothing about java...  
I downloaded the postgresql jdbc4 driver from here: [http://jdbc.postgresql.org/](http://jdbc.postgresql.org/)  
extracted it and put the postgresql-9.1-902.jdbc.jar file in /usr/share/elasticsearch/plugins/river\_jdbc which is where the elasticsearch-river-jdbc-1.3.2.jar file is.  
My curl is

curl -XPUT 'localhost:9200/\_river/my\_jdbc\_river/\_meta' -d '{  
"type" : "jdbc",  
"jdbc" : {  
"driver" : "org.postgresql.Driver",  
"url" : "jdbc.postgresql://localhost:5432/test",  
"username" : "username",  
"password" : "password",  
"sql" : "select \* from everything"  
},  
"index" : {  
"index" : "jdbc",  
"type" : "jdbc"  
}  
}'

and I always get back this error

[ERROR][river.jdbc] No suitable driver found for postgresql://localhost:5432/nibbel  
java.sql.SQLException: No suitable driver found for postgresql://localhost:5432/test  
at java.sql.DriverManager.getConnection(DriverManager.java:602)  
at java.sql.DriverManager.getConnection(DriverManager.java:185)  
at org.elasticsearch.river.jdbc.SQLService.getConnection(SQLService.java:103)  
at org.elasticsearch.river.jdbc.JDBCRiver$JDBCConnector.run(JDBCRiver.java:194)

Any ideas? Again I know nothing about java but was hoping to index and search postgresql databases with elasticsearch.  
Thanks

--

--

---

<div class="post-metadata">

**Author:** ![dadoonet](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/dadoonet/32/137187_2.png) [@dadoonet](https://discuss.elastic.co/u/dadoonet)\
**Post date:** [August 23, 2012, 8:03pm UTC](https://discuss.elastic.co/t/postgresql-integration/8316/5 "2012-08-23T20:03:29Z")

</div>

And try with jdbc:postgresql://localhost:5432/test (not jdbc.postgresql)

--  
David 😉  
Twitter : @dadoonet / @elasticsearchfr / @scrutmydocs

Le 23 août 2012 à 22:00, David Pilato [david@pilato.fr](mailto:david@pilato.fr) a écrit :

Try to put postgresql jar in es lib dir. And restart ES.

--  
David 😉  
Twitter : @dadoonet / @elasticsearchfr / @scrutmydocs

Le 23 août 2012 à 21:58, DavidLR [davidlreiff@gmail.com](mailto:davidlreiff@gmail.com) a écrit :

I cannot get this going with postgresql 9.1, I only get the error "no suitable driver found for postgresql.  
I know nothing about java...  
I downloaded the postgresql jdbc4 driver from here: [http://jdbc.postgresql.org/](http://jdbc.postgresql.org/)  
extracted it and put the postgresql-9.1-902.jdbc.jar file in /usr/share/elasticsearch/plugins/river\_jdbc which is where the elasticsearch-river-jdbc-1.3.2.jar file is.  
My curl is

curl -XPUT 'localhost:9200/\_river/my\_jdbc\_river/\_meta' -d '{  
"type" : "jdbc",  
"jdbc" : {  
"driver" : "org.postgresql.Driver",  
"url" : "jdbc.postgresql://localhost:5432/test",  
"username" : "username",  
"password" : "password",  
"sql" : "select \* from everything"  
},  
"index" : {  
"index" : "jdbc",  
"type" : "jdbc"  
}  
}'

and I always get back this error

[ERROR][river.jdbc] No suitable driver found for postgresql://localhost:5432/nibbel  
java.sql.SQLException: No suitable driver found for postgresql://localhost:5432/test  
at java.sql.DriverManager.getConnection(DriverManager.java:602)  
at java.sql.DriverManager.getConnection(DriverManager.java:185)  
at org.elasticsearch.river.jdbc.SQLService.getConnection(SQLService.java:103)  
at org.elasticsearch.river.jdbc.JDBCRiver$JDBCConnector.run(JDBCRiver.java:194)

Any ideas? Again I know nothing about java but was hoping to index and search postgresql databases with elasticsearch.  
Thanks

--

--

--

---

<div class="post-metadata">

**Author:** ![DavidLR\_2](https://avatars.discourse-cdn.com/v4/letter/d/7ab992/32.png) [@DavidLR\_2](https://discuss.elastic.co/u/DavidLR_2)\
**Post date:** [August 23, 2012, 10:44pm UTC](https://discuss.elastic.co/t/postgresql-integration/8316/6 "2012-08-23T22:44:07Z")

</div>

Thanks but I already tried putting the postgresql jar in es/lib (in  
addition to being in /plugins/river-jdbc) and I've tried several  
combinations like  
"jdbc: postgresql://localhost:5432/test"  
"jdbc:postgresql:localhost/test"  
"jdbc:postgresql:test"

for "driver" I tried  
"com.postgresql.jdbc.Driver"  
".postgresql.jdbc.Driver"  
and realized, through error messages, that I need  
"org.postgresql.jdbc.Driver"

Otherwise, I always get the same error.

Now I'm wondering if I'm starting es in a messed-up way. I've been using  
'./bin/elasticsearch -f -Des.config=/etc/elasticsearch/elasticsearch.yml'  
and maybe the file has paths wrong? I'll check more.

Thanks for the help

--

---

<div class="post-metadata">

**Author:** ![dadoonet](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/dadoonet/32/137187_2.png) [@dadoonet](https://discuss.elastic.co/u/dadoonet)\
**Post date:** [August 24, 2012, 1:49am UTC](https://discuss.elastic.co/t/postgresql-integration/8316/7 "2012-08-24T01:49:12Z")

</div>

Here is what I can see from postgresql docs.

Driver class : org.postgresql.Driver  
URL :  
jdbc:postgresql:database  
jdbc:postgresql://host/database  
jdbc:postgresql://host:port/database

I hope this helps.

--  
David 😉  
Twitter : @dadoonet / @elasticsearchfr / @scrutmydocs

Le 24 août 2012 à 00:44, David Reiff [davidlreiff@gmail.com](mailto:davidlreiff@gmail.com) a écrit :

Thanks but I already tried putting the postgresql jar in es/lib (in addition to being in /plugins/river-jdbc) and I've tried several combinations like  
"jdbc: postgresql://localhost:5432/test"  
"jdbc:postgresql:localhost/test"  
"jdbc:postgresql:test"

for "driver" I tried  
"com.postgresql.jdbc.Driver"  
".postgresql.jdbc.Driver"  
and realized, through error messages, that I need "org.postgresql.jdbc.Driver"

Otherwise, I always get the same error.

Now I'm wondering if I'm starting es in a messed-up way. I've been using  
'./bin/elasticsearch -f -Des.config=/etc/elasticsearch/elasticsearch.yml'  
and maybe the file has paths wrong? I'll check more.

Thanks for the help

--

--

---

<div class="post-metadata">

**Author:** ![Sourav\_Gulati](https://avatars.discourse-cdn.com/v4/letter/s/e68b1a/32.png) [@Sourav\_Gulati](https://discuss.elastic.co/u/Sourav_Gulati)\
**Post date:** [August 24, 2012, 4:45am UTC](https://discuss.elastic.co/t/postgresql-integration/8316/8 "2012-08-24T04:45:21Z")

</div>

Use ODBC driver instaed of JDBC. that will help  
On Friday, August 24, 2012 1:28:13 AM UTC+5:30, DavidLR wrote:

> I cannot get this going with postgresql 9.1, I only get the error "no  
> suitable driver found for postgresql.  
> I know nothing about java...  
> I downloaded the postgresql jdbc4 driver from here:  
> [http://jdbc.postgresql.org/](http://jdbc.postgresql.org/)  
> extracted it and put the postgresql-9.1-902.jdbc.jar file in  
> /usr/share/elasticsearch/plugins/river\_jdbc which is where the  
> elasticsearch-river-jdbc-1.3.2.jar file is.  
> My curl is
> 
> curl -XPUT 'localhost:9200/\_river/my\_jdbc\_river/\_meta' -d '{  
> "type" : "jdbc",  
> "jdbc" : {  
> "driver" : "org.postgresql.Driver",  
> "url" : "jdbc.postgresql://localhost:5432/test",  
> "username" : "username",  
> "password" : "password",  
> "sql" : "select \* from everything"  
> },  
> "index" : {  
> "index" : "jdbc",  
> "type" : "jdbc"  
> }  
> }'
> 
> and I always get back this error
> 
> [ERROR][river.jdbc] No suitable driver found for  
> postgresql://localhost:5432/nibbel  
> java.sql.SQLException: No suitable driver found for  
> postgresql://localhost:5432/test  
> at java.sql.DriverManager.getConnection(DriverManager.java:602)  
> at java.sql.DriverManager.getConnection(DriverManager.java:185)  
> at  
> org.elasticsearch.river.jdbc.SQLService.getConnection(SQLService.java:103)  
> at  
> org.elasticsearch.river.jdbc.JDBCRiver$JDBCConnector.run(JDBCRiver.java:194)
> 
> Any ideas? Again I know nothing about java but was hoping to index and  
> search postgresql databases with elasticsearch.  
> Thanks

--

---

<div class="post-metadata">

**Author:** ![DavidLR\_2](https://avatars.discourse-cdn.com/v4/letter/d/7ab992/32.png) [@DavidLR\_2](https://discuss.elastic.co/u/DavidLR_2)\
**Post date:** [September 7, 2012, 2:20am UTC](https://discuss.elastic.co/t/postgresql-integration/8316/9 "2012-09-07T02:20:10Z")

</div>

I'm really grateful for your help, David, but I still don't have it going.  
I haven't had much time to work on it since my last post, but I'm beginning  
to think that the postgres jdbc driver is not in the class path. Again, I  
know nothing about java or class paths; I get this from google searches.  
I'm open to any ideas about how to check my Elasticsearch class path and  
how to add the postgresql jdbc driver to it, if that's needed. The examples  
I've seen about setting class paths seem to apply if I were creating my own  
java program.

Dave

On Thursday, August 23, 2012 8:49:12 PM UTC-5, David Pilato wrote:

> Here is what I can see from postgresql docs.
> 
> Driver class : org.postgresql.Driver  
> URL :
> 
> - 
> 
> jdbc:postgresql:_database_
> 
> - 
> 
> jdbc:postgresql://_host_/_database_
> 
> - 
> 
> jdbc:postgresql://_host_:_port_/_database_
> 
> - 
> - 
> 
> I hope this helps.
> 
> --  
> David 😉  
> Twitter : @dadoonet / @elasticsearchfr / @scrutmydocs
> 
> Le 24 août 2012 à 00:44, David Reiff \<[david...@gmail.com](mailto:david...@gmail.com) \<javascript:\>\> a  
> écrit :
> 
> Thanks but I already tried putting the postgresql jar in es/lib (in  
> addition to being in /plugins/river-jdbc) and I've tried several  
> combinations like  
> "jdbc: postgresql://localhost:5432/test"  
> "jdbc:postgresql:localhost/test"  
> "jdbc:postgresql:test"
> 
> for "driver" I tried  
> "com.postgresql.jdbc.Driver"  
> ".postgresql.jdbc.Driver"  
> and realized, through error messages, that I need  
> "org.postgresql.jdbc.Driver"
> 
> Otherwise, I always get the same error.
> 
> Now I'm wondering if I'm starting es in a messed-up way. I've been using  
> './bin/elasticsearch -f -Des.config=/etc/elasticsearch/elasticsearch.yml'  
> and maybe the file has paths wrong? I'll check more.
> 
> Thanks for the help
> 
> --

--

---

<div class="post-metadata">

**Author:** ![dadoonet](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/dadoonet/32/137187_2.png) [@dadoonet](https://discuss.elastic.co/u/dadoonet)\
**Post date:** [September 7, 2012, 5:42am UTC](https://discuss.elastic.co/t/postgresql-integration/8316/10 "2012-09-07T05:42:52Z")

</div>

Could you "ls -l" your es lib dir ?

--  
David 😉  
Twitter : @dadoonet / @elasticsearchfr / @scrutmydocs

Le 7 sept. 2012 à 04:20, DavidLR [davidlreiff@gmail.com](mailto:davidlreiff@gmail.com) a écrit :

> I'm really grateful for your help, David, but I still don't have it going. I haven't had much time to work on it since my last post, but I'm beginning to think that the postgres jdbc driver is not in the class path. Again, I know nothing about java or class paths; I get this from google searches. I'm open to any ideas about how to check my Elasticsearch class path and how to add the postgresql jdbc driver to it, if that's needed. The examples I've seen about setting class paths seem to apply if I were creating my own java program.
> 
> Dave
> 
> On Thursday, August 23, 2012 8:49:12 PM UTC-5, David Pilato wrote:  
> Here is what I can see from postgresql docs.
> 
> Driver class : org.postgresql.Driver  
> URL :  
> jdbc:postgresql:database  
> jdbc:postgresql://host/database  
> jdbc:postgresql://host:port/database
> 
> I hope this helps.
> 
> --  
> David 😉  
> Twitter : @dadoonet / @elasticsearchfr / @scrutmydocs
> 
> Le 24 août 2012 à 00:44, David Reiff [david...@gmail.com](mailto:david...@gmail.com) a écrit :
> 
> Thanks but I already tried putting the postgresql jar in es/lib (in addition to being in /plugins/river-jdbc) and I've tried several combinations like  
> "jdbc: postgresql://localhost:5432/test"  
> "jdbc:postgresql:localhost/test"  
> "jdbc:postgresql:test"
> 
> for "driver" I tried  
> "com.postgresql.jdbc.Driver"  
> ".postgresql.jdbc.Driver"  
> and realized, through error messages, that I need "org.postgresql.jdbc.Driver"
> 
> Otherwise, I always get the same error.
> 
> Now I'm wondering if I'm starting es in a messed-up way. I've been using  
> './bin/elasticsearch -f -Des.config=/etc/elasticsearch/elasticsearch.yml'  
> and maybe the file has paths wrong? I'll check more.
> 
> Thanks for the help
> 
> --
> 
> --

--

---

<div class="post-metadata">

**Author:** ![Ivan](https://avatars.discourse-cdn.com/v4/letter/i/df788c/32.png) [@Ivan](https://discuss.elastic.co/u/Ivan)\
**Post date:** [September 7, 2012, 4:18pm UTC](https://discuss.elastic.co/t/postgresql-integration/8316/11 "2012-09-07T16:18:23Z")

</div>

Are you using the service wrapper by any chance? Given your startup  
command above, probably not.

--  
Ivan

On Thu, Sep 6, 2012 at 7:20 PM, DavidLR [davidlreiff@gmail.com](mailto:davidlreiff@gmail.com) wrote:

> I'm really grateful for your help, David, but I still don't have it going. I  
> haven't had much time to work on it since my last post, but I'm beginning to  
> think that the postgres jdbc driver is not in the class path. Again, I know  
> nothing about java or class paths; I get this from google searches. I'm open  
> to any ideas about how to check my Elasticsearch class path and how to add  
> the postgresql jdbc driver to it, if that's needed. The examples I've seen  
> about setting class paths seem to apply if I were creating my own java  
> program.
> 
> Dave
> 
> On Thursday, August 23, 2012 8:49:12 PM UTC-5, David Pilato wrote:
> 
> > Here is what I can see from postgresql docs.
> > 
> > Driver class : org.postgresql.Driver  
> > URL :
> > 
> > jdbc:postgresql:database
> > 
> > jdbc:postgresql://host/database
> > 
> > jdbc:postgresql://host:port/database
> > 
> > I hope this helps.
> > 
> > --  
> > David 😉  
> > Twitter : @dadoonet / @elasticsearchfr / @scrutmydocs
> > 
> > Le 24 août 2012 à 00:44, David Reiff [david...@gmail.com](mailto:david...@gmail.com) a écrit :
> > 
> > Thanks but I already tried putting the postgresql jar in es/lib (in  
> > addition to being in /plugins/river-jdbc) and I've tried several  
> > combinations like  
> > "jdbc: postgresql://localhost:5432/test"  
> > "jdbc:postgresql:localhost/test"  
> > "jdbc:postgresql:test"
> > 
> > for "driver" I tried  
> > "com.postgresql.jdbc.Driver"  
> > ".postgresql.jdbc.Driver"  
> > and realized, through error messages, that I need  
> > "org.postgresql.jdbc.Driver"
> > 
> > Otherwise, I always get the same error.
> > 
> > Now I'm wondering if I'm starting es in a messed-up way. I've been using  
> > './bin/elasticsearch -f -Des.config=/etc/elasticsearch/elasticsearch.yml'  
> > and maybe the file has paths wrong? I'll check more.
> > 
> > Thanks for the help
> > 
> > --
> 
> --

--

---

<div class="post-metadata">

**Author:** ![DavidLR\_2](https://avatars.discourse-cdn.com/v4/letter/d/7ab992/32.png) [@DavidLR\_2](https://discuss.elastic.co/u/DavidLR_2)\
**Post date:** [September 7, 2012, 8:04pm UTC](https://discuss.elastic.co/t/postgresql-integration/8316/12 "2012-09-07T20:04:24Z")

</div>

Sure -

dave@dave-desktop:~$ ls -l /usr/share/elasticsearch/lib  
total 14952  
-rw-r--r-- 1 root root 9998142 2012-07-02 15:04 elasticsearch-0.19.8.jar  
-rw-r--r-- 1 root root 865400 2012-07-02 15:04 jna-3.3.0.jar  
-rw-r--r-- 1 root root 481535 2012-07-02 15:04 log4j-1.2.16.jar  
-rw-r--r-- 1 root root 1172498 2012-07-02 15:04 lucene-analyzers-3.6.0.jar  
-rw-r--r-- 1 root root 1535258 2012-07-02 15:04 lucene-core-3.6.0.jar  
-rw-r--r-- 1 root root 89201 2012-07-02 15:04 lucene-highlighter-3.6.0.jar  
-rw-r--r-- 1 root root 29814 2012-07-02 15:04 lucene-memory-3.6.0.jar  
-rw-r--r-- 1 root root 47407 2012-07-02 15:04 lucene-queries-3.6.0.jar  
-rw-rw-r-- 1 dave dave 507454 2012-08-23 13:34 postgresql-9.1-902.jdbc3.jar  
-rw-rw-r-- 1 dave dave 561969 2012-08-17 10:58 postgresql-9.1-902.jdbc4.jar  
drwxr-xr-x 2 root root 4096 2012-08-22 09:14 sigar

I added the jdbc3.jar in case it might help, but, no help.

On Fri, Sep 7, 2012 at 12:42 AM, David Pilato [david@pilato.fr](mailto:david@pilato.fr) wrote:

> Could you "ls -l" your es lib dir ?
> 
> --  
> David 😉  
> Twitter : @dadoonet / @elasticsearchfr / @scrutmydocs
> 
> Le 7 sept. 2012 à 04:20, DavidLR [davidlreiff@gmail.com](mailto:davidlreiff@gmail.com) a écrit :

--

---

<div class="post-metadata">

**Author:** ![DavidLR\_2](https://avatars.discourse-cdn.com/v4/letter/d/7ab992/32.png) [@DavidLR\_2](https://discuss.elastic.co/u/DavidLR_2)\
**Post date:** [September 7, 2012, 8:08pm UTC](https://discuss.elastic.co/t/postgresql-integration/8316/13 "2012-09-07T20:08:14Z")

</div>

No, I'm not. I was hoping to just get a simple database table indexed to  
get started, then move on to learning more, but I can't get any indexing  
going. For now I'm starting it with ./bin/elasticsearch -f  
-Des.config=/etc/elasticsearch/elasticsearch.yml

Thanks Dave

On Fri, Sep 7, 2012 at 11:18 AM, Ivan Brusic [ivan@brusic.com](mailto:ivan@brusic.com) wrote:

> Are you using the service wrapper by any chance? Given your startup  
> command above, probably not.
> 
> --  
> Ivan
> 
> On Thu, Sep 6, 2012 at 7:20 PM, DavidLR [davidlreiff@gmail.com](mailto:davidlreiff@gmail.com) wrote:
> 
> > I'm really grateful for your help, David, but I still don't have it  
> > going. I  
> > haven't had much time to work on it since my last post, but I'm  
> > beginning to  
> > think that the postgres jdbc driver is not in the class path. Again, I  
> > know  
> > nothing about java or class paths; I get this from google searches. I'm  
> > open  
> > to any ideas about how to check my Elasticsearch class path and how to  
> > add  
> > the postgresql jdbc driver to it, if that's needed. The examples I've  
> > seen  
> > about setting class paths seem to apply if I were creating my own java  
> > program.
> > 
> > Dave
> > 
> > On Thursday, August 23, 2012 8:49:12 PM UTC-5, David Pilato wrote:
> > 
> > > Here is what I can see from postgresql docs.
> > > 
> > > Driver class : org.postgresql.Driver  
> > > URL :
> > > 
> > > jdbc:postgresql:database
> > > 
> > > jdbc:postgresql://host/database
> > > 
> > > jdbc:postgresql://host:port/database
> > > 
> > > I hope this helps.
> > > 
> > > --  
> > > David 😉  
> > > Twitter : @dadoonet / @elasticsearchfr / @scrutmydocs
> > > 
> > > Le 24 août 2012 à 00:44, David Reiff [david...@gmail.com](mailto:david...@gmail.com) a écrit :
> > > 
> > > Thanks but I already tried putting the postgresql jar in es/lib (in  
> > > addition to being in /plugins/river-jdbc) and I've tried several  
> > > combinations like  
> > > "jdbc: postgresql://localhost:5432/test"  
> > > "jdbc:postgresql:localhost/test"  
> > > "jdbc:postgresql:test"
> > > 
> > > for "driver" I tried  
> > > "com.postgresql.jdbc.Driver"  
> > > ".postgresql.jdbc.Driver"  
> > > and realized, through error messages, that I need  
> > > "org.postgresql.jdbc.Driver"
> > > 
> > > Otherwise, I always get the same error.
> > > 
> > > Now I'm wondering if I'm starting es in a messed-up way. I've been using  
> > > './bin/elasticsearch -f  
> > > -Des.config=/etc/elasticsearch/elasticsearch.yml'  
> > > and maybe the file has paths wrong? I'll check more.
> > > 
> > > Thanks for the help
> > > 
> > > --
> > 
> > --
> 
> --

--

---

<div class="post-metadata">

**Author:** ![dadoonet](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/dadoonet/32/137187_2.png) [@dadoonet](https://discuss.elastic.co/u/dadoonet)\
**Post date:** [September 7, 2012, 8:32pm UTC](https://discuss.elastic.co/t/postgresql-integration/8316/14 "2012-09-07T20:32:48Z")

</div>

Hmmm.

Adding jdbc3 won't help. Remove it.

I misread Jörg Prante readme. You have to put your jar in plugins/river-jdbc  
directory.  
Sorry.

See here: [Quickstart · jprante/elasticsearch-jdbc Wiki · GitHub](https://github.com/jprante/elasticsearch-river-jdbc/wiki/Quickstart)

HTH  
David

Le 7 septembre 2012 à 22:04, David Reiff [davidlreiff@gmail.com](mailto:davidlreiff@gmail.com) a écrit :

> Sure -
> 
> dave@dave-desktop:~$ ls -l /usr/share/elasticsearch/lib  
> total 14952  
> -rw-r--r-- 1 root root 9998142 2012-07-02 15:04 elasticsearch-0.19.8.jar  
> -rw-r--r-- 1 root root 865400 2012-07-02 15:04 jna-3.3.0.jar  
> -rw-r--r-- 1 root root 481535 2012-07-02 15:04 log4j-1.2.16.jar  
> -rw-r--r-- 1 root root 1172498 2012-07-02 15:04 lucene-analyzers-3.6.0.jar  
> -rw-r--r-- 1 root root 1535258 2012-07-02 15:04 lucene-core-3.6.0.jar  
> -rw-r--r-- 1 root root 89201 2012-07-02 15:04 lucene-highlighter-3.6.0.jar  
> -rw-r--r-- 1 root root 29814 2012-07-02 15:04 lucene-memory-3.6.0.jar  
> -rw-r--r-- 1 root root 47407 2012-07-02 15:04 lucene-queries-3.6.0.jar  
> -rw-rw-r-- 1 dave dave 507454 2012-08-23 13:34 postgresql-9.1-902.jdbc3.jar  
> -rw-rw-r-- 1 dave dave 561969 2012-08-17 10:58 postgresql-9.1-902.jdbc4.jar  
> drwxr-xr-x 2 root root 4096 2012-08-22 09:14 sigar
> 
> I added the jdbc3.jar in case it might help, but, no help.
> 
> On Fri, Sep 7, 2012 at 12:42 AM, David Pilato \<[david@pilato.fr](mailto:david@pilato.fr)  
> [mailto:david@pilato.fr](mailto:david@pilato.fr) \> wrote:
> 
> > > Could you "ls -l" your es lib dir ?
> > 
> > --  
> > David 😉  
> > Twitter : @dadoonet / @elasticsearchfr / @scrutmydocs
> > 
> > Le 7 sept. 2012 à 04:20, DavidLR \< [davidlreiff@gmail.com](mailto:davidlreiff@gmail.com)  
> > [mailto:davidlreiff@gmail.com](mailto:davidlreiff@gmail.com) \> a écrit :
> > 
> > >
> 
> --

--  
David Pilato  
[http://www.scrutmydocs.org/](http://www.scrutmydocs.org/)  
[http://dev.david.pilato.fr/](http://dev.david.pilato.fr/)  
Twitter : @dadoonet / @elasticsearchfr / @scrutmydocs

--

---

<div class="post-metadata">

**Author:** ![DavidLR\_2](https://avatars.discourse-cdn.com/v4/letter/d/7ab992/32.png) [@DavidLR\_2](https://discuss.elastic.co/u/DavidLR_2)\
**Post date:** [September 7, 2012, 9:55pm UTC](https://discuss.elastic.co/t/postgresql-integration/8316/15 "2012-09-07T21:55:11Z")

</div>

Well, I hate to drive you crazy but I've tried with only the jdbc4 driver  
in the /plugins/river-jdbc directory; with only the jdbc4 driver in both  
the /lib and the /plugins/river-jdbc directories, with only the jdbc4  
driver in the /lib directory, and with both the jdbc4 driver and the jdbc3  
driver in the /lib directory (as shown in my previous post).

A reply to a similar question here

> <https://stackoverflow.com/questions/5982675/sqlexception-no-suitable-driver-found>

says that this error has two causes:

1. The JDBC driver is not loaded at all.
2. URL does not match any of the loaded JDBC drivers.

If this is the right path for me to follow, maybe somehow my jdbc driver is  
not being loaded at all??

On Fri, Sep 7, 2012 at 3:32 PM, David Pilato [david@pilato.fr](mailto:david@pilato.fr) wrote:

> \*\*
> 
> Hmmm.
> 
> Adding jdbc3 won't help. Remove it.
> 
> I misread Jörg Prante readme. You have to put your jar in plugins/river-jdbc  
> directory.
> 
> Sorry.
> 
> See here:  
> [Quickstart · jprante/elasticsearch-jdbc Wiki · GitHub](https://github.com/jprante/elasticsearch-river-jdbc/wiki/Quickstart)
> 
> HTH
> 
> David
> 
> Le 7 septembre 2012 à 22:04, David Reiff [davidlreiff@gmail.com](mailto:davidlreiff@gmail.com) a  
> écrit :
> 
> Sure -
> 
> dave@dave-desktop:~$ ls -l /usr/share/elasticsearch/lib  
> total 14952  
> -rw-r--r-- 1 root root 9998142 2012-07-02 15:04 elasticsearch-0.19.8.jar  
> -rw-r--r-- 1 root root 865400 2012-07-02 15:04 jna-3.3.0.jar  
> -rw-r--r-- 1 root root 481535 2012-07-02 15:04 log4j-1.2.16.jar  
> -rw-r--r-- 1 root root 1172498 2012-07-02 15:04 lucene-analyzers-3.6.0.jar  
> -rw-r--r-- 1 root root 1535258 2012-07-02 15:04 lucene-core-3.6.0.jar  
> -rw-r--r-- 1 root root 89201 2012-07-02 15:04  
> lucene-highlighter-3.6.0.jar  
> -rw-r--r-- 1 root root 29814 2012-07-02 15:04 lucene-memory-3.6.0.jar  
> -rw-r--r-- 1 root root 47407 2012-07-02 15:04 lucene-queries-3.6.0.jar  
> -rw-rw-r-- 1 dave dave 507454 2012-08-23 13:34  
> postgresql-9.1-902.jdbc3.jar  
> -rw-rw-r-- 1 dave dave 561969 2012-08-17 10:58  
> postgresql-9.1-902.jdbc4.jar  
> drwxr-xr-x 2 root root 4096 2012-08-22 09:14 sigar
> 
> I added the jdbc3.jar in case it might help, but, no help.
> 
> On Fri, Sep 7, 2012 at 12:42 AM, David Pilato [david@pilato.fr](mailto:david@pilato.fr) wrote:
> 
> Could you "ls -l" your es lib dir ?
> 
> --  
> David 😉  
> Twitter : @dadoonet / @elasticsearchfr / @scrutmydocs
> 
> Le 7 sept. 2012 à 04:20, DavidLR \< [davidlreiff@gmail.com](mailto:davidlreiff@gmail.com)\> a écrit :
> 
> --
> 
> --  
> David Pilato  
> [http://www.scrutmydocs.org/](http://www.scrutmydocs.org/)  
> [http://dev.david.pilato.fr/](http://dev.david.pilato.fr/)
> 
> Twitter : @dadoonet / @elasticsearchfr / @scrutmydocs
> 
> --

--

---

<div class="post-metadata">

**Author:** ![DavidLR\_2](https://avatars.discourse-cdn.com/v4/letter/d/7ab992/32.png) [@DavidLR\_2](https://discuss.elastic.co/u/DavidLR_2)\
**Post date:** [September 8, 2012, 1:54am UTC](https://discuss.elastic.co/t/postgresql-integration/8316/16 "2012-09-08T01:54:46Z")

</div>

Anyone who knows java, could this be related to my problem?

> <https://stackoverflow.com/questions/7790609/no-suitable-driver-found-for-jdbc-postgresql>

This person says there's a bug in Mule 3.1.2. Could this be an issue for me  
also? If so, what do I do?  
I'm lost with any java-related stuff.

--

---

<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:** [September 8, 2012, 9:11pm UTC](https://discuss.elastic.co/t/postgresql-integration/8316/17 "2012-09-08T21:11:10Z")

</div>

Hi,

I did a write-up here how to use JDBC river and PostgreSQL 9.1, in the hope  
it helps.

> **[Create new page · jprante/elasticsearch-jdbc Wiki](https://github.com/jprante/elasticsearch-jdbc/wiki/JDBC-river-and-PostgreSQL)**
>
> JDBC importer for Elasticsearch. Contribute to jprante/elasticsearch-jdbc development by creating an account on GitHub.

Best regards,

Jörg

On Saturday, September 8, 2012 3:54:46 AM UTC+2, DavidLR wrote:

> Anyone who knows java, could this be related to my problem?
> 
> [No Suitable Driver found for JDBC-Postgresql - Stack Overflow](http://stackoverflow.com/questions/7790609/no-suitable-driver-found-for-jdbc-postgresql?rq=1)
> 
> This person says there's a bug in Mule 3.1.2. Could this be an issue for  
> me also? If so, what do I do?  
> I'm lost with any java-related stuff.

--

---

<div class="post-metadata">

**Author:** ![DavidLR\_2](https://avatars.discourse-cdn.com/v4/letter/d/7ab992/32.png) [@DavidLR\_2](https://discuss.elastic.co/u/DavidLR_2)\
**Post date:** [September 12, 2012, 2:35pm UTC](https://discuss.elastic.co/t/postgresql-integration/8316/18 "2012-09-12T14:35:19Z")

</div>

I got it going! I had a space in my url, like this:

"url" : "jdbc: postgresql://localhost:5432/nibbel",

which should be

"url" : "jdbc:postgresql://localhost:5432/nibbel",

(no space after jdbc:) That little space caused the "no suitable driver  
found" error to come up.

Also had to edit pg\_hba.conf to allow access to the database.

I can't work on this every day so it took a while. Thanks, David, for quick  
replies and thanks Jorge for working out the procedure for Postgresql.

On Saturday, September 8, 2012 4:11:10 PM UTC-5, Jörg Prante wrote:

> Hi,
> 
> I did a write-up here how to use JDBC river and PostgreSQL 9.1, in the  
> hope it helps.
> 
> [Create new page · jprante/elasticsearch-jdbc Wiki · GitHub](https://github.com/jprante/elasticsearch-river-jdbc/wiki/JDBC-river-and-PostgreSQL)
> 
> Best regards,
> 
> Jörg
> 
> On Saturday, September 8, 2012 3:54:46 AM UTC+2, DavidLR wrote:
> 
> > Anyone who knows java, could this be related to my problem?
> > 
> > [No Suitable Driver found for JDBC-Postgresql - Stack Overflow](http://stackoverflow.com/questions/7790609/no-suitable-driver-found-for-jdbc-postgresql?rq=1)
> > 
> > This person says there's a bug in Mule 3.1.2. Could this be an issue for  
> > me also? If so, what do I do?  
> > I'm lost with any java-related stuff.

--

---

<div class="post-metadata">

**Author:** ![chaithanya](https://avatars.discourse-cdn.com/v4/letter/c/b4bc9f/32.png) [@chaithanya](https://discuss.elastic.co/u/chaithanya)\
**Post date:** [July 31, 2014, 5:42pm UTC](https://discuss.elastic.co/t/postgresql-integration/8316/19 "2014-07-31T17:42:20Z")

</div>

HI can any one help me out how to generate reports using postgresql in ELK,in elastic search i configured jdbc jar files and its working fine later wat step i have to do in logslash and ui kebina..please help me out

---

<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, 1:11am UTC](https://discuss.elastic.co/t/postgresql-integration/8316/20 "2017-07-06T01:11:54Z")

</div>


