Problem connecting to database while debugging

Hi all,

I am new to Xojo Web development and am having problems trying to debug locally on a Windows machine. I created a very simple web app and deployed to Xojo cloud with no problems. App runs fine from cloud. I then added some code to connect to a Postgres database I created on cloud server and re-deployed my app and it also works fine. I would like to be able to debug locally and connect to server database. I have watched webinar showing how to do this, and also read http://blog.xojo.com/2015/03/19/xojo_cloud_databases/ thread describing the exact problem I am experiencing, and cannot figure out what I am doing wrong. The webinar and the thread both describe how to connect to the database remotely using a terminal command from the MacOS. I am using PUTTY in windows but cannot seem to get it to work. I have enabled logging in PUTTY and see that a tunnel between localhost and port 5432 is being opened. When I run my app locally I see an error in the log stating: “could not chdir to home directory/dev/null: Not a directory. This account is currently not available” and then the tunnel is closed.

Has anyone else experienced this problem using PUTTY, and if so can you help me figure out what I am doing wrong.

Thanks in Advance,

Wendell

Hi Wendell - just so I’m clear on this, are you trying to connect to Postgre on your local machine or the Postgre db on your cloud server?

Jason,

Thanks for the reply. I am trying to test app on my local machine and connect to db on cloud.

Thanks

This actually explains the problem. Putty is trying to create an SSH shell for you as opposed to a tunnel.

The tunnel config on a unix/linux system would look like this:

/usr/bin/ssh -N -v -L 5432:localhost:5432 dbadmin@12.24.48.82

I think the piece you’re missing is the -N option:

-N Do not execute a remote command. This is useful for just for- warding ports.

In PuTTY, click on the SSH item and you’ll see a checkbox that says “Don’t start a shell or command at all”. I think that’s what you want.

Greg,

That solved the problem. I really appreciate the help.

Wendell