Thread: setting up streaming error. Please help

setting up streaming error. Please help

From
akp geek
Date:
Hi all -

         After making the required changes to the Primary and slave , I have restarted the slave and I keep seeing the following in the logs.

         Operating system is solaris.
         
          on the primary . postgresql.conf has the following changes  

            listen_addresses = '*' 
            port = 5432
            wal_level = hot_standby
            archive_mode = on
            archive_command = 'cp -i %p /dbbackup/9.0.2/archive/%f </dev/null'

            pg_hba.conf ( Primary ) . created a superuser  called stream on the primary

            host    replication     stream          10.xxx.xxx.47/32        md5

I have made the following changes on the slave

              postgresql.conf ( slave )
                 
                listen_addresses = '*' 
                port = 5433

                recovery.conf 

                 standby_mode='on'
                 primary_conninfo='host=10.xxx.xxx.46 port=5432  user=stream password=stream'
                  trigger_file='/opt/postgres/9.0.2/data/finished.replication'
                 restore_command = 'cp -i /dbbackup/9.0.2/archive/%f "%p" </dev/null'

then restarted the slave and I see the following in logs.  

cp: cannot access /dbbackup/9.0.2/archive/00000001000000010000008E
FATAL:  could not connect to the primary server: invalid connection option "replication"


Thanks for the help

regards

Re: setting up streaming error. Please help

From
Guillaume Lelarge
Date:
On Fri, 2011-06-10 at 15:46 -0400, akp geek wrote:
> Hi all -
>
>
>          After making the required changes to the Primary and slave ,
> I have restarted the slave and I keep seeing the following in the
> logs.
>
>
>          Operating system is solaris.
>
>           on the primary . postgresql.conf has the following changes
>
>
>             listen_addresses = '*'
>             port = 5432
>             wal_level = hot_standby
>             archive_mode = on
>             archive_command = 'cp -i %p /dbbackup/9.0.2/archive/%f
> </dev/null'
>

You miss at least the max_wal_senders parameter.

>
>             pg_hba.conf ( Primary ) . created a superuser  called
> stream on the primary
>
>
>             host    replication     stream          10.xxx.xxx.47/32
>        md5
>
>
> I have made the following changes on the slave
>
>
>               postgresql.conf ( slave )
>
>                 listen_addresses = '*'
>                 port = 5433
>
>
>                 recovery.conf
>
>
>                  standby_mode='on'
>                  primary_conninfo='host=10.xxx.xxx.46 port=5432
>  user=stream password=stream'
>
>   trigger_file='/opt/postgres/9.0.2/data/finished.replication'
>                  restore_command = 'cp -i /dbbackup/9.0.2/archive/%f
> "%p" </dev/null'
>
>
> then restarted the slave and I see the following in logs.
>
>
> cp: cannot access /dbbackup/9.0.2/archive/00000001000000010000008E
> FATAL:  could not connect to the primary server: invalid connection
> option "replication"
>

Are they both 9.0 servers?


--
Guillaume
  http://blog.guillaume.lelarge.info
  http://www.dalibo.com


Re: setting up streaming error. Please help

From
akp geek
Date:
Both the servers are having 9.0.2

Thanks

On Fri, Jun 10, 2011 at 4:09 PM, Guillaume Lelarge <guillaume@lelarge.info> wrote:
On Fri, 2011-06-10 at 15:46 -0400, akp geek wrote:
> Hi all -
>
>
>          After making the required changes to the Primary and slave ,
> I have restarted the slave and I keep seeing the following in the
> logs.
>
>
>          Operating system is solaris.
>
>           on the primary . postgresql.conf has the following changes
>
>
>             listen_addresses = '*'
>             port = 5432
>             wal_level = hot_standby
>             archive_mode = on
>             archive_command = 'cp -i %p /dbbackup/9.0.2/archive/%f
> </dev/null'
>

You miss at least the max_wal_senders parameter.

