Uploaded image for project: 'Teiid'
  1. Teiid
  2. TEIID-2593

often report: the trustAnchors parameter must be non-empty

XMLWordPrintable

      This ques appear when we upgrade JBoss from 6.0 to 6.1, the teiid always could not create connection, as below:

      23:49:41,639 SEVERE [org.teiid.jdbc] (Timer-2) Could not create connection: org.teiid.jdbc.TeiidSQLException: Error establishing socket to host and port: vdb.engineering.redhat.com:31000. Reason: java.lang.RuntimeException: Unexpected error: java.security.InvalidAlgorithmParameterException: the trustAnchors parameter must be non-empty
      at org.teiid.jdbc.TeiidSQLException.create(TeiidSQLException.java:113) [teiid-client-7.7.0.Final.jar:7.7.0.Final]
      at org.teiid.jdbc.TeiidSQLException.create(TeiidSQLException.java:70) [teiid-client-7.7.0.Final.jar:7.7.0.Final]
      at org.teiid.jdbc.SocketProfile.connect(SocketProfile.java:56) [teiid-client-7.7.0.Final.jar:7.7.0.Final]
      at org.teiid.jdbc.TeiidDriver.connect(TeiidDriver.java:107) [teiid-client-7.7.0.Final.jar:7.7.0.Final]
      at java.sql.DriverManager.getConnection(DriverManager.java:571) [rt.jar:1.7.0_25]
      at java.sql.DriverManager.getConnection(DriverManager.java:215) [rt.jar:1.7.0_25]
      at com.rehat.tools.vault.service.impl.BugzillaProductUpdate.productVersionUpdateTask(BugzillaProductUpdate.java:42) [vault-service-1.1.1.jar:]
      at com.redhat.tools.vault.listener.UpdateTimer.run(UpdateTimer.java:31) [classes:]
      at java.util.TimerThread.mainLoop(Timer.java:555) [rt.jar:1.7.0_25]
      at java.util.TimerThread.run(Timer.java:505) [rt.jar:1.7.0_25]
      Caused by: [SingleInstanceCommunicationException]Error establishing socket to host and port: vdb.engineering.redhat.com:31000. Reason: java.lang.RuntimeException: Unexpected error: java.security.InvalidAlgorithmParameterException: the trustAnchors parameter must be non-empty
      1 [SSLException]java.lang.RuntimeException: Unexpected error: java.security.InvalidAlgorithmParameterException: the trustAnchors parameter must be non-empty
      2 [RuntimeException]Unexpected error: java.security.InvalidAlgorithmParameterException: the trustAnchors parameter must be non-empty
      3 [InvalidAlgorithmParameterException]the trustAnchors parameter must be non-empty
      at org.teiid.net.socket.SocketServerConnection.selectServerInstance(SocketServerConnection.java:161) [teiid-client-7.7.0.Final.jar:7.7.0.Final]
      at org.teiid.net.socket.SocketServerConnection.<init>(SocketServerConnection.java:95) [teiid-client-7.7.0.Final.jar:7.7.0.Final]
      at org.teiid.net.socket.SocketServerConnectionFactory.getConnection(SocketServerConnectionFactory.java:320) [teiid-client-7.7.0.Final.jar:7.7.0.Final]
      at org.teiid.jdbc.SocketProfile.connect(SocketProfile.java:54) [teiid-client-7.7.0.Final.jar:7.7.0.Final]
      ... 7 more
      Caused by: javax.net.ssl.SSLException: java.lang.RuntimeException: Unexpected error: java.security.InvalidAlgorithmParameterException: the trustAnchors parameter must be non-empty
      at sun.security.ssl.Alerts.getSSLException(Alerts.java:208) [jsse.jar:1.7.0_25]
      at sun.security.ssl.SSLSocketImpl.fatal(SSLSocketImpl.java:1886) [jsse.jar:1.7.0_25]
      at sun.security.ssl.SSLSocketImpl.fatal(SSLSocketImpl.java:1844) [jsse.jar:1.7.0_25]
      at sun.security.ssl.SSLSocketImpl.handleException(SSLSocketImpl.java:1827) [jsse.jar:1.7.0_25]
      at sun.security.ssl.SSLSocketImpl.handleException(SSLSocketImpl.java:1753) [jsse.jar:1.7.0_25]
      at sun.security.ssl.AppInputStream.read(AppInputStream.java:113) [jsse.jar:1.7.0_25]
      at java.io.BufferedInputStream.fill(BufferedInputStream.java:235) [rt.jar:1.7.0_25]
      at java.io.BufferedInputStream.read1(BufferedInputStream.java:275) [rt.jar:1.7.0_25]
      at java.io.BufferedInputStream.read(BufferedInputStream.java:334) [rt.jar:1.7.0_25]
      at java.io.DataInputStream.read(DataInputStream.java:149) [rt.jar:1.7.0_25]
      at org.teiid.netty.handler.codec.serialization.ObjectDecoderInputStream.fillBuffer(ObjectDecoderInputStream.java:164) [teiid-client-7.7.0.Final.jar:7.7.0.Final]
      at org.teiid.netty.handler.codec.serialization.ObjectDecoderInputStream.findLength(ObjectDecoderInputStream.java:147) [teiid-client-7.7.0.Final.jar:7.7.0.Final]
      at org.teiid.netty.handler.codec.serialization.ObjectDecoderInputStream.readObjectOverride(ObjectDecoderInputStream.java:81) [teiid-client-7.7.0.Final.jar:7.7.0.Final]
      at java.io.ObjectInputStream.readObject(ObjectInputStream.java:364) [rt.jar:1.7.0_25]
      at org.teiid.net.socket.OioOjbectChannelFactory$OioObjectChannel.read(OioOjbectChannelFactory.java:114) [teiid-client-7.7.0.Final.jar:7.7.0.Final]
      at org.teiid.net.socket.SocketServerInstanceImpl.doHandshake(SocketServerInstanceImpl.java:113) [teiid-client-7.7.0.Final.jar:7.7.0.Final]
      at org.teiid.net.socket.SocketServerInstanceImpl.connect(SocketServerInstanceImpl.java:94) [teiid-client-7.7.0.Final.jar:7.7.0.Final]
      at org.teiid.net.socket.SocketServerConnectionFactory.getServerInstance(SocketServerConnectionFactory.java:279) [teiid-client-7.7.0.Final.jar:7.7.0.Final]
      at org.teiid.net.socket.SocketServerConnection.connect(SocketServerConnection.java:199) [teiid-client-7.7.0.Final.jar:7.7.0.Final]
      at org.teiid.net.socket.SocketServerConnection.selectServerInstance(SocketServerConnection.java:125) [teiid-client-7.7.0.Final.jar:7.7.0.Final]
      ... 10 more
      Caused by: java.lang.RuntimeException: Unexpected error: java.security.InvalidAlgorithmParameterException: the trustAnchors parameter must be non-empty
      at sun.security.validator.PKIXValidator.<init>(PKIXValidator.java:90) [rt.jar:1.7.0_25]
      at sun.security.validator.Validator.getInstance(Validator.java:179) [rt.jar:1.7.0_25]
      at sun.security.ssl.X509TrustManagerImpl.getValidator(X509TrustManagerImpl.java:314) [jsse.jar:1.7.0_25]
      at sun.security.ssl.X509TrustManagerImpl.checkTrustedInit(X509TrustManagerImpl.java:173) [jsse.jar:1.7.0_25]
      at sun.security.ssl.X509TrustManagerImpl.checkTrusted(X509TrustManagerImpl.java:186) [jsse.jar:1.7.0_25]
      at sun.security.ssl.X509TrustManagerImpl.checkServerTrusted(X509TrustManagerImpl.java:126) [jsse.jar:1.7.0_25]
      at sun.security.ssl.ClientHandshaker.serverCertificate(ClientHandshaker.java:1323) [jsse.jar:1.7.0_25]
      at sun.security.ssl.ClientHandshaker.processMessage(ClientHandshaker.java:153) [jsse.jar:1.7.0_25]
      at sun.security.ssl.Handshaker.processLoop(Handshaker.java:868) [jsse.jar:1.7.0_25]
      at sun.security.ssl.Handshaker.process_record(Handshaker.java:804) [jsse.jar:1.7.0_25]
      at sun.security.ssl.SSLSocketImpl.readRecord(SSLSocketImpl.java:1016) [jsse.jar:1.7.0_25]
      at sun.security.ssl.SSLSocketImpl.performInitialHandshake(SSLSocketImpl.java:1312) [jsse.jar:1.7.0_25]
      at sun.security.ssl.SSLSocketImpl.readDataRecord(SSLSocketImpl.java:882) [jsse.jar:1.7.0_25]
      at sun.security.ssl.AppInputStream.read(AppInputStream.java:102) [jsse.jar:1.7.0_25]
      ... 24 more
      Caused by: java.security.InvalidAlgorithmParameterException: the trustAnchors parameter must be non-empty
      at java.security.cert.PKIXParameters.setTrustAnchors(PKIXParameters.java:200) [rt.jar:1.7.0_25]
      at java.security.cert.PKIXParameters.<init>(PKIXParameters.java:120) [rt.jar:1.7.0_25]
      at java.security.cert.PKIXBuilderParameters.<init>(PKIXBuilderParameters.java:104) [rt.jar:1.7.0_25]
      at sun.security.validator.PKIXValidator.<init>(PKIXValidator.java:88) [rt.jar:1.7.0_25]
      ... 37 more

      According to the log, it may be caused by the cacerts in jre/lib/security is NULL, however, we've create the symlink to ../../../../../../../etc/pki/java/cacerts.
      I'm so confused about it, before jboss upgrade, the teiid is normal. So could you follow the issue? have any reason will cause the error?

              rhn-engineering-shawkins Steven Hawkins
              yma@redhat.com Ying Ma
              Votes:
              0 Vote for this issue
              Watchers:
              3 Start watching this issue

                Created:
                Updated:
                Resolved:

                  Estimated:
                  Original Estimate - 1 day
                  1d
                  Remaining:
                  Remaining Estimate - 1 day
                  1d
                  Logged:
                  Time Spent - Not Specified
                  Not Specified