[Pgpool-general] problem with backendkey data
Takumi Okubo
t-okubo at tsysd.net
Wed Oct 19 02:36:56 GMT 2005
----- Original Message -----
From: "Tatsuo Ishii" <ishii at sraoss.co.jp>
To: <t-okubo at tsysd.net>
Sent: Wednesday, October 19, 2005 12:27 PM
Subject: Re: [Pgpool-general] problem with backendkey data
>> ----- Original Message -----
>> From: "Tatsuo Ishii" <ishii at sraoss.co.jp>
>> To: <t-okubo at tsysd.net>
>> Cc: <pgpool-general at pgfoundry.org>
>> Sent: Tuesday, October 18, 2005 11:34 PM
>> Subject: Re: [Pgpool-general] problem with backendkey data
>>
>>
>> >> i am having an error that i have two servers(say serv1 and serv2),
>> >> both
>> >> have
>> >> postgreSQL 8.0.3
>> >> and pgpool(2.6.3) is running on the primary server(serv1).
>> >>
>> >> i have been trying to access the DBs via pgpool and i have had errors
>> >> below:
>> >>
>> >> 2005-10-18 19:40:41 DEBUG: pid 9991: I am 9991 accept fd 6
>> >> 2005-10-18 19:40:41 DEBUG: pid 9991: Protocol Major: 3 Minor: 0
>> >> database:
>> >> nittel user: postgres
>> >> 2005-10-18 19:40:41 DEBUG: pid 9991: read_message_length: lenghth: 8
>> >> 2005-10-18 19:40:41 DEBUG: pid 9991: trying clear text password
>> >> authentication
>> >> 2005-10-18 19:40:41 ERROR: pid 9991: do_clear_text_password: failed to
>> >> read
>> >> password packet "p"
>> >> 2005-10-18 19:40:41 ERROR: pid 9991: pool_do_auth: backend does not
>> >> return
>> >> authenticaton ok
>> >> 2005-10-18 19:40:50 DEBUG: pid 9991: I am 9991 accept fd 6
>> >> 2005-10-18 19:40:50 DEBUG: pid 9991: Protocol Major: 3 Minor: 0
>> >> database:
>> >> nittel user: postgres
>> >> 2005-10-18 19:40:50 DEBUG: pid 9991: read_message_length: lenghth: 8
>> >> 2005-10-18 19:40:50 DEBUG: pid 9991: trying clear text password
>> >> authentication
>> >> 2005-10-18 19:40:50 DEBUG: pid 9991: read_message_length: lenghth: 65
>> >> 2005-10-18 19:40:50 ERROR: pid 9991: pool_do_auth: invalid messages
>> >> length(65) for BackendKeyData
>> >>
>> >> both DBs have the same data and a postgres.cof file. it seems that the
>> >> two
>> >> postmasters do not send the same backendkeydata to pgpool but
>> >> postmasters
>> >> have no errors.....
>> >>
>> >> does anyone have any ideas?
>> >
>> > pgpool 2.6.3/PostgreSQL 8.0.3/replication mode/password authentication
>> > works for me. I want to know what kind of packet you received before
>> > the error message. Can you apply following patches and send me the
>> > debug out?
>> > --
>> > SRA OSS, Inc. Japan
>> > Tatsuo Ishii
>> >
>> > *** pool_auth.c 25 Jun 2005 00:58:46 -0000 1.4
>> > --- pool_auth.c 18 Oct 2005 13:31:17 -0000
>> > ***************
>> > *** 243,252 ****
>> > /*
>> > * message length (V3 only)
>> > */
>> > ! if (protoMajor == PROTO_MAJOR_V3 && (length =
>> > pool_read_message_length(cp)) != 12)
>> > {
>> > ! pool_error("pool_do_auth: invalid messages length(%d) for
>> > BackendKeyData", length);
>> > ! return -1;
>> > }
>> >
>> > /*
>> > --- 243,261 ----
>> > /*
>> > * message length (V3 only)
>> > */
>> > ! if (protoMajor == PROTO_MAJOR_V3)
>> > {
>> > ! if (kind != 'K')
>> > ! {
>> > ! pool_error("pool_do_auth: expect \"K\" got %c", kind);
>> > ! return -1;
>> > ! }
>> > !
>> > ! if ((length = pool_read_message_length(cp)) != 12)
>> > ! {
>> > ! pool_error("pool_do_auth: invalid messages length(%d) for
>> > BackendKeyData", length);
>> > ! return -1;
>> > ! }
>> > }
>> >
>> > /*
>> >
>>
>> Hi
>> Thanks for your help. I have patched your codes above and I have got
>> error
>> messages...
>>
>> 2005-10-19 12:00:41 DEBUG: pid 16563: I am 16563 accept fd 6
>> 2005-10-19 12:00:41 DEBUG: pid 16563: Protocol Major: 3 Minor: 0
>> database:
>> nittel user: postgres
>> 2005-10-19 12:00:42 DEBUG: pid 16563: read_message_length: lenghth: 8
>> 2005-10-19 12:00:42 DEBUG: pid 16563: trying clear text password
>> authentication
>> 2005-10-19 12:00:42 ERROR: pid 16563: do_clear_text_password: failed to
>> read
>> password packet "p"
>> 2005-10-19 12:00:42 ERROR: pid 16563: pool_do_auth: backend does not
>> return
>> authenticaton ok
>> 2005-10-19 12:00:46 DEBUG: pid 16563: I am 16563 accept fd 6
>> 2005-10-19 12:00:46 DEBUG: pid 16563: Protocol Major: 3 Minor: 0
>> database:
>> nittel user: postgres
>> 2005-10-19 12:00:46 DEBUG: pid 16563: read_message_length: lenghth: 8
>> 2005-10-19 12:00:46 DEBUG: pid 16563: trying clear text password
>> authentication
>> 2005-10-19 12:00:46 ERROR: pid 16563: pool_do_auth: expect "K" got N
>>
>> In addition, when I turn off all log options in postgres.conf then I can
>> access to pgpool......does that help?
>
> Yes, it does. Can you tell me the exact postgresql.conf settings for
> log options so that I could reproduce your problem?
> --
> SRA OSS, Inc. Japan
> Tatsuo Ishii
>
>
Hi
This is my log options in postgresql.conf
Thank you
# - Where to Log -
log_destination = 'stderr' # Valid values are combinations of stderr,
# syslog and eventlog, depending on
# platform.
# This is relevant when logging to stderr:
redirect_stderr = true # Enable capturing of stderr into log files.
# These are only relevant if redirect_stderr is true:
#log_directory = '/usr/local/pgsql/data/pg_log' # Directory where log
files are written.
# May be specified absolute or relative to
PGDATA
#log_filename = 'postgresql-%Y-%m-%d_%H%M%S.log' # Log file name pattern.
# May include strftime() escapes
#log_truncate_on_rotation = false # If true, any existing log file of the
# same name as the new log file will be
truncated
# rather than appended to. But such truncation
# only occurs on time-driven rotation,
# not on restarts or size-driven rotation.
# Default is false, meaning append to existing
# files in all cases.
#log_rotation_age = 1440 # Automatic rotation of logfiles will happen
after
# so many minutes. 0 to disable.
#log_rotation_size = 10240 # Automatic rotation of logfiles will happen
after
# so many kilobytes of log output. 0 to
disable.
# These are relevant when logging to syslog:
#syslog_facility = 'LOCAL0'
#syslog_ident = 'postgres'
# - When to Log -
client_min_messages = debug4 # Values, in order of decreasing detail:
# debug5, debug4, debug3, debug2, debug1,
# log, notice, warning, error
#log_min_messages = debug4 # Values, in order of decreasing detail:
# debug5, debug4, debug3, debug2, debug1,
# info, notice, warning, error, log,
fatal,
# panic
#log_error_verbosity = default # terse, default, or verbose messages
#log_min_error_statement = debug4 # Values in order of increasing severity:
# debug5, debug4, debug3, debug2, debug1,
# info, notice, warning, error,
panic(off)
#log_min_duration_statement = -1 # -1 is disabled, in milliseconds.
#silent_mode = true # DO NOT USE without syslog or
redirect_stderr
# - What to Log -
debug_print_parse = false
#debug_print_rewritten = false
#debug_print_plan = false
#debug_pretty_print = false
#log_connections = true
#log_disconnections = false
#log_duration = false
#log_line_prefix = '' # e.g. '<%u%%%d> '
# %u=user name %d=database name
# %r=remote host and port
# %p=PID %t=timestamp %i=command tag
# %c=session id %l=session line number
# %s=session start timestamp %x=transaction
id
# %q=stop here in non-session processes
# %%='%'
#log_statement = 'none' # none, mod, ddl, all
#log_hostname = false
More information about the Pgpool-general
mailing list