Web Deploy 3.6: Performance issues behind a firewall - webdeploy

Using TeamCity and WebDeploy, I publish websites remotely to production servers. Here's an example log of a deployment:
[15:48:24][Step 11/18] Deploying to Web Server 1 (2s)
[15:48:24][Deploying to Web Server 1] Deploying to Web Server 1:
[15:48:24][Deploying to Web Server 1] Info: Using ID 'e7a113e6-5dbd-4ed4-887a-156af88f7403' for connections to the remote server.
[15:48:25][Deploying to Web Server 1] Info: Using ID 'ad9a7a1a-0adb-45f6-bdde-e4d7157b4eb1' for connections to the remote server.
[15:48:26][Deploying to Web Server 1] Total changes: 0 (0 added, 0 deleted, 0 updated, 0 parameters changed, 0 bytes copied)
[15:48:26][Step 11/18] Deploying to Web Server 2 (3s)
[15:48:26][Deploying to Web Server 2] Deploying to Web Server 2:
[15:48:26][Deploying to Web Server 2] Info: Using ID 'b8218d7a-5fa0-4152-8e6b-c467ee86267e' for connections to the remote server.
[15:48:28][Deploying to Web Server 2] Info: Using ID '2f02aa87-5e5c-4305-90d5-f82a549ffca3' for connections to the remote server.
[15:48:29][Deploying to Web Server 2] Total changes: 0 (0 added, 0 deleted, 0 updated, 0 parameters changed, 0 bytes copied)
[15:48:29][Step 11/18] Deploying to Web Server 3 (2s)
[15:48:29][Deploying to Web Server 3] Deploying to Web Server 3:
[15:48:29][Deploying to Web Server 3] Info: Using ID 'e5457237-4632-46da-a7b6-3cb1a7d5078e' for connections to the remote server.
[15:48:31][Deploying to Web Server 3] Info: Using ID '28b3725e-00e6-43b4-a014-523279678d9b' for connections to the remote server.
[15:48:32][Deploying to Web Server 3] Total changes: 0 (0 added, 0 deleted, 0 updated, 0 parameters changed, 0 bytes copied)
We moved our deployment agent to a new machine, but now there's a huge delay running WebDeploy across all our sites, even when it (effectively) deploys nothing:
[15:46:53][Step 11/18] Deploying to Web Server 1 (17s)
[15:46:53][Deploying to Web Server 1] Deploying to Web Server 1:
[15:46:54][Deploying to Web Server 1] Info: Using ID 'e55ed14a-0557-4300-b25d-3fbb39907b3b' for connections to the remote server.
[15:47:10][Deploying to Web Server 1] Info: Using ID '0cdfb2b4-e435-492a-9157-caee13b27962' for connections to the remote server.
[15:47:11][Deploying to Web Server 1] Total changes: 0 (0 added, 0 deleted, 0 updated, 0 parameters changed, 0 bytes copied)
[15:47:11][Step 11/18] Deploying to Web Server 2 (18s)
[15:47:11][Deploying to Web Server 2] Deploying to Web Server 2:
[15:47:12][Deploying to Web Server 2] Info: Using ID '53691c36-9c65-4ce4-aad9-3f8e52fefd87' for connections to the remote server.
[15:47:28][Deploying to Web Server 2] Info: Using ID 'afccf558-e1f4-4abf-90c6-c1bbef6c4434' for connections to the remote server.
[15:47:29][Deploying to Web Server 2] Total changes: 0 (0 added, 0 deleted, 0 updated, 0 parameters changed, 0 bytes copied)
[15:47:29][Step 11/18] Deploying to Web Server 3 (18s)
[15:47:29][Deploying to Web Server 3] Deploying to Web Server 3:
[15:47:30][Deploying to Web Server 3] Info: Using ID '35a92c74-ac2b-4d02-af1d-6eac7a53405a' for connections to the remote server.
[15:47:46][Deploying to Web Server 3] Info: Using ID '0e73566a-8692-4849-9a79-3c4afec7089b' for connections to the remote server.
[15:47:47][Deploying to Web Server 3] Total changes: 0 (0 added, 0 deleted, 0 updated, 0 parameters changed, 0 bytes copied)
That first "Using ID [guid] for connections to the remote server" step seems to have a very predictable and consistent 15 second delay every time.
Using NETSTAT, this piece of information stood out:
TCP 192.168.XXX.XXX:58265 23.47.144.26:80 SYN_SENT
[msdeploy.exe]
On the old machine, it doesn't try to access this IP, so this was unexpected. We're going to try fixing the firewall rules in our next maintenance window to let it through to see if that will work, but what is Web Deploy trying to do here?

