tristan / heroku-buildpack-pgsql-stunnel

Heroku buildpack for connecting to postgresql via stunnel
2 stars 3 forks source link

Could not connect: No such file or directory #1

Open woudsma opened 7 years ago

woudsma commented 7 years ago

Hi, i'm having trouble to connect to postgres using the stunnel buildpack. Initialization:

app[web.1]: buildpack=pgsql-stunnel at=pgsql-stunnel-enabled
app[web.1]: buildpack=pgsql-stunnel at=config-gen-start
app[web.1]: Setting $DATABASE_URL environment var to  postgres://user:pw@:6101/db
app[web.1]: buildpack=pgsql-stunnel at=config-gen-end
app[web.1]: buildpack=pgsql-stunnel at=stunnel-launched pid=18 signal=SIGINT
app[web.1]: buildpack=pgsql-stunnel at=stunnel-start
app[web.1]: buildpack=pgsql-stunnel at=app-launched pid=19
app[web.1]: buildpack=pgsql-stunnel at=app-start
app[web.1]: 2017.04.18 15:07:47 LOG5[ui]: stunnel 5.30 on x86_64-pc-linux-gnu platform
app[web.1]: 2017.04.18 15:07:47 LOG5[ui]: Compiled with OpenSSL 1.0.2e 3 Dec 2015
app[web.1]: 2017.04.18 15:07:47 LOG5[ui]: Running  with OpenSSL 1.0.2g  1 Mar 2016
app[web.1]: 2017.04.18 15:07:47 LOG5[ui]: Update OpenSSL shared libraries or rebuild stunnel
app[web.1]: 2017.04.18 15:07:47 LOG5[ui]: Threading:PTHREAD Sockets:POLL,IPv6,SYSTEMD TLS:ENGINE,FIPS,OCSP,PSK,SNI Auth:LIBWRAP
app[web.1]: 2017.04.18 15:07:47 LOG5[ui]: Reading configuration from file /app/vendor/stunnel/stunnel.conf
app[web.1]: 2017.04.18 15:07:47 LOG5[ui]: UTF-8 byte order mark not detected
app[web.1]: 2017.04.18 15:07:47 LOG5[ui]: FIPS mode disabled
app[web.1]: 2017.04.18 15:07:47 LOG4[ui]: Service [postgresql-DATABASE_URL] needs authentication to prevent MITM attacks
app[web.1]: 2017.04.18 15:07:47 LOG5[ui]: Configuration successful

Then i'm trying to connect using node-mapnik, but something isn't right. Why does it mention 2 different ports?

app[web.1]: Error: Postgis Plugin: could not connect to server: No such file or directory
app[web.1]:     Is the server running locally and accepting
app[web.1]:     connections on Unix domain socket "/tmp/.s.PGSQL.6101/.s.PGSQL.5432"?
app[web.1]: Connection string: 'host=/tmp/.s.PGSQL.6101 dbname=dbname user=user connect_timeout=4'
app[web.1]:   encountered during parsing of layer 'layer' in Layer of '/app/src/resources/stylesheet.xml'
app[web.1]:     at Error (native)
woudsma commented 7 years ago

Using the pgbouncer buildpack solved my issue https://github.com/mapnik/node-mapnik/issues/755