1
2

Delete article

Deleted articles cannot be recovered.

Draft of this article would be also deleted.

Are you sure you want to delete this article?

More than 3 years have passed since last update.

MacのAnsibleでwindows serverに接続しようとしたときに発生したエラー [ERROR! A worker was found in a dead state]

Posted at

環境

  • macOS Catalina バージョン 10.15.2
ansible: 2.9.2
  config file = None
  configured module search path = ['/Users/aoshima/.ansible/plugins/modules', '/usr/share/ansible/plugins/modules']
  ansible python module location = /Users/aoshima/.local/share/virtualenvs/tests-jeV_LJ4f/lib/python3.7/site-packages/ansible
  executable location = /Users/aoshima/.local/share/virtualenvs/tests-jeV_LJ4f/bin/ansible
  python version = 3.7.6 (default, Dec 30 2019, 19:38:26) [Clang 11.0.0 (clang-1100.0.33.16)]

エラー内容

Ansibleからwin_pingでwindows serverへの接続確認を行なおうとしたらエラーがでた。

$ ansible windows -i ./inventory -m win_ping
objc[47572]: +[__NSPlaceholderDate initialize] may have been in progress in another thread when fork() was called.
objc[47572]: +[__NSPlaceholderDate initialize] may have been in progress in another thread when fork() was called. We cannot safely call it or ignore it in the fork() child process. Crashing instead. Set a breakpoint on objc_initializeAfterForkError to debug.
objc[47571]: +[__NSPlaceholderDate initialize] may have been in progress in another thread when fork() was called.
objc[47571]: +[__NSPlaceholderDate initialize] may have been in progress in another thread when fork() was called. We cannot safely call it or ignore it in the fork() child process. Crashing instead. Set a breakpoint on objc_initializeAfterForkError to debug.
ERROR! A worker was found in a dead state

回避策

https://github.com/ansible/ansible/issues/34056#issuecomment-352862252 でワークアラウンドを説明してくれていた。macOSのpythonの問題らしいが、すぐには理解できそうになかったので放置...

$ export OBJC_DISABLE_INITIALIZE_FORK_SAFETY=YES

これで接続できるようになった。

1
2
0

Register as a new user and use Qiita more conveniently

  1. You get articles that match your needs
  2. You can efficiently read back useful information
  3. You can use dark theme
What you can do with signing up
1
2

Delete article

Deleted articles cannot be recovered.

Draft of this article would be also deleted.

Are you sure you want to delete this article?