Re: Having trouble connecting Railo 3.3.4.003 to SQL Server Express 2008 on Windows 7

563 views
Skip to first unread message

Thorsten Eilers

unread,
Jul 9, 2012, 4:09:09 AM7/9/12
to ra...@googlegroups.com

Have you opened Port 1433 and activated TCP-IP ?

 

Andrea Campolonghi

unread,
Jul 9, 2012, 4:11:30 AM7/9/12
to ra...@googlegroups.com
Looks like your sql server does not accept connection on port 1433.
Can you connect with any other tool via TCP/IP 1433?

Andrea

On Jul 9, 2012, at 10:09 AM, Thorsten Eilers wrote:


Have you opened Port 1433 and activated TCP-IP ?

 

Andrea Campolonghi



Mark Drew

unread,
Jul 9, 2012, 5:04:27 AM7/9/12
to ra...@googlegroups.com
This is a long running bug (not with Railo) but with Java and the drivers. 

(we should really pin this up somewhere) 

But again, if you have problems connecting to MSSQL, this is the bug (and work rounds) you should look to. 

Check out your version of Java, and upgrade (or downgrade) as required. 

Regards

Mark Drew
 
Railo Technologies Professional Open Source
skype: mark_railo ma...@getrailo.com
+44 7971 852296 http://www.getrailo.com

On 9 Jul 2012, at 01:45, TallerMike wrote:

So I have this new laptop I'm trying to move my work to. I've installed Railo 3.3.4.003 and SQL Server Express 2008, but I can't get the two to communicate. I have a database which is set up in SQL, and I'm able to create a Windows DSN which can connect to it, so I know it's out there. I also have this set up (same configuration) on another old laptop, but I can't figure out for the life of me what's wrong.

Basically, I can't seem to use either of the SQL drivers (Microsoft and jTDS); both think for a long time and then tell me that they can't find the server. I've confirmed that the firewall isn't the problem (I turned the firewall off to test). I tried using localhost, 127.0.0.1, .\SQLEXPRESS, and MACHINENAME\SQLEXPRESS and none of them make a difference.

The TCP/IP connection to the host localhost, port 1433 has failed. Error: "Connection refused: connect. Verify the connection properties, check that an instance of SQL Server is running on the host and accepting TCP/IP connections at the port, and that no firewall is blocking TCP connections to the port.".

So to mirror what I have on the other laptop, I created a Windows Datasource in the control panel (which connects just fine using .\SQLEXPRESS). I then tried to create a DSN in Railo using JDBC-ODBC Bridge Driver as I have on my other laptop, and I get the following error:

[Microsoft][ODBC Driver Manager] Invalid string or buffer length

Can someone help me get a connection from Railo to SQL Server Express 2008?

Thanks!

Mark Drew

unread,
Jul 9, 2012, 9:50:07 AM7/9/12
to ra...@googlegroups.com
ok, go back to basics. 

What I do when I install a version of SQL Server is check (using another client such as Aqua Data Studio or Navicat) if I can indeed connect via the web to the server. 

Can you check this pls?

Regards

Mark Drew
 
Railo Technologies Professional Open Source
skype: mark_railo ma...@getrailo.com
+44 7971 852296 http://www.getrailo.com

On 9 Jul 2012, at 14:22, TallerMike wrote:

Thorsten / Andrea:
So I ran "netstat -n | find "1433" and came up with nothing on both the laptop where it's working find (Windows 7 32-bit with the JDBC-ODBC Bridge Driver) and the laptop where it's not working (Windows 7 64-bit). Is this something I need to change in SQL Server to open? I don't need this port open outside of this machine, it's for an app that will only be developed and used on this machine.

Mark:
I had read this issue before, but it doesn't quite match my circumstances. It does sit for a while, but I do get an error message.

Not sure if this helps, but the differences between the two laptops include that the one which is working is 32-bit and the one that is not is the 64-bit version of Windows. On the one that is not working, I had initially installed SQL Express 2012 and uninstalled it, reverting back to SQL Express 2008 (so now it's the same on both machines) because I couldn't get it to connect, and after reading a number of posts on SQL Express 2012 having issues (and trying to install the new 4.0 drivers with no resolution), I gave up on that.

Mike Kingery

unread,
Jul 9, 2012, 10:09:40 AM7/9/12
to ra...@googlegroups.com
I tested with HeidiSQL on both machines using TCP/IP and neither worked, but I was able to access the database using Named Pipes with ".\SQLEXPRESS" on both. I assumed this emulated the setup on the Windows DSN which used the same Hostname.
- Mike
From: Mark Drew <ma...@getrailo.com>
To: ra...@googlegroups.com
Sent: Monday, July 9, 2012 9:50 AM
Subject: Re: [railo] Re: Having trouble connecting Railo 3.3.4.003 to SQL Server Express 2008 on Windows 7

Andrea Campolonghi

unread,
Jul 9, 2012, 10:49:24 AM7/9/12
to ra...@googlegroups.com
Sql Server comes with a management tool ( over the visual studio ).
Look into programs soemthing like sql server configurations tools.
That is the place where you configure sql server connections protocol ports etc....

Andrea
Andrea Campolonghi



Mike Kingery

unread,
Jul 9, 2012, 12:54:04 PM7/9/12
to ra...@googlegroups.com
So I FINALLY got this to work. It seems that this is mostly a SQL configuration issue, so my apologies for spamming the Railo lists. Looks like a lot of people have had trouble setting this up, so I don't feel too alone. It just confuses me that this worked on my 32-bit laptop but the 64-bit version took a lot more coercion. Firstly, based on the comments received, I followed the instructions below. I also update Named Pipes to be turned on. I'm able to now create a DSN in Railo using both of the MSSQL datasources.
 
 
Thanks to all that helped!
Reply all
Reply to author
Forward
0 new messages