<?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 java openkit certificate error when trying simplesample in Real User Monitoring</title>
    <link>https://community.dynatrace.com/t5/Real-User-Monitoring/java-openkit-certificate-error-when-trying-simplesample/m-p/127231#M2643</link>
    <description>&lt;P&gt;I have installed a Publice Active Gateway (PAG). Version 1.183.127.20200108-111113 on Platform: Linux, Version: 3.10.0-1062.el7.x86_64, Architecture: amd64, Processors: 2 - Running. &lt;/P&gt;&lt;P&gt;On the same server I have installed the java openkit package from  &lt;A rel="noopener noreferrer noopener noreferrer" href="https://bintray.com/dynatrace/openkit/com.dynatrace.openkit" target="_blank"&gt;https://bintray.com/dynatrace/openkit/com.dynatrace.openkit&lt;/A&gt;&lt;/P&gt;&lt;P&gt;Then I have altered the SimpleSample &lt;A rel="noopener noreferrer noopener noreferrer" href="https://github.com/Dynatrace/openkit-java/blob/master/samples/SimpleSample.java" target="_blank"&gt;https://github.com/Dynatrace/openkit-java/blob/master/samples/SimpleSample.java&lt;/A&gt; for my environment stating the url in my environmen, the application the applicationid and deviceid.&lt;/P&gt;&lt;P&gt;When I run the java application, I get errors about the certificate.&lt;/P&gt;&lt;P&gt;[root@vhpmon540cop007 cbruhn2]#&lt;STRONG&gt; java SimpleSample&lt;/STRONG&gt;&lt;BR /&gt;2020-02-11T10:52:46.245 ERROR [BeaconSender] HTTPClient sendRequest() - ERROR: STATUS Request failed!&lt;BR /&gt;javax.net.ssl.SSLHandshakeException: java.security.cert.CertificateException: No subject alternative names present&lt;BR /&gt;        at sun.security.ssl.Alerts.getSSLException(Alerts.java:192)&lt;BR /&gt;        at sun.security.ssl.SSLSocketImpl.fatal(SSLSocketImpl.java:1946)&lt;BR /&gt;        at sun.security.ssl.Handshaker.fatalSE(Handshaker.java:316)&lt;BR /&gt;        at sun.security.ssl.Handshaker.fatalSE(Handshaker.java:310)&lt;BR /&gt;        at sun.security.ssl.ClientHandshaker.serverCertificate(ClientHandshaker.java:1639)&lt;BR /&gt;        at sun.security.ssl.ClientHandshaker.processMessage(ClientHandshaker.java:223)&lt;BR /&gt;        at sun.security.ssl.Handshaker.processLoop(Handshaker.java:1037)&lt;BR /&gt;        at sun.security.ssl.Handshaker.process_record(Handshaker.java:965)&lt;BR /&gt;        at sun.security.ssl.SSLSocketImpl.readRecord(SSLSocketImpl.java:1064)&lt;BR /&gt;        at sun.security.ssl.SSLSocketImpl.performInitialHandshake(SSLSocketImpl.java:1367)&lt;/P&gt;&lt;P&gt;I have not altered anything about the certificate that the PAG uses, so it just states it has been issued by dynatrace.&lt;/P&gt;&lt;P&gt;Cluster ActiveGate SSL certificate&lt;/P&gt;&lt;P&gt;Current SSL certificate&lt;/P&gt;&lt;P&gt; Issuer:  Dynatrace &lt;/P&gt;&lt;P&gt; Subject:  Dynatrace &lt;/P&gt;&lt;P&gt; Expires:  Feb 07, 2030 &lt;/P&gt;&lt;P&gt;Is there a way in Dynatrace to export this certificate to other machines ?&lt;/P&gt;&lt;P&gt;I think that this certificate should be exported and then imported with keytools, but I can't find any documentation about how to do this.&lt;/P&gt;&lt;P&gt;The java application is run on the same machine as the PAG so I don't understand why there should be a problem with the certificate, but that is just my ignorance about certificates.&lt;/P&gt;&lt;P&gt;Can anybody help solving this issue, so I could test the openkit setup, before I let java developers access the setup ?&lt;/P&gt;</description>
    <pubDate>Tue, 11 Feb 2020 11:03:40 GMT</pubDate>
    <dc:creator>cbruhn2</dc:creator>
    <dc:date>2020-02-11T11:03:40Z</dc:date>
    <item>
      <title>java openkit certificate error when trying simplesample</title>
      <link>https://community.dynatrace.com/t5/Real-User-Monitoring/java-openkit-certificate-error-when-trying-simplesample/m-p/127231#M2643</link>
      <description>&lt;P&gt;I have installed a Publice Active Gateway (PAG). Version 1.183.127.20200108-111113 on Platform: Linux, Version: 3.10.0-1062.el7.x86_64, Architecture: amd64, Processors: 2 - Running. &lt;/P&gt;&lt;P&gt;On the same server I have installed the java openkit package from  &lt;A rel="noopener noreferrer noopener noreferrer" href="https://bintray.com/dynatrace/openkit/com.dynatrace.openkit" target="_blank"&gt;https://bintray.com/dynatrace/openkit/com.dynatrace.openkit&lt;/A&gt;&lt;/P&gt;&lt;P&gt;Then I have altered the SimpleSample &lt;A rel="noopener noreferrer noopener noreferrer" href="https://github.com/Dynatrace/openkit-java/blob/master/samples/SimpleSample.java" target="_blank"&gt;https://github.com/Dynatrace/openkit-java/blob/master/samples/SimpleSample.java&lt;/A&gt; for my environment stating the url in my environmen, the application the applicationid and deviceid.&lt;/P&gt;&lt;P&gt;When I run the java application, I get errors about the certificate.&lt;/P&gt;&lt;P&gt;[root@vhpmon540cop007 cbruhn2]#&lt;STRONG&gt; java SimpleSample&lt;/STRONG&gt;&lt;BR /&gt;2020-02-11T10:52:46.245 ERROR [BeaconSender] HTTPClient sendRequest() - ERROR: STATUS Request failed!&lt;BR /&gt;javax.net.ssl.SSLHandshakeException: java.security.cert.CertificateException: No subject alternative names present&lt;BR /&gt;        at sun.security.ssl.Alerts.getSSLException(Alerts.java:192)&lt;BR /&gt;        at sun.security.ssl.SSLSocketImpl.fatal(SSLSocketImpl.java:1946)&lt;BR /&gt;        at sun.security.ssl.Handshaker.fatalSE(Handshaker.java:316)&lt;BR /&gt;        at sun.security.ssl.Handshaker.fatalSE(Handshaker.java:310)&lt;BR /&gt;        at sun.security.ssl.ClientHandshaker.serverCertificate(ClientHandshaker.java:1639)&lt;BR /&gt;        at sun.security.ssl.ClientHandshaker.processMessage(ClientHandshaker.java:223)&lt;BR /&gt;        at sun.security.ssl.Handshaker.processLoop(Handshaker.java:1037)&lt;BR /&gt;        at sun.security.ssl.Handshaker.process_record(Handshaker.java:965)&lt;BR /&gt;        at sun.security.ssl.SSLSocketImpl.readRecord(SSLSocketImpl.java:1064)&lt;BR /&gt;        at sun.security.ssl.SSLSocketImpl.performInitialHandshake(SSLSocketImpl.java:1367)&lt;/P&gt;&lt;P&gt;I have not altered anything about the certificate that the PAG uses, so it just states it has been issued by dynatrace.&lt;/P&gt;&lt;P&gt;Cluster ActiveGate SSL certificate&lt;/P&gt;&lt;P&gt;Current SSL certificate&lt;/P&gt;&lt;P&gt; Issuer:  Dynatrace &lt;/P&gt;&lt;P&gt; Subject:  Dynatrace &lt;/P&gt;&lt;P&gt; Expires:  Feb 07, 2030 &lt;/P&gt;&lt;P&gt;Is there a way in Dynatrace to export this certificate to other machines ?&lt;/P&gt;&lt;P&gt;I think that this certificate should be exported and then imported with keytools, but I can't find any documentation about how to do this.&lt;/P&gt;&lt;P&gt;The java application is run on the same machine as the PAG so I don't understand why there should be a problem with the certificate, but that is just my ignorance about certificates.&lt;/P&gt;&lt;P&gt;Can anybody help solving this issue, so I could test the openkit setup, before I let java developers access the setup ?&lt;/P&gt;</description>
      <pubDate>Tue, 11 Feb 2020 11:03:40 GMT</pubDate>
      <guid>https://community.dynatrace.com/t5/Real-User-Monitoring/java-openkit-certificate-error-when-trying-simplesample/m-p/127231#M2643</guid>
      <dc:creator>cbruhn2</dc:creator>
      <dc:date>2020-02-11T11:03:40Z</dc:date>
    </item>
    <item>
      <title>Re: java openkit certificate error when trying simplesample</title>
      <link>https://community.dynatrace.com/t5/Real-User-Monitoring/java-openkit-certificate-error-when-trying-simplesample/m-p/127232#M2644</link>
      <description>&lt;P&gt;You have the answer right there - "java.security.cert.CertificateException: No subject alternative names". Certificates are verified every time, it does not matter if it is a local connection.&lt;BR /&gt;&lt;BR /&gt;The default self-signed certificate is not a good way to operate Cluster ActiveGate (named Public Security Gateway in the past). You will need a proper certificate issued to FQDN / DNS name of the ActiveGate. Now also with the SNI extension (subject alternative name). So you should get a certificate with SNI extension, including a private key and put it on the ActiveGate. This is done via the CMC console in Dynatrace Managed, not by copying it to the host. If your certificate will be issued by a your local CA and not by a public CA, then you might need to import the CA certificate into the trust store of the JVM you are running so the SSL connection to the gateway can be trusted.&lt;BR /&gt;&lt;BR /&gt;&lt;BR /&gt;If this is just for testing and getting familiar with OpenKit, you can turn off the SSL validation in the example, see here:&lt;/P&gt;&lt;P&gt;&lt;A href="https://github.com/Dynatrace/openkit-java/blob/master/docs/example.md#ssltls-security-in-openkit"&gt;https://github.com/Dynatrace/openkit-java/blob/master/docs/example.md#ssltls-security-in-openkit&lt;/A&gt;&lt;/P&gt;&lt;P&gt;Just add this method call in the initialization of the openkit library:&lt;/P&gt;&lt;PRE&gt;.withTrustManager(new SSLBlindTrustManager())&lt;/PRE&gt;</description>
      <pubDate>Tue, 11 Feb 2020 12:37:25 GMT</pubDate>
      <guid>https://community.dynatrace.com/t5/Real-User-Monitoring/java-openkit-certificate-error-when-trying-simplesample/m-p/127232#M2644</guid>
      <dc:creator>Julius_Loman</dc:creator>
      <dc:date>2020-02-11T12:37:25Z</dc:date>
    </item>
    <item>
      <title>Re: java openkit certificate error when trying simplesample</title>
      <link>https://community.dynatrace.com/t5/Real-User-Monitoring/java-openkit-certificate-error-when-trying-simplesample/m-p/127233#M2645</link>
      <description>&lt;DIV class="fr-view clearfix"&gt;&lt;P&gt;Hi Julius, thank you for a very helpfull answer. I can now test and i works fine. Just one thing for the record.&lt;/P&gt;&lt;P&gt;You have to import the class&lt;/P&gt;&lt;PRE&gt;import com.dynatrace.openkit.protocol.ssl.SSLBlindTrustManager;&lt;/PRE&gt;&lt;P&gt;Otherwise it works great. Once again. Many thanks&lt;/P&gt;&lt;P&gt;Best regards &lt;/P&gt;&lt;P&gt;Carl Bruhn&lt;/P&gt;&lt;/DIV&gt;</description>
      <pubDate>Wed, 12 Feb 2020 12:58:39 GMT</pubDate>
      <guid>https://community.dynatrace.com/t5/Real-User-Monitoring/java-openkit-certificate-error-when-trying-simplesample/m-p/127233#M2645</guid>
      <dc:creator>cbruhn2</dc:creator>
      <dc:date>2020-02-12T12:58:39Z</dc:date>
    </item>
    <item>
      <title>Re: java openkit certificate error when trying simplesample</title>
      <link>https://community.dynatrace.com/t5/Real-User-Monitoring/java-openkit-certificate-error-when-trying-simplesample/m-p/127234#M2646</link>
      <description>&lt;P&gt;You are welcome. Of course you need to import that class or package. Just in production I strongly discourage running Cluster ActiveGate with selfsigned certificate or without SSL certificate validation.&lt;/P&gt;</description>
      <pubDate>Wed, 12 Feb 2020 14:13:22 GMT</pubDate>
      <guid>https://community.dynatrace.com/t5/Real-User-Monitoring/java-openkit-certificate-error-when-trying-simplesample/m-p/127234#M2646</guid>
      <dc:creator>Julius_Loman</dc:creator>
      <dc:date>2020-02-12T14:13:22Z</dc:date>
    </item>
  </channel>
</rss>

