LinuxQuestions.org
Visit Jeremy's Blog.
Home Forums Tutorials Articles Register
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Server
User Name
Password
Linux - Server This forum is for the discussion of Linux Software used in a server related context.

Notices


Reply
  Search this Thread
Old 09-06-2008, 04:36 PM   #1
zomane
Member
 
Registered: Sep 2005
Location: Austria
Distribution: Debian, CentOS, OpenBSD, FreeBSD
Posts: 52

Rep: Reputation: 16
Postgresql on Gentoo init script errors


Helo all, my problem is more Gentoo oriented...this is my opinion of course, but I hope someone is using Postgres over Gentoo and helps me to solve problem.I posted same thread in gentoo forums but I still got no answer that helps me to fix this issue I dont have any ideas what causing it .

Code:
ze64 ~ # ps auxf | grep postgres
root      9715  0.0  0.0   8508   744 pts/23   S+   20:34   0:00                  |               \_ grep --colour=auto postgres
postgres  9708  5.0  0.0  38812  2460 ?        Ss   20:34   0:00 /usr/bin/postmaster -D /var/lib/postgresql/data --silent-mode=true -N 40 -B 80
postgres  9710  0.0  0.0  38812  1092 ?        Ss   20:34   0:00  \_ postgres: writer process                                                     
postgres  9711  0.0  0.0  35228   972 ?        Ss   20:34   0:00  \_ postgres: stats collector process                                             
ze64 ~ # ls /var/lib/postgresql/data/ | grep pid
postmaster.pid
ze64 ~ # /etc/init.d/postgresql stop
 * Stopping PostgreSQL ...                                                                                                            [ !! ]
 * ERROR: postgresql failed to stop
ze64 ~ # ps auxf | grep postgres
root      9729  0.0  0.0   8508   740 pts/23   S+   20:34   0:00                  |               \_ grep --colour=auto postgres
ze64 ~ # ls /var/lib/postgresql/data/ | grep pid
ze64 ~ # /etc/init.d/postgresql start
 * WARNING: postgresql has already been started
ze64 ~ # ps auxf | grep postgres
root      9743  0.0  0.0   8508   744 pts/23   S+   20:34   0:00                  |               \_ grep --colour=auto postgres
ze64 ~ # ls /var/lib/postgresql/data/ | grep pid
ze64 ~ # /etc/init.d/postgresql zap
 * Manually resetting postgresql to stopped state
ze64 ~ # /etc/init.d/postgresql start
 * Starting PostgreSQL ...                                                                                                            [ ok ]
ze64 ~ # ps auxf | grep postgres
root      9765  0.0  0.0   8508   744 pts/23   S+   20:35   0:00                  |               \_ grep --colour=auto postgres
postgres  9758  5.3  0.0  38812  2460 ?        Ss   20:35   0:00 /usr/bin/postmaster -D /var/lib/postgresql/data --silent-mode=true -N 40 -B 80
postgres  9760  0.0  0.0  38812  1092 ?        Ss   20:35   0:00  \_ postgres: writer process                                                     
postgres  9761  0.0  0.0  35228   972 ?        Ss   20:35   0:00  \_ postgres: stats collector process                                             
ze64 ~ # ls /var/lib/postgresql/data/ | grep pid
postmaster.pid
ze64 ~ #
In /var/log/messages is written same as this on stderr. I also enable logging for postgres (nothing useful for problem), but as I said I think problem is related with init script.
I wondering how init script says "postgresql has already been started" ,when there is no pid file, looks like init holds somewhere info about state of started or stopped daemons . I found in /lib64/rc some things related to init, when I start postgres init creates in /lib64/rc/init.d/daemons/ dir named postgresql, but when I stopped it this dir is still there, wheh i use init script with zap option dir disappear and after new start init creates it again, so I wonder why this happens. Just for experiment I stopped sshd and sshd dir in lib64/rc/init.d/daemons/ disappear when started it again dir was created without using zap option.

Please help.
Excuse me mods if thread is not at the right place.
Thanks in advance.

SOLVED :

I find solution here :
http://bugs.gentoo.org/show_bug.cgi?id=231660
I just removed --oknodo in script as described in comments and now postgres starting and stopping normally .

Last edited by zomane; 09-07-2008 at 07:16 AM. Reason: SOLVED
 
  


Reply



Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off



Similar Threads
Thread Thread Starter Forum Replies Last Post
what is /etc/init.d/serial in Gentoo? Pedia Linux - General 3 08-12-2005 02:43 AM
Where can i know more about the parallel init in Gentoo tuxfood Linux - Distributions 1 02-27-2005 07:34 AM
errors in init!!! ruanlin Linux - Hardware 1 03-13-2003 11:23 PM
errors in init!!! ruanlin Linux - Software 1 03-13-2003 10:53 PM
PostgreSQL shell script help, please marktaff Linux - General 0 11-10-2001 03:40 AM

LinuxQuestions.org > Forums > Linux Forums > Linux - Server

All times are GMT -5. The time now is 06:24 AM.

Main Menu
Advertisement
My LQ
Write for LQ
LinuxQuestions.org is looking for people interested in writing Editorials, Articles, Reviews, and more. If you'd like to contribute content, let us know.
Main Menu
Syndicate
RSS1  Latest Threads
RSS1  LQ News
Twitter: @linuxquestions
Open Source Consulting | Domain Registration