Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Azure SQL Migration Extension in Disconnected Environment #22558

Closed
pvandermaas-apriva opened this issue Mar 31, 2023 · 20 comments
Closed

Azure SQL Migration Extension in Disconnected Environment #22558

pvandermaas-apriva opened this issue Mar 31, 2023 · 20 comments

Comments

@pvandermaas-apriva
Copy link

Issue Type: Bug

Attempting to run the Azure SQL Migration Extension in Azure Data Studio on an Azure VM in a restricted environment (no internet access) and witnessing the following behavior:

Steps:
Connect to Source Server
Right-click -> Manage
General -> Azure SQL Migration

Error in notification popup:

Failed to start Sql Migration Service: Error: Request error: Error
at ClientRequest. (c:\Users<userfolder>.azuredatastudio\extensions\microsoft.sql-migration-1.4.2\dist\main.js:2:7448)
at ClientRequest.emit (node:events:538:35)
at TLSSocket.socketErrorListener (node:_http_client:442:9)
at TLSSocket.emit (node:events:526:28)
at emitErrorNT (node:internal/streams/destroy:157:8)
at emitErrorCloseNT (node:internal/streams/destroy:122:3)
at process.processTicksAndRejections (node:internal/process/task_queues:83:21)

Close tab, repeat
Connect to Source Server
Right-click -> Manage
General -> Azure SQL Migration
Azure SQL Migration tab now has content
New Migration (or, "Migrate to Azure SQL" link in welcome screen)

Hangs with "Waiting for SqlMigrationProvider component to start." in the notification popup. Never resolves or times-out.

Is this extension supported in a disconnected environment? If not, is there an available list of hostnames/domains that I can request from my network team to allow access? I am interested in the assessment information, including SKU recommendations. TIA.

Extension version: 1.4.2
Azure Data Studio version: azuredatastudio 1.42.0 (22f384e, 2023-03-17T18:15:48.982Z)
OS version: Windows_NT x64 10.0.17763
Restricted Mode: No
Preview Features: Enabled

System Info
Item Value
CPUs Intel(R) Xeon(R) Platinum 8272CL CPU @ 2.60GHz (4 x 2594)
GPU Status 2d_canvas: unavailable_software
canvas_oop_rasterization: disabled_off
direct_rendering_display_compositor: disabled_off_ok
gpu_compositing: disabled_software
multiple_raster_threads: enabled_on
opengl: disabled_off
rasterization: disabled_software
raw_draw: disabled_off_ok
skia_renderer: enabled_on
video_decode: disabled_software
video_encode: disabled_software
vulkan: disabled_off
webgl: unavailable_software
webgl2: unavailable_software
webgpu: disabled_off
Load (avg) undefined
Memory (System) 32.00GB (11.22GB free)
Process Argv
Screen Reader no
VM 0%
@cap-dm
Copy link

cap-dm commented Apr 3, 2023

Just to add to the above, I'm seeing the same behaviour in my environment.
We have:

  • Dev VMs on premise
  • SQL instances on premise
  • Azure SQL MI
  • Private routes from on prem into Azure.
  • Proxy between the Dev VMs and the wider internet, but not between the Dev VMs and everything else mentioned.

Default behaviour throws an exception (different to above) because I'm not authenticating to the proxy. If I fully disable the proxy in Settings > Proxy Support > Off, I get the above exception encountered by pvandermaas-apriva. I got it to load the Azure SQL Migration window once (Proxy Support off, but I think the main app was successfully communicating with the proxy), but then I hung on 'Waiting for SqlMigrationProvider component to start.'

Azure Data Studio is v1.42.0 (user setup, win 2016), Azure SQL Migration v1.4.2.

Note: sorry for the brand new account. I made it specifically to comment on this.

@Charles-Gagnon
Copy link
Contributor

@alanrenmsft Have we tested the service downloader in a proxy environment? The comment from @cap-dm sounds like a separate issue where they have their proxy set up but it still doesn't download the service binaries.

@cap-dm Can you confirm that other parts of ADS function with the proxy settings you have - a specific example would be the extension gallery loading and displaying the marketplace extensions.

@pvandermaas-apriva
Copy link
Author

pvandermaas-apriva commented Apr 3, 2023

@cap-dm, FWIW I stumbled onto using DmaCmd.exe and SqlAssessment.exe, included with the Data Migration Assistant. I believe it will allow collection of perf metrics that can then be copied down and uploaded from my less-restricted workstation. That said, I'm actually in the process of collecting perf data as I type this, so this approach may not actually work, but am giving it a shot. More info can be found here:
https://learn.microsoft.com/en-us/sql/dma/dma-sku-recommend-sql-db?view=sql-server-ver16

