"brew services list" shows postgresql as "started", but can not connect to it
Hello!
I am trying to move from (successfully) using VM Fusion with CentOS Linux
image on Mac OSX "El Capitan" for web development to Homebrew:
brew update
brew install postgres
brew tap homebrew/services
This resulted in some files installed to
/usr/local/Cellar/postgresql/9.5.1/
And "brew services list" reports it as "started":
postgresql started afarber
/Users/afarber/Library/LaunchAgents/homebrew.mxcl.postgresql.plist
And I can restart it:
# brew services restart postgresql
Stopping `postgresql`... (might take a while)
==> Successfully stopped `postgresql` (label: homebrew.mxcl.postgresql)
==> Successfully started `postgresql` (label: homebrew.mxcl.postgresql)
But unfortunately I can not connect with "psql":
psql: could not connect to server: No such file or directory
Is the server running locally and accepting
connections on Unix domain socket "/tmp/.s.PGSQL.5432"?
And there is no "pg", "post" or "master" in "ps uawwwx" list.
And I can find neither postgresql.conf nor pg_hba.conf nor any startup logs
at my Macbook Air.
In the troubleshooting process I have tried:
xcode-select --install
brew update
brew update
sudo chown -R $(whoami) $(brew --prefix)
and restarted the Macbook and finally filed an issue at
https://github.com/Homebrew/homebrew/issues/50065
If you are using Homebrew PostgreSQL package at the latest Mac OSX, please
share some tips on how to get it running or at least proceed in debugging.
Thank you
Alex
Did you initialize the DB cluster (initdb -D /path/to/data)?
Did you configure the installation (postgres.conf file)?
Does homebrew.mxcl.postgresql where the data lives?
when you run "ps -ef|grep -i postg", do you see the postmaster and other postgres executables running?
Show quoted text
On Mar 13, 2016, at 06:07, Alexander Farber <alexander.farber@gmail.com> wrote:
Hello!
I am trying to move from (successfully) using VM Fusion with CentOS Linux image on Mac OSX "El Capitan" for web development to Homebrew:
brew update
brew install postgres
brew tap homebrew/servicesThis resulted in some files installed to
/usr/local/Cellar/postgresql/9.5.1/
And "brew services list" reports it as "started":
postgresql started afarber /Users/afarber/Library/LaunchAgents/homebrew.mxcl.postgresql.plist
And I can restart it:
# brew services restart postgresql
Stopping `postgresql`... (might take a while)
==> Successfully stopped `postgresql` (label: homebrew.mxcl.postgresql)
==> Successfully started `postgresql` (label: homebrew.mxcl.postgresql)But unfortunately I can not connect with "psql":
psql: could not connect to server: No such file or directory
Is the server running locally and accepting
connections on Unix domain socket "/tmp/.s.PGSQL.5432"?And there is no "pg", "post" or "master" in "ps uawwwx" list.
And I can find neither postgresql.conf nor pg_hba.conf nor any startup logs at my Macbook Air.
In the troubleshooting process I have tried:
xcode-select --install
brew update
brew update
sudo chown -R $(whoami) $(brew --prefix)and restarted the Macbook and finally filed an issue at
https://github.com/Homebrew/homebrew/issues/50065 <https://github.com/Homebrew/homebrew/issues/50065>If you are using Homebrew PostgreSQL package at the latest Mac OSX, please share some tips on how to get it running or at least proceed in debugging.
Thank you
Alex
Alexander Farber <alexander.farber@gmail.com> writes:
And "brew services list" reports it as "started":
postgresql started afarber
/Users/afarber/Library/LaunchAgents/homebrew.mxcl.postgresql.plist
And I can restart it:
# brew services restart postgresql
Stopping `postgresql`... (might take a while)
==> Successfully stopped `postgresql` (label: homebrew.mxcl.postgresql)
==> Successfully started `postgresql` (label: homebrew.mxcl.postgresql)
But unfortunately I can not connect with "psql":
psql: could not connect to server: No such file or directory
Is the server running locally and accepting
connections on Unix domain socket "/tmp/.s.PGSQL.5432"?
I'd start by figuring out where that packaging causes the postmaster
to write its log file, and having a look in the log file.
Hopefully there is some documentation included with the homebrew PG
package that explains that. But if not, perhaps a look into the
launch-agent script mentioned above would tell you. Look for something
like a -l argument to pg_ctl, or a redirection of stderr into a file.
regards, tom lane
--
Sent via pgsql-general mailing list (pgsql-general@postgresql.org)
To make changes to your subscription:
http://www.postgresql.org/mailpref/pgsql-general