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: issuing 'ping 192.168.56.1' gets a series of replies with results Packets: Sent = 4, Received = 4, Lost = 0 etc so I presume the ping worked.
[This reply is migrated from our old forums.]

Re: Connection refused
Hi Paul, Sorry, maybe I was unclear. The "ping" command only tests if the server is reachable. I meant using the Ping Server button in DbVisualizer that is active when you use the Server Info settings format. It tests that some process is listening to the specified port on the specified server. Best Regards, Hans
[This reply is migrated from our old forums. The original author name has been removed]

Re: Connection refused
Hans: I get this: 'The ping attempt resulted in an error: "cannot connect to localhost' on port 1433" '
[This reply is migrated from our old forums.]

Re: Connection refused
Hi Paul, Okay, then there is still some configuration issues on the server side. Did you restart it after making the TCP changes? Is there a firewall between where you're running DbVisualizer and the database server? If so, you need to make sure it is configured to allow connections to the database port. Best Regards, Hans
[This reply is migrated from our old forums.]

Re: Connection refused
Hi again, Paul reading your post more carefully I see that you say the message is "cannot connect to localhost' on port 1433". So you have specified localhost as the Database Server. You need to use the IP address that you enabled for TCP/IP, 192.168.56.1 according to earlier posts. Best Regards, Hans
[This reply is migrated from our old forums. The original author name has been removed]

Re: Connection refused
Hans: OK, I changed localhost to 192.168.56.1 as the Database Server in the Server Info page. Pinged the server and got more or less the same message: 'The ping attempt resulted in an error: Cannot connect to '192.168.56.1' on port 1433' In answer to your other question I set up DbVisualizer as an 'allowed' program in the Windows Firewall quite early in this process.
[This reply is migrated from our old forums.]

Re: Connection refused
Hi Paul, Is the database running on the same machine as where you run DbVisualizer? If not, you need to allow connections to port 1433 through the firewall. "Allowing" DbVisualizer does not make a difference since you are not connecting to DbVisualizer, you are connecting to the database at port 1433. Best Regards, Hans
[This reply is migrated from our old forums. The original author name has been removed]

Re: Connection refused
Hans: yes, DbVis is running on the same machine as the database. So, if I understand you, I don't need to 'allow' Dbvis in the firewall. What further information can I provide to allow you to find a solution?
[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
[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, 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]
[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, 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]

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, 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