¿Puede el agente web deploy ejecutarse en un puerto que no sea 80 en IIS6?
Tengo un pequeño desafío con una máquina Windows 2003 donde necesito ejecutar el agente web deploy en un puerto que no es 80. De forma predeterminada, MsDepSvc expondrá un punto final en http: / / [server] / MsDeployAgentService que obviamente escucha implícitamente en el puerto 80.
El problema que tengo es que la máquina también está ejecutando Visual SVN Server que está utilizando el puerto 80 y, como resultado, el servicio web deployment agent se niega a iniciar. (Al menos esta es la única conclusión lógica que puedo dibujar.) Tengo una pequeña aplicación de administración de SVN en la misma máquina que me gustaría publicar a través de web deploy de ahí el dilema.
Es posible ejecutar el agente en otro puerto? Obviamente si esto fuera IIS7 estaríamos en 8172 y todo estaría bien pero desafortunadamente ese no es el caso aquí. Alguna sugerencia?
4 answers
Hay un par de maneras de hacer esto:
Opción 1: Desinstale y vuelva a instalar Especificando un puerto diferente:
msiexec /I WebDeploy_x86_en-US.msi /passive ADDLOCAL=ALL LISTENURL=http://+:8172/MsDeployAgentService
La línea de comandos instala el MsDeployAgentService y lo configura para que escuche en el puerto 8172 al igual que en IIS7.
Opción 2: Vuelva a configurar el Servicio existente para escuchar en el puerto 8172:
Detener el msdepsvc (
net stop msdepsvc
)-
Edite el siguiente valor del registro:
HKLM\SYSTEM\CurrentControlSet\Services\MsDepSvc\Parameters\ListenUrl
Se verá algo como:
http://+:80/MsDeployAgentService
Cambiar a:
http://+:8172/MsDeployAgentService
-
Oyentes HTTP de consulta:
httpcfg query urlacl
Debería ver la siguiente entrada listada en los resultados:
URL : http://+:80/MsDeployAgentService/ ACL : D:(A;;GX;;;NS)
-
Modificar el oyente:
httpcfg delete urlacl /u http://+:80/MsDeployAgentService/
Esto debería responder con:
HttpDeleteServiceConfiguration completed with 0.
httpcfg set urlacl /u http://+:8172/MsDeployAgentService/ /a D:(A;;GX;;;NS)
Esto debería responder con:
HttpSetServiceConfiguration completed with 0.
El ACL especificado en el interruptor
/a
debe coincidir con el ACL reportado por el comandohttpcfg query urlacl
Reiniciar el msdepsvc (
net start msdepsvc
).-
Puede confirmar que el servicio está escuchando en el puerto 8172 haciendo:
netstat -an
Usted debe ver lo siguiente:
TCP 0.0.0.0:8172 0.0.0.0:0 LISTENING
Advertencia:
Primero probaría esto en una máquina que no sea de producción para asegurarme de que funciona como esperas.
Warning: date(): Invalid date.timezone value 'Europe/Kyiv', we selected the timezone 'UTC' for now. in /var/www/agent_stack/data/www/ajaxhispano.com/template/agent.layouts/content.php on line 61
2011-05-16 10:19:23
Estos son los cambios que tuve que hacer para Windows 7, siguiendo la receta de Kev:
Paso 3:
netsh http show urlacl
Paso 4:
netsh http delete urlacl url=http://+:80/MSDEPLOYAGENTSERVICE/
netsh http add urlacl url=http://+:8172/MSDEPLOYAGENTSERVICE/ sddl=D:(A;;GX;;;NS)
Warning: date(): Invalid date.timezone value 'Europe/Kyiv', we selected the timezone 'UTC' for now. in /var/www/agent_stack/data/www/ajaxhispano.com/template/agent.layouts/content.php on line 61
2012-10-06 01:33:43
Por si sirve de algo, pegué juntos el sólido consejo de Kev en un script por lotes para una parada de compras en el cambio de números de puerto.
:: Name: MsDepSvc.Port.cmd
:: Purpose: Modifies the TCP/IP port that the Web Deployment Agent Service
:: (MsDepSvc) listens on. Tested on Win7 Enterprise 32-bit.
:: Author: [email protected]
:: Revision: January 2013
@ECHO OFF
SETLOCAL ENABLEEXTENSIONS
SETLOCAL ENABLEDELAYEDEXPANSION
:: variables
SET me=%~n0
SET url=
SET port=
IF NOT "%~1"=="" (
SET /A port=%~1
)
ECHO %me%: Web Deployment Agent Service (MsDepSvc) port change script
:: default argument values
IF "%port%"=="" (
SET /A port=8172
ECHO %me%: INFO - using default port value of 8172
)
SC.EXE query msdepsvc >NUL 2>NUL
IF NOT "%ERRORLEVEL%"=="0" (
ECHO %me%: ERROR - MsDepSvc not installed
ECHO %me%: exiting
EXIT /B 1
)
ECHO %me%: stopping MsDepSvc
NET STOP msdepsvc >NUL 2>NUL
:: check if the default port is set
REG.EXE QUERY HKLM\SYSTEM\CurrentControlSet\Services\MsDepSvc\Parameters /v ListenUrl >NUL
IF NOT "%ERRORLEVEL%"=="0" (
ECHO %me%: ERROR - MsDepSvc ListenUrl registry key not found
REG.EXE QUERY HKLM\SYSTEM\CurrentControlSet\Services\MsDepSvc\Parameters
ECHO %me%: exiting
EXIT /B 2
)
FOR /F "tokens=3" %%I IN ('REG.EXE QUERY HKLM\SYSTEM\CurrentControlSet\Services\MsDepSvc\Parameters /v ListenUrl ^| FINDSTR ListenUrl') DO (
SET url=%%I
)
ECHO %me%: INFO - MsDepSvc current reservation is "%url%"
NETSH.EXE http show urlacl "%url%" >NUL
IF NOT "%ERRORLEVEL%"=="0" (
ECHO %me%: ERROR - reservation for "%url%" not found
EXIT /B 4
)
:: save the existing urlacl properties for User, Listen, Delegate, and SDDL
FOR /F "tokens=1,* delims=: " %%A IN ('NETSH.exe http show urlacl %url% ^| FINDSTR "User Listen Delegate SDDL"') DO (
SET URLACL.%%A=%%B
)
IF NOT DEFINED URLACL.User ECHO %me%: Failed to read the exising URLACL setting for User &&GOTO :ERROR
IF NOT DEFINED URLACL.Listen ECHO %me%: Failed to read the exising URLACL setting for Listen &&GOTO :ERROR
IF NOT DEFINED URLACL.Delegate ECHO %me%: Failed to read the exising URLACL setting for Delegate &&GOTO :ERROR
IF NOT DEFINED URLACL.SDDL ECHO %me%: Failed to read the exising URLACL setting for SDDL &&GOTO :ERROR
ECHO %me%: updating MsDepSvc to listen on port %port%
REG.EXE ADD HKLM\SYSTEM\CurrentControlSet\Services\MsDepSvc\Parameters /v ListenUrl /t REG_SZ /f /d "http://+:%port%/MSDEPLOYAGENTSERVICE/"
ECHO %me%: deleting the existing reservation for MsDepSvc
NETSH.EXE http delete urlacl "%url%" || GOTO :ERROR
ECHO %me%: adding the port %port% reservation for MsDepSvc
NETSH.EXE http add urlacl url=http://+:%port%/MsDeployAgentService/ user="%URLACL.User%" listen="%URLACL.Listen%" delegate="%URLACL.Delegate%" SDDL="%URLACL.SDDL%" || GOTO :ERROR
ECHO %me%: starting MsDepSvc
NET START msdepsvc >NUL 2>NUL
ECHO %me%: process info for MsDepSvc
QUERY.EXE PROCESS MSDEPSVC.EXE
ECHO.
ECHO %me%: port bindings for MsDepSvc
NETSTAT.EXE -a -n -o | FINDSTR /R "TCP.*:%port%.*LISTENING Proto"
ECHO.
ECHO %me%: finished
:END
ENDLOCAL
ECHO ON
@EXIT /B 0
:ERROR
ECHO %me%: ERROR - exiting with errorlevel %ERRORLEVEL%
ECHO ON
@EXIT/B %ERRORLEVEL%
Leer más:
Warning: date(): Invalid date.timezone value 'Europe/Kyiv', we selected the timezone 'UTC' for now. in /var/www/agent_stack/data/www/ajaxhispano.com/template/agent.layouts/content.php on line 61
2013-02-28 22:33:20
También vale la pena conocer la magia detrás de averiguar qué propiedad se almacena en qué clave de registro - enter Orca.exe - herramienta invaluable y fácil de usar para leer/modificar la base de datos MSI (intente no modificarla).
Primero, necesitamos encontrar la propiedad en la tabla de propiedades
Una vez que se encuentra la propiedad, vaya a la tabla de Registro y busque dónde está insertada.
Warning: date(): Invalid date.timezone value 'Europe/Kyiv', we selected the timezone 'UTC' for now. in /var/www/agent_stack/data/www/ajaxhispano.com/template/agent.layouts/content.php on line 61
2016-11-08 15:59:17