How to capture error on JDBC connection failure - streamsets

I am trying to send an email notification whenever a JDBC connection is failing in my streamsets pipeline.
I am able to send email notification when a JDBC query has encountered an error. But not when JDBC connection has encountered an error. Went through a ton of streamsets documentation, but couldnt find an answer to this.
Can someone please help?

You will be better off generating a notification based on pipeline states. For more info on Notifications, click here.
Cheers,
Dash

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.

Challenge in data from REST API using Azure Data Factory - access issue

We are trying to reach to an API hosted in our company network using rest connector in ADF (SHIR is used). Linked service connection is successful but dataset is unable to read the data and copy activity is as well failing with below error. Please suggest your thoughts in resolving the same.
Failure happened on 'Source' side. ErrorCode=UserErrorFailToReadFromRestResource,'Type=Microsoft.DataTransfer.Common.Shared.HybridDeliveryException,Message=An error occurred while sending the request.,Source=Microsoft.DataTransfer.ClientLibrary,''Type=System.Net.Http.HttpRequestException,Message=An error occurred while sending the request.,Source=mscorlib,''Type=System.Net.WebException,Message=Unable to connect to the remote server,Source=System,''Type=System.Net.Sockets.SocketException,Message=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 ,Source=System,'
This error is mostly seen due to firewall issues. You might want to verify your network firewall setting to allow the API request to be read.
Also, verify if your API call is working as expected using other API testing tools. If the issue persists you can raise a support ticket for engineers to investigate more on the issue.
If you are able to preview data in your source , then check your sink connection as this issue can occur when the Sink in the copy activity is behind a firewall, I was getting the same issue and I tried copying to a container without a firewall and it worked. Its weird that the error is related to Source and the issue is with Sink.

I am getting a connection error while setting up DB2-s5 on IBM Cloud

I've been trying to set up the Lite Plan - DB2-s5 on IBM Cloud and it gives me an Connection Error all the time.
Please, help would be appreciated.
Many thanks in advance.
I got the same error:
The Service "Db2-1q" has not been created due to a network error. Please try again at a later time. [...]
There is no error number, so I can't find any solution online either. I guess this is a general problem with IBM cloud right now, maybe it will be fixed some time soon.

Kafka Connect: Error detection when worker fails

I'am submitting a connector to kafka. The connector created is sftp connector. Now when the password is wrong the connector sends back success response when the connector fails. The password is wrong response is not given at that time. This is a single scenario there could be mutliple scenarios like this. Now when I use the <host>/connectors/<connector-name>/status, I get the error saying failed to establish connection. But this endpoint has a little delay. If I'am immediately trying after creating the connector, I may not get any response(404).
What is the proper way of handling this using the status api call.Is there any delay that needs to be used before firing this API. Or can it be handled while submitting the connector to API?
When you create the connector, it naturally needs to load the JAR(s) responsible for the tasks, then distribute the tasks to actually start the connector code (which is responsible for connecting to the SFTP server with the connection details).
Therefore, the delay is natural, and there's no way to know your connection details are incorrect unless you try to use them before launching the connector.

How to log when a a connection to the database is restored in Talend?

I'm using Talend, tJDCBConnection.
Before running a db actions I added the tJDCBConnection component so if the connection was lost it will be reconnected again.
How can I tell if the connection was re-established so I can add a log message?
Thank you,
Shirly
You can adopt this schema tJDBCConnection-->onComponentOK-->tWarn.
As soon as the tJDBCConnection is called, tWarn send the message you've configured.
In parallel, you need a tLogCatcher to catch all messages issued from tWarn (and/or tDie and/or Java exceptions) and log these messages in the desired logfile.
Hope this helps,
TRF