quick update: I was able to get the SKU recommendations from the within the disconnected environment; no need to copy down the perf data.
edit to add:

  • can get SKU recommendations from the CLI tools
  • DmaCmd.exe appears to still require external access

@alanrenmsft
Copy link
Contributor

so just to confirm, the issue is resolved now, right?

@cap-dm
Copy link

cap-dm commented Apr 4, 2023

@cap-dm Can you confirm that other parts of ADS function with the proxy settings you have - a specific example would be the extension gallery loading and displaying the marketplace extensions.

Oh I know I'm having proxy issues! It was more that I was seeing the same errors as pvandermaas-apriva while experiencing them, so I was throwing some weight behind the SQL Migration Extension (SME) having issues when it was in a disconnected environment.

Now I'm going to have to apologise because I can't quite remember the sequence of events before finding this ticket.

  • I know I was able to browse to and download the (SME). I don't think I changed any proxy settings prior to this
  • Once it was down and I launched it I encountered the problems as described above
  • I have tried many proxy settings, but I was finding either ADS or SME would work correctly not both. I finally managed to get both ADS and SME work by nuking all http.proxy* settings in settings.json and restarting the application. I'm actually astounded this works, but here we are.

I would suggest that both ADS and SME get some more graceful handling of connectivity and proxy issues, it was a pain to debug as those traces don't really tell the end user much.

@pvandermaas-apriva
Copy link
Author

pvandermaas-apriva commented Apr 4, 2023

so just to confirm, the issue is resolved now, right?

Not for me. I was able to get to my end goal a different way (CLI tools), but the issue with the Azure SQL Migration extension for ADS still exists.

@Charles-Gagnon
Copy link
Contributor

Charles-Gagnon commented Apr 4, 2023

We're working on making this experience better, but for the time being these steps should work for getting the extension functioning:

  1. Open ADS and run the "Extensions: Open Extensions Folder" command
  2. Look for the latest "microsoft.sql-migration-*" folder (e.g. microsoft.sql-migration-1.4.2)
  3. In there look for a config.json file and open it
  4. Get the version from the "version": "*.*.*.*", line (e.g. "version": "4.5.0.37")
  5. Download the zip/tar.gz that corresponds to your OS and replace the *.*.*.* in the links below with that version and copy it to the machine that ADS is installed on.

Windows: https://github.com/Microsoft/sqltoolsservice/releases/download/*.*.*.*/microsoft.sqltools.migration-win-x64-net7.0.zip
Windows (x86): https://github.com/Microsoft/sqltoolsservice/releases/download/*.*.*.*/microsoft.sqltools.migration-win-x86-net7.0.zip
OSX: https://github.com/Microsoft/sqltoolsservice/releases/download/*.*.*.*/microsoft.sqltools.migration-osx-x64-net7.0.tar.gz
Linux: https://github.com/Microsoft/sqltoolsservice/releases/download/*.*.*.*/microsoft.sqltools.migration-rhel-x64-net7.0.tar.gz

