08-02-2017 05:55 PM
Hi, i recently installed studio and am trying to get it to connect to local SQL server db. When i add a new connection and click test, it just hangs.
note: i have verified the port number, i can telnet localhost 1433, connect to db from SSMS , verified that network parameters are set correctly, even tried connecting using localhost, 127.0.0.1, hostname, IP but to no avail.
Q: Why does the error refer to /etc/hosts (on a windows)?
Here's the exception I get in the log.
org.h2.jdbc.JdbcSQLException: Exception opening port "H2 TCP Server (tcp://<ip address>:62419)" (port may be in use), cause: "timeout; please check your network configuration, specially the file /etc/hosts" [90061-194]
08-03-2017 01:33 AM
you're referring to SQL Server and port 1433. So you're using Microsoft SQL Server, right?
The errors are coming from the H2 SQL engine, an open source embedded database written in Java.
So please select the correct database type first.
08-03-2017 11:18 AM
Connecting to SQL Server shouldn't be a problem using either the generic JDBC Driver for SQL Server or Microsoft's own JDBC Driver. I've attached two screenshots showing the paramters for one of the SQL Server connections I use often.
The file "MS_SQL_Connection_Parameters_Nr_1.png" is the baisc connection dialouge that you couls use as a model. Note the connection URL.
The file MS_SQL_Connection_Parameters_Nr_2.png is what you see if you click on the "Advanced" button in the first dialog - whoich contains other useful options that may apply at some point.
Hope this helps and best wishes, Michael Martin
08-03-2017 01:49 PM - edited 08-03-2017 02:22 PM
I have configured it the way you show it in your screenshots. It still won't work. as I said in my orginal posts, i used localhost, 127.0.0.1, hostname, ip address, with/without schema name but no luck.
08-03-2017 04:23 PM
Sorry to hear that the issue persists.
I have never used an IP (http) address (i.e. 127.0.0.1) to refer to the SQL Server Instance Name in the connection dialouge - I have always used localhost as the Instance Name. In your environment, are SQL Server and rapidMiner Studio on the same machine?
What also works (I just tested it) is using the Machine Name as the SQL Server Instance Name. You can see your current Machine Name in Windows under Control Panel -> System -> Advanced system Settings. A tabbed dialog will come up that shows the current Full Machine Name (assuming Windows).
At the end of the configuration process I think that you want a connection URL to SQL Server that looks like:
jdbc:sqlserver//<localhost or Machine Name>:1433;databaseName=<SQL Server database Name>
You might also check your SQL Server Network configuration settings using the SQL Server Configuration Manager as it could be that somehow 1433 is not the port your SQL Server instance is running on. Checking the properties of the TCP / IP protocol shows which port SQL Server is running on. On my machine all netowrk protocols are enabled excepting VIA.
Also double check to be sure that your SQL Server instance currently permits remote connections. You can check this under the Properties dialog for the Instance Name of SQL Server on your machine on the the "Connections" page. There is an option that says "Allow remote connections to this server". Make sure that it is ticked.
From my experience, if you accepteed the default SQL Server Instance name when installing SQL Server on your machine, your instance name would be localhost.
Again, I've never used an IP address to refer to a SQL Server instance - either the deafult instance name of localhost or the Machine Name - both of which work for me with RapidMiner.
I hope the above was helpful - let me know how things go.
08-03-2017 05:12 PM
OK - can you try connecting to SQL Server using your Machine Name (instead of localhost) as the SQL Server Instance Name? (and confirm there is no IP address in the connection string.)
Out of interest: have you connected to this SQL Server instance using other client programs or BI moddelware tool; (Tableau, QlikView, Omniscope, or via .NET programming (i.e. OLEDB), etc.) ?
Do you have the most recent version of the MS SQL Server jdbc driver? Have you set the PATH command to include the directory where the MS SQL Server driver is?
If this fails, can you please post what the acutal connection URL isin a reply? I can proxy your connection string on my system by creating a SQL Server database with a single table on my machine that matches the database you want to connect to on your machine.
Let me know and best wishes, Michael
08-03-2017 05:49 PM
I can login to the schema using SQL server mangement studio. I don't have any other clients on the server that i can try. I also tried connectiving to remote oracle db and same error. I am able to connect to remote oracle DB using SSIS from this box but not from RMS.
Pardon my ignorance, but i didn't realize i needed to setup JDBC drivers, paths etc. I think i know how to add a driver from using studio GUI but don't know how to set the path. can you please send instructions? what jdbc driver should i add? Doesn't the out of the box driver suffice?
I tried using the full machine name. and still no luck. can you email me directly for any screenshots of my system/URLs?
08-03-2017 10:02 PM
I am attaching three .png files:
From the RM "Connections" menu, there is an option named "Manage Database Drivers". The first screenshot in my list above shows you what drivers I have on my system. Open that same dialog on your system and see if the "Microsoft SQL Server (Microsoft)" driver is installed. From what you have written, it sounds like the Microsoft jdbc Driver for SQL Server is not on your system.
The diownload URL for the MS JDBC Driver for SQL Server is:
There are instructions on this page that explain how to set up the driver on your system. I was wrong about having to modify the PATH environment variable, I must have confused the jdbc driver with another utility I use.
After you have installed the JDBC driver from Microsoft, you need to configure RM Studio to use that driver. Take a look at the second .png file. The file shows the setup parameters. Setting up the driver includes browsing to the folder where you installed the jdbc driver on your system. Once you select the jar file that contains the driver (sqljdbc.jar - or it could be sqljdbc-4.1.jar) the value for the "Driver Class" will appear in the set up dialog. You can copy the info for the rest of the fields into your setup dialog from the second screenshot - in which I set up a second instance of the SQL Server jdbc Driver on my system.
After setting up the driver, save your changes, exit RapidMiner Studio and then open it again - then try to configure a connection to your SQL Server instance - an example configuration dialog from my system is hown in the third screen shot referenced above.
Let me know how things go - good luck!