Why would a Visual Studio Web Deploy have a failure of "unexpected error occurred on a send" when publishing to an intranet site that resolves as an IPv6 address? I am assuming IPv6 had something to do with it because adding the IPv4 address to the hosts file resolves the issue and the web deploy succeeds.
Details:
Initially the build error came from a TeamCity build agent, but the same issue occurs when attempting to publish (or just validate the connection in the publish profile) from Visual Studio.
A ping (successful) to the target machine resolves to an IPv6 address which is identical to the address found from running "ipconfig" on the target machine itself, except for a different Scope ID on the tail end.
Windows UNC share paths to the target machines work fine
The target machine is actually the host of the VM on which the build agent runs.
Below is the error from validating connection on publish profile.
And detail from the original build/deploy attempt.
C:\Program Files (x86)\MSBuild\Microsoft\VisualStudio\v14.0\Web\Microsoft.Web.Publishing.targets(4276, 5): Web deployment task failed. (Could not complete the request to remote agent URL 'https://tapserver:8172/msdeploy.axd?site=MealPlannerCIAPI'.)
This error indicates that you cannot connect to the server. Make sure the service URL is correct, firewall and network settings on this computer and on the server computer are configured properly, and the appropriate services have been started on the server.
Error details:
Could not complete the request to remote agent URL 'https://tapserver:8172/msdeploy.axd?site=MealPlannerCIAPI'.
The underlying connection was closed: An unexpected error occurred on a send.
Unable to read data from the transport connection: An existing connection was forcibly closed by the remote host.
An existing connection was forcibly closed by the remote host
Again I've fixed the issue, but it is a very baffling fix to me. What would break any of the msdeploy calls that is fixed by adding the IPv4 address to the hosts file when it is clearly already reaching that host using v6?
Have you checked the Option IP Address Restrictions in the Management Service-Configuration (IIS)?
Please be aware that you're always connecting with your local IPv6 address if you try to access an IPv6 target. If you have configured any restrictions, they won't apply for your IPv6 address as the restriction configuration is not compatible with IPv6. So your connection attempt will be declined automatically if you set Access for unspecified clients to Deny.
Related
I am using Conveyor by Keyoti visual studio 2019 extension I ran application on my home network and accessed that application over my other remote device successfully.
But when I get connected to my university network the Conveyor by Keyoti failed to update the IP ADDRESS over my university network and kept showing the home's network IP ADDRESS due to which localhost failed to connect.
I deleted and re-installed the extension many times but its not updating the IP ADDRESS due to which I am unable to access the localhost.What could be the possible reason for this and how to update it as my network changes ?
Have you checked the IP address here?And have you tried to reset all settings?
It looks like this extension is reading IPv4 ip address from all of my network adapter. So did you see 192.168.x.x in your cmd "ipconfig" command line?
I am trying to setup build servers, and a mac available for remote builds in VS. As results I have a Synology server setup with VPN enabled. The Firewall and all settings are setup according to the synology guide. I have then enabled port forwarding on my linksys WRT1900ACS router, for the three ports needed (500,1701,4500), which is also enabled in the firewall on the router. I then access the VPN locally without any issues, tried with different guides (guide1 guide2 guide3).
I then create copies of the vpn connection and inserting my static IP from my ISP. I logon to a tethered internet from my phone, as to ensure the network is different. I then get an error:
local l2tp connection attempt failed because the security layer encountered a processing error during initial negotiations.
Searching it seems like it is an error with the registry (reg 1 reg 2). Changing that just makes the vpn connection hang. What am I doing wrong? After waiting a long period of time (several minutes), the same error returns.
I have also tested on an Ipad using the settings defined in ios-settings.
For others the above guides solves the issue if you have a static IP. You however have to ensure that your ISP, have allowed the traffic, and that your router does not receive a double IP registration, rendering your static IP invalid.
which was the case for me.
I am using TeamCity version 10.4. I am trying to create the database on my local machine.
However, I am getting this error:
The connection to the host localhost, named instance hsalman-pc failed. Error: "java.net.SocketTimeoutException: Receive timed out".
Verify the server and instance names and check that no firewall is blocking UDP traffic to port 1434. For SQL Server 2005 or later,
verify that the SQL Server Browser Service is running on the host.
I have the required driver here:
Aslo, I cannot locate the database properties file in the data directory. So what is the problem?
I have a Windows Azure VM running VS2013 Load Test Controller and a second Azure VM running 2013 Load Test Agent.
I have not been able to get the two communicating successfully. I added the hostname and IP of each VM to the other's HOSTS file. I also created a local admin account with the same username and password on both machines. Neither machine is joined to a domain. I have also created endpoints for each VM to port 6901/TCP. I am able to telnet from the agent VM to port 6901 on the controller VM.
When I apply the test agent configuration settings, it fails on "Test agent could not connect to the test controller." In the agent configuration log, I see:
Could not get the status from the test agent. Exception: Failed to
connect to an IPC Port: The system cannot find the file specified.
In the event viewer, I see:
Unable to connect to the controller on 'controllerVM:6901'. The agent
can connect to the controller but the controller cannot connect to the
agent because of following reason: 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 168.62.XX.XX:6910. Make sure that the firewall on the test
agent machine is not blocking the connection.
I have been completely unable to work around this issue so far. I need help please.
Can you Check your c:\windows\system32\drivers\etc\hosts file both agent and controler .
If there is an entry assigned to 127.0.0.1 remove that.
When you install the Agent/Controller, be sure to use the same user (Admin) Account (Run as...). This account have to be in the group TeamTestAgentService on the controller.
In addition, after setup, the wizard will try to connect agent to the test controller. What's the status ?
MSDN explains here how to install/configure the test rig in a workgroup.
There is also a complete troubleshoot guide here.
I'm at a loss to explain this behavior with web servers on windows. It's in a domain environment with windows firewall set as domain policy.
local web servers - both as localhost:port and FQDM:port
Tomcat OK
IIS OK
WEBrick OK
Jenkin's server - OK
remote access - using FQDM:port
Tomcat No connection
IIS No connection
WEBrick OK
Jenkin's server - OK
What I don't understand what WEBRick and the server Jenkins uses to accept remote connections.
Are there other diagnostics I should look into?
Is it possible to configure Tomcat to use a similar approach?
I can't tell much about WEBRick or Jenkins, but for Tomcat - if you look at Tomcat 7 source (StandardServer.java), you'll see:
// Set up a server socket to wait on
try {
awaitSocket = new ServerSocket(port, 1,
InetAddress.getByName(address));
} catch (IOException e) { ... }
This means, whatever you specify in address (in your server.xml), goes through this.
The contract of InetAddress.getByName says:
The host name can either be a machine name, such as "java.sun.com", or
a textual representation of its IP address. If a literal IP address is
supplied, only the validity of the address format is checked.
If I was you, I'd try setting just the IP address first and see if there are any problems.
The second step is to check whether you have got local name resolution policy incorrect (hosts file). I've been in situations where local hosts file was incorrect or contained non-resolvable entries, causing all sorts of weird issues like the one you're having.
It sounds like your remote request are never reaching the services that don't reply. And that implies it's a firewall or NAT issue. I don't think it's a configuration issue since you said from the local machine localhost:port and FQDN:port both work.
To diagnose, a good first step is to see if there is any communication remotely with telnet.
telnet hostname port
If you don't see a Connected to FQDN. response, then a firewall, hardware or the local software firewall, blocked the connection. You will need to make sure the firewalls in the way have all the proper ports open, forwarding, etc.