[Pgpool-general] [pgPool]

Micka mickamusset at gmail.com
Thu Feb 24 17:17:18 UTC 2011


Yes it was, Thx !

Now the replication functionnality work well !

but when the main database server goes down I got :

2011-02-24 18:06:42 DEBUG: pid 1313: starting health checking
2011-02-24 18:06:42 DEBUG: pid 1313: health_check: 0 th DB node status: 2
2011-02-24 18:06:42 DEBUG: pid 1313: health_check: 1 th DB node status: 2
2011-02-24 18:06:44 DEBUG: pid 1347: do_query: kind: T
2011-02-24 18:06:44 DEBUG: pid 1347: num_fileds: 1
2011-02-24 18:06:44 DEBUG: pid 1347: do_query: kind: D
2011-02-24 18:06:44 DEBUG: pid 1347: do_query: kind: C
2011-02-24 18:06:44 DEBUG: pid 1347: do_query: kind: Z
2011-02-24 18:06:44 DEBUG: pid 1347: do_query: kind: T
2011-02-24 18:06:44 DEBUG: pid 1347: num_fileds: 1
2011-02-24 18:06:44 DEBUG: pid 1347: do_query: kind: D
2011-02-24 18:06:44 DEBUG: pid 1347: do_query: kind: C
2011-02-24 18:06:44 DEBUG: pid 1347: do_query: kind: Z
2011-02-24 18:06:52 DEBUG: pid 1313: starting health checking
2011-02-24 18:06:52 DEBUG: pid 1313: health_check: 0 th DB node status: 2
2011-02-24 18:06:52 DEBUG: pid 1313: health_check: 1 th DB node status: 2
2011-02-24 18:06:54 ERROR: pid 1347: pool_flush_it: write failed to backend
(0). reason: Broken pipe offset: 0 wlen: 39
2011-02-24 18:06:54 ERROR: pid 1347: check_replication_time_lag: SELECT
pg_current_xlog_location() failed
2011-02-24 18:07:02 DEBUG: pid 1313: starting health checking
2011-02-24 18:07:02 DEBUG: pid 1313: health_check: 0 th DB node status: 2
2011-02-24 18:07:02 ERROR: pid 1313: connect_unix_domain_socket_by_port:
connect() failed: No such file or directory
2011-02-24 18:07:02 ERROR: pid 1313: health check failed. 0 th host  at port
5432 is down
2011-02-24 18:07:02 LOG:   pid 1313: set 0 th backend down status
2011-02-24 18:07:02 DEBUG: pid 1313: failover_handler called
2011-02-24 18:07:02 DEBUG: pid 1313: failover_handler: starting to select
new master node
2011-02-24 18:07:02 LOG:   pid 1313: starting degeneration. shutdown host
(5432)
2011-02-24 18:07:02 DEBUG: pid 1313: failover_handler: kill 1314
2011-02-24 18:07:02 DEBUG: pid 1313: failover_handler: kill 1315
2011-02-24 18:07:02 DEBUG: pid 1313: failover_handler: kill 1316
2011-02-24 18:07:02 DEBUG: pid 1313: failover_handler: kill 1317

and :

