Re: [Sqlrelay-discussion] Fwd: problem config sqlrelay router
Brought to you by:
mused
|
From: David M. <dav...@fi...> - 2007-11-21 03:57:32
|
Hello, I'm not sure what you're attempting to do. If you're trying to use sqlrelay between psql and postmaster, then you just need to use 1 instance of SQL Relay configured to connect to the postgresql database and you need to use the postgresql drop-in replacement library on the client machine. You'll need to use a configuration similar to the one defined in: http://sqlrelay.sourceforge.net/sqlrelay/gettingstarted/postgresql.html#sqlrelay to connect to the postgresql database. You should use sqlrsh to test it. If that's working, then you need to use the drop-in replacement library as described in: http://sqlrelay.sourceforge.net/sqlrelay/dropin/postgresql.html to use psql. You only need to use sqlrelay as a router if you want to send some queries to one instance of postgresql and other queries to a different instance. David Muse dav...@fi... On Sun, 2007-11-18 at 17:44 +0100, Heiko L. wrote: > > hallo *! > > > I try one config with router, but it does not work. > > - config: > > psql ----- :9000 sqlrelay ------ :5432 postmaster > x.x.x.87 x.x.x.73 x.x.x.74 > > > $ egrep "instance |user |route " /usr/local/firstworks/etc/sqlrelay.conf | > cut -c 1-70 > <instance id="inspg1" port="9000" unixport="/tmp/psql.socket" > <user user="smuser" password="smpass"/> > <user user="smuser" password="smpass"/> > <route host="x.x.x.74" port="5432" socket > > > - Test route sqlrelay-0.35-10 (debian sarge) > > sqlrelay $ sqlr-start -id inspg1 -config > /usr/local/firstworks/etc/sqlrelay.conf > > Starting listener: > sqlr-listener -id inspg1 -config > /usr/local/firstworks/etc/sqlrelay.conf Could not listen on inet port: > 5432 > Make sure that no other processes are listening on that port. > > > sqlr-listener failed to start. > > - Test route sqlrelay-0.39 > > sqlrelay $ /usr/local/firstworks/bin/sqlr-start -id inspg1 ; netstat -anep > | grep sqlr ; > > > Starting listener: > sqlr-listener -id inspg1 -config /usr/local/firstworks/etc/sqlrelay.conf > > Starting 1 connections to defaultid : > sqlr-connection-router -id inspg1 -connectionid defaultid -config > /usr/local/f > irstworks/etc/sqlrelay.conf > > Starting cache manager: > sqlr-cachemanager > Warning: using default id. > > > tcp 0 0 0.0.0.0:9000 0.0.0.0:* LISTEN > 6 > 5534 18502296 5338/sqlr-listener > tcp 0 0 0.0.0.0:52403 0.0.0.0:* LISTEN > 6 > 5534 18502793 5343/sqlr-connectio > tcp 0 0 x.x.x.73:9000 x.x.x.87:54624 ESTABLISHED6 > 5534 18503113 5338/sqlr-listener > unix 2 [ ACC ] STREAM LISTENING 18502297 > 5338/sqlr-listener /tmp/psql.socket > unix 2 [ ACC ] STREAM LISTENING 18502791 > 5343/sqlr-connectio / > > usr/local/firstworks/var/sqlrelay/tmp/sockets/6 > > $ tail /var/log/postgresql/postgres.log; > 2007-11-16 15:54:31 [6098] LOG: connection received: host=x.x.x.73 > port=55699 > 2007-11-16 15:54:31 [6098] LOG: invalid length of startup packet > 2007-11-16 15:54:31 [6099] LOG: connection received: host=x.x.x.73 > port=55700 > 2007-11-16 15:54:31 [6099] LOG: invalid length of startup packet > > > - summary: > - 0.35-10 > - sqlrelay listen on :5432 , should be :9000 > - 0.39 > - sqlrelay listen on :9000, but not forward connection to postmaster > > Whats going wrong? > > regards heiko > > > > > > > ------------------------------------------------------------------------- > This SF.net email is sponsored by: Microsoft > Defy all challenges. Microsoft(R) Visual Studio 2005. > http://clk.atdmt.com/MRT/go/vse0120000070mrt/direct/01/ > _______________________________________________ > Sqlrelay-discussion mailing list > Sql...@li... > https://lists.sourceforge.net/lists/listinfo/sqlrelay-discussion > |