如何调试 salt-api 的 curl 请求?

How to debug curl request for salt-api?

我在 Ubuntu 服务器上有 salt masters 和 salt-api 服务。 我正在尝试使用此命令验证连接:

curl -sSk https://<MY-URL>/login \
    -H 'Accept: application/x-yaml' \
    -d username=<MY-LOGIN> \
    -d password=<MY-PASSWORD> \
    -d eauth=ldap

奇怪的是 - 从一些机器(linux 服务器)我得到了正确的响应,但是从其他机器我得到了这样的错误:

<h2>401 Unauthorized</h2>
        <p>Could not authenticate using provided credentials</p>
        <pre id="traceback">Traceback (most recent call last):
  File "/usr/lib/python3/dist-packages/cherrypy/_cprequest.py", line 670, in respond
    response.body = self.handler()
  File "/usr/lib/python3/dist-packages/cherrypy/lib/encoding.py", line 220, in __call__
    self.body = self.oldhandler(*args, **kwargs)
  File "/usr/lib/python3/dist-packages/salt/netapi/rest_cherrypy/app.py", line 858, in hypermedia_handler
    ret = cherrypy.serving.request._hypermedia_inner_handler(*args, **kwargs)
  File "/usr/lib/python3/dist-packages/cherrypy/_cpdispatch.py", line 60, in __call__
    return self.callable(*self.args, **self.kwargs)
  File "/usr/lib/python3/dist-packages/salt/netapi/rest_cherrypy/app.py", line 1870, in POST
    401, "Could not authenticate using provided credentials"
cherrypy._cperror.HTTPError: (401, 'Could not authenticate using provided credentials')

我可以检查什么来调试这个? 如果需要,我可以提供有关服务器的任何信息。

问题出在 salt-master 中。 pip 包 python-ldap 和其他一些包不存在