Connecting SQL Server to Dataiku installed on WSL2

mahmoud_shihab
Level 3
Connecting SQL Server to Dataiku installed on WSL2

I currently have my Dataiku instance installed on the windows subsystem for Linux Ubuntu subsystem.

I've managed to get it working flawlessly, but the issue I'm currently having now is I can't get my Dataikue instance to connect to my SQL Server from my windows machine.

I've tried opening the ports in my firewall
I've tried connecting to:
127.0.0.1 localhost,
127.0.1.1 WSL Host Machine,
the IP Address found when typing `cat /etc/resolv.conf` on the Ubuntu machine, 
the IP Address found in the SQL Network Configuration Manager

But nothing seems to work...

I could use some assistance...

I'm also using the 14 Day Free Trial...


Operating system used: Ubuntu, Windows (VM)

0 Kudos
9 Replies
sergeyd
Dataiker

Hi, 

First, please show the actual error you are getting. Second, please check that you can connect to MS SQL server from the windows host (where you installed DSS)

Side note: we do not officially support WSL installations as they had a lot of issues related to WSL itself. 

 

mahmoud_shihab
Level 3
Author

Hi sergeyd,

Here is the error I get.

The host ip I got from running the below command on the WSL2 terminal

cat /etc/hosts
# This file was automatically generated by WSL. To stop automatic generation of this file, add the following entry to /etc/wsl.conf:
# [network]
# generateHosts = false
127.0.0.1       localhost
127.0.1.1       SLB-JSTG4M3.DIR.slb.com SLB-JSTG4M3

I'm not sure what else to try to be honest...

0 Kudos
Turribeach

Most likely this is a WSL issue rather than a Dataiku issue. So use tools like nmap to test connectivity from inside the VM to make sure you are able to reach SQL Server outside the VM. 

Sample command to test TCP conectivity:

nmap -vv -Pn -p tcp_port machine_IP

0 Kudos
mahmoud_shihab
Level 3
Author

Hi Turribeach,

I tried the nmap command, referencing 127.0.1.1 (which I believe is my windows host), and I got this response:

cat /etc/hosts
# This file was automatically generated by WSL. To stop automatic generation of this file, add the following entry to /etc/wsl.conf:
# [network]
# generateHosts = false
127.0.0.1       localhost
127.0.1.1       SLB-JSTG4M3.DIR.slb.com SLB-JSTG4M3

nmap -vv -Pn -p 1433 127.0.1.1
Starting Nmap 7.80 ( https://nmap.org ) at 2022-10-06 14:58 EET
Initiating Connect Scan at 14:58
Scanning SLB-JSTG4M3.DIR.slb.com (127.0.1.1) [1 port]
Completed Connect Scan at 14:58, 0.00s elapsed (1 total ports)
Nmap scan report for SLB-JSTG4M3.DIR.slb.com (127.0.1.1)
Host is up, received user-set (0.000044s latency).
Scanned at 2022-10-06 14:58:41 EET for 0s

PORT     STATE  SERVICE  REASON
1433/tcp closed ms-sql-s conn-refused

Read data files from: /usr/bin/../share/nmap
Nmap done: 1 IP address (1 host up) scanned in 0.02 seconds

Is there a way to get the state open and allow the connection?

0 Kudos
mahmoud_shihab
Level 3
Author

For reference, this is where I got the 1433 TCP port number

0 Kudos

I am not familiar with how WSL does networking but probably best to ask the question in a WSL specific tech forum. 

mahmoud_shihab
Level 3
Author

Not sure if anyone will benefit from this, but it was apparently a firewall issue

Opening the firewall from the host side helped made it work for me...

When you say host side.  It sounds like you are referring to the MS Windows, not the guest Linux side.

Did you work out the very specific change you needed to make in order to allow the connection?  Or are you just completely deactivating the windows firewall?  If you have worked out the specific settings that could be helpful to others.

I do note the WSL workaround may no longer be as necessary as it was in the past.  I note that there is now a new windows installer that does not seem to require WSL

https://doc.dataiku.com/dss/latest/installation/other/windows.html

--Tom
0 Kudos
mahmoud_shihab
Level 3
Author

Hi tgb,

Yes, I did mean windows.

But I did not deactivate the firewall. I added a rule that allows the WSL machine to access my windows machine.

The windows installation might be something I have to experiment with.

Thank you for sharing!

0 Kudos

Labels

?
Labels (3)
A banner prompting to get Dataiku