1

Windows Server 2012 r2 に Chef-server-11.04 とchef-client 11.12.4-1 を使用しています。Windows クライアントで Active Directory powershell コマンドを実行しようとしています。使用するとレシピの実行に失敗する

ナイフ ブートストラップ Windows winrm 10.XX.XXX.XX -x ユーザー名 -P xxxxxxx -r Adpowershell

また

*knife winrm "name:example.co.in" "chef-client -r Adpowershell " -x ユーザー名 -P xxxxxxx

エラーは、サーバーに接続できません。これは、このサーバーが存在しないか、現在ダウンしているか、Active Directory Web サービスが実行されていないことが原因である可能性があります

ナイフ コマンドは、Active Directory powerwshell コマンド以外の他の powershell コマンドに対して成功します。

しかし、ノードでローカルにchef-clientを使用して試してみると、レシピは正常に実行されました。

このサーバーに接続できないことに関して、さまざまなリンクを参照しました。しかし、Windows 2012 r2 の解決策は見つかりませんでした。誰でもこの問題の解決策を教えてもらえますか

4

1 に答える 1

0

サーバーで次を実行します。

winrm quickconfig -q
winrm set winrm/config/winrs '@{MaxMemoryPerShellMB="300"}'
winrm set winrm/config '@{MaxTimeoutms="1800000"}'
winrm set winrm/config/service '@{AllowUnencrypted="true"}'
winrm set winrm/config/service/auth '@{Basic="true"}'
netsh advfirewall firewall add rule name="WinRM 5985" protocol=TCP dir=in localport=5985 action=allow
netsh advfirewall firewall add rule name="WinRM 5986" protocol=TCP dir=in localport=5986 action=allow  
于 2015-05-08T15:00:59.320 に答える