Connecting Apps with Windows Azure Connect - Problem connecting - azure

I'm following the Connecting Apps with Windows Azure Connect lab in the Azure Training Kit.
I've followed the instructions to set up the Groups and Roles, and the Activated EndPoints.
I've updated the SQL Express settings and restarted the service
I've installed the local endpoint, which gives the following text.
I've added a new Windows Firewall rule
This endpoint is configured to
connect, and can connect to other
resources in Windows Azure Connect.
I still get this error displayed in the browser.
Sorry, an error occurred while
processing your request.
Message: The underlying provider
failed on Open. Inner Message: 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: 0 - No such host is known.)
Any ideas on why this might be or suggestions on finding out where it is failing?
Thanks.
Update
I found this link "Windows Azure Connect and Symantec Endpoint Protection" describing a similar problem; as the title suggests Symantec EndPoint Protection could be the problem.
Although in this case, removing Symantec did not fix the problem
Update 2
some messages from Event Viewer - this set is repeated every 2 mins, they dont appear connected to a web page request.
at 9:29:40 [Information]
The user SYSTEM has successfully
established a link to the Remote
Access Server using the following
device: Server address/Phone Number =
sydrelay4.windows.azure-test.net
also at 9:29:40 [Information]
The link to the Remote Access Server
has been established by user SYSTEM.
at 9:29:41 [Error]
The user SYSTEM dialed a connection
named Windows Azure Connect Relay2 1
which has failed. The error code
returned on failure is 798.
at 9:29:45 [Information]
The user SYSTEM dialed a connection
named Windows Azure Connect Relay2 1
which has terminated. The reason code
returned on termination is 631

I had the exact same issue, Symantec et al. I was able to resolve it by adding the .cer certs I used in the Azure portal for the Hosted Services -> Management Certificates to my personal certificates collection via MMC and then rebooting my computer.
Hope that helps.

If you’re receiving a message like that, it’s possible that your current location has an outgoing port blocked.
Check this thread:
SQL Azure : Connection to SQL Azure throws exception

Is your machine behind a proxy? If so try to run the following commands to set proxy for the local system account:
bitsadmin /UTIL /SETIEPROXY LOCALSYSTEM NO_PROXY
bitsadmin /UTIL /SETIEPROXY LOCALSYSTEM MANUAL_PROXY a.b.c.d:80 NULL

Related

Connect Azure App Service and Azure SQL VM

I have a setup where the connection string of my .NET application is configured at the app service level and the database used in it is present in an Azure SQL VM
I see the following error, while accessing my Web APIs in the app service
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: 0 - Access is denied.
However, I’m able to connect to the database directly on my local system using SSMS with my organisation’s VPN
I’m struggling to find the right resource, appreciate if you someone can help me with steps to fix it
i just have the beginner level knowledge on Azure platform
I tried to reproduce the same in my environment I got the same error like below.
To resolve this issue i have removed private access and tried and then added new private access its work successfully.
Check the public access in selected network with firewall rule and allow exception as below.
And, when I remove this private endpoint and try to add new private access i can able to connect with my sql server.
Check this connectivity as below.
My azuresql,database server connected successfully.
Note: This error may occur in multiple ways if are not enable sql services and in tcp/Ip If any of the protocols are disabled or if Remote Connection Permission is disable error may occur for this please refer the below documents.
Reference:
Microsoft SQL Server Error 2 Cannot Connect to Local: How to Solve? (systoolsgroup.com)
Resolving could not open a connection to SQL Server errors (mssqltips.com)

Simple App Service cannot access Azure SQL after upgrading service tier ("no such host is known")

I upgraded my service tier on only our App Service app (not the other resources). A day after doing this, the app will no longer start up - giving the following:
HTTP Error 500.30 - ASP.NET Core app failed to start
If I connect to the App Service portal and use Kudu to start it via a debug cmd prompt, I see
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: 0 - No such host is known.)
System.ComponentModel.Win32Exception (11001): No such host is known.
Storage queue startup also fails with my queue hostname. In kudu I also tried
C:\home\site\wwwroot>nameresolver mydatabase.database.windows.net
Server: Default
Can't find mydatabase.database.windows.net: Non-existent domain
(not my actual server name...) but same thing for google.com or any other hostname
also:
C:\home\site\wwwroot>ping 142.251.32.142
Unable to contact IP driver. General failure.
but this seems to be expected?
I am not using any fancy VPNs, private networks, groups or whatnot - this is as plain vanilla as I could make it. This worked for months before the upgrade. It works when run locally. My firewall for the database allows all azure services and my work/remote IP. I tried connection strings in the app service configuration only as well as only in appsettings.json. The connection string works in VS 2019, 2022, and sql management studio as well as the query tool within Azure portal itself. I've restarted the App service many times. OpenDNS cache check shows multiple different IPs for my database server but is this expected for regions? Why is the DNS apparently broken? How can I get this back to a functional state?
FYI - MS support contacted me and the service started working again with no changes after 6 days. So - there is no answer.