>
>             pg_hba.conf ( Primary ) . created a superuser  called
> stream on the primary
>
>
>             host    replication     stream          10.xxx.xxx.47/32
>        md5
>
>
> I have made the following changes on the slave
>
>
>               postgresql.conf ( slave )
>
>                 listen_addresses = '*'
>                 port = 5433
>
>
>                 recovery.conf
>
>
>                  standby_mode='on'
>                  primary_conninfo='host=10.xxx.xxx.46 port=5432
>  user=stream password=stream'
>
>   trigger_file='/opt/postgres/9.0.2/data/finished.replication'
>                  restore_command = 'cp -i /dbbackup/9.0.2/archive/%f
> "%p" </dev/null'
>
>
> then restarted the slave and I see the following in logs.
>
>
> cp: cannot access /dbbackup/9.0.2/archive/00000001000000010000008E
> FATAL:  could not connect to the primary server: invalid connection
> option "replication"
>

Are they both 9.0 servers?


--
Guillaume
 http://blog.guillaume.lelarge.info
 http://www.dalibo.com


Re: setting up streaming error. Please help

From
Tom Lane
Date:
akp geek <akpgeek@gmail.com> writes:
>          After making the required changes to the Primary and slave , I have
> restarted the slave and I keep seeing the following in the logs.

> *FATAL:  could not connect to the primary server: invalid connection option
> "replication"*

That message has to be caused by libpq, because the string 'invalid
connection option' occurs nowhere else in PG.  I am guessing that you
have an 8.4 or older libpq.so that walreceiver.so is somehow linking to.
I don't know what Solaris' equivalent of LD_LIBRARY_PATH is, but I'd be
looking into that angle if I were you.

            regards, tom lane

Re: setting up streaming error. Please help

From
akp geek
Date:
Thanks Tom .  

When I did.... Is there any that I can run some commands to point it to libpq.so.5.   I have  LD_LIBRARY_PATH =/opt/postgres/9.0.2/lib. still it is pointing to  /usr/lib  .. Any suggestions? 

ldd libpqwalreceiver.so

  libpq.so.4 =>    /usr/lib/libpq.so.4
        libgcc_s.so.1 =>         /usr/sfw/lib/libgcc_s.so.1
        libssl.so.0.9.7 =>       /usr/sfw/lib/libssl.so.0.9.7
        libcrypto.so.0.9.7 =>    /usr/sfw/lib/libcrypto.so.0.9.7
        libresolv.so.2 =>        /usr/lib/libresolv.so.2
        libsocket.so.1 =>        /usr/lib/libsocket.so.1
        libnsl.so.1 =>   /usr/lib/libnsl.so.1
        libpthread.so.1 =>       /usr/lib/libpthread.so.1
        libc.so.1 =>     /lib/libc.so.1
        libmp.so.2 =>    /lib/libmp.so.2
        libmd.so.1 =>    /lib/libmd.so.1
        libscf.so.1 =>   /lib/libscf.so.1
        libdoor.so.1 =>  /lib/libdoor.so.1
        libuutil.so.1 =>         /lib/libuutil.so.1
        libgen.so.1 =>   /lib/libgen.so.1
        libssl_extra.so.0.9.7 =>         /usr/sfw/lib/libssl_extra.so.0.9.7
        libcrypto_extra.so.0.9.7 =>      /usr/sfw/lib/libcrypto_extra.so.0.9.7
        libm.so.2 =>     /lib/libm.so.2
        /platform/SUNW,SPARC-Enterprise/lib/libc_psr.so.1


Appreciate your help

Regards

On Sat, Jun 11, 2011 at 12:25 PM, Tom Lane <tgl@sss.pgh.pa.us> wrote:
akp geek <akpgeek@gmail.com> writes:
>          After making the required changes to the Primary and slave , I have
> restarted the slave and I keep seeing the following in the logs.

> *FATAL:  could not connect to the primary server: invalid connection option
> "replication"*

That message has to be caused by libpq, because the string 'invalid
connection option' occurs nowhere else in PG.  I am guessing that you
have an 8.4 or older libpq.so that walreceiver.so is somehow linking to.
I don't know what Solaris' equivalent of LD_LIBRARY_PATH is, but I'd be
looking into that angle if I were you.

                       regards, tom lane

Re: setting up streaming error. Please help

From
Tom Lane
Date:
akp geek <akpgeek@gmail.com> writes:
> *ldd libpqwalreceiver.so*

>  * libpq.so.4 =>    /usr/lib/libpq.so.4*

Looks like you need to recompile, for starters.  libpq.so.4 would be 8.1
or even older.

            regards, tom lane