Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Web deploy error ERROR_DESTINATION_NOT_REACHABLE

I am trying to deploy my application using the following msdeploy command:

MSDeploy.exe -source:contentPath="C:\Users\myUser\Documents\ui\dist" -dest:contentPath='c:/inetpub/wwwroot/dist',computerName="https://ec2-xx-xxx-xx-xx.ap-northeast-1.compute.amazonaws.com:8172/MSDeploy.axd?site=Default Web Site",username="administrator",password="XXXXXXXXX",authtype="Basic",includeAcls="False" -verb:sync -allowUntrusted

Getting the following error:

Working...
    Info: Using ID '01657062-cece-4713-8dc6-585537b265fd' for connections to the rem
    ote server.
    >> Error Code: ERROR_DESTINATION_NOT_REACHABLE
    >> More Information: Could not connect to the remote computer ("ec2-52-207-222-6
    5.compute-1.amazonaws.com"). On the remote computer, make sure that Web Deploy i
    s installed and that the required process ("Web Management Service") is started.
      Learn more at: http://go.microsoft.com/fwlink/?LinkId=221672#ERROR_DESTINATION
    _NOT_REACHABLE.
    >> Error: Unable to connect to the remote server
    >> Error: 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 xx.xxx.xx.xx:8172

I tried the same command for 6 other servers and it worked fine, but not working for 2 of the servers which are configured the same way.

  1. All the IIS installables are in place
  2. Firewall inbound rule for port 8172 (TCP) is in place, There are no issues with the other Firewall rules as i have turned the Firewalls off
  3. Installed Web Deploy 3.6 and Web deploy 3.6 for Hosting servers
  4. Made sure Web Management Service,Web Deployment Agent Service is started and set to Automatic

What am i missing ?

like image 940
hakuna Avatar asked Jul 08 '16 16:07

hakuna


3 Answers

Added the rule to security group for port 8172 and it started working. But i have no clue why it was working from Visual studio before and not from command prompt.

like image 177
hakuna Avatar answered Oct 23 '22 19:10

hakuna


To successfully deploy your website on to windows server using Web deploy, make sure the following is in place.

  1. The site names must be exactly matched in both Visual studio and on IIS server

  2. Make sure the sever installed with the same.net framework as your visual studio (e.g ASP, ASP.net 4.5…)

  3. Make sure port 8172 is open on the server(8172 is used for web deploy)

like image 20
Hung Vu Avatar answered Oct 23 '22 18:10

Hung Vu


The following step fixed my issue.

While installing web deploy on a windows server, please ensure to select 'Complete' feature installation instead of 'Typical' or 'Custom'. Once installation is done you will be able to deploy an application from visual studio.

enter image description here

like image 2
Gaurav Lolge Avatar answered Oct 23 '22 18:10

Gaurav Lolge