Невозможно запустить / запустить эмулятор хранилища Azure - PullRequest
0 голосов
/ 14 марта 2019

Невозможно инициализировать / запустить эмулятор хранилища Azure

Я пытаюсь создать функцию Azure и сталкиваюсь с проблемами в самом начале.У меня VS VS Enterprise, я создал шаблонную функцию Azure, и когда я перехожу к отладке, он дает мне знать, что типичный (перефразированный) «не может запустить эмулятор хранилища Azure, запустите azurestorageemulator.exe, запустите от имени администратора.Я сделал это с VSStudio, работающим от имени администратора и нормально, тот же результат.

(Кроме того, когда я вчера начал это делать, я был на 5.4.xx эмулятора ... Я прошел через всеЯ мог найти в том числе удаление / перезапуск экземпляра localdb ... Затем возник интересный момент, когда я решил обновить visual studio и все компоненты, и после этого и перезапуска я открыл проект шаблона VS и запустил debug, иэто просто сработало, окно команд эмулятора открылось и запустилось и показывало все ожидаемые результаты и т. д. Я закрылся на ночь, но возвращаясь к нему на следующий день, теперь я вернулся к исходному состоянию проблемы.)

Итак, я делаю это (из первого абзаца, запустив эмулятор хранилища от имени администратора), и я в основном получаю зондирование ошибок (localdb) / MSSQLLocalDB (полный журнал ошибок будет внизу):

Проверка экземпляра SQL: '(localdb) \ MSSQLLocalDB'.Обнаружено исключение при проверке конечной точки SQL.Целевое имя участника неверно.Невозможно сгенерировать контекст SSPI.

Обобщенная ошибка состояла в том, что init должен быть запущен, хотя я думаю, что проблема была скорее в доступе к локальной базе данных в первую очередь ... тем не менее, я пробовал init с похожимпроблемы:

Я прошел шаги по удалению mssqllocaldb и Azurestorageemulator mdf и аналогичных файлов, которые прошли, как и ожидалось, никаких проблем ... вот текущая информация о db:


C:\Program Files (x86)\Microsoft SDKs\Azure\Storage Emulator>sqllocaldb i
MSSQLLocalDB
v11.0

