Postgresql Socket Error
Contents |
here for a quick overview of the site Help Center Detailed answers to any questions you might have Meta Discuss the workings and policies of this site About Us Learn more about Stack Overflow
Postgres Could Not Connect To Server Connection Refused
the company Business Learn more about hiring developers or posting ads with us Stack is the server running locally and accepting connections on unix domain socket Overflow Questions Jobs Documentation Tags Users Badges Ask Question x Dismiss Join the Stack Overflow Community Stack Overflow is a community of psql: could not connect to server: no such file or directory ubuntu 6.2 million programmers, just like you, helping each other. Join them; it only takes a minute: Sign up Socket File “/var/pgsql_socket/.s.PGSQL.5432” Missing In Mountain Lion (OS X Server) up vote 73 down vote favorite 38 I
How To Start Postgres Server
just upgraded my MacMini Server from Lion Server to Mountain Lion using OS X Server. I am having the same problem with PostgreSQL that I did last year when I first installed Lion Server. When I try to do any kind of PostgreSQL terminal command I get the following notorious error message that many have gotten over the years: psql: could not connect to server: No such file or directory Is the
Could Not Connect To Server Connection Refused Is The Server Running On Host Localhost
server running locally and accepting connections on Unix domain socket "/var/pgsql_socket/.s.PGSQL.5432"? I was attempting to change the password for _postgres when I got the error. I tried several commands but got the same error. I just rebooted my server but no luck. I logged in as root to look at /var/pgsql_socket and the folder is empty. Folder /var/pgsql_socket_alt is also empty. I have checked online about this. However just about all of the solutions I have read, including on Stack Overflow, suggest a removal and reinstall of PostgreSQL. I do not know but this does not seem like a plausible option because several options on the Server App use PostgreSQL. I contacted Apple Enterprise Support (no agreement) and I was told that my issue would have to be solved by the developers which would cast $695. I have a website that is down right now because I cannot rebuild it. I don't know where to turn for help with this at this point. I will continue looking online to see if I can find something. However I hope that someone can give me an answer quick so I can rebuild my database. Update: 12/13/2012 15:33 GMT-6 Here is my output for ps auwwx|grep postg: _postgres 28123 0.0 0.1 2479696 7724 ?? Ss 3:01PM 0:00.04 /Applications/Server.app/Contents/ServerRoot/usr/bin/postg
log in tour help Tour Start here for a quick overview of the site Help Center Detailed answers to any questions you might have Meta Discuss the workings and policies of connections on unix domain socket /tmp/.s.pgsql.5432 mac this site About Us Learn more about Stack Overflow the company Business
Psql Could Not Connect To Server Connection Refused Windows
Learn more about hiring developers or posting ads with us Database Administrators Questions Tags Users Badges Unanswered Ask Question psql could not connect to server connection refused ubuntu _ Database Administrators Stack Exchange is a question and answer site for database professionals who wish to improve their database skills and learn from others in the community. Join them; it only http://stackoverflow.com/questions/13868730/socket-file-var-pgsql-socket-s-pgsql-5432-missing-in-mountain-lion-os-x-ser takes a minute: Sign up Here's how it works: Anybody can ask a question Anybody can answer The best answers are voted up and rise to the top PostgreSQL is running locally but I cannot connect. Why? up vote 26 down vote favorite 18 Recently updated my machine from Mac OS X Lion (10.7.4) to Mountain Lion (10.8) and I think it borked my http://dba.stackexchange.com/questions/21587/postgresql-is-running-locally-but-i-cannot-connect-why PostgreSQL installation. It was installed originally via Homebrew. I'm not a DBA, but hoping someone can tell me how to troubleshoot this. I am unable to connect (but was able to before pre-Mountain Lion): $ psql -U rails -d myapp_development psql: could not connect to server: No such file or directory Is the server running locally and accepting connections on Unix domain socket "/var/pgsql_socket/.s.PGSQL.5432"? But Postgres is still clearly running: $ ps aux | grep postgres meltemi 2010 0.0 0.0 2444124 5292 ?? Ss Wed01PM 0:00.02 postgres: rails myapp_development [local] idle meltemi 562 0.0 0.0 2439312 592 ?? Ss Wed12PM 0:02.28 postgres: stats collector process meltemi 561 0.0 0.0 2443228 1832 ?? Ss Wed12PM 0:01.57 postgres: autovacuum launcher process meltemi 560 0.0 0.0 2443096 596 ?? Ss Wed12PM 0:02.89 postgres: wal writer process meltemi 559 0.0 0.0 2443096 1072 ?? Ss Wed12PM 0:04.01 postgres: writer process meltemi 466 0.0 0.0 2443096 3728 ?? S Wed12PM 0:00.85 /usr/local/bin/postgres -D /usr/local/varpostgres -r /usr/local/var/postgres/server.log And it's responding to queries (both to a test db and the development db) from a local Rails app User Load (0.2ms) SELECT "users".* FROM "users" Rendered users/index.html.h
communities company blog Stack Exchange Inbox Reputation and Badges sign up log in tour help Tour Start here for a quick overview of the site Help Center Detailed answers to any questions you might have Meta Discuss the http://askubuntu.com/questions/838975/postgresql-change-data-dir-and-socket-error workings and policies of this site About Us Learn more about Stack Overflow the company Business Learn more about hiring developers or posting ads with us Ask Ubuntu Questions Tags Users Badges Unanswered Ask Question _ Ask Ubuntu is a question and answer site for Ubuntu users and developers. Join them; it only takes a minute: Sign up Here's how it could not works: Anybody can ask a question Anybody can answer The best answers are voted up and rise to the top Postgresql change data dir and socket error up vote 0 down vote favorite When I chenge postgresql data directory in /etc/postgresql/9.5/main/postgresql.conf form default path /var/lib/postgresql/9.5/main to my custom /home/user/postgresql/9.5/main Use this manual https://www.digitalocean.com/community/tutorials/how-to-move-a-postgresql-data-directory-to-a-new-location-on-ubuntu-16-04 I have error: psql: could not connect to could not connect server: No such file or directory Is the server running locally and accepting connections on Unix domain socket "/var/run/postgresql/.s.PGSQL.5432"? When I wrong? UPD1 ubuntu@rails-serv-1:~$ sudo service postgresql status ● postgresql.service - PostgreSQL RDBMS Loaded: loaded (/lib/systemd/system/postgresql.service; enabled; vendor prese Active: active (exited) since Wed 2016-10-19 08:52:12 UTC; 4min 52s ago Process: 854 ExecStart=/bin/true (code=exited, status=0/SUCCESS) Main PID: 854 (code=exited, status=0/SUCCESS) Tasks: 0 Memory: 0B CPU: 0 CGroup: /system.slice/postgresql.service Oct 19 08:52:12 rails-serv-1 systemd[1]: Starting PostgreSQL RDBMS... Oct 19 08:52:12 rails-serv-1 systemd[1]: Started PostgreSQL RDBMS. UPD2 ubuntu@rails-serv-1:~$ sudo ps auxww | grep [p]ostgresql ubuntu@rails-serv-1:~$ is empty ubuntu@rails-serv-1:~$ sudo ls -al /var/run/postgresql total 0 drwxrwsr-x 2 postgres postgres 40 Oct 19 21:28 . drwxr-xr-x 24 root root 900 Oct 19 21:32 .. UPD3 log "2016-10-21 07:25:54 UTC [3493-1] FATAL: data directory "/var/lib/postgresql-new/9.5/main" has group or world access 2016-10-21 07:25:54 UTC [3493-2] DETAIL: Permissions should be u=rwx (0700)." folders permissions root@rails-serv-1:~# cd /var/lib/postgresql-new/ root@rails-serv-1:/var/lib/postgresql-new# ls -lh total 4.0K drwx------ 1 postgres postgres 4.0K Oct 18 23:00 9.5 root@rails-serv-1:/var/lib/postgresql-new# cd 9.5/ root@rails-serv-1:/var/lib/postgresql-new/9.5# ls -lh total 4.0K drwx------ 1 postgres postgres 4.0K Oct 18 23:01 main root@rails-serv-1:/var/lib/postgresql-ne