Re: Connecting to a MS SQL server from django
On 01/14/2014 03:15 PM, Larry Martell wrote:
> I am trying to connect to a MS SQL server from django on Linux using
> Vernon Cole's django-mssql package
> (https://bitbucket.org/vernondcole/django-mssql-ado-merge/src).
>
> When I first tried to connect it failed with:
>
> Exception Type: DatabaseError at /report/CDSEM/EventsTable/
> Exception Value: Cannot create connection
> to=PYRO:ado.connection@xx.xx.xx.xx:9099
>
> I traced it through
> /usr/lib/python2.6/site-packages/adodbapi/remote.py and I see it tries
> to access os.environ['PROXY_PORT'], which is not defined and then it
> defaults to 9099 - Is that the correct port or should I set
> os.environ['PROXY_PORT']? How can I tell what port MS SQL db is
> listening on? I googled this and it said the default MS SQL port is
> 1433. I set os.environ['PROXY_PORT'] to that and now I don't get that
> error but it times out:
>
>> /usr/lib/python2.6/site-packages/Pyro4-4.22-py2.6.egg/Pyro4/core.py(160)__call__()
> -> return self.__send(self.__name, args, kwargs)
> (Pdb) n
> TimeoutError: TimeoutE...imeout',)
>
> I tried opening port 1433 with iptables, but still no joy.
>
> I can connect to the MS SQL db locally from the host it's running so I
> know it's up and my credentials are correct, and I can ping the
> Windows box from the Linux host I am running on, so I know there is
> connectivity to it from there.
>
> Anyone here ever get this working? Anyone have any ideas as to what my
> problem is or how I can debug this further?
>
> Thanks!
> -larry
>
Check your Windows Firewall settings. You can test from linux using nmap
to port probe.
nmap -PN -p 1433 ip.of.win.machine
It is unlikely to be the linux firewall unless you're filtering all
outgoing data.
Enjoy,
Alex
--
You received this message because you are subscribed to the Google Groups "Django users" group.
To unsubscribe from this group and stop receiving emails from it, send an email to django-users+unsubscribe@googlegroups.com.
To post to this group, send email to django-users@googlegroups.com.
Visit this group at http://groups.google.com/group/django-users.
To view this discussion on the web visit https://groups.google.com/d/msgid/django-users/52D608E5.4050100%40wildintellect.com.
For more options, visit https://groups.google.com/groups/opt_out.
0 Comments:
Post a Comment
Subscribe to Post Comments [Atom]
<< Home