Opening Port 80 to allow msdeploy.exe to call home (or whatever it's doing there) fixes the 15 second delay issues. Deployment times are now down to what was seen on the previous machine (2-3 seconds per server).

Related

Azure Server Database: error: 0 - The wait operation timed out

We use Azure Databases to hold our data for our web app.
All of a sudden as of 8pm Central Time on 10/12/2021, I am seeing this error:
A connection was successfully established with the server, but then an error occurred during the pre-login handshake. (provider: SSL Provider, error: 0 - The wait operation timed out.) (Microsoft SQL Server, Error: 258)
We are seeing this via SQL Server Management Studio and also when I debug within VS 2019.
This doesn't appear to happen with everyone on our team.
Is anyone else seeing issues with Azure database service?
Ping the Azure SQL database server to get the current IP address of the server.
C:\>ping <myserver>.database.windows.net
Pinging data.sn1-1.database.windows.net [65.55.74.144] with 32 bytes of data: Request timed out. Request timed out. Request timed out. Request timed out. Ping statistics for 65.55.74.144: Packets: Sent = 4, Received = 0, Lost = 4 (100% loss)
Once you get the IP, run a tracert to find out on what hop the communication gets timed out or has noticeable latency.
C:\>tracert 65.55.74.144
Tracing route to 65.55.74.144 over a maximum of 30 hops
1 2 ms 1 ms 1 ms 192.168.0.1
2 6 ms 5 ms 5 ms 10.33.34.50
3 5 ms 4 ms 5 ms 4-1-753.DLLSTX-LCR-07.verizon-gni.net [130.81.107.26]
4 8 ms 5 ms 5 ms so-6-2-0-0.DFW01-BB-RTR1.verizon-gni.net [130.81.28.208]
5 44 ms 43 ms 44 ms so-11-0-0-0.LCC1-RES-BB-RTR1-RE1.verizon-gni.net [130.81.17.40]
6 49 ms 44 ms 44 ms so-6-0-0-0.ASH-PEER-RTR1-re1.verizon-gni.net [130.81.10.90]
Sometimes you experience this when you are trying to get connected to SQL Azure using a VPN software on the corporate network, but when you get connected from home you are fine.
It appears that this issue was due to my home network ISP.
I assume the ISP accidently changed a setting for port 1433. I called the ISP, they reconfigured my modem, I rebooted and it still didn't work.
Then about 30 minutes to 45 minutes later, it started working perfect, without any issues within my local debug session in VS 2019 OR with trying to access the Azure database via SSMS.
We also had another developer that was seeing the same issue and he had the same ISP provider since he lives about 15 minutes from me.
All other developers were working fine because they had different ISPs

WLST : Which mBean to access deployments>monitoring>workload>Work Managers

I am working on rolling weblogic manager servers start up scripts using python and wlst.
Once server is started and comes in running mode I have to check if manage server Completed Requests > 0. If its more than 0 then proceed to next manager server and bring it down.
So I am looking to access the Completed Requests count using wlst but not sure which mBean to use which can provide me the details.
I can see the detail in weblogic console from below path
domain>Deployments>Monitoring>Work Load>Work Manager (default)
How to find the exact mBean to access the above details.

Cannot find SQL Instance name on network PC

I have been facing this type of situation a dozen of times now and final want a permanent solution to it.
Problem
Cannot find Server PC's SQL Instance name on client PC.
Note:- I have installed SQL Express And Management Studio on both server and client
Server PC Name : M-PC
Server SQL Version : SQL Server 2008
Client PC Name : SHIVANG
Client SQL Version : SQL Server 2008
Client's PC SQL Server Screenshot
Solution that i have tried
1) Switching OFF firewall of both server and client PC completely (Domain, Private & Public)
2) Enabling and restarting the services : SQL Server and Browser Service
3) Enabling SQL Network Configuration settings
4) Also enabled "Allow remote connection" from SQL Server of both the PC
5) Networking between both the PC is perfect can access files through network of both the PC.
6) Even changed the IP configuration settings from obtain to static of both the PC (IP of Server is 192.168.1.41 and IP of client is 192.168.1.44)
7) I have completely uninstalled SQL Express and Management Studio from client and server and installed it again.
8) I also told my client to format the PC and then installed SQL Express and Management Studio. Still nothing.
9) They don't have any antivirus on any of the system (to block the connection)
FUN PART
Now the fun part here is while i was fiddling with the settings of client and server PC. Server PC started showing the client PC SQL Instance while client PC was still unable to find the server SQL Instance.
Below image is of Server PC's SQL Server
Below image is of Client PC's SQL Server
Here are the following settings i have been fiddling with:-
Changed IP from Obtain to Static of both the PC's (client and server)
Changed the Protocol : TCP/IP of SQL of both the PC's (client and server) [sorry i forgot to get the screenshots of it and was fiddling with it even more when the server PC stopped showing the client's PC SQL Instance]
Now i don't have a clue what to do next to solve this problem. Please help me if you can.
Thanks in advance
There are two levels of security that need to be changed in order to allow remote access.
SQL Server configuration: By default in Express, Developer, and
Enterprise Evaluation editions, connecting by the TCP/IP protocol is disabled. Enable this using SQL Server Configuration Manager.
Windows Firewall: While disabling the firewall entirely will work
for this component, doing so is not a security best-practice (nor is it
required). (Note: in this section, I assume a default
configuration. There are many settings that can be changed which
affect these steps slightly.)
There are two cases depending on the type of SQL Server instance you're connecting to:
Default instance (connect by computer name only). Add an allow
incoming rule either on TCP port 1433 or the database engine service
.
Named instance (connect by computer name + instance name). Add an
allow incoming rule on UDP port 1434 to access to the SQL Browser
service. Add an allow incoming rule on the database engine service.
Microsoft Step by Step Tutorial to Getting Started With DB
Sharing
Reference Stack
A Youtube Tutorial
I don't have a definitive answer for your inconsistent results but I do have some background information that may help you troubleshoot the problem.
SQL instances are enumerated using the SQL Server Resolution Protocol. This is an application layer protocol that uses UDP (not TCP) to send enumeration requests to servers on the local subnet and receive responses as shown in the communication flow for multi-instance discovery diagram. It is the SQL Server Browser services that listens on UDP port 1434 to handle enumeration requests.
Importantly, the UDP multicast protocol does not guarantee requests or responses are delivered. Consequently, loss may occur that can only be detected by a network trace. The SQL Server Resolution Protocol cannot know why no response was received; it could be because a server is down, network problem, firewall, SQL instance hidden, etc. Also UDP multicast requests are delivered only to devices on the local subnet so resolution is limited to those machines.
The PowerShell script below sends a UDP request to a specific host. You can run this to ensure the SQL Browser service responds with the expected information about the instance(s) on the host.
Function List-Instances($hostName)
{
Write-Host ("Retrieving information from SQL Server Browser service on host $HostName ...");
try
{
$udpClient = new-object Net.Sockets.UdpClient($HostName, 1434);
$bufferLength = 1;
$browserQueryMessage = new-object byte[] $bufferLength;
$browserQueryMessage[0] = 2; # list all instances
$bytesSent = $udpClient.Send($browserQueryMessage, $browserQueryMessage.Length);
$udpClient.Client.ReceiveTimeout = 10000;
$remoteEndPoint = new-object System.Net.IPEndPoint([System.Net.IPAddress]::Broadcast, 0);
$browserResponse = $udpClient.Receive([ref]$remoteEndPoint);
$payloadLength = $browserResponse.Length - 3;
$browserResponseString = [System.Text.ASCIIEncoding]::ASCII.GetString($browserResponse, 3, $payloadLength);
$browserResponseString
$elements = $browserResponseString.Split(";");
$elements
$namedInstancePort = "";
Write-host "SQL Browser Data:" -ForegroundColor Green;
$i = 0;
while($i -lt $elements.Length)
{
if([String]::IsNullOrEmpty($elements[$i]))
{
Write-Host "";
$i += 1;
}
else
{
Write-Host $(" " + $elements[$i] + "=" + $elements[$i+1]) -ForegroundColor Green;
$i += 2;
}
}
}
catch [Exception]
{
Write-host $("ERROR: " + $_.Exception.Message) -ForegroundColor Red;
}
}
# send request to SQL Brower service to enumerate all SQL instances running on specific host
List-Instances -hostName "SomeMachine";
In summary, successful resolution requires:
SQL Server Browser Service must be running
UDP port 1434 must be allowed through the firewall
The servers must be on the same subnet
No UDP packet loss
The servers respond in a timely manner
First, confirm the firewall settings. Install SQL Server Management Studio on a non-host LAN computer and check that you can connect using the IP address of the host. This may mean messing around with logon rights if SA is not enabled on the host server.
SQL Server Services > SQL Server Browser > Right Click > Properties > Service > Start Mode > Automatic.
SQL Server Services > SQL Server Browser > Right Click > Properties > Start
Open command prompt on host and/or LAN computer and execute:
sqlcmd -L
When you install SQL Express , you can't access it from network or remotely.
unless you configure the remote access option
1 - In Object Explorer, right-click a server and select Properties.
2 - Click the Connections node.
3 - Under Remote server connections, select or clear the Allow remote connections to this server check box.

Azure cloud service hosted website stops connecting database suddenly

I have a website hosted on azure cloud services. The configuration is - Java 7, Tomcat 7, SQL Azure. Nowadays I am running into a problem. Suddenly, my website stops responding to pages which require database connectivity. I have used Apache Commons DBCP for connection pooling. I have checked all the logs but I could not find any connection failure logs. I have checked the DB connections on azure portal, which also looks okay to me. Please help me out on this and let me know what other information is required.
here is sql connection configuration-
min connections - 20
max connections 200
num helpers - 10

Remote backup imap

I must archive to email with 1 server to 2 server temporarily and upload to 3 server. Why? My client is changing the server. Resigns from 1 server and want to buy a server 3. Server 2 is my. How can I make remote copies of IMAP?
old server -> my server -> new server...
imapsync perhaps, although that copies one user's mail, not the entire server.