<?xml version="1.0" encoding="UTF-8"?>
<rss xmlns:content="http://purl.org/rss/1.0/modules/content/" xmlns:dc="http://purl.org/dc/elements/1.1/" xmlns:rdf="http://www.w3.org/1999/02/22-rdf-syntax-ns#" xmlns:taxo="http://purl.org/rss/1.0/modules/taxonomy/" version="2.0">
  <channel>
    <title>topic Re: urlopen error [dh key too small] with python suds client for perfmon api in Management</title>
    <link>https://community.cisco.com/t5/management/urlopen-error-dh-key-too-small-with-python-suds-client-for/m-p/3760987#M2995</link>
    <description>&lt;P&gt;Did you ever find a solution to this by any chance?&lt;/P&gt;</description>
    <pubDate>Tue, 11 Dec 2018 02:27:58 GMT</pubDate>
    <dc:creator>Chris Deren</dc:creator>
    <dc:date>2018-12-11T02:27:58Z</dc:date>
    <item>
      <title>urlopen error [dh key too small] with python suds client for perfmon api</title>
      <link>https://community.cisco.com/t5/management/urlopen-error-dh-key-too-small-with-python-suds-client-for/m-p/3708069#M2973</link>
      <description>&lt;P&gt;So i am using this scripts that uses perfmon api to fetch counters/details from call manager.&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;Some details about the script.&lt;/P&gt;
