Debugging connection issues

153 views
Skip to first unread message

Ganesh Shankar

unread,
May 18, 2011, 3:14:48 AM5/18/11
to rubyrep
Hi there,

I managed to get rubyrep up and running on my local box and working
well. However, when I try to connect to a DB on another machine I keep
getting the following error.

Exception caught: no connection to 'right' database

Is there any way I can debug this further to see _where_ the
connection is failing? I've tested the connection to the remote DB
from command line and PgAdmin and it works fine so I'm guessing
there's something wrong with my rubyrep config...

Cheers,
Ganesh

Yan Chunlu

unread,
May 18, 2011, 3:22:22 AM5/18/11
to rub...@googlegroups.com
I just encoutered this issue too, fixed by make the timeout longer:  config.options[:database_connection_timeout] = 60

since I am syncing between two server that has high latency


--
You received this message because you are subscribed to the Google Groups "rubyrep" group.
To post to this group, send email to rub...@googlegroups.com.
To unsubscribe from this group, send email to rubyrep+u...@googlegroups.com.
For more options, visit this group at http://groups.google.com/group/rubyrep?hl=en.




--
Charles

Nishkarsh Kulshreshtha

unread,
May 18, 2011, 11:26:25 AM5/18/11
to rub...@googlegroups.com
Hi Ganesh,

I am using rubyrep for long now. One of my client place it is running....

Please check the following things
- Password of both the systems in setup file
- Port numbers
- Database name
- Fire wall of both of the system

Tip : Try connecting the DB on the 2'nd (remote) system using PgAdmin from 1'st (local), if it works then firewall and other

Hope this helps

Regards
Nishkarsh

Ganesh Shankar

unread,
May 18, 2011, 8:53:50 PM5/18/11
to rubyrep
Thanks for the tips.

I increased the timeout and double checked all my DB connection params
but it's still not working.

Is there a way I can get more info on WHY the connection is failing?
It would help if I could tell if it was a authentication issue or a
network issue...

Cheers,
Ganesh

On May 19, 1:26 am, Nishkarsh Kulshreshtha <nishka...@gmail.com>
wrote:
> Hi Ganesh,
>
> I am using rubyrep for long now. One of my client place it is running....
>
> Please check the following things
> - Password of both the systems in setup file
> - Port numbers
> - Database name
> - Fire wall of both of the system
>
> *Tip :* Try connecting the DB on the 2'nd (remote) system using PgAdmin from

Yan Chunlu

unread,
May 18, 2011, 10:40:44 PM5/18/11
to rub...@googlegroups.com
check the file session.rb, the method "def connect_database(database)",  I think it uses "@connections[database] = @proxies[database].create_session arm_config" to connect the db

if there's something wrong, might has some error message output.  

the "no connection to left database" is threw out when "database_unreachable" failed, you can see in that method it is doing a test query "select 1+1 as x", in my case it takes to short to connect the database,  the test method executed before the database get connected.

you could print some log message in those methods to see what was wrong
--
Charles

Nishkarsh Kulshreshtha

unread,
May 19, 2011, 3:26:36 AM5/19/11
to rub...@googlegroups.com
Hi Ganesh,

To make it sure that there is no connectivity issue between the 2 DB,

try to connect the remote DB using PgAdmin in your local system oo/and the other way....

PgAdmin being a GUI interface makes it easy to do the same

If that works we then you may have to share your setup file....

Regards
Nishkarsh

Luis Eduardo Bueno

unread,
Feb 1, 2013, 9:33:11 AM2/1/13
to rub...@googlegroups.com
Thanks..

For me just work fine now!

Cheers
Luis
Reply all
Reply to author
Forward
0 new messages