Mathew Thomas
unread,Aug 3, 2011, 9:16:46 AM8/3/11Sign in to reply to author
Sign in to forward
You do not have permission to delete messages in this group
Sign in to report message
Either email addresses are anonymous for this group or you need the view member email addresses permission to view the original message
to rubyrep
I need to setup replication using ruby rep between 2 servers where
direct connectivity does not exist.
So i have set up an ssh tunnel from server A which listens to the 5432
port on server B...
I am able to connect to the database on B from A using psql
command...But ruby rep is not working...
[root@warehouse1 rubyrep-1.2.0]# /usr/local/postgresql-9.0.1/bin/psql -
U postgres -h 127.0.0.1 -p 8738 -d new_vodafone_user_data_oltp -c
"select now()"
now
----------------------------------
2011-08-03 18:48:15.495278+05:30
My configuration is as follows.
RR::Initializer::run do |config|
config.left = {
:adapter => 'postgresql', # or 'mysql'
:database => 'vodafone_rubyrep',
:username => 'postgres',
:password => 'abc',
:host => 'localhost',
:port => '5432'
}
config.right = {
:adapter => 'postgresql',
:database => 'new_vodafone_user_data_oltp',
:username => 'postgres',
:password => 'postgres',
:host => '127.0.0.1',
:port => '8738'
}
config.options[:database_connection_timeout] = 600
config.include_tables 'subscription_pkg'
Error:-
[root@warehouse1 rubyrep-1.2.0]# ./rubyrep --verbose scan -c
vodarep2.conf
Exception caught: no connection to 'right' database
/home/postgres/RubyRep/rubyrep-1.2.0/lib/rubyrep/session.rb:189:in
`refresh_database_connection'
/home/postgres/RubyRep/rubyrep-1.2.0/lib/rubyrep/session.rb:158:in
`refresh'
org/jruby/RubyArray.java:1676:in `each'
/home/postgres/RubyRep/rubyrep-1.2.0/lib/rubyrep/session.rb:158:in
`refresh'
/home/postgres/RubyRep/rubyrep-1.2.0/lib/rubyrep/session.rb:227:in
`initialize'
/home/postgres/RubyRep/rubyrep-1.2.0/lib/rubyrep/base_runner.rb:151:in
`session'
/home/postgres/RubyRep/rubyrep-1.2.0/lib/rubyrep/base_runner.rb:166:in
`execute'
/home/postgres/RubyRep/rubyrep-1.2.0/lib/rubyrep/base_runner.rb:187:in
`run'
/home/postgres/RubyRep/rubyrep-1.2.0/lib/rubyrep/command_runner.rb:
102:in `run'
./bin/rubyrep:7:in `(root)'
Any help regarding this problem would be much appreciated...