New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Connect To Database: Connection to the database failed for an unknown reason. #87
Comments
I have run tests over ssh tunnels before, so I don't think there is a problem with Database Library. Could you try manually creating the ssh tunnel and then running a robotframework test using the databaselibrary? Also, have you tried using DBlibrary to connect without the ssh tunnel? Can you try running Robotframework with "--loglevel TRACE" |
I created the SSH tunnel myself and connected successfully using It doesn't work this way using So now it seems
I must be missing something about how RF works.. it seems really strange. I added the TRACE log levels and it doesn't seem to output anything more than before. When I try to run everything through RF the test just hangs until a specified timeout (and sometimes doesn't even abide by the timeout) so I can't even check the logs properly. I'm not sure DBLibrary you are talking about exactly... could you be more specific? |
Unfortunately I don't have a setup to test this out right now. TRACE doesn't always give more info but sometimes it helps. I am rather puzzled as to this problem as well. My reference to "DBlibrary" was just my shorthanding "DatabaseLibrary" and not doing a good job of it, sorry. |
What are the chances this is a timing issue with how the tunnel is being created with RF and then used by RF DatabaseLibrary? Can you add a 10sec sleep between the tunnel creation and initiating the DB connect? What happens then? |
I have just tried with both: |
can you send me a testsuite that is failing and the suite/exact steps when it works? I will see what I can do with it here? |
Hi Aimeejtix did you end up getting your issue to work I also need to run robot database tests on a machine that has ssh. |
I am working with RobotFramework and am trying to use this
Create Local Ssh Tunnel
keyword to open a connection to a MS SQL-Server DB on a remote host so I can run further DB commands.So far if I create the tunnel myself using the following command from the command line:
ssh -fN -L 11433:10.x.x.x:1433 user1@40.x.x.x
And then run a small python program as follows:
This all works fine and I get output.
When I try to do the same from within RF like so:
I get the following error:
I have also tried a mix of running the RF like so:
And then running the python program to connect to the DB which works, so I know the tunnel is created and I am can connect.
I have also tried the same with the other keyword,
Connect to Database Using Custom Params
Any ideas as to why the DB connection can't be made within RF?
The text was updated successfully, but these errors were encountered: