DbFit Connection for Remote Oracle Server via SSH

48 views
Skip to first unread message

Kabilan Ganesan

unread,
Feb 27, 2020, 11:17:37 AM2/27/20
to dbfit
Dear Friends,

Please help me connecting to remote Oracle Server. 

Oracle 11g is hosted on a Unix Server, which we access 
  1. Creating a SSH session . See Attachment 'Remote Host Connection.jpg'
  2. Creating a SSH tunnel.. See attachment 'Tunneling.jpg'

After the tunnel is established (2nd method), I though we should be able to establish connection from DbFit to DB server, but its not working. Connection timeout error is show.

Please help me to get the connection established
  1. Either directly creating a SSH tunnel from DbFit if possible.
  2. Or connect to DB server using the SSH tunnel created.

Below is the code used for testing 

!path lib/*.jar
!|dbfit.OracleTest|

!|Connect|xxxxxx.europe.intranet:5000|<DB user name>|<password>|dbfit|

!|Query|select 'test' as x|
|x                        |
|test                     |

Please find attached screenshot with error displayed.

Host Connection.jpg
Tunneling.jpg
DbFit Error.JPG

Mark Matten

unread,
Feb 27, 2020, 12:48:26 PM2/27/20
to dbfit
I've not done this kind of thing before but from what I can make out from the images, if FitNesse is running locally (on the laptop) then shouldn't the connection string include "localhost" instead of that server name?

Kabilan Ganesan

unread,
Mar 3, 2020, 8:46:51 AM3/3/20
to dbfit
Hi Mark,

I have tried to connect as per your advise and get a different error. (attached)

Code:
!path lib/*.jar
!|dbfit.OracleTest|

!|Connect|localhost:5050|<user name>|<password>|<DB name>|

!|Query|select 'test' as x|
|x                        |
|test                     |


Can you please think of any other issue?

Note: I have downloaded Oracle JDBC driver and placed it on lib folder as well.
FitNesse String Error.jpg

Yavor Nikolov

unread,
Mar 3, 2020, 11:59:40 AM3/3/20
to dbfit
Could you try adding a blank line between
!path lib/*.jar

and

!|dbfit.OracleTest|

--
You received this message because you are subscribed to the Google Groups "dbfit" group.
To unsubscribe from this group and stop receiving emails from it, send an email to dbfit+un...@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/dbfit/083dc6a6-1f14-4da7-8126-2940c09692ff%40googlegroups.com.

Kabilan Ganesan

unread,
Mar 4, 2020, 2:59:39 AM3/4/20
to dbfit
Hi Yavor,

That doesn't make any difference.

The exception is shown on the connection string and not on invoking the drivers.
To unsubscribe from this group and stop receiving emails from it, send an email to db...@googlegroups.com.

Yavor Nikolov

unread,
Mar 4, 2020, 6:02:16 AM3/4/20
to dbfit
There might me some special symbols in your password which dbfit (fitness) is unable to parse.

Could you try defining them in a properties file:

!|ConnectUsingFile|TestDbConnectionDbFitOracle.properties|


# TestDbConnectionDbFitOracle.properties:

service=//localhost:5050/service_name

username=yourusername

password=yourpassword


Also your query should have a FROM clause as per Oracle syntax: select 'test's as x from dual

To unsubscribe from this group and stop receiving emails from it, send an email to dbfit+un...@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/dbfit/28625b65-57c9-48fb-854f-aa5e1c895300%40googlegroups.com.

Kabilan Ganesan

unread,
Mar 4, 2020, 10:32:57 AM3/4/20
to dbfit
Hi Yavor,

No joy mate. Still get the same error on same line even after using .properties file.

DbFit Error 0304.JPG

Yavor Nikolov

unread,
Mar 4, 2020, 11:00:29 AM3/4/20
to dbfit
It might be some issue due to specifics of your tunneling. Are you able to connect to your database with other tools - e.g. sqlplus or Oracle SQL Developer?

To unsubscribe from this group and stop receiving emails from it, send an email to dbfit+un...@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/dbfit/214ce077-166b-40d7-92c0-5e3d2bc102ee%40googlegroups.com.

Mark Matten

unread,
Mar 4, 2020, 1:34:23 PM3/4/20
to dbfit
Could it be an Oracle 12c driver issue? I think the v11 driver works but don't think the 12c one does wiht DbFit (but it's been a while!).

Kabilan Ganesan

unread,
Mar 9, 2020, 11:16:48 AM3/9/20
to dbfit
Dear guys,

The issue was resolved.

It was problem with tunneling to the DB server and not with FitNesse. Apologies for raising an incorrect issue.

But all you comments and suggestions are valuable and I have implemented some on my tests.

Thank you all.

Regards,
Kabilan
Reply all
Reply to author
Forward
0 new messages