如果在Mac上执行Ansible的prometheus集合时出现错误,应采取以下解决方法
当我尝试使用Ansible的prometheus集合时,在遇到错误时遇到了一些困难,所以做了一些备忘。
当试图执行role时,Python在以下部分崩溃了。
TASK [prometheus.prometheus.node_exporter : Get checksum list from github] ************************************************************************************************************************************
objc[69554]: +[__NSPlaceholderDate initialize] may have been in progress in another thread when fork() was called.
objc[69554]: +[__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
解决方案 (jiě jué àn)
在运行时设置环境变量
$ export OBJC_DISABLE_INITIALIZE_FORK_SAFETY=YES
这样就不再崩溃了。