From alex@safelogic.com Mon Jan 22 11:36:09 2007 Received: from localhost (maia-2.hub.org [200.46.204.187]) by postgresql.org (Postfix) with ESMTP id D17C19FB1BC for ; Mon, 22 Jan 2007 07:36:09 -0400 (AST) Received: from postgresql.org ([200.46.204.71]) by localhost (mx1.hub.org [200.46.204.187]) (amavisd-new, port 10024) with ESMTP id 77619-07 for ; Mon, 22 Jan 2007 07:36:01 -0400 (AST) X-Greylist: delayed 00:15:47.85648 by SQLgrey-1.7.4 Received: from svr4.postgresql.org (svr4.postgresql.org [66.98.251.159]) by postgresql.org (Postfix) with ESMTP id BAA479FB4D8 for ; Mon, 22 Jan 2007 07:36:05 -0400 (AST) X-Greylist: domain auto-whitelisted by SQLgrey-1.7.3 Received: from smtp19.orange.fr (smtp19.orange.fr [80.12.242.19]) by svr4.postgresql.org (Postfix) with ESMTP id DCE205AF97A for ; Mon, 22 Jan 2007 11:20:11 +0000 (GMT) Received: from me-wanadoo.net (localhost [127.0.0.1]) by mwinf1921.orange.fr (SMTP Server) with ESMTP id E66911C000B1 for ; Mon, 22 Jan 2007 12:20:09 +0100 (CET) Received: from ALEX (ATuileries-153-1-66-100.w83-202.abo.wanadoo.fr [83.202.33.100]) by mwinf1921.orange.fr (SMTP Server) with ESMTP id B4EF21C00045 for ; Mon, 22 Jan 2007 12:20:09 +0100 (CET) X-ME-UUID: 20070122112009741.B4EF21C00045@mwinf1921.orange.fr From: "Alexandre Becquereau" To: Subject: Startup problem Date: Mon, 22 Jan 2007 12:20:07 +0100 Message-ID: <000001c73e17$47369d80$0a01a8c0@ALEX> MIME-Version: 1.0 Content-Type: multipart/alternative; boundary="----=_NextPart_000_0001_01C73E1F.A8FD4F70" X-Mailer: Microsoft Office Outlook 11 Thread-Index: Acc+F0T1rodLfYHBRwq3tuOqGhZwPw== X-MimeOLE: Produced By Microsoft MimeOLE V6.00.2900.3028 X-Virus-Scanned: Maia Mailguard 1.0.1 X-Spam-Status: No, hits=0.002 tagged_above=0 required=5 tests=BAYES_50, HTML_MESSAGE X-Spam-Level: X-Archive-Number: 200701/191 X-Sequence-Number: 24347 This is a multi-part message in MIME format. ------=_NextPart_000_0001_01C73E1F.A8FD4F70 Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7bit Hello, I have a problem running Postgres at startup. I use the start-scripts/linux script in /etc/rc.local. The script is executed on boot but the system ask a question : " Your default context is user_u:system_r:unconfined_t Do you want to choose a different one? [n] " If I do not answer the system wait several seconds and then continue boot (but I can't login except by connecting on ssh). Once I login I have to kill the start-scripts/linux process and launch it manually. When the script is manually launched the question is never asked The answer to the question will always be no... I would like to know how to avoid this question, this machine will be rebooted remotely so I won't be able to type n ! The postgres version is 8.2.1 running on RedHat Enterprise Edition ES 4 I previously used a 7.6 version on Fedora Core 3 and there was no problem launching it on boot. Thank you for your help! Alex BECQUEREAU -- SafeLogic www.safelogic.com www.pgeep.com ------=_NextPart_000_0001_01C73E1F.A8FD4F70 Content-Type: text/html; charset="us-ascii" Content-Transfer-Encoding: quoted-printable
Hello,
 
    I have a problem running Postgres at startup. I use the=20 start-scripts/linux script in /etc/rc.local. The script is executed = on boot=20 but the system ask a question :
 
" = Your default=20 context is user_u:system_r:unconfined_t Do you want to choose a = different one?=20 [n] "
If I = do not answer=20 the system wait several seconds and then continue boot (but I can't = login except=20 by connecting on ssh). Once I login I have to kill the=20 start-scripts/linux process and launch it manually. When the script is = manually=20 launched the question is never asked
 
The = answer to the=20 question will always be no... I would like to know how to avoid this = question,=20 this machine will be rebooted remotely so I won't be able to type n=20 !
 
The = postgres=20 version is 8.2.1 running on RedHat Enterprise Edition ES = 4
 
I = previously used=20 a 7.6 version on Fedora Core 3 and there was no problem launching it on=20 boot.
 
 
Thank you for your=20 help!
 
Alex = BECQUEREAU
--
SafeLogic
 
------=_NextPart_000_0001_01C73E1F.A8FD4F70-- From devrim@CommandPrompt.com Mon Jan 22 11:48:40 2007 Received: from localhost (maia-2.hub.org [200.46.204.187]) by postgresql.org (Postfix) with ESMTP id ADBDB9FB1BC for ; Mon, 22 Jan 2007 07:48:40 -0400 (AST) Received: from postgresql.org ([200.46.204.71]) by localhost (mx1.hub.org [200.46.204.187]) (amavisd-new, port 10024) with ESMTP id 84741-01 for ; Mon, 22 Jan 2007 07:48:21 -0400 (AST) X-Greylist: from auto-whitelisted by SQLgrey-1.7.4 Received: from lists.commandprompt.com (host-254.commandprompt.net [207.173.203.254]) by postgresql.org (Postfix) with ESMTP id EAF049FA25B for ; Mon, 22 Jan 2007 07:48:25 -0400 (AST) Received: from [192.168.199.109] (dsl.static81214124250.ttnet.net.tr [81.214.124.250] (may be forged)) (authenticated bits=0) by lists.commandprompt.com (8.13.7/8.13.6) with ESMTP id l0MBmNdV012240; Mon, 22 Jan 2007 03:48:24 -0800 Subject: Re: Startup problem From: Devrim GUNDUZ To: Alexandre Becquereau Cc: pgsql-admin@postgresql.org In-Reply-To: <000001c73e17$47369d80$0a01a8c0@ALEX> References: <000001c73e17$47369d80$0a01a8c0@ALEX> Content-Type: multipart/signed; micalg=pgp-sha1; protocol="application/pgp-signature"; boundary="=-bcLa8F8mNO6Dq4at2vXx" Organization: Command Prompt, Inc. Date: Mon, 22 Jan 2007 13:48:40 +0200 Message-Id: <1169466520.3361.16.camel@laptop.gunduz.org> Mime-Version: 1.0 X-Mailer: Evolution 2.8.2.1 (2.8.2.1-3.fc6) X-Virus-Scanned: ClamAV version 0.88.5, clamav-milter version 0.88.5 on projects.commandprompt.com X-Virus-Status: Clean X-Greylist: Sender succeded SMTP AUTH authentication, not delayed by milter-greylist-1.6 (lists.commandprompt.com [192.168.2.159]); Mon, 22 Jan 2007 03:48:25 -0800 (PST) X-Virus-Scanned: Maia Mailguard 1.0.1 X-Archive-Number: 200701/193 X-Sequence-Number: 24349 --=-bcLa8F8mNO6Dq4at2vXx Content-Type: text/plain Content-Transfer-Encoding: quoted-printable Hi, On Mon, 2007-01-22 at 12:20 +0100, Alexandre Becquereau wrote: > " Your default context is user_u:system_r:unconfined_t Do you want to > choose a different one? [n] " This is a SELinux issue. I haven't used SELinux until now; but you should either play with your SELinux policies or disable it. I'm sure some people may give a better answer. Regards, --=20 The PostgreSQL Company - Command Prompt, Inc. 1.503.667.4564 PostgreSQL Replication, Consulting, Custom Development, 24x7 support Managed Services, Shared and Dedicated Hosting Co-Authors: plPHP, ODBCng - http://www.commandprompt.com/ --=-bcLa8F8mNO6Dq4at2vXx Content-Type: application/pgp-signature; name=signature.asc Content-Description: This is a digitally signed message part -----BEGIN PGP SIGNATURE----- Version: GnuPG v1.4.6 (GNU/Linux) iD8DBQBFtKSYpme12CBXnxERApyBAJ0Rg4QAn6AOjxUk7phRTGKDNk5z/ACgqpSz tyNKz4aq8iMCvPwpLS9Q4VQ= =aXoX -----END PGP SIGNATURE----- --=-bcLa8F8mNO6Dq4at2vXx-- From tgl@sss.pgh.pa.us Mon Jan 22 16:10:35 2007 Received: from localhost (maia-2.hub.org [200.46.204.187]) by postgresql.org (Postfix) with ESMTP id 130789FB529 for ; Mon, 22 Jan 2007 12:10:35 -0400 (AST) Received: from postgresql.org ([200.46.204.71]) by localhost (mx1.hub.org [200.46.204.187]) (amavisd-new, port 10024) with ESMTP id 66309-05 for ; Mon, 22 Jan 2007 12:10:28 -0400 (AST) X-Greylist: from auto-whitelisted by SQLgrey-1.7.4 Received: from sss.pgh.pa.us (sss.pgh.pa.us [66.207.139.130]) by postgresql.org (Postfix) with ESMTP id 69CF49FB25E for ; Mon, 22 Jan 2007 12:10:28 -0400 (AST) Received: from sss2.sss.pgh.pa.us (tgl@localhost [127.0.0.1]) by sss.pgh.pa.us (8.13.6/8.13.6) with ESMTP id l0MGARnk018806; Mon, 22 Jan 2007 11:10:27 -0500 (EST) To: "Alexandre Becquereau" cc: pgsql-admin@postgresql.org Subject: Re: Startup problem In-reply-to: <000001c73e17$47369d80$0a01a8c0@ALEX> References: <000001c73e17$47369d80$0a01a8c0@ALEX> Comments: In-reply-to "Alexandre Becquereau" message dated "Mon, 22 Jan 2007 12:20:07 +0100" Date: Mon, 22 Jan 2007 11:10:27 -0500 Message-ID: <18805.1169482227@sss.pgh.pa.us> From: Tom Lane X-Virus-Scanned: Maia Mailguard 1.0.1 X-Archive-Number: 200701/196 X-Sequence-Number: 24352 "Alexandre Becquereau" writes: > I have a problem running Postgres at startup. I use the > start-scripts/linux script in /etc/rc.local. The one in our contrib/? That's pretty old, crufty, and unmaintained. The one most people actually use on RPM-based systems is the one that comes with our RPM distribution ... is there a reason you're not using the RPM? Anyway I would guess the problem comes from the fact that the contrib script uses "su". The RPM script doesn't: # For SELinux we need to use 'runuser' not 'su' if [ -x /sbin/runuser ] then SU=runuser else SU=su fi and eventually $SU -l postgres -c "$PGENGINE/postmaster -p '$PGPORT' -D '$PGDATA' ${PGOPTS} &" >> "$PGLOG" 2>&1 < /dev/null but you really ought to adopt the whole script not just that one bit. > I previously used a 7.6 version on Fedora Core 3 and there was no problem > launching it on boot. I believe FC3 didn't have SELinux security ... it certainly didn't have it enabled by default. regards, tom lane From alex@safelogic.com Mon Jan 22 16:18:38 2007 Received: from localhost (maia-2.hub.org [200.46.204.187]) by postgresql.org (Postfix) with ESMTP id 33CC29FB52D for ; Mon, 22 Jan 2007 12:18:38 -0400 (AST) Received: from postgresql.org ([200.46.204.71]) by localhost (mx1.hub.org [200.46.204.187]) (amavisd-new, port 10024) with ESMTP id 69050-07 for ; Mon, 22 Jan 2007 12:18:30 -0400 (AST) X-Greylist: delayed 04:58:19.471471 by SQLgrey-1.7.4 Received: from smtp19.orange.fr (smtp19.orange.fr [80.12.242.1]) by postgresql.org (Postfix) with ESMTP id A7B7F9FB532 for ; Mon, 22 Jan 2007 12:18:30 -0400 (AST) Received: from me-wanadoo.net (localhost [127.0.0.1]) by mwinf1928.orange.fr (SMTP Server) with ESMTP id 8EFA51C000A7; Mon, 22 Jan 2007 17:18:29 +0100 (CET) Received: from ALEX (ATuileries-153-1-66-100.w83-202.abo.wanadoo.fr [83.202.33.100]) by mwinf1928.orange.fr (SMTP Server) with ESMTP id 5942E1C00090; Mon, 22 Jan 2007 17:18:29 +0100 (CET) X-ME-UUID: 20070122161829365.5942E1C00090@mwinf1928.orange.fr From: "Alexandre Becquereau" To: "'Tom Lane'" Cc: References: <000001c73e17$47369d80$0a01a8c0@ALEX> <18805.1169482227@sss.pgh.pa.us> Subject: Re: Startup problem Date: Mon, 22 Jan 2007 17:18:28 +0100 Message-ID: <007801c73e40$f3ddfff0$0a01a8c0@ALEX> MIME-Version: 1.0 Content-Type: text/plain; charset="iso-8859-1" Content-Transfer-Encoding: quoted-printable X-Mailer: Microsoft Office Outlook 11 Thread-Index: Acc+P9m5UvaLHXgISeaUN1m7yCmYqwAAM9Pw X-MimeOLE: Produced By Microsoft MimeOLE V6.00.2900.3028 In-Reply-To: <18805.1169482227@sss.pgh.pa.us> X-Virus-Scanned: Maia Mailguard 1.0.1 X-Spam-Status: No, hits=0.002 tagged_above=0 required=5 tests=AWL, BAYES_50 X-Spam-Level: X-Archive-Number: 200701/198 X-Sequence-Number: 24354 Thank you, i replaced the su command by runuser and everything works perfectly now! Regards, Alexandre BECQUEREAU -- SafeLogic www.safelogic.com www.pgeep.com -----Message d'origine----- De : Tom Lane [mailto:tgl@sss.pgh.pa.us]=20 Envoy=E9 : lundi 22 janvier 2007 17:10 =C0 : Alexandre Becquereau Cc : pgsql-admin@postgresql.org Objet : Re: [ADMIN] Startup problem=20 "Alexandre Becquereau" writes: > I have a problem running Postgres at startup. I use the=20 > start-scripts/linux script in /etc/rc.local. The one in our contrib/? That's pretty old, crufty, and unmaintained. The one most people actually use on RPM-based systems is the one that = comes with our RPM distribution ... is there a reason you're not using the = RPM? Anyway I would guess the problem comes from the fact that the contrib = script uses "su". The RPM script doesn't: # For SELinux we need to use 'runuser' not 'su' if [ -x /sbin/runuser ] then SU=3Drunuser else SU=3Dsu fi and eventually $SU -l postgres -c "$PGENGINE/postmaster -p '$PGPORT' -D '$PGDATA' ${PGOPTS} &" >> "$PGLOG" 2>&1 < /dev/null but you really ought to adopt the whole script not just that one bit. > I previously used a 7.6 version on Fedora Core 3 and there was no=20 > problem launching it on boot. I believe FC3 didn't have SELinux security ... it certainly didn't have = it enabled by default. regards, tom lane From stellr@cns.vt.edu Mon Jan 22 18:20:26 2007 Received: from localhost (maia-1.hub.org [200.46.204.191]) by postgresql.org (Postfix) with ESMTP id D2AEB9FB30C for ; Mon, 22 Jan 2007 14:20:26 -0400 (AST) Received: from postgresql.org ([200.46.204.71]) by localhost (mx1.hub.org [200.46.204.191]) (amavisd-new, port 10024) with ESMTP id 74035-03 for ; Mon, 22 Jan 2007 14:20:22 -0400 (AST) X-Greylist: from auto-whitelisted by SQLgrey-1.7.4 Received: from locust.cns.vt.edu (locust.cns.vt.edu [198.82.169.14]) by postgresql.org (Postfix) with ESMTP id A624E9FB1F5 for ; Mon, 22 Jan 2007 14:20:22 -0400 (AST) Received: by locust.cns.vt.edu (Postfix, from userid 986) id BC121118A24; Mon, 22 Jan 2007 13:20:21 -0500 (EST) Date: Mon, 22 Jan 2007 13:20:21 -0500 From: Ray Stell To: Tom Lane Cc: Alexandre Becquereau , pgsql-admin@postgresql.org Subject: Re: Startup problem Message-ID: <20070122182021.GE951@cns.vt.edu> References: <000001c73e17$47369d80$0a01a8c0@ALEX> <18805.1169482227@sss.pgh.pa.us> Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <18805.1169482227@sss.pgh.pa.us> User-Agent: Mutt/1.5.11 X-Virus-Scanned: Maia Mailguard 1.0.1 X-Archive-Number: 200701/201 X-Sequence-Number: 24357 On Mon, Jan 22, 2007 at 11:10:27AM -0500, Tom Lane wrote: > > but you really ought to adopt the whole script not just that one bit. where is the is script to be found? Nothing extracts to /etc/init.d [stellr@stell postgresql]$ rpm -qlp postgresql-8.2.1-1PGDG.i686.rpm /usr/bin/clusterdb /usr/bin/createdb /usr/bin/createlang /usr/bin/createuser /usr/bin/dropdb /usr/bin/droplang /usr/bin/dropuser /usr/bin/pg_dump /usr/bin/pg_dumpall /usr/bin/pg_restore /usr/bin/psql /usr/bin/reindexdb /usr/bin/vacuumdb /usr/share/doc/postgresql-8.2.1 /usr/share/doc/postgresql-8.2.1/COPYRIGHT ... From stellr@cns.vt.edu Mon Jan 22 18:39:45 2007 Received: from localhost (maia-3.hub.org [200.46.204.184]) by postgresql.org (Postfix) with ESMTP id A28CE9FB30C for ; Mon, 22 Jan 2007 14:39:45 -0400 (AST) Received: from postgresql.org ([200.46.204.71]) by localhost (mx1.hub.org [200.46.204.184]) (amavisd-new, port 10024) with ESMTP id 72417-05 for ; Mon, 22 Jan 2007 14:39:36 -0400 (AST) X-Greylist: from auto-whitelisted by SQLgrey-1.7.4 Received: from locust.cns.vt.edu (locust.cns.vt.edu [198.82.169.14]) by postgresql.org (Postfix) with ESMTP id CA2C79FB259 for ; Mon, 22 Jan 2007 14:39:37 -0400 (AST) Received: by locust.cns.vt.edu (Postfix, from userid 986) id 3CCA4118A24; Mon, 22 Jan 2007 13:39:37 -0500 (EST) Date: Mon, 22 Jan 2007 13:39:37 -0500 From: Ray Stell To: Tom Lane Cc: Alexandre Becquereau , pgsql-admin@postgresql.org Subject: Re: Startup problem Message-ID: <20070122183937.GG951@cns.vt.edu> References: <000001c73e17$47369d80$0a01a8c0@ALEX> <18805.1169482227@sss.pgh.pa.us> <20070122182021.GE951@cns.vt.edu> Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <20070122182021.GE951@cns.vt.edu> User-Agent: Mutt/1.5.11 X-Virus-Scanned: Maia Mailguard 1.0.1 X-Archive-Number: 200701/202 X-Sequence-Number: 24358 found it: [stellr@stell postgresql]$ rpm -qlp postgresql-server-8.2.1-1PGDG.i686.rpm /etc/pam.d/postgresql /etc/rc.d/init.d/postgresql On Mon, Jan 22, 2007 at 01:20:21PM -0500, Ray Stell wrote: > On Mon, Jan 22, 2007 at 11:10:27AM -0500, Tom Lane wrote: > > > > but you really ought to adopt the whole script not just that one bit. > > > where is the is script to be found? Nothing extracts to /etc/init.d > > [stellr@stell postgresql]$ rpm -qlp postgresql-8.2.1-1PGDG.i686.rpm > /usr/bin/clusterdb > /usr/bin/createdb > /usr/bin/createlang > /usr/bin/createuser > /usr/bin/dropdb > /usr/bin/droplang > /usr/bin/dropuser > /usr/bin/pg_dump > /usr/bin/pg_dumpall > /usr/bin/pg_restore > /usr/bin/psql > /usr/bin/reindexdb > /usr/bin/vacuumdb > /usr/share/doc/postgresql-8.2.1 > /usr/share/doc/postgresql-8.2.1/COPYRIGHT > ... -- You have no chance to survive make your time.