使用Tornado在SaltStack 8上发生SSL错误 [英] SSL Error on 8 on SaltStack using Tornado

查看:126
本文介绍了使用Tornado在SaltStack 8上发生SSL错误的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

如果我运行:


curl -si localhost:8000 / login -H接受:application / json -d
username ='salt'-d password ='salt'-d eauth ='pam'

curl -si localhost:8000/login -H "Accept: application/json" -d username='salt' -d password='salt' -d eauth='pam'

出现此错误:


进程管理器启动!输入PEM密码:[警告] 8('127.0.0.1',50408)上的SSL错误
:[错误1] _ssl.c:510:错误:1407609C:SSL
例程:SSL23_GET_CLIENT_HELLO:http请求[错误]未捕获的
异常回溯(最近一次调用为最新):文件
/usr/lib/python2.7/dist-packages/tornado/http1connection.py,行
693 ,在_server_request_loop
中ret = yield conn.read_response(request_delegate)文件 /usr/lib/python2.7/dist-packages/tornado/gen.py,第870行,运行中
的值=将来.result()文件 /usr/lib/python2.7/dist-packages/tornado/concurrent.py,第215行,在
结果中
raise_exc_info(self._exc_info)文件 / usr / lib / python2.7 / dist-packages / tornado / gen.py,行876,在运行
中产生= self.gen.throw(* exc_info)文件 /usr/lib/python2.7/dist-包/tornado/http1connection.py,行_read_message
中的
168行,quiet_exceptions = iostream.StreamClosedError)文件 /usr/lib/python2.7/dist-packages/tornado/gen。 py,第870行,运行
值= future.result()文件 /usr/lib/python2.7/dist-packages/tornado/concurrent.py,第215行,以
结果显示
raise_exc_info(self._exc_info)文件,在raise_exc_info SSL错误中的第3行:[Errno 1] _ssl.c:510:错误:1407609C:SSL
例程:SSL23_GET_CLIENT_HELLO:http请求

Process Manager starting! Enter PEM pass phrase: [WARNING ] SSL Error on 8 ('127.0.0.1', 50408): [Errno 1] _ssl.c:510: error:1407609C:SSL routines:SSL23_GET_CLIENT_HELLO:http request [ERROR ] Uncaught exception Traceback (most recent call last): File "/usr/lib/python2.7/dist-packages/tornado/http1connection.py", line 693, in _server_request_loop ret = yield conn.read_response(request_delegate) File "/usr/lib/python2.7/dist-packages/tornado/gen.py", line 870, in run value = future.result() File "/usr/lib/python2.7/dist-packages/tornado/concurrent.py", line 215, in result raise_exc_info(self._exc_info) File "/usr/lib/python2.7/dist-packages/tornado/gen.py", line 876, in run yielded = self.gen.throw(*exc_info) File "/usr/lib/python2.7/dist-packages/tornado/http1connection.py", line 168, in _read_message quiet_exceptions=iostream.StreamClosedError) File "/usr/lib/python2.7/dist-packages/tornado/gen.py", line 870, in run value = future.result() File "/usr/lib/python2.7/dist-packages/tornado/concurrent.py", line 215, in result raise_exc_info(self._exc_info) File "", line 3, in raise_exc_info SSLError: [Errno 1] _ssl.c:510: error:1407609C:SSL routines:SSL23_GET_CLIENT_HELLO:http request

这里是:


tail / etc / salt / master
#套接字待办事项
待办事项:128
ssl_crt:/etc/pki/api/certs/cert.pem
#如果cert和key $ b $则无需指定ssl_key b#在一个文件中
ssl_key:/etc/pki/api/certs/key.pem
调试:False
disable_ssl:False
webhook_disable_auth:False
cors_origin:null

tail /etc/salt/master # socket backlog backlog: 128 ssl_crt: /etc/pki/api/certs/cert.pem # no need to specify ssl_key if cert and key # are in one single file ssl_key: /etc/pki/api/certs/key.pem debug: False disable_ssl: False webhook_disable_auth: False cors_origin: null

然后我将自签名证书复制到上面显示的位置,并将其添加到根CA:

And I copied my self-signed certs to the location shown above and added it to the root CA:


sudo cp cert.pem / usr / share / ca-certi ficates / sudo dpkg-reconfigure
ca证书

sudo cp cert.pem /usr/share/ca-certificates/ sudo dpkg-reconfigure ca-certificates


推荐答案

看来您不能在salt-api中使用虚拟环境。我删除了Anaconda并升级到Python 3,现在可以使用了,但是它给出了警告,但没有出现错误:

It appears you cannot use a virtual environment with the salt-api. I removed Anaconda and upgrade to Python 3 and now it works, yet it gives a warning, but it gives no error:


curl -si本地主机:8000 /登录> -H接受:应用程序/ json>

-d用户名='salt'> -d密码='salt'> -d eauth ='pam'

curl -si localhost:8000/login > -H "Accept: application/json" >
-d username='salt' > -d password='salt' > -d eauth='pam'

不抛出错误,仅发出警告:

Does not throw an error, only a warning:


[DEBUG]流程管理器启动! [警告] 11
('127.0.0.1',46632)发生SSL错误:[SSL:HTTP_REQUEST] http请求(_ssl.c:600)

[DEBUG ] Process Manager starting! [WARNING ] SSL Error on 11 ('127.0.0.1', 46632): [SSL: HTTP_REQUEST] http request (_ssl.c:600)

这篇关于使用Tornado在SaltStack 8上发生SSL错误的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