Getting error when trying to use starttls() in PySpark application in Azure Synapse Notebook - pyspark

I've got a two part question. I've been asked to have an email sent whenever an error occurs when running a Notebook in Azure Synapse. The Notebook is going to be run in a pipeline, so I asked them why they didn't just have the email sent from the pipeline, since they know how to do it from there. They gave me a long answer which I didn't understand, so I guess it has to be done inside Synapse.
So anyway, do you have any suggestions as to how to do this? I thought of maybe doing a Logic App or Function and having the Logic App or Function called via the PySpark application.
Another way I am trying and do it is inside the PySpark application itself. Anyway I have the following code:
smtp = smtplib.SMTP("smtp-mail.outlook.com", port=587)
smtp.ehlo()
smtp.starttls()
So anyway, when it gets to smtp.starttls(), I get an error message
SMTPNotSupportedError: STARTTLS extension not supported by server.
I only get this error when trying to do it in PySpark in Synapse. When I do it in Python in Visual Studio on my other machine and run it there, I don't get the error, and I can send the email. Do you have any suggestions? Thanks.

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.

Executing Batch service in Azure Data factory using python script

Hi i've been trying to execute a custom activity in ADF which receives csv file from the container (A) after further transformation on the data set, transformed DF stored into another csv file in a same container (A).
I've written the transformation logic in python and have it stored in the same container (A).
Error raises here, when i execute the pipeline it returns an error *can't find the specified file *
Nothing wrong in the connections, Is anything wrong in batch Account or pools!!
can anyone tell me where to place the python script..!!!
Install azure batch explorer and make sure to choose proper configuration for virtual machine (dsvm-windows) which will ensure python is already in place in the virtual machine where your code is being run.
This video explains the steps
https://youtu.be/_3_eiHX3RKE

TabPy Server configuration error when running flow from command line

I have a tableau prep flow which uses python script. When i run the flow from tableau prep, it works.
However, i am using command line alongside task scheduler to automate the flow. When running the automated flow; i am encountering the error below:
I have already configured the connection to tabpy in the tableau prep itself. Previously this used to work. But i am now getting this error. Should the TabPy configuration be added to the json file used for credentials? if so, in what format should it be?
Got it to work. Just had to include the following command in the json file:

Flow does not run on Tableau Server - where can I see the actual error?

When I run a flow in Tableau Server, it fails with the following error message:
Unfortunately this error is not helpful in understanding the actual cause of the problem.
Is there a way to see the actual underlying error? Or how am I supposed to debug this?
The flow runs fine in my Tableau Prep.
(EDIT: I used state here that I used a different data source to test in prep, but this is no longer true)
Arguably that error log does give you a hint as to what the issue is. The issue is with the Output step. This is most likely due to a permissions error when Tableau Server goes to publish the output since you can do it locally in Tableau Prep.
Are credentials for your flows able to be embedded on server? This will impact whether the output will be accessible. Are all flows run using a service account? Make sure that service account has access to the output location.
If these troubleshooting steps don't work, check the server logs. For this you'll need to check the logs on Tableau Server using the command line to see if there is a more detailed response. If you have the access, run tsm maintenance ziplogs to zip the log files and investigate.

powershell use-azurehdinsightCluster specified method not suppored

Hi I am new to azure and trying to run script job on my cluster; yesterday i was able to to do map reduce streaming job successfully; however today i am stuck when trying to do hive job ; on powershell ise when i type command use-azurehdinsightcluster 'nnn' I am getting specified method not supported
also when i try script file I get error start-azure job not supported...
I I have mysettings.publishsettings file imported and in place. I have azure.psd1
I am connected to azure etc...
one thing confuses me: account name there are three account names: xxxxx#hotmail.com; and one which is similar to my storage account name , and one weird pay-as-you-go
I have tried all of them
I am totally confused please can some one help me ?
Please upgrade to the latest powershell from http://azure.microsoft.com/en-us/documentation/articles/install-configure-powershell/#Install and try again.