簡體   English   中英

msdeploy 停止工作,出現錯誤代碼:ERROR_USER_NOT_ADMIN

[英]msdeploy stop working, getting error Code: ERROR_USER_NOT_ADMIN

我正在使用 msdeploy 將代碼部署到開發服務器。 今天早上它停止工作。 我收到 ERROR_USER_NOT_ADMIN。 什么都沒有改變,至少不是我所知道的。

abc\\jqin,這個用戶是域賬號,是本地管理員。 為什么我仍然收到 ERROR_USER_NOT_ADMIN

部署:“C:\\Program Files\\IIS\\Microsoft Web Deploy V3\\msdeploy.exe” -verb:sync -source:package="C:\\NetBuild\\Packages\\IRViewerSvc\\IRViewerSvc.zip" -dest:iisApp=IRViewerSvc, computerName=tvw-irwebsvc,username="abc\\jqin",password=******** 信息:使用 ID '51e98b9d-456e-4c7e-8f1a-c696c240f431' 連接到遠程服務器。 EXEC:錯誤代碼:ERROR_USER_NOT_ADMIN [C:\\NetBuild\\BuildScript\\IRViewerSvc.build]
更多信息:使用 Web 部署代理服務連接到“tvw-irwebsvc”,但無法授權。 確保您是“tvw-irwebsvc”的管理員。 了解更多信息: http : //go.microsoft.com/fwlink/?LinkId=221672#ERROR_USER_NOT_ADMIN 錯誤:遠程服務器返回錯誤:(401) 未經授權。 [C:\\NetBuild\\BuildScript\\IRViewerSvc.build] EXEC:錯誤計數:1。[C:\\NetBuild\\BuildScript\\IRViewerSvc.build] C:\\NetBuild\\BuildScript\\IRViewerSvc.build(71,5):錯誤 MSB3073:命令 ""C:\\Program Files\\IIS\\Microsoft Web Deploy V3\\msdeploy.exe" -verb:sync -source:package="C:\\NetBuild\\Packages\\IRViewerSvc\\IRViewerSvc.zip" -dest:iisApp=IRViewerSvc ,computerName=tvw-irwebsvc,username="abc\\jqin",password=********" 以代碼 -1 退出。 完成構建項目“C:\\NetBuild\\BuildScript\\IRViewerSvc.build”(部署目標)——失敗。

嘗試搜索 mmc 並運行它單擊文件添加或刪除管理單元,選擇本地用戶和組點擊確定。 單擊用戶取消選中所有內容並只選中密碼永不過期。

如果 MSDepSvcUsers 不存在,現在轉到組添加新組,雙擊它並將您的用戶添加為成員。

轉到服務並重新啟動 Web 部署代理服務。

現在嘗試運行您的 MSDeploy。

我希望這可以幫到你。 特羅薩戈

由於以下原因,此處發布的 NetLogon 解決方案在我們的 AWS EC2 Windows Server 2019 實例上不起作用:

This computer is configured as a member of a workgroup, not as a member of a domain. The Netlogon service does not need to run in this configuration.

此處發布的 MSDepSvcUsers 解決方案也無法完全運行:

[16:19:20]  Error: (2/10/2020 5:19:20 PM) An error occurred when the request was processed on the remote computer.
[16:19:20]  Error: An error occurred when reading the IIS Configuration File 'MACHINE/REDIRECTION'. The identity performing the operation was 'EC2AMAZ-ABCDEFG\SomeUserName'.
[16:19:20]  Error: Filename: \\?\C:\Windows\system32\inetsrv\config\redirection.config
[16:19:20]  Error: Cannot read configuration file due to insufficient permissions

如此處所述: https : //social.msdn.microsoft.com/Forums/vstudio/en-US/083efb2e-d087-4a03-9f6a-662a218cacf8/machineredirection-error?forum=tfsgeneral

為執行部署的用戶添加對包含 redirection.config 文件的文件夾的讀取和執行和讀取訪問權限並沒有解決問題,但為同一文件夾上的 NETWORK SERVICE 用戶添加讀取權限可以解決問題。

我最近遇到了一個埋葬問題,其中構建失敗並顯示 ERROR_USER_NOT_ADMIN。

這是在操作系統升級到 Windows 2016 之后。

MsDeploy 的錯誤在我們的情況下並不完全正確,我們注意到如果部署用戶遠程連接到服務器上,部署將成功完成。

在查看事件日志時,我注意到有一個錯誤指出部署帳戶無法登錄,原因是“NetLogon 組件未處於活動狀態”。

果然,NetLogon 服務被停止了。 啟動它意味着部署再次起作用。

暫無
暫無

聲明:本站的技術帖子網頁,遵循CC BY-SA 4.0協議,如果您需要轉載,請注明本站網址或者原文地址。任何問題請咨詢:yoyou2525@163.com.

 
粵ICP備18138465號  © 2020-2024 STACKOOM.COM