Error on pg:vacuum_stats - "psql: server does not support SSL, but SSL was required"
I get the error "psql: server does not support SSL, but SSL was required" when I try to run the pg:vacuum_stats command on my database. I'm running postgreSQL 9.2, and I've installed postgreSQL 9.2 on my x64 Windows 7 machine. Other commands, such as pg:bloat and pg:long_running_queries work as desired
Does this problem persist? All of them use the same exec_sql mechanism under the covers. I suspect the problem may be in resolving the host in safe_resolve or something like that--do you have a Postgres server running locally?
That does seem to be related. I stopped the locally running postgresql instance, and I get a new error message: "psql: could not connect to server: Connection refused (0x0000274D/10061) Is the server running on host "localhost" (::1) and accepting TCP/IP connections on port 5432? could not connect to server: Connection refused (0x0000274D/10061) Is the server running on host "localhost" (127.0.0.1) and accepting TCP/IP connections on port 5432?
The full commands I'm using are:
heroku pg:vacuum_stats DATABASE_URL --app [my_app_name]
Which now yields the above error
whereas
heroku pg:bloat DATABASE_URL --app [my_app_name]
returns results as expected
Is the server running on host "localhost" (::1) and accepting localhost doesn't sound right...
Nope it doesn't. Any ideas why the heroku toolbelt would try connecting to localhost? And apparently only for the pg:vacuum_stats command? I'm pretty mystified by this one
As @deafbybeheading said, they all go through the same exec_sql method. Are you still running into this?
I can verify that I am seeing this exact problem. The vacuum_stats is trying to connect to localhost
@shermes641 what environment (OS and anything else that may be relevant) are you running in?
I am getting this issue as well. DL is deprecated, please use Fiddle psql: server does not support SSL, but SSL was required ! Heroku client internal error. ! Search for help at: https://help.heroku.com ! Or report a bug at: https://github.com/heroku/heroku/issues/new
Error: psql failed. exit status 512, output: "" (RuntimeError)
Command: heroku pg:vacuum-stats
Plugins: heroku-pg-extras
Version: heroku/toolbelt/3.43.5 (i386-mingw32) ruby/2.1.7
Error ID: 8ffea0890a8c493a856f751c051659c9
@eltmon What is the message DL is deprecated, please use Fiddle about? I'm assuming per the error message you're on Windows? What version of Windows?
I am running Mac OS X 10.12.5 and get this error:
psql: sslmode value "require" invalid when SSL support is not compiled in
gem uninstall pg and reinstall didn't help. Had the newest versions of postgresql from homebrew installed.
@simonneutert it sounds like that might be a different error--your client may not support SSL. Can you paste the output of pg_config --libs --configure?
sure, @uhoh-itsmaciek here it is:
-lpgcommon -lpgport -lz -lreadline -lm
'--prefix=/Users/simonneutert/.asdf/installs/postgres/9.6.1'
@simonneutert yeah, so it looks like SSL support was not linked in to your build. Check out mine:
maciek@mothra:~$ pg_config --libs --configure -lpgcommon -lpgport -lselinux -lxslt -lxml2 -lpam -lssl -lcrypto -lgssapi_krb5 -lz -ledit -lrt -lcrypt -ldl -lm
'--with-tcl' '--with-perl' '--with-python' '--with-pam' '--with-openssl' '--with-libxml' '--with-libxslt' ...
(emphasis added and some configure opts elided)
I'm not sure how to set up a Postgres with SSL from homebrew (I'm on Ubuntu), but I'm pretty sure it's possible. Alternately, there's also Postgres.app...
@uhoh-itsmaciek this addon works with homebrew version of postgres, I had to clean up what asdf left and reinstall pg gem one last time.
What pg_config --libs --configure spits out looks much more similar to yours now.
Thank you so much for your support, have a nice weekend!
Nice, glad to hear it. Happy to help.