Heroku - Disable Postgresql SSL? - postgresql

I have a PostGIS database on Heroku and I want to connect my external GeoServer to it. I can't do it because Geoserver does not support SSL and Heroku requires it.
Is there any way of disabling Heroku postgres SSL?
Thanks in advance

The simplified GeoServer UI does not allow to configure SSL connections, but you can setup a JNDI connection pool and provide all JDBC parameters you want that way:
http://docs.geoserver.org/stable/en/user/tutorials/tomcat-jndi/tomcat-jndi.html#configuring-a-postgresql-connection-pool

If you do run into a client that doesn't support SSL at all, you can possibly proxy it using a tool like stunnel.

Related

Is it possible to connect Grafana to postgres database based on a remote server without expose database port?

I am looking for a solution. I wan't to connect my postgres database to grafana but, both services are not on the same server and i don't wan't to expose my database.
I tought that ssh tunneling could be a good solution, but there is no paramaters on Grafana UI.
Someone had already solved this problem ? Or do you have some ideas ?
Thanks!

Heroku Postgresql with Google Datastudio II

I refer to this post:
Heroku Postgresql with Google Datastudio - does anyone have an idea when ssl support for postres will start or if there is a good workaround?
Many Thanks
There is already support for SSL connections using GDS. Here is another thread referecing the way to go: Heroku Postgresql with Google Datastudio

How does pgAdmin connect to the server?

I've started to read about protocols (HTTP/TCP/IP etc.).
I have a few questions.
How does pgAdmin connect to the server? Which protocol does it use? Am I able to connect to the DB server via cmd? How do drivers connect to the DB server?
They use the well documented PostgreSQL frontend/backend protocol.

Connection to CloudBees database using MySQL Workbench

I've just uploaded my locally developed app to CloudBees. It works fine: I can load the web pages and it can access the database.
However, I cannot connect to its database (also provided by CloudBees) using MySQL Workbench or the command line tool. It always says
Can't connect to MySQL server on 'ec2-50-19-213-178.compute-1.amazonaws.com' (10060)
Any CloudBees configuration that I might be missing?
double check your database connection parameters using SDK : bees db:info -p <databasename>
you should be able to connect to DB using mysql workbench and other mysql tools.
In the MySQL forum exists a collection of links for various types of connections using MySQL Workbench. One is probably especially interesting for you as it deals with Amazon RDS databases. Among others it shows what connection parameters are needed.
Seems that there were some firewall problems in the corporate router that prevented me from connecting before. I tried at home and it worked.

c3p0 pool cannot establish a connection. How to debug this?

I have a Tomcat and PostgreSQL installed on a server. I'm having a connection problem trying to connect from my servlet to PostgreSQL database using c3p0 pool.
I can reach DB if I'm running Tomcat locally on my laptop. Also I can connect from server to DB using psql (i.e. command line sql utility). But when I'm trying to deploy my servlet to server and establish a connection I'm getting the following error:
java.sql.SQLException: Connections could not be acquired from the underlying database!
com.mchange.v2.sql.SqlUtils.toSQLException(SqlUtils.java:106)
...
com.mchange.v2.resourcepool.CannotAcquireResourceException: A ResourcePool could not acquire a resource from its primary factory or source.
com.mchange.v2.resourcepool.BasicResourcePool.awaitAvailable(BasicResourcePool.java:1319)
com.mchange.v2.resourcepool.BasicResourcePool.prelimCheckoutResource(BasicResourcePool.java:557)
com.mchange.v2.resourcepool.BasicResourcePool.checkoutResource(BasicResourcePool.java:477)
What should I check to locate a problem? It should be a trivial issue but may be due to 4 a.m. I'm missing something :) Thanks in advance!
PS: Connection from all network interfaces are allowed to database. PostgreSQL JDBC driver and c3p0 pool are distributed in WAR. Tomcat configuration is very default. JNDI is not used.
You need to check a few things:
java.policy which tomcat is using
(e.g.
/etc/tomcat5.5/policy.d/02debian.policy)
db server settings (e.g.
/etc/postgresql/pg_hba.conf)
try connecting without pool first as
in my case c3p0 was hiding important information from me
Adding to #Alexey's answer, I had this issue with Tomcat and PostgreSQL 9.4. In my case, the md5 authentication method in postgres was causing the issue.
If you are using Windows server or RHEL server, make sure you update the authentication method in pg_hba.conf file. Modify it to trust and restart postgresql.