C:\Program Files (x86)\Microsoft SDKs\Azure\Storage Emulator>sqllocaldb i "MSSQLLocalDB"
Name:               MSSQLLocalDB
Version:            13.1.4001.0
Shared name:
Owner:              {MyComputer'sName, replaced actual value here}\{MyUserProfile, replaced actual value}
Auto-create:        Yes
State:              Running
Last start time:    3/13/2019 3:38:36 PM
Instance pipe name: np:\\.\pipe\LOCALDB#B161531A\tsql\query

C:\Program Files (x86)\Microsoft SDKs\Azure\Storage Emulator>

Вот полные выходы вызовов запуска / инициализации эмулятора.ЛЮБАЯ помощь или мысли приветствуются!


C:\Program Files (x86)\Microsoft SDKs\Azure\Storage Emulator>AzureStorageEmulator.exe start
Windows Azure Storage Emulator 5.7.0.0 command line tool
Autodetect requested. Autodetecting SQL Instance to use.
Looking for a LocalDB Installation.
Probing SQL Instance: '(localdb)\MSSQLLocalDB'.
Caught exception while probing for SQL endpoint. The target principal name is incorrect.  Cannot generate SSPI context.
Number of SqlErrors Reported: 1
SqlError: System.Data.SqlClient.SqlError: The target principal name is incorrect.  Cannot generate SSPI context.
Could not find a LocalDB Installation.
Probing SQL Instance: 'localhost\SQLExpress'.
Caught exception while probing for SQL endpoint. A network-related or instance-specific error occurred while establishing a connection to SQL Server. The server was not found or was not accessible. Verify that the instance name is correct and that SQL Server is configured to allow remote connections. (provider: SQL Network Interfaces, error: 26 - Error Locating Server/Instance Specified)
Number of SqlErrors Reported: 1
SqlError: System.Data.SqlClient.SqlError: A network-related or instance-specific error occurred while establishing a connection to SQL Server. The server was not found or was not accessible. Verify that the instance name is correct and that SQL Server is configured to allow remote connections. (provider: SQL Network Interfaces, error: 26 - Error Locating Server/Instance Specified)
No available SQL Instance was found.
One or more initialization actions have failed. Resolve these errors before attempting to run the storage emulator again.
Error: The storage emulator needs to be initialized. Please run the 'init' command.

C:\Program Files (x86)\Microsoft SDKs\Azure\Storage Emulator>

C:\Program Files (x86)\Microsoft SDKs\Azure\Storage Emulator>AzureStorageEmulator.exe init
Windows Azure Storage Emulator 5.7.0.0 command line tool
Empty SQL Instance. Autodetecting SQL Instance to use.
Looking for a LocalDB Installation.
Probing SQL Instance: '(localdb)\MSSQLLocalDB'.
Caught exception while probing for SQL endpoint. The target principal name is incorrect.  Cannot generate SSPI context.
Number of SqlErrors Reported: 1
SqlError: System.Data.SqlClient.SqlError: The target principal name is incorrect.  Cannot generate SSPI context.
Could not find a LocalDB Installation.
Probing SQL Instance: 'localhost\SQLExpress'.
Caught exception while probing for SQL endpoint. A network-related or instance-specific error occurred while establishing a connection to SQL Server. The server was not found or was not accessible. Verify that the instance name is correct and that SQL Server is configured to allow remote connections. (provider: SQL Network Interfaces, error: 26 - Error Locating Server/Instance Specified)
Number of SqlErrors Reported: 1
SqlError: System.Data.SqlClient.SqlError: A network-related or instance-specific error occurred while establishing a connection to SQL Server. The server was not found or was not accessible. Verify that the instance name is correct and that SQL Server is configured to allow remote connections. (provider: SQL Network Interfaces, error: 26 - Error Locating Server/Instance Specified)
No available SQL Instance was found.
One or more initialization actions have failed. Resolve these errors before attempting to run the storage emulator again.
Error: No available SQL Instance was found.

C:\Program Files (x86)\Microsoft SDKs\Azure\Storage Emulator>

Вот полный файл AzureStorageEmulator.exe.config, если он полезен:

<?xml version="1.0"?>
<configuration>
  <configSections>
    <section name="StorageEmulatorConfig" type="Microsoft.WindowsAzure.Storage.Emulator.Controller.Configuration.StorageEmulatorConfigurationHandler, Microsoft.Azure.Storage.Emulator.Controller"/>
  </configSections>

  <StorageEmulatorConfig>
    <services>
      <service name="Blob" url="http://127.0.0.1:10000/"/>
      <service name="Queue" url="http://127.0.0.1:10001/"/>
      <service name="Table" url="http://127.0.0.1:10002/"/>
    </services>

    <!-- NOTE: These are preconfigured accounts with well known keys. The purpose of the
      authentication supported by the Storage Emulator is simply to allow you to test
      your authentication code. It has no security purpose.
      It is strongly recommended that you DO NOT use your actual storage account or key over here.
      These keys are stored unencrypted on disk and in SQL databases.
      -->
    <accounts>
      <account name="devstoreaccount1" authKey="{ActualValueRemoved}" />
    </accounts>
  </StorageEmulatorConfig>
  <startup>
    <supportedRuntime version="v4.0" sku=".NETFramework,Version=v4.0"/>
  </startup>
  <runtime>
    <assemblyBinding xmlns="urn:schemas-microsoft-com:asm.v1">
      <dependentAssembly>
        <assemblyIdentity name="System.Windows.Forms" publicKeyToken="b77a5c561934e089" culture="neutral"/>
        <bindingRedirect oldVersion="0.0.0.0-4.0.0.0" newVersion="4.0.0.0"/>
      </dependentAssembly>
      <dependentAssembly>
        <assemblyIdentity name="System.Core" publicKeyToken="b77a5c561934e089" culture="neutral"/>
        <bindingRedirect oldVersion="0.0.0.0-4.0.0.0" newVersion="4.0.0.0"/>
      </dependentAssembly>
      <dependentAssembly>
        <assemblyIdentity name="System.Xml" publicKeyToken="b77a5c561934e089" culture="neutral"/>
        <bindingRedirect oldVersion="0.0.0.0-4.0.0.0" newVersion="4.0.0.0"/>
      </dependentAssembly>
      <dependentAssembly>
        <assemblyIdentity name="mscorlib" publicKeyToken="b77a5c561934e089" culture="neutral"/>
        <bindingRedirect oldVersion="0.0.0.0-4.0.0.0" newVersion="4.0.0.0"/>
      </dependentAssembly>
      <dependentAssembly>
        <assemblyIdentity name="System" publicKeyToken="b77a5c561934e089" culture="neutral"/>
        <bindingRedirect oldVersion="0.0.0.0-4.0.0.0" newVersion="4.0.0.0"/>
      </dependentAssembly>
      <dependentAssembly>
        <assemblyIdentity name="System.Drawing" publicKeyToken="b03f5f7f11d50a3a" culture="neutral"/>
        <bindingRedirect oldVersion="0.0.0.0-4.0.0.0" newVersion="4.0.0.0"/>
      </dependentAssembly>
      <dependentAssembly>
        <assemblyIdentity name="System.Runtime.Serialization" publicKeyToken="b77a5c561934e089" culture="neutral"/>
        <bindingRedirect oldVersion="0.0.0.0-4.0.0.0" newVersion="4.0.0.0"/>
      </dependentAssembly>

      <dependentAssembly>
        <assemblyIdentity name="System.Data.Services" publicKeyToken="b77a5c561934e089" culture="neutral"/>
        <bindingRedirect oldVersion="0.0.0.0-4.0.0.0" newVersion="4.0.0.0"/>
      </dependentAssembly>
      <dependentAssembly>
        <assemblyIdentity name="System.Data" publicKeyToken="b77a5c561934e089" culture="neutral"/>
        <bindingRedirect oldVersion="2.0.0.0" newVersion="4.0.0.0"/>
      </dependentAssembly>
    </assemblyBinding>
  </runtime>
</configuration>

Кроме того, вот содержимое файла конфигурации в AppData \ Local \ AzureStorageEmulator \ AzureStorageEmulator.5.7.config:

<?xml version="1.0"?>
<StorageEmulator xmlns:xsd="http://www.w3.org/2001/XMLSchema" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance">
  <SQLInstance />
  <PageBlobRoot>C:\Users\{I STRIPPED OUT MY USER PROFILE NAME}\AppData\Local\AzureStorageEmulator\PageBlobRoot</PageBlobRoot>
  <BlockBlobRoot>C:\Users\{I STRIPPED OUT MY USER PROFILE NAME}\AppData\Local\AzureStorageEmulator\BlockBlobRoot</BlockBlobRoot>
  <LogPath>C:\Users\{I STRIPPED OUT MY USER PROFILE NAME}\AppData\Local\AzureStorageEmulator\Logs</LogPath>
  <LoggingEnabled>false</LoggingEnabled>
</StorageEmulator>
...