Connecting SQL Server to Dataiku installed on WSL2

Options
mahmoud_shihab
mahmoud_shihab Partner, Dataiku DSS Core Designer, Dataiku DSS ML Practitioner, Dataiku DSS Adv Designer, Registered Posts: 42 Partner

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)

Answers

  • Sergey
    Sergey Dataiker, Dataiku DSS Core Designer, Dataiku DSS & SQL, Dataiku DSS Core Concepts Posts: 366 Dataiker
    Options

    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.

  • Turribeach
    Turribeach Dataiku DSS Core Designer, Neuron, Dataiku DSS Adv Designer, Registered, Neuron 2023 Posts: 1,708 Neuron
    Options

    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

  • mahmoud_shihab
    mahmoud_shihab Partner, Dataiku DSS Core Designer, Dataiku DSS ML Practitioner, Dataiku DSS Adv Designer, Registered Posts: 42 Partner
    Options

    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 = false127.0.0.1 localhost127.0.1.1 SLB-JSTG4M3.DIR.slb.com SLB-JSTG4M3nmap -vv -Pn -p 1433 127.0.1.1Starting Nmap 7.80 ( https://nmap.org ) at 2022-10-06 14:58 EETInitiating Connect Scan at 14:58Scanning 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 0sPORT STATE SERVICE REASON1433/tcp closed ms-sql-s conn-refusedRead data files from: /usr/bin/../share/nmapNmap 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?

  • mahmoud_shihab
    mahmoud_shihab Partner, Dataiku DSS Core Designer, Dataiku DSS ML Practitioner, Dataiku DSS Adv Designer, Registered Posts: 42 Partner
    Options

    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 = false127.0.0.1 localhost127.0.1.1 SLB-JSTG4M3.DIR.slb.com SLB-JSTG4M3

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

  • mahmoud_shihab
    mahmoud_shihab Partner, Dataiku DSS Core Designer, Dataiku DSS ML Practitioner, Dataiku DSS Adv Designer, Registered Posts: 42 Partner
    Options
  • Turribeach
    Turribeach Dataiku DSS Core Designer, Neuron, Dataiku DSS Adv Designer, Registered, Neuron 2023 Posts: 1,708 Neuron
    Options

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

  • mahmoud_shihab
    mahmoud_shihab Partner, Dataiku DSS Core Designer, Dataiku DSS ML Practitioner, Dataiku DSS Adv Designer, Registered Posts: 42 Partner
    Options

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

  • tgb417
    tgb417 Dataiku DSS Core Designer, Dataiku DSS & SQL, Dataiku DSS ML Practitioner, Dataiku DSS Core Concepts, Neuron 2020, Neuron, Registered, Dataiku Frontrunner Awards 2021 Finalist, Neuron 2021, Neuron 2022, Frontrunner 2022 Finalist, Frontrunner 2022 Winner, Dataiku Frontrunner Awards 2021 Participant, Frontrunner 2022 Participant, Neuron 2023 Posts: 1,595 Neuron
    Options

    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

  • mahmoud_shihab
    mahmoud_shihab Partner, Dataiku DSS Core Designer, Dataiku DSS ML Practitioner, Dataiku DSS Adv Designer, Registered Posts: 42 Partner
    Options

    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!

Setup Info
    Tags
      Help me…