I have a tab/bot teams app that is catching on the first db call inside the bot handleTeamsTaskModuleSubmit handler. I keep getting a connection error in 2 forms
Error in PostgreSQL connection: Error { kind: Io, cause: Some(Os { code: 10054, kind: ConnectionReset, message: "An existing connection was forcibly closed by the remote host." }) }
or
connect EACCES 127.0.0.1:49543
The bot is deployed as an azure app service, written in node.js, and it's using Prisma client to connect with my Postgres database. It had been working previously but since the last time, I deployed the app to the team store the call has been erroring.
I'm not sure where I can see the active connections or find a place to verify the connection URL. The only other thing I can think of is that the client isn't being initiated on deployment but I cannot find the deploy source code in the generated code of the vs code teams-toolkit.
Related
I have a webapp running in Azure. It uses a Azure MSSQL database set to Standard S0: 10 DTUs performance. The backend is written in dot net core 3.1. The app works fine when I visit it.
Checking my logs I found a few of these, they happen weeks apart at odd times.
Microsoft.Data.SqlClient.SqlException (0x80131904): 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: TCP Provider, error: 35 - An internal exception was caught)
This error has me wondering if some random user is unable to access the site because the SQL server won't respond.
Any suggestions as to what this might be about?
Or suggestions as to what I should try doing?
Update 1: As a response to comment regarding retry. I actually have implemented retry on the connection (.net core entity framework) using this code.
services.AddDbContext<ApplicationDbContext>(
options =>
{
options.UseSqlServer(connectionString, sqlOptions =>
{
sqlOptions.EnableRetryOnFailure(
maxRetryCount: 10,
maxRetryDelay: TimeSpan.FromSeconds(10),
errorNumbersToAdd: null
);
});
options.EnableSensitiveDataLogging(true);
},
ServiceLifetime.Transient
);
This is what I followed to setup IR.
In the final step of Registering Azure Data factory self hosted intergration runtime, we need to provide the Authentication Key. then the installation is making a call to internet. Isn't this strange as the VM could be in a private network?
If the VM is not connected to internet and it gets this error then what to do? "Failed to connect to: we.frontend.clouddatahub.net"
This is the error I get
Failed to execute the command ' -Key xxx'. Error message: Microsoft.DataTransfer.DIAgentClient.HostServiceException: Failed to get service token from ADF service with key xxxx and time cost is: 3.0786307 seconds, the error code is: UnexpectedFault, activityId is: xxx and detailed error message is An error occurred while sending the request.
The underlying connection was closed: An unexpected error occurred on a send.
Authentication failed because the remote party has closed the transport stream.
The issue seems to be disabled remote access. How can I enable it? Dmgcmd -era 8060 is not working.
I have also a related issue logged as another VM works and this fails
Even if you have some private network where the communication can go without any restrictions between your data sources and your integration runtime, the integration runtime application needs to be able to communicate with the Azure data factory services as well. Try whitelisting the IPs for your region in the networking settings of your Azure VM or in your firewall - according to this:
https://learn.microsoft.com/sv-se/azure/data-factory/azure-integration-runtime-ip-addresses
I'm following a tutorial for setting up easy tables in Azure but I'm getting 'There was an error while initializing App Service app for 'blahblahapp'. 'Error connecting to SQL server (SQL error code 40532)'.
My connection string is:
Data Source=tcp:blahblahapp.database.windows.net,1433;Initial Catalog=blahblahapp_db;User ID=myemail#email.com;Password=blahblahpassword.
I've had a similar problem before while following another tutorial where my sql connection credentials were copied from the connection string given by Azure and pasted into a visualstudio c# program but it came up with errors and would not connect using the username myemail#email.com instead of the username given which was the same myemail#email.com I had to put myemail#email.com#database.azurewebsites.net so I'm thinking this could be the problem.
Or is it????
This problem is happening in the Azure console but how do I edit the connection string given by azure so that it is myemail#email.com#database.azurewebsites.net?
A transport-level error has occurred when receiving results from the server. (provider: Session Provider, error: 19 - Physical connection is not usable) - occurs intermittently, using hybrid connector to connect to on-premise database from Azure API
I try connecting to SQL database in on-premise sever from app service resource (Web API). Configured classic hybrid connection end point to on-premise db.
Root Cause :
In SQL database, there is a property 'Auto Close' in Options tab, which is set to TRUE by default.
When Azure Service(API) establishes connection to SQL server. Azure tries to maintain the same connection pool and try to reuse and reconnect to it.
As we have set 'Auto Close as TRUE', the SQL database clears the existing connection after sometime. Whereas Azure tries to reconnect with the earlier connection which has already been cleared by SQL database. This results in 'Physical Connection is not usable - error 19'.
SOLUTION:
In SQL db, go to database properties. Navigate to 'OPTIONS' page and expand automatic tab and set 'AUTO CLOSE' property as 'FALSE'.
Make sure you restart Azure app and your database server to ensure no old connections are used.
PROBLEM SOLVED.
NOTE : This is one of the reason (which happened to me).
Another useful method to get rid of this error is to use RETRY LOGIC of Entity Framework 1.1.0
services.AddDbContext<DbContext>(options => options.UseSqlServer('yourconnectionstring',
sqlServerOptionsAction: sqlOptions =>
{
sqlOptions.EnableRetryOnFailure(
maxRetryCount: 5,
maxRetryDelay: TimeSpan.FromSeconds(30),
errorNumbersToAdd: new List<int>() { 19 });
}));
In Retry logic, error 19 is not included. So you have to pass the error code 19 to set retry logic for error code 19.
It seems you need to add a retry logic to your Web API as explained here. The "Physical connection is not usable" error may be caused by transient errors as explained on this Microsoft documentation.
"Transient fault errors typically manifest as one of the following error messages from your client programs:+
•Database on server is not currently available. Please retry the connection later. If the problem persists, contact customer support, and provide them the session tracing ID of
•Database on server is not currently available. Please retry the connection later. If the problem persists, contact customer support, and provide them the session tracing ID of . (Microsoft SQL Server, Error: 40613)
•An existing connection was forcibly closed by the remote host.
•System.Data.Entity.Core.EntityCommandExecutionException: An error occurred while executing the command definition. See the inner exception for details. ---> System.Data.SqlClient.SqlException: A transport-level error has occurred when receiving results from the server. (provider: Session Provider, error: 19 - Physical connection is not usable)
•An connection attempt to a secondary database failed because the database is in the process of reconfguration and it is busy applying new pages while in the middle of an active transation on the primary database."
EDIT: I have enabled logging, here is the error in more detail:
Uncaught internal server error. { [MongoError: Authentication failed.]
name: 'MongoError',
message: 'Authentication failed.',
ok: 0,
code: 18,
I've been following the Microsoft Azure guide to setting up Parse on Azure, which is here.
I've completed the steps and have everything up and running, however, when I try to create a new account on my Obj-C app, I get the error [Error]: {"code":1,"message":"Internal server error."} (Code: 1, Version: 1.12.0).
I'm not sure why this happens, as I can see on Azure that I am getting multiple requests and HTTP errors.
Also the parse source I'm using is the one Azure have provided/forked, so maybe that's where the error is coming from?
Thanks.
The error is with your MongoDB authentication. Double check you followed the steps correctly for the Parse on Azure tutorial, so that there isn't any hard coded incorrect "username/password123" strings
Double check that the URI is correct. I had some issues when migrating. If you use the Parse Server Managed on Azure, it creates the server for you and you can check the Database URI structure there. (In the web app - application settings - DATABASE_URI)
You can also open the settings of the documentDB and check the URI settings there.
Another trick is that if you change the DATABASE_URI setting (in application settings) make sure you restart your web app.
Make sure you have added "/parse" at the end of your URL