Can't connect to new Azure SQL Server instance

I've just spun up an instance Azure SQL server. I can connect to it from the Azure Portal, but I get a timeout error when trying to connect with SQL Management Studio (and other methods):
Cannot connect to *server*,*port*.
Additional information:
A connection was successfully established with the server, but then an error occurred during the pre-login handshake. (provider: TCP Provider, error: 0 - The semaphore timeout period has expired.)
(Microsoft SQL Server, Error: 121)
The semaphore timeout period has expired
I've been searching for a solution but the only thing I find about the error message is that the database is under heavy load, which seems unlikely concidering it was just created!
Anybody know what can cause this problem?
Thanks!
Error 121 has always been considered a network related error as you can read in this Microsoft Support article. The Internet service you receive, network adapters are things you should consider examine.
Please consider to click the "Options" button of SQL Server Management Studio, on the "Connection Properties" tab, try setting a greater value for the "Connection time-out" setting.
If you need to use a Corporate VPN to connect to Azure SQL Database, make sure you are connected to the VPN.
Problem is related to a Firewall in the middle doing SSL inspection.
I Suggest to try requesting your firewall admin to add an exemption on the SSL Inspection engine , or try using another connection not doing SSL inspection.
So it seems it was the company firewall that was blocking the traffic. I tried from another network entirely and then I could access the server.
I guess my two alternatives now are either to unblock 1433 in the company firewall, or to open another port in Azure SQL Server, which doesn't seem possible at the moment.

Getting an intermittent error while connecting to on-premise sql database from Azure service

Created an azure MVC website, from service (controller) code we are connecting to an on-premise sql server using Azure Hybrid Connection. Intermittently we are facing below issue.
"A transport-level error has occurred when receiving results from the
server. (provider: TCP Provider, error: 0 - The specified network name
is no longer available.)"
Please provide suggestions to resolve this issue.
You can try following solutions :
Try increasing connection time-out.
check if remote connection is enabled.
Try adding firewall exception.
First of all the error means either the networks has some extra latency, the database is down or you may have too many concurrent connections open the database.
(Make sure you are closing all open datareaders.)
also it may be due to this
These are transient faults and are to be expected in the cloud. Implementing defensive programming is usually a must in the cloud. Try using some retry logic. Microsoft's transient fault exception library is an excellent start. Though meant primarily for SQL Azure and Azure Service bus, you can use the library for SQL IaaS.
In my opinion, 98% sure, because I recently had the same experience, it is a network issue from the server provider.
For instance: if you are rent the server from Ionos, by default all remote connections are blocked, even though you disable the firewall in the server. You still won't be able to connect remotely. You can, however, do your work on the server without any problem.
To connect remotely, you have to contact the server provider. They will explain how to enable firewall ports from your control panel.
I contacted my server provider as I almost get frustrated. Here was their response.
enter image description here
After this, every permitted client can connect remotely to the server.
I wish you success.

RemoteApp working with Azure Windows Server 2012

Hoping someone can shed some light on my RemoteApp/Azure dilemma
I have successfully setup RDS on Server 2012 VMs in Azure - session host, rdweb and connection broker, opted not to have a gateway as only running one session host.
Created an self-signed certificate in RDS tools in Server Manager and bound this to rdweb, named the cert remote.cloudapp.net. I also uploaded this to the cloud service for the VMs using Azure powershell.
So via an Azure VM on the domain in Azure I can connect to remoteapp and successfully run an application.
However when I connect externally via a browser on my standalone laptop I get the following error in the RDS Log:
Remote Desktop Connection Broker Client failed to redirect the user
REMOTE\appuser. Error: NULL
I have tried the fix of look for an Pool ID of NULL in the Windows Internal Database and I only have one pool ID which is the collection I created, so can't be that.
Also get this error returned when I try to run a remoteapp after successfully logging into the RDweb page:
Remote Desktop Services cannot connect to the remote computer for one
of these reasons: Remote Access is not enabled to the server Remote
computer turned off Remote computer not available on the network
I am totally stumped, is there something I am missing that is so simple.

Resources