Open ajrgrubbs opened 7 years ago
I get this same error when using the requests
API, on High Sierra.
Probably related to this https://bugs.python.org/issue30837
https://github.com/ansible/ansible/issues/31869#issuecomment-337769174
See this solution
(just seen that this solution is mentioned above. wow i should read more)
@ajrgrubbs please could you retest using the latest python version from python.org. My testing on a the aws_ssm lookup module seems to show that there is some fix included there.
@mikedlr unfortunately no longer have the means to retest - traded the mac for a PC since I created this issue. My apologies!
I would also mention that you need to export no_proxy='*'
as found on this webpage. Otherwise you will get messages like ERROR! A worker was found in a dead state
.
I'm running in macOS 10.13.3 , a python virtualenv with python version 2.7.10 and tip of master.
@snoby : That's true, but not related to the issue; I get the worker was found in a dead state
issue on macOS 10.12, but the may have been in progress in another thread
issue on macOS 10.13.
I would also mention that you need to export
no_proxy='*'
as found on this webpage. Otherwise you will get messages likeERROR! A worker was found in a dead state
. I'm running in macOS 10.13.3 , a python virtualenv with python version 2.7.10 and tip of master.
the first env var stopped working here so setting no_proxy='*'
saved me now :), tks!
Summary: Attempting to use this plugin on High Sierra is causing a python crash. Reproduced on both Python 2.7.14 and 3.6.2 (installed with brew). Unable to reproduce with other lookup plugins.
Reproduction: A simple playbook with a debug step will do:
Symptoms: In the terminal which executes this playbook, the output looks like:
Additional notes: This appears to be due to some low-level objective-C changes introduced in High Sierra. This article (http://sealiesoftware.com/blog/archive/2017/6/5/Objective-C_and_fork_in_macOS_1013.html) has more details. It also provides a workaround: Setting the environment variable
OBJC_DISABLE_INITIALIZE_FORK_SAFETY=YES
. Setting this before running ansible provides successful results.I'll be honest, I have no clue what the "correct" fix is here, or even if it can be made in this plugin (as opposed to ansible or python itself). Mostly I'm documenting this here in case others come across this issue - I hope someone finds this useful. I'm content with using the environment variable for the time being.