predictionio-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Chan Lee <chanlee...@gmail.com>
Subject Re: Perplexed by "No suitable driver"
Date Fri, 26 May 2017 05:42:15 GMT
Hi Mars,

I'm not sure what the cause of the error is but adding the --verbose option
may help debug. Also, I've noticed that the host in the postgres URL for
the output (jdbc:postgresql://*postgres*/pio) is different from the one in
config/pio-env.sh (localhost/$hostport). Hope this helps.

Best,
Chan


On Thu, May 25, 2017 at 6:07 PM, Mars Hall <mars@heroku.com> wrote:

> Hi PIO users 🐸
>
> I've got this engine that cannot find its Postgres JDBC driver. Common
> conundrum! I solved this problem dozens of times with PIO, but this one
> stumps me.
>
> It comes from `pio status`, as opposed to `pio train`:
>
> > $ ./PredictionIO-dist/bin/pio status
> >   [INFO] [Management$] Inspecting PredictionIO...
> >   [INFO] [Management$] PredictionIO 0.11.0-incubating is installed at
> /app/pio-engine/PredictionIO-dist
> >   [INFO] [Management$] Inspecting Apache Spark...
> >   [INFO] [Management$] Apache Spark is installed at
> /app/pio-engine/PredictionIO-dist/vendors/spark-hadoop
> >   [INFO] [Management$] Apache Spark 2.1.0 detected (meets minimum
> requirement of 1.3.0)
> >   [INFO] [Management$] Inspecting storage backend connections...
> >   [INFO] [Storage$] Verifying Meta Data Backend (Source: PGSQL)...
> >   [ERROR] [Management$] Unable to connect to all storage backends
> successfully.
> >   The following shows the error message from the storage backend.
> >
> >   No suitable driver found for jdbc:postgresql://postgres/pio
> (java.sql.SQLException)
> >
> >   Dumping configuration of initialized storage backend sources.
> >   Please make sure they are correct.
> >
> >   Source Name: PGSQL; Type: jdbc; Configuration: URL ->
> jdbc:postgresql://postgres/pio, PARTITIONS -> 4, PASSWORD -> pio,
> USERNAME -> pio, CONNECTIONS -> 8, TYPE -> jdbc, INDEX -> enabled
>
>
> I've added a debug output to `bin/pio-class` to reveal what's running
> (e.g. classpath); multi-line formatting added by me:
>
> > exec java \
> >   -cp /app/pio-engine/PredictionIO-dist/conf:\
> >     /app/pio-engine/PredictionIO-dist/plugins/*:\
> >     /app/pio-engine/PredictionIO-dist/lib/spark/*:\
> >     /app/pio-engine/PredictionIO-dist/lib/pio-assembly-0.11.0-
> incubating.jar:\
> >     /app/pio-engine/PredictionIO-dist/conf:\
> >     /app/pio-engine/PredictionIO-dist/conf:\
> >     /app/pio-engine/PredictionIO-dist/lib/postgresql_jdbc.jar \
> >   -Dpio.log.dir=/root \
> >   org.apache.predictionio.tools.console.Console \
> >   status \
> >   --pio-home /app/pio-engine/PredictionIO-dist
>
>
>
> Verified that the Postgres JDBC jar file exists & is readable by the
> current user:
>
> > ls -hal /app/pio-engine/PredictionIO-dist/lib/postgresql_jdbc.jar
> >   -rw-r--r-- 1 root       root 674K May 26 00:57 postgresql_jdbc.jar
>
>
>
> Is there something else that would cause that "No suitable driver" error
> when something else is really wrong?
>
>
> Context:
> This is building on Ubuntu 14.04.5 LTS with docker-compose on TravisCI for
> the Heroku buildpack: https://github.com/heroku/
> predictionio-buildpack/pull/36
>
> This same setup works fine elsewhere, finds that JDBC driver, both on
> Heroku and local macOS. The build also used to work fine with PredictionIO
> 0.10.0-incubating. Trying to upgrade everything to 0.11.0!
>
> *Mars
>
> ( <> .. <> )
>
>

Mime
View raw message