[Date Prev][Date Next] [Thread Prev][Thread Next] [Date Index] [Thread Index]

Re: Postgresql refure to connect



>>>>> "Giuseppe" == Giuseppe Sacco <gsacco@hsomail.com> writes:
Giuseppe> Organization: HSO Business Company
Giuseppe> X-Mailer: Mozilla 4.05 [en] (WinNT; I)

Giuseppe> hsogso:~# psql
Giuseppe> Connection to database 'template1' failed.
Giuseppe> FATAL 1:  SetUserId: user "root" is not in "pg_shadow"

Root is NOT the superuser in postgres.  You need to log on as user postgres.
As root do a `su - postgres' and set up your database.  You can add new users
via a script, namely `createuser'.  The script will prompt you whether the new
user is able to create/delete/modify databases and tables.

Giuseppe> And then, after reboot I cannot start the server:
Giuseppe> hsogso:/tmp# /etc/init.d/postgresql start
Giuseppe> Starting PostgreSQL postmaster
Giuseppe> FATAL: StreamServerPort: bind() failed: errno=13
Giuseppe>         Is another postmaster already running on that port?
Giuseppe>         If not, remove socket node (/tmp/.s.PGSQL.<portnr>)and retry.
Giuseppe> /usr/lib/postgresql/bin/postmaster: cannot create UNIX stream port

I observed the same problem.  Could be a bug with the debian postgres startup
script, could be a bug with postgres not deleting the file on shutdown.

Just delete that file and you can restart the server.  Maybe the startup
script should check for existence of that file after shutdown and remove it if
it's still there.
-- 
Nicolai P Guba
	BT Laboratories			GNU Project
	http://www.labs.bt.com		http://www.gnu.org	
	nicolai.guba@bt.com		nicolai@gnu.org


Reply to: