Using Charles Proxy to debug Azure function locally - visual-studio-code

I'm creating an azure function to generate audio files from ssml. It worked great until a couple days back when I started getting empty file back from the API. If I use an app I created to request the conversion it work great, but when I use my azure function running locally on my mac, after a few files I start to get empty files (for the same file that work great with the app).
To debug the issue, i'd like to use Charles on my machine to see what the network request are and what is different between those two.
Unfortunately, when I try to run the function in VS code with Charles on, I get:
Core Tools Version: 3.0.3331 Commit hash: 0b57b1647c5a385beb8f7d64fa0e534ad4c7555d
Function Runtime Version: 3.0.15371.0
[2021-03-08T05:24:12.902Z] A host error has occurred during startup operation 'd98e6aea-950a-4d9a-84db-afe74e83cabb'.
[2021-03-08T05:24:12.903Z] System.Net.Http: The SSL connection could not be established, see inner exception. System.Private.CoreLib: The remote certificate is invalid according to the validation procedure.
Value cannot be null. (Parameter 'provider')
How can I configure the azure function tooling to work with Charles in VS Code?

Related

The listener for Azure function was unable to start - Microsoft.Azure.EventHubs.Processor Encountered error

I am getting the below error whilst running my Python Azure Function on the local machine in VSCode.
For clarification the message is:
The listener for function 'Functions.IoT_Data-Handler' was unable to
start. Microsoft.Azure.EventHubs.Processor: Encountered error while
fetching the list of EventHub PartitionIds. System.Private.CoreLib: A
connection attempt failed because the connected party did not properly
respond after a period of time, or established connection failed
because connected host has failed to respond.
This error has never occurred before in the time I have started using VSCode for Azure functions (since last September). The only thing that has changed recently is that I now deploy this function within an Azure Function premium resource, but really that should not matter in the dev environment.
For information, this function is hooked up to an Azure IoT-Hub endpoint and is simply reading and processing the uplink data before saving it to an Azure SQL database.
Can anyone offer any advice?
Check if my below findings help to fix your issue:
As #PeterBons said, check the connection string given correctly in the local.settings.json:
Whatever the Event Hub Endpoint/IoT Hub Endpoint Connection String given in the file local.settings.json, that property name should be mapped in the function.json file.
Try replacing the IoT Hub Connection String without the consumer group name as mentioned in this GitHub Issue #5512
I found similar issues in the SO 1 & 2 which will be helpful to fix your issue.

Time out error after setting up HANA studio using landscape file import

When I installed HANA in Eclipse and imported a Landscape file provided by my teammate, I am getting the error. I have attached the image to this post.
Please tell me what should I do to resolve it.
W1D sapw1ddb00.dir.slb.com 00 - System status cannot be determined
SAPControl request failed: Connection timed out: connect
java.lang.reflect.InvocationTargetException
The "Landscape export file" from HANA Studio contains the list of connections set up in HANA Studio incl. the folder structure.
It does not contain any login data.
When HANA Studio is set to refresh the instance status for all instances on startup, it will try to connect to the instances via the sapcontrol connection, which requires logon data.
Without this information, the call will fail.
The error message in the question does point to a different issue, though.
There seem to be logon data available (otherwise HANA studio would not have tried the connection), but the sapcontrol call timed out.
A common issue can be that the target system is not reachable from the workstation this HANA Studio is running on.
To analyse this issue, the usual network tools like PING, DIG, ARP, and SSH can come in handy.

Web Deploy not working. Timeout on client. Schannel 1203 on server

I'm trying to deploy an application via web deploy to a windows 2012 r2 server.
First tried installing iis, web deploy using the msi. After getting an unreachable error I saw somewhere that I needed wmsvc to be installed and installed it via powershell command Install-WindowsFeature Web-Mgmt-Service.
I stopped getting the unreachable error and started getting this error ->
Error: Could not complete the request to remote agent URL 'http://xx.x.xx.xx:8172/MSDEPLOYAGENTSERVICE'.
Error: The operation has timed out
On the server's event viewer under system I get the following error ->
A fatal alert was generated and sent to the remote endpoint. This may result in termination of the connection. The TLS protocol defined fatal error code is 10. The Windows SChannel error state is 1203.
Any idea of what could be going on? Did I miss something on the installation?
After this I also tried installing everything but without iis and I get the same error.
So, this is really not a PoSH issue.
Maybe you should consider movin gthis question to another forum.
Anyway, you have either real server config issues (this can sometimes mean wipe and rebuild - very ugly option - but if it's a virtual machine and you have a snapshot, just roll back), or an app causing this.
Typically for Schannel type of error, it has to do with application or service in machine not able to complete any SSL connection sort of connection.
The error state parameter of 1203 means client error connecting to server, ie invalid ClientHello from the client
See if you can collect more data by...
https://support.microsoft.com/en-us/help/260729/how-to-enable-schannel-event-logging-in-iis
I realized this is an old question, but in case somebody ran into the same issue, here are my solution.
I had to follow this guidelines : https://learn.microsoft.com/en-us/aspnet/web-forms/overview/deployment/configuring-server-environments-for-web-deployment/configuring-a-web-server-for-web-deploy-publishing-web-deploy-handler
Copy the resulting publishsetting file. In the Publish/Profile page import it.
In the Publish/Connection page, change the server to the server address with the 8172 port. Add the password. Change the Destination URL to the site to go to after the publish is completed.
Then after Validate connection was completed, go ahead and publish it!

Can't run or debug the api locally

I am following the quick start here tutorial and the api works online as it should. However, when it comes to testing the api locally, the admin server runs as it should but the api itself, which i supposed should be http://localhost:8080/_ah/api/echo/v1/echo and any post message should work. All I'm getting is : bad runtime process port ['']. I would also like to know how to create a debug configuration in eclipse as well as the api-explorer similar to what we used to have in v1.

Visual studio release management - deploy with ps/dsc encountered error with server certificate

I'm trying to run a simple ps script on a target computer (my local machine) from our RM server through the RM client. However the release falls over when it reaches deploy using ps/dsc. The error message reads:
Connecting to remote server ### failed with the following error message : The server certificate on the destination computer (###:5985) has the following errors:
Encountered an internal error in the SSL library.
However as you can see by the winrm port number, I'm using HTTP not HTTPS to communicate with my machine, so surely SSL should not come into it. So has anyone else come across this or have any idea what I could be doing wrong?
UPDATE: the machines are part of the same domain.
In the deploy using DSC action keep UseHTTPS variable to false and skipCACheck to true, just in case.
BTW, how long does it take for the action to show this error message in the logs? Also, as someone mentioned in the comments, are you able to manually run the script using PS remoting?
If none of the above helps, we would need more details. Try looking into the event logs for the target machine right after your deployment failed and check for any errors.
I came across same issue ,On installing Azure service certification VM tailed,Resolved issue.