我正在设置C ++二进制文件的声纳系统,我正在尝试使用https安装程序。
请参阅Server.xml中的Connector元素
<Connector port="8443" protocol="org.apache.coyote.http11.Http11Protocol" SSLEnabled="true"
maxThreads="150" scheme="https" secure="false"
clientAuth="false" sslProtocol="TLS"
keystoreFile="D:/sonar_framework/apache-tomcat-7.0.35/conf/.keystore" keystorePass="changeit"
ciphers="SSL_RSA_WITH_RC4_128_MD5, SSL_RSA_WITH_RC4_128_SHA, TLS_RSA_WITH_AES_128_CBC_SHA, TLS_DHE_RSA_WITH_AES_128_CBC_SHA, TLS_DHE_DSS_WITH_AES_128_CBC_SHA, SSL_RSA_WITH_3DES_EDE_CBC_SHA, SSL_DHE_RSA_WITH_3DES_EDE_CBC_SHA,SSL_DHE_DSS_WITH_3DES_EDE_CBC_SHA"/>
Sonar-runner.properties中的sonar.host.url = https://b1.co:8443/sonar/
我还给了localhost以进行下一次尝试,
但它显示错误
Exception in thread "main" java.lang.IllegalStateException: Fail to request server version
at org.sonar.runner.Bootstrapper.getServerVersion(Bootstrapper.java:73)
at org.sonar.runner.Runner.checkSonarVersion(Runner.java:220)
at org.sonar.runner.Runner.execute(Runner.java:150)
at org.sonar.runner.Main.execute(Main.java:84)
at org.sonar.runner.Main.main(Main.java:56)
Caused by: javax.net.ssl.SSLHandshakeException: java.security.cert.CertificateException: No name matching <machine Name> found
at sun.security.ssl.Alerts.getSSLException(Alerts.java:192)
at sun.security.ssl.SSLSocketImpl.fatal(SSLSocketImpl.java:1902)
at sun.security.ssl.Handshaker.fatalSE(Handshaker.java:276)
at sun.security.ssl.Handshaker.fatalSE(Handshaker.java:270)
at sun.security.ssl.ClientHandshaker.serverCertificate(ClientHandshaker.java:1341)
at sun.security.ssl.ClientHandshaker.processMessage(ClientHandshaker.java:153)
at sun.security.ssl.Handshaker.processLoop(Handshaker.java:868)
at sun.security.ssl.Handshaker.process_record(Handshaker.java:804)
at sun.security.ssl.SSLSocketImpl.readRecord(SSLSocketImpl.java:1032)
at sun.security.ssl.SSLSocketImpl.performInitialHandshake(SSLSocketImpl.java:1328)
at sun.security.ssl.SSLSocketImpl.startHandshake(SSLSocketImpl.java:1355)
at sun.security.ssl.SSLSocketImpl.startHandshake(SSLSocketImpl.java:1339)
at sun.net.www.protocol.https.HttpsClient.afterConnect(HttpsClient.java:515)
at sun.net.www.protocol.https.AbstractDelegateHttpsURLConnection.connect(AbstractDelegateHttpsURLConnection.java:185)
at sun.net.www.protocol.http.HttpURLConnection.getInputStream(HttpURLConnection.java:1299)
at java.net.URLConnection.getContent(URLConnection.java:748)
at sun.net.www.protocol.https.HttpsURLConnectionImpl.getContent(HttpsURLConnectionImpl.java:434)
at org.sonar.runner.Bootstrapper.remoteContent(Bootstrapper.java:125)
at org.sonar.runner.Bootstrapper.getServerVersion(Bootstrapper.java:71)
... 4 more
Caused by: java.security.cert.CertificateException: No name matching blrkmis1977pc.in002.siemens.net found
at sun.security.util.HostnameChecker.matchDNS(HostnameChecker.java:208)
at sun.security.util.HostnameChecker.match(HostnameChecker.java:93)
at sun.security.ssl.X509TrustManagerImpl.checkIdentity(X509TrustManagerImpl.java:347)
at sun.security.ssl.X509TrustManagerImpl.checkTrusted(X509TrustManagerImpl.java:203)
at sun.security.ssl.X509TrustManagerImpl.checkServerTrusted(X509TrustManagerImpl.java:126)
at sun.security.ssl.ClientHandshaker.serverCertificate(ClientHandshaker.java:1323)
... 18 more
帮我解决这个问题。
答案 0 :(得分:3)
您需要告诉Java接受自签名证书。请参阅this SO帖子(接受答案中的选项1)。
答案 1 :(得分:0)
我想您应该检查您的声纳服务器,在您的日志中,您的服务器正在使用端口8443,因此您应该使用以下命令来检查此端口是否仍在侦听? netstat -anl | grep 8443
或
你刚刚重启声纳服务器。