e.g. for Windows with version 4.5.0.37 it would be https://github.com/Microsoft/sqltoolsservice/releases/download/4.5.0.38/microsoft.sqltools.migration-win-x64-net7.0.zip

  1. Unzip the contents
  2. Back in the extension folder make sure the following path exists <Path to Extension Folder>/migrationService/<Platform>/<Version> (e.g. %USERPROFILE%\.azuredatastudio\extensions\microsoft.sql-migration-1.4.2\migrationService\Windows\4.5.0.37)
  3. Copy the unzipped contents from above into this new folder. Verify the path is correct by checking that <Path to Extension Folder>/migrationService/<Platform>/<Version>/MicrosoftSqlToolsMigration.exe exists (e.g. %USERPROFILE%\.azuredatastudio\extensions\microsoft.sql-migration-1.4.2\migrationService\Windows\4.5.0.37\MicrosoftSqlToolsMigration.exe
  4. Reload ADS - the Migration extension should start up correctly

Note that you'll need to do this each time a new version of the service is available - so if you hit the error again follow the instructions above (there will likely be a new version you have to download but the rest of the steps are the same)

@Charles-Gagnon
Copy link
Contributor

@alanrenmsft @cssuh So two things we should be following up on:

  1. Does ADS service downloader respect proxy settings?
  2. If it can't download the service zip it should show an error with a link for the user to download manually, and ideally link to some instructions in our wiki or something with the steps I outlined above

@alanrenmsft
Copy link
Contributor

alanrenmsft commented Apr 4, 2023

There are different scenarios:

  1. Disconnected environment
    Extensions need to have platform specific installer which includes the service binaries (similar to vscode-mssql extension)
  2. Internet access with proxy
    Service downloader needs to respect the proxy settings.

I will create issues to track these work items.

@alanrenmsft
Copy link
Contributor

#22610

#22610

AkshayMata added a commit that referenced this issue May 1, 2023
…wnload (#22846)

Add troubleshooting links to error message when SQL-Migration fails to download the MigrationService as seen in this issue: #22558

---------

Co-authored-by: Akshay Mata <akma@microsoft.com>
@kburtram
Copy link
Member

kburtram commented May 8, 2023

@AkshayMata @alanrenmsft are we tracking any pending work for the May release with this issue? Or should we move or close it?

Edit: nevermind, I see this is not in the May release milestone 😄 though please close if this is resolved. Thanks!

@alanrenmsft alanrenmsft added this to the July 2023 Release milestone May 8, 2023
@alanrenmsft
Copy link
Contributor

I have a follow up work item.

@sanjeevreddy22
Copy link

sanjeevreddy22 commented Jun 26, 2023

We're working on making this experience better, but for the time being these steps should work for getting the extension functioning:

  1. Open ADS and run the "Extensions: Open Extensions Folder" command
  2. Look for the latest "microsoft.sql-migration-*" folder (e.g. microsoft.sql-migration-1.4.2)
  3. In there look for a config.json file and open it
  4. Get the version from the "version": "*.*.*.*", line (e.g. "version": "4.5.0.37")
  5. Download the zip/tar.gz that corresponds to your OS and replace the *.*.*.* in the links below with that version and copy it to the machine that ADS is installed on.

Windows: https://github.com/Microsoft/sqltoolsservice/releases/download/*.*.*.*/microsoft.sqltools.migration-win-x64-net7.0.zip Windows (x86): https://github.com/Microsoft/sqltoolsservice/releases/download/*.*.*.*/microsoft.sqltools.migration-win-x86-net7.0.zip OSX: https://github.com/Microsoft/sqltoolsservice/releases/download/*.*.*.*/microsoft.sqltools.migration-osx-x64-net7.0.tar.gz Linux: https://github.com/Microsoft/sqltoolsservice/releases/download/*.*.*.*/microsoft.sqltools.migration-rhel-x64-net7.0.tar.gz

e.g. for Windows with version 4.5.0.37 it would be https://github.com/Microsoft/sqltoolsservice/releases/download/4.5.0.38/microsoft.sqltools.migration-win-x64-net7.0.zip

  1. Unzip the contents
  2. Back in the extension folder make sure the following path exists <Path to Extension Folder>/migrationService/<Platform>/<Version> (e.g. %USERPROFILE%\.azuredatastudio\extensions\microsoft.sql-migration-1.4.2\migrationService\Windows\4.5.0.37)
  3. Copy the unzipped contents from above into this new folder. Verify the path is correct by checking that <Path to Extension Folder>/migrationService/<Platform>/<Version>/MicrosoftSqlToolsMigration.exe exists (e.g. %USERPROFILE%\.azuredatastudio\extensions\microsoft.sql-migration-1.4.2\migrationService\Windows\4.5.0.37\MicrosoftSqlToolsMigration.exe
  4. Reload ADS - the Migration extension should start up correctly

Note that you'll need to do this each time a new version of the service is available - so if you hit the error again follow the instructions above (there will likely be a new version you have to download but the rest of the steps are the same)

Hi , I have tried the above method but, still i am not able to use the migration extension. i don't have internet on VM. Cloud you please help me.

@kisantia
Copy link
Contributor

@raymondtruong @brian-harris is this issue planned for the July release? Please move it out of the July milestone if it isn't. Thanks!

@kisantia
Copy link
Contributor

@raymondtruong @brian-harris any updates on this issue? I'll move it to the backlog if there aren't any plans to work on this

@brian-harris
Copy link
Contributor

is there anything that can be done on the SQL-Migration extension side? or is this all ADS?

@kisantia
Copy link
Contributor

@brian-harris the issue Alan linked above is completed. Is there anything else that needs to be done for this issue?

@brian-harris
Copy link
Contributor

I will assign to someone to verify it is fixed.

@kisantia
Copy link
Contributor

@Ramudaykumar I moved this issue to November. Please close if this is complete or add details on what else needs to be done

@Ramudaykumar
Copy link
Contributor

Ramudaykumar commented Oct 3, 2023

If source is in local/reachable from the machine ADS is running, we can do assessment and SKU recommendation without internet connection.

Installing SQL Migration Extension in disconnected will need these steps: #22558 (comment)

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

10 participants