Start a new topic

Connection refused

[This topic is migrated from our old forums. The original author name has been removed]

I am trying to connect to the Adventure Works d/b but keep getting a 'connection refused' message. These are the settings I have established a. enabled TCP/IP b. opened port 1433 in Windows Firewall as database port c. driver jTDS d. URL/Name: jdbc:jtds://localhost:1433;DatabaseName=AdventureWorks2008R2 e: userid: same as used for SQL Management Studio login f: added 'workgroup' as domain g: authentication method: Windows From reading the FAQs and posts here I thought I'd got everything in place. So am I missing something? TIA

[This reply is migrated from our old forums. The original author name has been removed]

Re: Connection refused
Hans: thanks anyway. > You may want to continue looking for a solution by Googling on selected terms like "SQL Server JDBC TCP/IP connection refused". I have been doing this and everything I found I have implemented - and it was the same advice as you have given. So something not right on this laptop. Thanks again.
[This reply is migrated from our old forums.]

Re: Connection refused
Hi Paul, Yes, I'm out of ideas. But I can tell you that the problem is with the network configuration somewhere. The fact that you get "connection refused" and that Ping Server gives you an error means that it is simply not possible to set up a TCP/IP connection to port 1433 on 192.168.56.1. You will have then same problem with any client that uses TCP/IP to communicate with the database. I have asked about all configuration items I can think of that could explain this, and your answers indicate that those areas are set up correctly. You may want to continue looking for a solution by Googling on selected terms like "SQL Server JDBC TCP/IP connection refused". Sorry I couldn't help you. Best Regards, Hans
[This reply is migrated from our old forums. The original author name has been removed]

Re: Connection refused
Hans: I followed your suggested steps (installed DbVIS 64-bit with JVM), added the settings you suggested (Server: 192.168.56.1, Port 1433, Authentication: SQL Server) - result: connection refused. I guess we've reached the end of the road :-(
[This reply is migrated from our old forums.]

Re: Connection refused
Hi Paul, Thanks. Only the first attempt has valid values. SQLSERVER2012 is the name of a SQL Server database instance, not a server DNS name, so it cannot be used the way you use it. Either way, even with the correct settings it fails at the network level. The screenshots you have sent me so far indicates that the SQL Server is configured correctly, and you say you have restarted the server after the TCP/IP reconfiguration. That leaves me with only one more suggestion. You said that your PC is 64-bit. If the Java version you are running is 32-bit and/or the DbVisualizer installer you used is 32-bit, this can cause some very odd problem. I therefore suggest that you: 1) Unistall the DbVisualizer you have installed now, 2) Download and install the "Windows x64 (setup installer) With Java VM", 3) Try again with the settings from the first attempt in the document you posted. Best Regards, Hans
[This reply is migrated from our old forums. The original author name has been removed]
[Attachment has been removed.]

Re: Connection refused
Hans: attached are screen shots and debug output for 3 different 'Server Info' settings.
[This reply is migrated from our old forums. The original author name has been removed]

Re: Connection refused
Hans: yes, I restarted the SQL Server service after making TCP/IP changes. Do you want debug output just for the 'Server Info' settings or for the 'Database URL' settings as well?
[This reply is migrated from our old forums.]

Re: Connection refused
Hi Paul, And you have restarted the SQL Server service after you made the TCP/IP configuration changes? The changes do not take effect until you do. If it still doesn't work, please post then debug output from an attempt to connect with all the connection settings I suggested earlier today. Best Regards, Hans
[This reply is migrated from our old forums. The original author name has been removed]
[Attachment has been removed.]

Re: Connection refused
Hans: screen shot of SQL Services node attached. The SQL Server Network Configuration (32 bit) when expanded says 'There are no items to show in this view'. My PC is running Windows 7 64-bit. The SQLEXPRESS node has an IP address the same (192.168.56.1) but no port is enabled.
[This reply is migrated from our old forums.]

Re: Connection refused
Hi Paul, From what you say, I take it that Paul-Asus-PC is then Windows domain name. When you specify an IP address, you do not specify the Windows domain so Database Server should definitely be set to 192.168.56.1. I was apparently wrong about the userid, though. Based on what you say, it should be Paul, not Paul-Asus-PC as I said before. But for now, I suggest you use the sa userid. Since you still get a 'Connection refused' error, there is some TCP/IP configuration error. Have you restarted the database after you made the TCP/IP configuration changes? Can you please post a screenshot of the SQL Services node in SQL Server Configuration Manager? You also have two Protocols nodes under the SQL Server Network Configuration node. Make sure that the SQLEXPRESS node does not have the same TCP/IP address and port enabled since that would cause a conflict. You also have a second SQL Server Network Configuration (32-bit). Is your PC 64 or 32-bit? Best Regards, Hans
[This reply is migrated from our old forums. The original author name has been removed]

Re: Connection refused
Hans: >>First, I suggest you use the Server Info setting instead of Database URL. Then enter this info: Database Server: 192.168.56.1 Database Port: 1433 Database: AdventureWorks2008R2 Database Userid: sa Database Password:
[This reply is migrated from our old forums.]

Re: Connection refused
Hi Paul, The SQL Server configuration looks okay to me, but the connection configuration in DbVisualizer is very different from what we have discussed. First, I suggest you use the Server Info setting instead of Database URL. Then enter this info: Database Server: 192.168.56.1 Database Port: 1433 Database: AdventureWorks2008R2 Database Userid: sa Database Password: Leave the other fields as you have them now. If you instead want to connect as the user you currently specify in the Database Userid field, you should probably enter it as Paul-Asus-PC and drop the "\Paul" part because I doubt that is part of the userid. Best Regards, Hans
[This reply is migrated from our old forums. The original author name has been removed]
[Attachment has been removed.]

Re: Connection refused
Hans: OK, if you're willing I am :-) Screenshots in attached Word document.
[This reply is migrated from our old forums.]

Re: Connection refused
Hi Paul, I'm sorry to hear that. If you're willing to give it one more try before giving up, please post or email us: 1) A screenshot of the TCP/IP server configuration in SQL Server Configuration Manager, 2) A screenshot of then DbVisualizer connection Object View tab, 3) The debug output from the connection attempt (enable debugging in Tools->Debug Window) We have lots of customers connecting to SQL Server so I'm sure it is just something we have overseen in the diagnosis so far. Best Regards, Hans
[This reply is migrated from our old forums. The original author name has been removed]

Re: Connection refused
Hans: I can't seem to make any headway with this. I have a standard SQL Server setup and have done everything suggested to make DbVis work - without success. I'm afraid I shall be uninstalling DbVis from my PC. Thanks for all your assistance.
[This reply is migrated from our old forums.]

Re: Connection refused
Hi Paul, Since you are using the network IP address for the database, you probably have to open up port 1433 in the firewall even though it is on the same machine. Best Regards, Hans