Problems was Ubuntu was installed from debootstrap then fuser command was missing... I have installed from psmisc package and everything was ok.
Thanks for your help :-) On 17 May 2010 18:28, Serge Dubrouski <[email protected]> wrote: > You are welcome. I've always thought that fuser is always there. Looks > like I need to create a patch for RA that will ensure that fuser is > available. > > On Mon, May 17, 2010 at 10:24 AM, Jose <[email protected]> wrote: >> It was fuser ;) >> >> I have installed psmisc package and everything is ok. >> >> Thank you very much. >> >> >> On 17 May 2010 17:56, Serge Dubrouski <[email protected]> wrote: >>> Ok, That's good. That means that you DB starts up but for some reason >>> monitoring fails. Please check following: >>> >>> 1. You have /bin/fuser tool on your ssystem >>> 2. After you ran pgsql manually >>> /var/lib/postgresql/8.4/main/postgres.pid file has the correct pid for >>> postmaster process. >>> >>> Basically this part of the RA fails: >>> >>> pgsql_status() { >>> if [ -f $PIDFILE ] >>> then >>> PID=`head -n 1 $PIDFILE` >>> kill -0 $PID >/dev/null 2>&1 && fuser $OCF_RESKEY_pgdata 2>&1 >>> | grep $PID >/dev/null 2>&1 >>> return $? >>> fi >>> >>> # No PID file >>> false >>> } >>> >>> >>> >>> On Mon, May 17, 2010 at 9:44 AM, Jose <[email protected]> wrote: >>>> I configure that directory because is same as >>>> /etc/postgresql/8.4/main/postgresql.conf: >>>> data_directory = '/var/lib/postgresql/8.4/main' >>>> >>>> r...@ubuntu02:/var/lib/postgresql/8.4/main# ls >>>> PG_VERSION pg_clog pg_subtrans pg_xlog server.crt >>>> base pg_multixact pg_tblspc postmaster.opts server.key >>>> global pg_stat_tmp pg_twophase postmaster.pid >>>> >>>> When I try run: >>>> OCF_ROOT=/usr/lib/ocf >>>> OCF_RESKEY_pgctl=/usr/lib/postgresql/8.4/bin/pg_ctl >>>> OCF_RESKEY_psql=/usr/bin/psql >>>> OCF_RESKEY_pgdata=/var/lib/postgresql/8.4/main/ >>>> OCF_RESKEY_config=/etc/postgresql/8.4/main/postgresql.conf >>>> OCF_RESKEY_logfile_default=/var/log/ocf_pgsql.txt >>>> /usr/lib/ocf/resource.d/heartbeat/pgsql start >>>> >>>> logs throw: >>>> 2010-05-17 15:41:50 UTC LOG: database system was shut down at >>>> 2010-05-17 15:39:54 UTC >>>> 2010-05-17 15:41:50 UTC LOG: database system is ready to accept >>>> connections >>>> 2010-05-17 15:41:50 UTC LOG: autovacuum launcher started >>>> >>>> and when i do ctrl-c to ocf script: >>>> 2010-05-17 15:42:09 UTC LOG: received fast shutdown request >>>> 2010-05-17 15:42:09 UTC LOG: aborting any active transactions >>>> 2010-05-17 15:42:09 UTC LOG: autovacuum launcher shutting down >>>> 2010-05-17 15:42:09 UTC LOG: shutting down >>>> 2010-05-17 15:42:10 UTC LOG: database system is shut down >>>> >>>> >>>> >>>> On 17 May 2010 17:19, Serge Dubrouski <[email protected]> wrote: >>>>> Ok. Are there any error messages in the PostgerSQL log files when you >>>>> try to start it with pgsql RA? And is your data directory really >>>>> /var/lib/postgresql/8.4/main/ or /var/lib/postgresql/8.4/main//data ? >>>>> What's in that directory? >>>>> >>>>> Actually how do you synchronize data directory between the nodes? >>>>> >>>>> On Mon, May 17, 2010 at 8:51 AM, Jose <[email protected]> wrote: >>>>>> When I start postgresql seems ok: >>>>>> r...@ubuntu01:~# /etc/init.d/postgresql-8.4 start >>>>>> * Starting PostgreSQL 8.4 database server >>>>>> [ OK ] >>>>>> >>>>>> >>>>>> Then, when I run psql command come problems: >>>>>> r...@ubuntu02:~# psql >>>>>> psql: FATAL: Ident authentication failed for user "root" >>>>>> >>>>>> If I do that whit user postgres all is ok: >>>>>> r...@ubuntu02:~# su - postgres >>>>>> postg...@ubuntu02:~$ psql >>>>>> psql (8.4.3) >>>>>> Type "help" for help. >>>>>> >>>>>> >>>>>> These are my tables: >>>>>> postgres=# \l >>>>>> List of databases >>>>>> Name | Owner | Encoding | Collation | Ctype | Access >>>>>> privileges >>>>>> -----------+----------+-----------+-----------+-------+----------------------- >>>>>> postgres | postgres | SQL_ASCII | C | C | >>>>>> template0 | postgres | SQL_ASCII | C | C | =c/postgres >>>>>> : >>>>>> postgres=CTc/postgres >>>>>> template1 | postgres | SQL_ASCII | C | C | =c/postgres >>>>>> : >>>>>> postgres=CTc/postgres >>>>>> >>>>>> And this is mi pg_hba.conf: >>>>>> # Database administrative login by UNIX sockets >>>>>> local all postgres ident >>>>>> >>>>>> # TYPE DATABASE USER CIDR-ADDRESS METHOD >>>>>> >>>>>> # "local" is for Unix domain socket connections only >>>>>> local all all ident >>>>>> # IPv4 local connections: >>>>>> host all all 127.0.0.1/32 md5 >>>>>> # IPv6 local connections: >>>>>> host all all ::1/128 md5 >>>>>> >>>>>> Thanks! >>>>>> >>>>>> >>>>>> >>>>>> On 17 May 2010 16:16, Serge Dubrouski <[email protected]> wrote: >>>>>>> As Dejan pointed out something is wrong with your PostgreSQL >>>>>>> installation, it doesn't start with configuration provided. Can you >>>>>>> start it outside of Pacemaker? Does it have template1 database >>>>>>> available? >>>>>>> >>>>>>> >>>>>>> On Mon, May 17, 2010 at 5:39 AM, Jose <[email protected]> wrote: >>>>>>>> On 17 May 2010 13:10, Florian Haas <[email protected]> wrote: >>>>>>>>> On 2010-05-17 12:09, Dejan Muhamedagic wrote: >>>>>>>>>>> config="/etc/postgresql/8.4/main/postgresql.conf" \ >>>>>>>>> >>>>>>>>>>> OCF_RESKEY_config=/etc/postgresql/8.4/main/pg_hba.conf >>>>>>>>> >>>>>>>>> Those don't match. Fix and retry. >>>>>>>> >>>>>>>> Yes, it was a typo. I have: >>>>>>>> >>>>>>>> config="/etc/postgresql/8.4/main/postgresql.conf" >>>>>>>> >>>>>>>> And it doesn't work :( >>>>>>>> >>>>>>>>> Florian >>>>>>>>> >>>>>>>>> >>>>>>>>> _______________________________________________ >>>>>>>>> Linux-HA mailing list >>>>>>>>> [email protected] >>>>>>>>> http://lists.linux-ha.org/mailman/listinfo/linux-ha >>>>>>>>> See also: http://linux-ha.org/ReportingProblems >>>>>>>>> >>>>>>>> _______________________________________________ >>>>>>>> Linux-HA mailing list >>>>>>>> [email protected] >>>>>>>> http://lists.linux-ha.org/mailman/listinfo/linux-ha >>>>>>>> See also: http://linux-ha.org/ReportingProblems >>>>>>>> >>>>>>> >>>>>>> >>>>>>> >>>>>>> -- >>>>>>> Serge Dubrouski. >>>>>>> _______________________________________________ >>>>>>> Linux-HA mailing list >>>>>>> [email protected] >>>>>>> http://lists.linux-ha.org/mailman/listinfo/linux-ha >>>>>>> See also: http://linux-ha.org/ReportingProblems >>>>>>> >>>>>> _______________________________________________ >>>>>> Linux-HA mailing list >>>>>> [email protected] >>>>>> http://lists.linux-ha.org/mailman/listinfo/linux-ha >>>>>> See also: http://linux-ha.org/ReportingProblems >>>>>> >>>>> >>>>> >>>>> >>>>> -- >>>>> Serge Dubrouski. >>>>> _______________________________________________ >>>>> Linux-HA mailing list >>>>> [email protected] >>>>> http://lists.linux-ha.org/mailman/listinfo/linux-ha >>>>> See also: http://linux-ha.org/ReportingProblems >>>>> >>>> _______________________________________________ >>>> Linux-HA mailing list >>>> [email protected] >>>> http://lists.linux-ha.org/mailman/listinfo/linux-ha >>>> See also: http://linux-ha.org/ReportingProblems >>>> >>> >>> >>> >>> -- >>> Serge Dubrouski. >>> _______________________________________________ >>> Linux-HA mailing list >>> [email protected] >>> http://lists.linux-ha.org/mailman/listinfo/linux-ha >>> See also: http://linux-ha.org/ReportingProblems >>> >> _______________________________________________ >> Linux-HA mailing list >> [email protected] >> http://lists.linux-ha.org/mailman/listinfo/linux-ha >> See also: http://linux-ha.org/ReportingProblems >> > > > > -- > Serge Dubrouski. > _______________________________________________ > Linux-HA mailing list > [email protected] > http://lists.linux-ha.org/mailman/listinfo/linux-ha > See also: http://linux-ha.org/ReportingProblems > _______________________________________________ Linux-HA mailing list [email protected] http://lists.linux-ha.org/mailman/listinfo/linux-ha See also: http://linux-ha.org/ReportingProblems
