pg.ddx.io pgsql-admin@postgresql.org mailing list archive
help / color / mirror / Atom feedStartup problem
6+ messages / 4 participants
[nested] [flat]
* Startup problem
@ 2007-01-22 11:20 Alexandre Becquereau <alex@safelogic.com>
0 siblings, 2 replies; 6+ messages in thread
From: Alexandre Becquereau @ 2007-01-22 11:20 UTC (permalink / raw)
To: pgsql-admin
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 <http://www.safelogic.com/;
www.pgeep.com <http://www.pgeep.com/;
^ permalink raw reply [nested|flat] 6+ messages in thread
* Re: Startup problem
@ 2007-01-22 11:48 Devrim GUNDUZ <devrim@CommandPrompt.com>
parent: Alexandre Becquereau <alex@safelogic.com>
1 sibling, 0 replies; 6+ messages in thread
From: Devrim GUNDUZ @ 2007-01-22 11:48 UTC (permalink / raw)
To: Alexandre Becquereau <alex@safelogic.com>; +Cc: pgsql-admin
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,
--
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/
Attachments:
signature.asc (application/pgp-signature, 188B) download
^ permalink raw reply [nested|flat] 6+ messages in thread
* Re: Startup problem
@ 2007-01-22 16:10 Tom Lane <tgl@sss.pgh.pa.us>
parent: Alexandre Becquereau <alex@safelogic.com>
1 sibling, 2 replies; 6+ messages in thread
From: Tom Lane @ 2007-01-22 16:10 UTC (permalink / raw)
To: Alexandre Becquereau <alex@safelogic.com>; +Cc: pgsql-admin
"Alexandre Becquereau" <alex@safelogic.com> 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
^ permalink raw reply [nested|flat] 6+ messages in thread
* Re: Startup problem
@ 2007-01-22 16:18 Alexandre Becquereau <alex@safelogic.com>
parent: Tom Lane <tgl@sss.pgh.pa.us>
1 sibling, 0 replies; 6+ messages in thread
From: Alexandre Becquereau @ 2007-01-22 16:18 UTC (permalink / raw)
To: 'Tom Lane' <tgl@sss.pgh.pa.us>; +Cc: pgsql-admin
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]
Envoyé : lundi 22 janvier 2007 17:10
À : Alexandre Becquereau
Cc : pgsql-admin@postgresql.org
Objet : Re: [ADMIN] Startup problem
"Alexandre Becquereau" <alex@safelogic.com> 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
^ permalink raw reply [nested|flat] 6+ messages in thread
* Re: Startup problem
@ 2007-01-22 18:20 Ray Stell <stellr@cns.vt.edu>
parent: Tom Lane <tgl@sss.pgh.pa.us>
1 sibling, 1 reply; 6+ messages in thread
From: Ray Stell @ 2007-01-22 18:20 UTC (permalink / raw)
To: Tom Lane <tgl@sss.pgh.pa.us>; +Cc: Alexandre Becquereau <alex@safelogic.com>; pgsql-admin
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
...
^ permalink raw reply [nested|flat] 6+ messages in thread
* Re: Startup problem
@ 2007-01-22 18:39 Ray Stell <stellr@cns.vt.edu>
parent: Ray Stell <stellr@cns.vt.edu>
0 siblings, 0 replies; 6+ messages in thread
From: Ray Stell @ 2007-01-22 18:39 UTC (permalink / raw)
To: Tom Lane <tgl@sss.pgh.pa.us>; +Cc: Alexandre Becquereau <alex@safelogic.com>; pgsql-admin
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.
^ permalink raw reply [nested|flat] 6+ messages in thread
end of thread, other threads:[~2007-01-22 18:39 UTC | newest]
Thread overview: 6+ messages (download: mbox mbox.gz follow: Atom feed)
-- links below jump to the message on this page --
2007-01-22 11:20 Startup problem Alexandre Becquereau <alex@safelogic.com>
2007-01-22 11:48 ` Devrim GUNDUZ <devrim@CommandPrompt.com>
2007-01-22 16:10 ` Tom Lane <tgl@sss.pgh.pa.us>
2007-01-22 16:18 ` Alexandre Becquereau <alex@safelogic.com>
2007-01-22 18:20 ` Ray Stell <stellr@cns.vt.edu>
2007-01-22 18:39 ` Ray Stell <stellr@cns.vt.edu>
This inbox is served by DDX for PostgreSQL; see mirroring instructions
for how to clone and mirror all data and code used for this inbox