&lt;P&gt;Python 3.x&lt;/P&gt;
&lt;P&gt;Libs: suds-jurko, ssl&lt;/P&gt;
&lt;P&gt;API: perfmon api&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;----------------------------------------------------------------------------------------&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;The script works perfectly fine on my lab cucm. but when i test this with another labs it gives me following errors.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&lt;STRONG&gt;urllib.error.URLError: &amp;lt;urlopen error [SSL: SSL_NEGATIVE_LENGTH] dh key too small (_ssl.c:777)&amp;gt;&lt;/STRONG&gt;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;Code snippet:&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;PRE&gt;&lt;SPAN&gt;from &lt;/SPAN&gt;suds.client &lt;SPAN&gt;import &lt;/SPAN&gt;Client&lt;BR /&gt;&lt;SPAN&gt;from &lt;/SPAN&gt;suds.xsd.doctor &lt;SPAN&gt;import &lt;/SPAN&gt;Import&lt;BR /&gt;&lt;SPAN&gt;from &lt;/SPAN&gt;suds.xsd.doctor &lt;SPAN&gt;import &lt;/SPAN&gt;ImportDoctor&lt;BR /&gt;&lt;SPAN&gt;import &lt;/SPAN&gt;logging&lt;BR /&gt;&lt;SPAN&gt;import &lt;/SPAN&gt;ssl&lt;/PRE&gt;
&lt;PRE&gt;&lt;BR /&gt;ssl._create_default_https_context = ssl._create_unverified_context&lt;BR /&gt;wsdl = &lt;SPAN&gt;'https://10.106.79.98&lt;/SPAN&gt;&lt;SPAN&gt;:8443/perfmonservice2/services/PerfmonService?wsdl'&lt;BR /&gt;&lt;/SPAN&gt;location = &lt;SPAN&gt;'https://10.106.79.98&lt;/SPAN&gt;&lt;SPAN&gt;:8443/perfmonservice2/services/PerfmonService'&lt;BR /&gt;&lt;/SPAN&gt;username = test&lt;BR /&gt;password = test&lt;BR /&gt;tns = &lt;SPAN&gt;'http://schemas.cisco.com/ast/soap/'&lt;BR /&gt;&lt;/SPAN&gt;imp = Import(&lt;SPAN&gt;'http://schemas.xmlsoap.org/soap/encoding/'&lt;/SPAN&gt;&lt;SPAN&gt;,&lt;BR /&gt;&lt;/SPAN&gt; &lt;SPAN&gt;'http://schemas.xmlsoap.org/soap/encoding/'&lt;/SPAN&gt;)&lt;BR /&gt;imp.filter.add(tns)&lt;BR /&gt;client = Client(wsdl&lt;SPAN&gt;, &lt;/SPAN&gt;&lt;SPAN&gt;location&lt;/SPAN&gt;=location&lt;SPAN&gt;, &lt;/SPAN&gt;&lt;SPAN&gt;faults&lt;/SPAN&gt;=&lt;SPAN&gt;False, &lt;/SPAN&gt;&lt;SPAN&gt;plugins&lt;/SPAN&gt;=[ImportDoctor(imp)]&lt;SPAN&gt;, &lt;/SPAN&gt;&lt;SPAN&gt;username&lt;/SPAN&gt;=username&lt;SPAN&gt;,&lt;/SPAN&gt;&lt;SPAN&gt;password&lt;/SPAN&gt;=password)&lt;BR /&gt;&lt;BR /&gt;perfmon_objects_1 = [&lt;SPAN&gt;'AnnunciatorResourceTotal'&lt;/SPAN&gt;&lt;SPAN&gt;, &lt;/SPAN&gt;&lt;SPAN&gt;'MOHTotalMulticastResources'&lt;/SPAN&gt;&lt;SPAN&gt;, &lt;/SPAN&gt;&lt;SPAN&gt;'MTPResourceAvailable'&lt;/SPAN&gt;&lt;SPAN&gt;,&lt;BR /&gt;&lt;/SPAN&gt; &lt;SPAN&gt;'SWConferenceResourceAvailable'&lt;/SPAN&gt;&lt;SPAN&gt;, &lt;/SPAN&gt;&lt;SPAN&gt;'RegisteredHardwarePhones'&lt;/SPAN&gt;&lt;SPAN&gt;, &lt;/SPAN&gt;&lt;SPAN&gt;'TLSConnectedSIPTrunks'&lt;/SPAN&gt;&lt;SPAN&gt;, &lt;/SPAN&gt;]&lt;BR /&gt;&lt;BR /&gt;res = client.service.perfmonCollectCounterData(node_name&lt;SPAN&gt;, &lt;/SPAN&gt;&lt;SPAN&gt;'Cisco CallManager'&lt;/SPAN&gt;)&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;print&lt;/SPAN&gt;(&lt;SPAN&gt;'CALL MANAGER Resources'&lt;/SPAN&gt;)&lt;BR /&gt;&lt;SPAN&gt;for &lt;/SPAN&gt;node &lt;SPAN&gt;in &lt;/SPAN&gt;res[&lt;SPAN&gt;1&lt;/SPAN&gt;]:&lt;BR /&gt; counter_name=(&lt;SPAN&gt;str&lt;/SPAN&gt;(node[&lt;SPAN&gt;'Name'&lt;/SPAN&gt;].split(&lt;SPAN&gt;'&lt;/SPAN&gt;&lt;SPAN&gt;\\&lt;/SPAN&gt;&lt;SPAN&gt;'&lt;/SPAN&gt;)[&lt;SPAN&gt;4&lt;/SPAN&gt;]))&lt;BR /&gt; &lt;SPAN&gt;if&lt;/SPAN&gt;(counter_name &lt;SPAN&gt;in &lt;/SPAN&gt;perfmon_objects_1):&lt;BR /&gt; &lt;SPAN&gt;print&lt;/SPAN&gt;(counter_name)&lt;BR /&gt; &lt;SPAN&gt;print&lt;/SPAN&gt;(&lt;SPAN&gt;str&lt;/SPAN&gt;(node[&lt;SPAN&gt;'Value'&lt;/SPAN&gt;]))&lt;/PRE&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Mon, 17 Sep 2018 13:18:42 GMT</pubDate>
      <guid>https://community.cisco.com/t5/management/urlopen-error-dh-key-too-small-with-python-suds-client-for/m-p/3708069#M2973</guid>
      <dc:creator>zerocool443</dc:creator>
      <dc:date>2018-09-17T13:18:42Z</dc:date>
    </item>
    <item>
      <title>Re: urlopen error [dh key too small] with python suds client for perfmon api</title>
      <link>https://community.cisco.com/t5/management/urlopen-error-dh-key-too-small-with-python-suds-client-for/m-p/3760987#M2995</link>
      <description>&lt;P&gt;Did you ever find a solution to this by any chance?&lt;/P&gt;</description>
      <pubDate>Tue, 11 Dec 2018 02:27:58 GMT</pubDate>
      <guid>https://community.cisco.com/t5/management/urlopen-error-dh-key-too-small-with-python-suds-client-for/m-p/3760987#M2995</guid>
      <dc:creator>Chris Deren</dc:creator>
      <dc:date>2018-12-11T02:27:58Z</dc:date>
    </item>
    <item>
      <title>Re: urlopen error [dh key too small] with python suds client for perfmon api</title>
      <link>https://community.cisco.com/t5/management/urlopen-error-dh-key-too-small-with-python-suds-client-for/m-p/3761039#M2996</link>
      <description>&lt;P&gt;hey chris,&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;The code worked on py 3.4.&lt;/P&gt;
&lt;P&gt;I was developing the script on py 2.7 earlier.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;As per the understanding py 3.4 implementation of urlopen either ignores those alerts or doesn't use those key sharing algorithms.&amp;nbsp;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Tue, 11 Dec 2018 05:54:17 GMT</pubDate>
      <guid>https://community.cisco.com/t5/management/urlopen-error-dh-key-too-small-with-python-suds-client-for/m-p/3761039#M2996</guid>
      <dc:creator>zerocool443</dc:creator>
      <dc:date>2018-12-11T05:54:17Z</dc:date>
    </item>
  </channel>
</rss>

