Выполнение сценариев Powershell в локальной среде из приложения-функции Azure приводит к ошибке согласно руководству Microsoft.
Итак, я пробую решение, представленное Microsoft в одном из их практических руководств, но, похоже, я не могу пройти первую фазу тестирования.
Вот руководство, которому я следую: Управление гибридными средами с помощью PowerShell в Функциях Azure и гибридных подключениях службы приложений.
После начальной настройки, когда я предполагаю протестировать вызов функций на моем локальном сервере, в части, называемой "Тест-функция", я получаю сообщение об ошибке в приложении-функции.
Чтобы дать более подробную информацию о моей настройке, я не делаю этого в своей основной ОС на моем компьютере, а скорее настраиваю это с помощью "Windows Sandbox".
Я получаю следующее сообщение об ошибке:
2020-05-12T13:53:29 Welcome, you are now connected to log-streaming service. The default timeout is 2 hours. Change the timeout with the App Setting SCM_LOGSTREAM_TIMEOUT (in seconds).
2020-05-12T13:54:09.319 [Information] Executing 'Functions.Get-ServiceStatus' (Reason='This function was programmatically called via the host APIs.', Id=xxxxxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxxx)
2020-05-12T13:54:10.826 [Information] OUTPUT: PowerShell HTTP trigger function processed a request.
2020-05-12T13:54:11.226 [Information] OUTPUT: Scenario 1: Running command via Invoke-Command
2020-05-12T13:54:21.517 [Error] ERROR: [finance1] Connecting to remote server finance1 failed with the following error message : The server certificate on the destination computer (finance1:5986) has the following errors:
Encountered an internal error in the SSL library. For more information, see the about_Remote_Troubleshooting Help topic.
+ CategoryInfo : OpenError: (finance1:String) [], PSRemotingTransportException
+ FullyQualifiedErrorId : 12175,PSSessionStateBroken
Script stack trace:
System.Management.Automation.Remoting.PSRemotingTransportException: Connecting to remote server finance1 failed with the following error message : The server certificate on the destination computer (finance1:5986) has the following errors:
Encountered an internal error in the SSL library. For more information, see the about_Remote_Troubleshooting Help topic.
Microsoft.Azure.WebJobs.Script.Workers.Rpc.RpcException : Result: ERROR: [finance1] Connecting to remote server finance1 failed with the following error message : The server certificate on the destination computer (finance1:5986) has the following errors:
Encountered an internal error in the SSL library. For more information, see the about_Remote_Troubleshooting Help topic.
+ CategoryInfo : OpenError: (finance1:String) [], PSRemotingTransportException
+ FullyQualifiedErrorId : 12175,PSSessionStateBroken
Script stack trace:
System.Management.Automation.Remoting.PSRemotingTransportException: Connecting to remote server finance1 failed with the following error message : The server certificate on the destination computer (finance1:5986) has the following errors:
Encountered an internal error in the SSL library. For more information, see the about_Remote_Troubleshooting Help topic.
Exception: Connecting to remote server finance1 failed with the following error message : The server certificate on the destination computer (finance1:5986) has the following errors:
Encountered an internal error in the SSL library. For more information, see the about_Remote_Troubleshooting Help topic.
Stack:
2020-05-12T13:54:21.653 [Information] Executed 'Functions.Get-ServiceStatus' (Succeeded, Id=xxxxxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxxx)
Следуя другому примеру той же функциональности, я просмотрел видео Трэвиса Робертса на YouTube, демонстрирующее тот же подход к желаемому эффекту, но с использованием вместо этого функции Eventgrid: Видео Трэвиса Робертса на YouTube. На этот раз я получил еще одну ошибку, говоря:
Метод или операция не реализованы.
Эта ошибка, похоже, еще не решена в следующем потоке в GitHub: [In Portal] Выполнение триггера EventGrid завершилось неудачно с NotImplementedException #374
Кто-нибудь сталкивался с этим раньше или мейбе вообще это решал?
1 ответ
Сегодня я боролся с этим несколько часов, пока не понял, что я неправильно настроил гибридное соединение.
В частности, это была настройка узла конечной точки, которая должна соответствовать имени сервера, к которому вы пытаетесь подключиться, в моем случае имя сервера "AD-Server": Имя компьютера сервера
Необходимо для соответствия настройке хоста конечной точки при настройке гибридного подключения: Новое гибридное подключение
Следуя примеру, я просто предположил, что это имя может иметь любое значение - надеюсь, это поможет!