擅长:python、mysql、java
<p>您缺少对密钥存储库的引用。程序产生以下错误:</p>
<pre><code>pymqi.MQMIError: MQI Error. Comp: 2, Reason 2381: FAILED: MQRC_KEY_REPOSITORY_ERROR
</code></pre>
<p>而{<cd1>}表明:</p>
<pre><code>AMQ9627: The path and stem name for the SSL key repository have not been
specified.
</code></pre>
<p>查看pymqi Git hub存储库<a href="https://github.com/dsuch/pymqi/blob/master/code/examples/ssl_tls.py" rel="nofollow noreferrer">pymqi/code/examples/ssl_tls.py</a>上提供的示例,下面介绍如何指定密钥存储库的位置:</p>
<pre class="lang-py prettyprint-override"><code>key_repo_location = '/var/mqm/ssl-db/client/KeyringClient'
...
sco = pymqi.SCO()
sco.KeyRepository = key_repo_location
qmgr = pymqi.QueueManager(None)
qmgr.connect_with_options(queue_manager, cd, sco)
</code></pre>
<p>所以在上面的代码中,您确实引用了这个,但是我没有看到您将<code>key_repo_location</code>设置为任何值</p>
<pre><code>sco.KeyRepository = key_repo_location
</code></pre>