Error Cannot Stat /var/run/postgresql
Contents |
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 this site About Us Learn more about no postgresql clusters exist see man pg_createcluster ubuntu Stack Overflow the company Business Learn more about hiring developers or posting ads with error: the locale requested by the environment is invalid. us Database Administrators Questions Tags Users Badges Unanswered Ask Question _ Database Administrators Stack Exchange is a question and answer site for error: cluster configuration already exists database professionals who wish to improve their database skills and learn from others in the community. Join them; it only takes a minute: Sign up Here's how it works: Anybody can ask a question Anybody
Connections On Unix Domain Socket /var/run/postgresql/.s.pgsql.5432 Ubuntu
can answer The best answers are voted up and rise to the top Why won't PostgreSQL 9.3 start on Ubuntu? up vote 12 down vote favorite 5 I have successfully installed PostgreSQL 9.3 from the APT repository on 2 VM's running Ubuntu 12.04 and 13.04...however, I cannot get it to install properly on my host machine running Ubuntu 12.04. The install (this time) seems to have gone ok, but perhaps there is error: no initdb program for version 9.3 found an error I'm not understanding: * No PostgreSQL clusters exist; see "man pg_createcluster" Setting up postgresql-9.3 (9.3.0-2.pgdg12.4+1) ... Creating new cluster 9.3/main ... config /etc/postgresql/9.3/main data /var/lib/postgresql/9.3/main locale en_US.UTF-8 port 5432 update-alternatives: using /usr/share/postgresql/9.3/man/man1/postmaster.1.gz to provide /usr/share/man/man1/postmaster.1.gz (postmaster.1.gz) in auto mode. So I then try to add myself as a PostgreSQL user, but I get this: createuser: could not connect to database postgres: could not connect to server: No such file or directory Is the server running locally and accepting connections on Unix domain socket "/var/run/postgresql/.s.PGSQL.5432"? I cannot see PostgreSQL running in system monitor, and there is no file in the /var/run/postgresql/ folder...completely empty. EDIT: On the VM's, there is a file in /var/run/postgresql/ called 9.3-main.pid There is nothing on the host machine log file located /var/log/postgresql So... what's going on here that isn't going on in my VM's? Like I said, the other installations on the VM's, including PostGIS and PGAdmin came in perfect...no idea why this host machine isn't going through... postgresql postgresql-9.3 share|improve this question edited Oct 3 '13 at 15:20 asked Oct 2 '13 at 20:24 DPSSpatial 1881210 Do you actually have a /var/run/postgresql directory? At one stage after succesful installation that folder was missing on my machine. What does the config say about which di
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 pg_createcluster example Us Learn more about Stack Overflow the company Business Learn more about hiring
Error: No Initdb Program For Version 9.4 Found
developers or posting ads with us Stack Overflow Questions Jobs Documentation Tags Users Badges Ask Question x Dismiss Join the
Fatal: Could Not Create Shared Memory Segment: Function Not Implemented
Stack Overflow Community Stack Overflow is a community of 4.7 million programmers, just like you, helping each other. Join them; it only takes a minute: Sign up how to start postgresql server on http://dba.stackexchange.com/questions/50906/why-wont-postgresql-9-3-start-on-ubuntu Ubuntu 12.04 [duplicate] up vote 8 down vote favorite 4 This question already has an answer here: How to thoroughly purge and reinstall postgresql on ubuntu? 8 answers I had just installed a PostgreSQL 9.1 on the Ubuntu 12.04 server (hosted by Amazon EWS).When I tried to launch the psql command, the following error message shows up. psql: could not connect to server: No such file or http://stackoverflow.com/questions/18281777/how-to-start-postgresql-server-on-ubuntu-12-04 directory Is the server running locally and accepting connections on Unix domain socket "/var/run/postgresql/.s.PGSQL.5432"? After searching on the web, I found I have to start the Server before using it. By following this initdb link, I still cannot use the postgresql database. Are there any further work (like configuration) should I do to start the server ? I tried to start the service : service postgresql start Another error message shows : No PostgreSQL clusters exist; see "man pg_createcluster" amazon-web-services ubuntu-12.04 postgresql-9.1 share|improve this question edited Aug 16 '13 at 20:47 asked Aug 16 '13 at 20:37 Ensom Hodder 4971820 marked as duplicate by Jens Erat, animuson♦ Dec 9 '13 at 4:38 This question has been asked before and already has an answer. If those answers do not fully address your question, please ask a new question. initdb only initializes the database, does not start the service. You should be able to start the service with the service command. –datasage Aug 16 '13 at 20:43 @datasage Yes I tried to start the server with service like following : service postgresql start. Another error message jumps out. I updated my post. –Ensom Hodder Au
9.0.23 Documentation Prev Up Chapter 17. Server Setup and Operation Next 17.3. Starting the Database Server Before anyone can access the database, you must start the database server. The database server program is called postgres. The https://www.postgresql.org/docs/9.0/static/server-start.html postgres program must know where to find the data it is supposed to use. This http://superuser.com/questions/566592/debian-postgresql-doesnt-appear-to-be-working is done with the -D option. Thus, the simplest way to start the server is: $ postgres -D /usr/local/pgsql/data which will leave the server running in the foreground. This must be done while logged into the PostgreSQL user account. Without -D, the server will try to use the data directory named by the environment variable PGDATA. If that variable is not error: no provided either, it will fail. Normally it is better to start postgres in the background. For this, use the usual Unix shell syntax: $ postgres -D /usr/local/pgsql/data >logfile 2>&1 & It is important to store the server's stdout and stderr output somewhere, as shown above. It will help for auditing purposes and to diagnose problems. (See Section 23.3 for a more thorough discussion of log file handling.) The postgres program also takes a number of other command-line error: no initdb options. For more information, see the postgres reference page and Chapter 18 below. This shell syntax can get tedious quickly. Therefore the wrapper program pg_ctl is provided to simplify some tasks. For example: pg_ctl start -l logfile will start the server in the background and put the output into the named log file. The -D option has the same meaning here as for postgres. pg_ctl is also capable of stopping the server. Normally, you will want to start the database server when the computer boots. Autostart scripts are operating-system-specific. There are a few distributed with PostgreSQL in the contrib/start-scripts directory. Installing one will require root privileges. Different systems have different conventions for starting up daemons at boot time. Many systems have a file /etc/rc.local or /etc/rc.d/rc.local. Others use rc.d directories. Whatever you do, the server must be run by the PostgreSQL user account and not by root or any other user. Therefore you probably should form your commands using su postgres -c '...'. For example: su postgres -c 'pg_ctl start -D /usr/local/pgsql/data -l serverlog' Here are a few more operating-system-specific suggestions. (In each case be sure to use the proper installation directory and user name where we show generic values.) For FreeBSD, look at the file contrib/start-scripts/freebsd in the PostgreSQL source distribution. On OpenBSD, add the following lines to the file /etc/rc.local: if [ -x /usr/local/pgsql/bin/pg_ctl -a -x /u
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 the company Business Learn more about hiring developers or posting ads with us Super User Questions Tags Users Badges Unanswered Ask Question _ Super User is a question and answer site for computer enthusiasts and power users. Join them; it only 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 Debian PostgreSQL doesn't appear to be working up vote 2 down vote favorite I've just set up a server running Debian 6.0 64-bit. I've installed PostgreSQL through aptitude, and now i try to access PostgreSQL without any luck. I am trying to access psql as the user postgres, but get this error message psql: could not connect to server: No such file or directory Is the server running locally and accepting connections on Unix domain socket "/var/run/postgresql/.s.PGSQL.5432"? I can't seem to find the folder where all the config files is either. On my CentOS server the config files are stored in /var/lib/pgsql, on my Debian server there is a folder called postgresqlin /var/lib but it's empty. debian postgresql share|improve this question asked Mar 15 '13 at 17:10 Anton Gildebrand 170247 add a comment| 2 Answers 2 active oldest votes up vote 4 down vote If /var/lib/postgresql/ is empty, something is wrong. It should have a directory for each version of PostgreSQL that you have installed, assuming you did the installation through the normal dpkg/apt-get processes (which you say you did) and that the package was intended for Debian. On the other hand, you have the postgres user and the psql command available. It is certainly possible that you have one of the postgresql-client-* packages installed but not the server package. Since you pretty clearly do not have PostgreSQL successfully running, I would suggest a purge and reinstall through aptitude, or (as root): apt-get purge postgresql-8.4 apt-get install postgresql-8.4 One final note. PostgreSQL has its own APT repository, so if you want to use a newer version than 8.4, you can do so with little hassle. To use it, as root, add the following line to /etc/apt/sources.list: deb http://apt.postgresql.org/pub/repos/apt/ squeeze-pgdg main Then, as root: wget --quiet -O - ht