011-02-24 18:07:02 DEBUG: pid 1313: failover_handler: kill 1334
2011-02-24 18:07:02 DEBUG: pid 1313: failover_handler: kill 1335
2011-02-24 18:07:02 DEBUG: pid 1313: failover_handler: kill 1336
2011-02-24 18:07:02 DEBUG: pid 1313: failover_handler: kill 1337
2011-02-24 18:07:02 DEBUG: pid 1313: failover_handler: kill 1338
2011-02-24 18:07:02 DEBUG: pid 1313: failover_handler: kill 1339
2011-02-24 18:07:02 DEBUG: pid 1313: failover_handler: kill 1340
2011-02-24 18:07:02 DEBUG: pid 1313: failover_handler: kill 1341
2011-02-24 18:07:02 DEBUG: pid 1313: failover_handler: kill 1342
2011-02-24 18:07:02 DEBUG: pid 1313: failover_handler: kill 1343
2011-02-24 18:07:02 DEBUG: pid 1313: failover_handler: kill 1344
2011-02-24 18:07:02 DEBUG: pid 1313: failover_handler: kill 1345
2011-02-24 18:07:02 LOG:   pid 1313: execute command:
/usr/local/etc/failover.sh 0 "" 5432 /usr/local/pgsql/data 1 0 "" 0
2011-02-24 18:07:02 DEBUG: pid 1314: child received shutdown request signal
3
2011-02-24 18:07:02 DEBUG: pid 1315: child received shutdown request signal
3
2011-02-24 18:07:02 DEBUG: pid 1316: child received shutdown request signal
3
*touch: cannot touch `/var/log/pgpool/trigger/trigger_file1': Permission
denied*
2011-02-24 18:07:02 LOG:   pid 1313: failover_handler: set new master node:
1
2011-02-24 18:07:02 DEBUG: pid 1317: child received shutdown request signal
3
2011-02-24 18:07:02 DEBUG: pid 1318: child received shutdown request signal
3
2011-02-24 18:07:02 DEBUG: pid 1319: child received shutdown request signal
3
2011-02-24 18:07:02 DEBUG: pid 1320: child received shutdown request signal
3
2011-02-24 18:07:02 DEBUG: pid 12178: I am 12178
2011-02-24 18:07:02 DEBUG: pid 12179: I am 12179
2011-02-24 18:07:02 DEBUG: pid 12180: I am 12180
2011-02-24 18:07:02 DEBUG: pid 12177: I am 12177
2011-02-24 18:07:02 DEBUG: pid 12181: I am 12181
2011-02-24 18:07:02 DEBUG: pid 1322: child received shutdown request signal
3
2011-02-24 18:07:02 DEBUG: pid 12176: I am 12176

011-02-24 18:07:02 DEBUG: pid 12205: I am 12205
2011-02-24 18:07:02 DEBUG: pid 1338: child received shutdown request signal
3
2011-02-24 18:07:02 DEBUG: pid 12206: I am 12206
2011-02-24 18:07:02 LOG:   pid 1313: failover done. shutdown host (5432)
2011-02-24 18:07:02 DEBUG: pid 1339: child received shutdown request signal
3
2011-02-24 18:07:02 DEBUG: pid 1313: pool_ssl: SSL requested but SSL support
is not available
2011-02-24 18:07:02 DEBUG: pid 1340: child received shutdown request signal
3
2011-02-24 18:07:02 DEBUG: pid 1341: child received shutdown request signal
3
2011-02-24 18:07:02 DEBUG: pid 1313: s_do_auth: auth kind: 0
2011-02-24 18:07:02 DEBUG: pid 1313: s_do_auth: parameter status data
received
2011-02-24 18:07:02 DEBUG: pid 1313: s_do_auth: parameter status data
received
2011-02-24 18:07:02 DEBUG: pid 1313: s_do_auth: parameter status data
received
2011-02-24 18:07:02 DEBUG: pid 1313: s_do_auth: parameter status data
received
2011-02-24 18:07:02 DEBUG: pid 1313: s_do_auth: parameter status data
received
2011-02-24 18:07:02 DEBUG: pid 1313: s_do_auth: parameter status data
received
2011-02-24 18:07:02 DEBUG: pid 1313: s_do_auth: parameter status data
received
2011-02-24 18:07:02 DEBUG: pid 1313: s_do_auth: parameter status data
received
2011-02-24 18:07:02 DEBUG: pid 1313: s_do_auth: parameter status data
received
2011-02-24 18:07:02 DEBUG: pid 1313: s_do_auth: parameter status data
received
2011-02-24 18:07:02 DEBUG: pid 1313: s_do_auth: parameter status data
received
2011-02-24 18:07:02 DEBUG: pid 1313: s_do_auth: backend key data received
2011-02-24 18:07:02 DEBUG: pid 1313: s_do_auth: transaction state: I
2011-02-24 18:07:02 DEBUG: pid 1342: child received shutdown request signal
3
2011-02-24 18:07:02 DEBUG: pid 1345: child received shutdown request signal
3
2011-02-24 18:07:02 DEBUG: pid 1344: child received shutdown request signal
3
2011-02-24 18:07:02 DEBUG: pid 1343: child received shutdown request signal
3
2011-02-24 18:07:02 DEBUG: pid 1313: do_query: kind: T
2011-02-24 18:07:02 DEBUG: pid 1313: num_fileds: 1
2011-02-24 18:07:02 DEBUG: pid 1313: do_query: kind: D
2011-02-24 18:07:02 DEBUG: pid 1313: do_query: kind: C
2011-02-24 18:07:02 DEBUG: pid 1313: do_query: kind: Z
2011-02-24 18:07:02 LOG:   pid 1313: find_primary_node: primary node id is 1


2011-02-24 18:07:02 DEBUG: pid 1313: child 1340 exits with status 0
2011-02-24 18:07:02 DEBUG: pid 1313: child 1341 exits with status 0
2011-02-24 18:07:02 DEBUG: pid 1313: child 1342 exits with status 0
2011-02-24 18:07:02 DEBUG: pid 1313: child 1343 exits with status 0
2011-02-24 18:07:02 DEBUG: pid 1313: child 1344 exits with status 0
2011-02-24 18:07:02 DEBUG: pid 1313: child 1345 exits with status 0
2011-02-24 18:07:02 DEBUG: pid 1313: reap_handler: normally exited
2011-02-24 18:07:12 DEBUG: pid 1313: starting health checking
2011-02-24 18:07:12 DEBUG: pid 1313: health_check: 0 th DB node status: 3
2011-02-24 18:07:12 DEBUG: pid 1313: health_check: 1 th DB node status: 2
2011-02-24 18:07:22 DEBUG: pid 1313: starting health checking


what does it mean ?

in pgpoolAdmin, it says :

5432 Down 0.5005433 Up. Connected. Running as standby server 0.500

Shouldn't I have the 5433 take the primary role ?




On Thu, Feb 24, 2011 at 2:47 PM, Tatsuo Ishii <ishii at sraoss.co.jp> wrote:

> You seem to forgot to add:
>
> wal_level = hot_standby
>
> to your postgresql.conf.
> --
> Tatsuo Ishii
> SRA OSS, Inc. Japan
> English: http://www.sraoss.co.jp/index_en.php
> Japanese: http://www.sraoss.co.jp
>
> > indeed,
> >
> > What do you think about :
> >
> > STATEMENT:  SELECT pgpool_recovery('basebackup.sh', 'localhost',
> > '/usr/local/pgsql/standby')
> > ERROR:  WAL level not sufficient for making an online backup
> > HINT:  wal_level must be set to "archive" or "hot_standby" at server
> start.
> > STATEMENT:  SELECT pg_start_backup('Streaming Replication', true)
> > ERROR:  WAL level not sufficient for making an online backup
> > HINT:  wal_level must be set to "archive" or "hot_standby" at server
> start.
> > mkdir: cannot create directory `/usr/local/pgsql/standby/pg_xlog': File
> > exists
> > rm: cannot remove `/usr/local/pgsql/standby/recovery.done': No such file
> or
> > directory
> > ERROR:  WAL level not sufficient for making an online backup
> > HINT:  wal_level must be set to "archive" or "hot_standby" at server
> start.
> > STATEMENT:  SELECT pg_stop_backup()
> > ERROR:  WAL level not sufficient for making an online backup
> > HINT:  wal_level must be set to "archive" or "hot_standby" at server
> start.
> > ERROR:  pgpool_recovery failel
> >
> >
> >
> > On Thu, Feb 24, 2011 at 2:06 PM, Tatsuo Ishii <ishii at sraoss.co.jp>
> wrote:
> >
> >> > It seems, that I missed the part of installing postrgresql for php .
> >> >
> >> > But when I click now on Recovery for the standby server I got :
> >> >
> >> > Error Code e1012
> >> > pcp_recovery_node command error occurred.
> >>
> >> To analyze the problem, I recommend to look into:
> >>
> >> - Pgpool log
> >> - PostgreSQL log
> >>
> >> Can you show me?
> >> --
> >> Tatsuo Ishii
> >> SRA OSS, Inc. Japan
> >> English: http://www.sraoss.co.jp/index_en.php
> >> Japanese: http://www.sraoss.co.jp
> >>
> >> > On Wed, Feb 23, 2011 at 4:49 PM, Micka <mickamusset at gmail.com> wrote:
> >> >
> >> >> Well,
> >> >>
> >> >>
> >> >> It seems that :
> >> >>
> >> >> http://172.17.100.12/pgpoolAdmin-3.0.2/nodeStatus.php
> >> >>
> >> >> return a 500 internal server error.
> >> >>
> >> >> And I think the error is here :
> >> >> for ($i = 0; $i < $nodeCount; $i++) {
> >> >>         echo "for $i <br>";
> >> >>         if ($node_alive == false) {
> >> >>           echo "node alive <br>";
> >> >>                 if (($isReplicationMode || $isMasterSlaveMode) &&
> >> >> NodeActive($i))
> >> >>                         array_push($nodeInfo[$i], 'return');
> >> >>                 else
> >> >>                         array_push($nodeInfo[$i], 'none');
> >> >>         } else if( $isParallelMode ) {
> >> >>         array_push($nodeInfo[$i], 'none');
> >> >>     } else {
> >> >>         echo "dead node ".$nodeInfo[$i][2]."<br>";
> >> >>         switch($nodeInfo[$i][2]) {
> >> >>                 case 1:
> >> >>                 case 2:
> >> >>                         if($isReplicationMode || $isMasterSlaveMode)
> {
> >> >>                                 array_push($nodeInfo[$i],
> 'disconnect');
> >> >>                         } else {
> >> >>                                 array_push($nodeInfo[$i], 'none');
> >> >>                         }
> >> >>                         echo "success 2<br>";
> >> >>                         break;
> >> >>                 case 3:
> >> >>                         if($isReplicationMode || $isMasterSlaveMode)
> {
> >> >>                                 if(NodeActive($i)) {
> >> >>                                         array_push($nodeInfo[$i],
> >> >> 'return');
> >> >>                                 } else {
> >> >>                     array_push($nodeInfo[$i], 'recovery');
> >> >>                 }
> >> >>                         } else {
> >> >>                                 array_push($nodeInfo[$i], 'none');
> >> >>                         }
> >> >>                         break;
> >> >>         }
> >> >>     }
> >> >>         echo print_r($nodeInfo)."<br>";
> >> >>         $nodeInfo[$i][5] = NodeStandby($i);
> >> >> }
> >> >> echo "test_final";
> >> >> print_r($nodeInfo);
> >> >>
> >> >> It prints me that :
> >> >>
> >> >> for 0
> >> >> dead node 2
> >> >> success 2
> >> >> Array ( [0] => Array ( [0] => [1] => 5432 [2] => 2 [3] => 0.500 [4]
> =>
> >> >> disconnect ) [1] => Array ( [0] => [1] => 5433 [2] => 3 [3] => 0.500
> ) )
> >> 1
> >> >>
> >> >> It seems that the function NodeStandby do something wrong, because
> the
> >> for
> >> >> loop didn't increment $i at all.
> >> >> Otherwise It will print "for 1"
> >> >>
> >> >> What do you think ?
> >> >>
> >> >>
> >> >> On Wed, Feb 23, 2011 at 3:52 PM, Micka <mickamusset at gmail.com>
> wrote:
> >> >>
> >> >>> Yes it seems,
> >> >>>
> >> >>> Just by curiousity, when you start stop start stop pgpool, where
> pgpool
> >> >>> store the information about the current database it uses ?
> >> >>>
> >> >>> about pgadmin, I got :
> >> >>>
> >> >>> http://img546.imageshack.us/i/pgpool.png/
> >> >>>
> >> >>> instead of :
> >> >>>
> >> >>>
> >> >>>
> >> >>>
> >>
> http://pgpool.projects.postgresql.org/contrib_docs/simple_sr_setting/operation_images/02.png
> >> >>>
> >> >>> I tried :
> >> >>>
> >> >>> postgres at PTI2:~$ pcp_node_count 10 localhost 9898 postgres1
> >> pgpoolAdmin
> >> >>> 2
> >> >>>
> >> >>> It works
> >> >>>
> >> >>> as well as :
> >> >>>
> >> >>> postgres at PTI2:~$ pcp_node_info 10 localhost 9898 postgres1
> pgpoolAdmin
> >> 1
> >> >>>  5433 3 0.500000
> >> >>>
> >> >>> and I'm sure that I've done a :
> >> >>>
> >> >>> chmod 755 /usr/local/bin/pgpool
> >> >>> chmod 755 /usr/local/bin/pcp_*
> >> >>>
> >> >>>
> >> >>> see :
> >> >>>
> >> >>>
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://pgfoundry.org/pipermail/pgpool-general/attachments/20110224/c99da4e1/attachment-0001.html>


More information about the Pgpool-general mailing list