Uploaded image for project: 'PUBLIC - Liferay Portal Community Edition'
  1. PUBLIC - Liferay Portal Community Edition
  2. LPS-66321

Creating a blog entry with links throws linkback errors; Unable to call HEAD

    Details

    • Fix Priority:
      4

      Description

      Steps to reproduce:

      1. Navigate to Content > Blogs
      2. Add a new blog entry
        1. Add a title
        2. Copy content from https://web.liferay.com/web/olaf.kock/blog/-/blogs/radio-liferay-episode-57-jim-hinkey-and-cody-hoag-on-documentation
        3. Publish
      3. Leave portal running

      Expected result: No errors on console
      Actual result: After some time, the console shows these errors:

      22:48:18,734 ERROR [liferay/scheduler_dispatch-6][LinkbackProducerUtil:215] Unable to call HEAD of https://radioliferay.com/
      javax.net.ssl.SSLHandshakeException: sun.security.validator.ValidatorException: PKIX path building failed: sun.security.provider.certpath.SunCertPathBuilderException: unable to find valid certification path to requested target
      	at sun.security.ssl.Alerts.getSSLException(Alerts.java:192)
      	at sun.security.ssl.SSLSocketImpl.fatal(SSLSocketImpl.java:1949)
      	at sun.security.ssl.Handshaker.fatalSE(Handshaker.java:302)
      	at sun.security.ssl.Handshaker.fatalSE(Handshaker.java:296)
      	at sun.security.ssl.ClientHandshaker.serverCertificate(ClientHandshaker.java:1509)
      	at sun.security.ssl.ClientHandshaker.processMessage(ClientHandshaker.java:216)
      	at sun.security.ssl.Handshaker.processLoop(Handshaker.java:979)
      	at sun.security.ssl.Handshaker.process_record(Handshaker.java:914)
      	at sun.security.ssl.SSLSocketImpl.readRecord(SSLSocketImpl.java:1062)
      	at sun.security.ssl.SSLSocketImpl.performInitialHandshake(SSLSocketImpl.java:1375)
      	at sun.security.ssl.SSLSocketImpl.writeRecord(SSLSocketImpl.java:747)
      	at sun.security.ssl.AppOutputStream.write(AppOutputStream.java:123)
      	at java.io.BufferedOutputStream.flushBuffer(BufferedOutputStream.java:82)
      	at java.io.BufferedOutputStream.flush(BufferedOutputStream.java:140)
      	at org.apache.commons.httpclient.HttpConnection.flushRequestOutputStream(HttpConnection.java:828)
      	at org.apache.commons.httpclient.MultiThreadedHttpConnectionManager$HttpConnectionAdapter.flushRequestOutputStream(MultiThreadedHttpConnectionManager.java:1565)
      	at org.apache.commons.httpclient.HttpMethodBase.writeRequest(HttpMethodBase.java:2116)
      	at org.apache.commons.httpclient.HttpMethodBase.execute(HttpMethodBase.java:1096)
      	at org.apache.commons.httpclient.HttpMethodDirector.executeWithRetry(HttpMethodDirector.java:398)
      	at org.apache.commons.httpclient.HttpMethodDirector.executeMethod(HttpMethodDirector.java:171)
      	at org.apache.commons.httpclient.HttpClient.executeMethod(HttpClient.java:397)
      	at com.liferay.portal.util.HttpImpl.URLtoInputStream(HttpImpl.java:1665)
      	at com.liferay.portal.util.HttpImpl.URLtoByteArray(HttpImpl.java:1510)
      	at com.liferay.portal.util.HttpImpl.URLtoByteArray(HttpImpl.java:1222)
      	at com.liferay.portal.kernel.util.HttpUtil.URLtoByteArray(HttpUtil.java:291)
      	at com.liferay.portlet.blogs.util.LinkbackProducerUtil._discoverPingbackServer(LinkbackProducerUtil.java:208)
      	at com.liferay.portlet.blogs.util.LinkbackProducerUtil.sendQueuedPingbacks(LinkbackProducerUtil.java:79)
      	at com.liferay.blogs.web.messaging.LinkbackMessageListener.doReceive(LinkbackMessageListener.java:73)
      	at com.liferay.portal.kernel.messaging.BaseMessageListener.receive(BaseMessageListener.java:26)
      	at com.liferay.portal.kernel.scheduler.messaging.SchedulerEventMessageListenerWrapper.receive(SchedulerEventMessageListenerWrapper.java:65)
      	at com.liferay.portal.kernel.messaging.InvokerMessageListener.receive(InvokerMessageListener.java:74)
      	at com.liferay.portal.kernel.messaging.ParallelDestination$1.run(ParallelDestination.java:52)
      	at com.liferay.portal.kernel.concurrent.ThreadPoolExecutor$WorkerTask._runTask(ThreadPoolExecutor.java:756)
      	at com.liferay.portal.kernel.concurrent.ThreadPoolExecutor$WorkerTask.run(ThreadPoolExecutor.java:667)
      	at java.lang.Thread.run(Thread.java:745)
      Caused by: sun.security.validator.ValidatorException: PKIX path building failed: sun.security.provider.certpath.SunCertPathBuilderException: unable to find valid certification path to requested target
      	at sun.security.validator.PKIXValidator.doBuild(PKIXValidator.java:387)
      	at sun.security.validator.PKIXValidator.engineValidate(PKIXValidator.java:230)
      	at sun.security.validator.Validator.validate(Validator.java:260)
      	at sun.security.ssl.X509TrustManagerImpl.validate(X509TrustManagerImpl.java:324)
      	at sun.security.ssl.X509TrustManagerImpl.checkTrusted(X509TrustManagerImpl.java:229)
      	at sun.security.ssl.X509TrustManagerImpl.checkServerTrusted(X509TrustManagerImpl.java:124)
      	at sun.security.ssl.ClientHandshaker.serverCertificate(ClientHandshaker.java:1491)
      	... 30 more
      Caused by: sun.security.provider.certpath.SunCertPathBuilderException: unable to find valid certification path to requested target
      	at sun.security.provider.certpath.SunCertPathBuilder.build(SunCertPathBuilder.java:146)
      	at sun.security.provider.certpath.SunCertPathBuilder.engineBuild(SunCertPathBuilder.java:131)
      	at java.security.cert.CertPathBuilder.build(CertPathBuilder.java:280)
      	at sun.security.validator.PKIXValidator.doBuild(PKIXValidator.java:382)
      	... 36 more
      22:48:19,090 ERROR [liferay/scheduler_dispatch-6][LinkbackProducerUtil:240] Unable to call GET of https://radioliferay.com/
      javax.net.ssl.SSLHandshakeException: sun.security.validator.ValidatorException: PKIX path building failed: sun.security.provider.certpath.SunCertPathBuilderException: unable to find valid certification path to requested target
      	at sun.security.ssl.Alerts.getSSLException(Alerts.java:192)
      	at sun.security.ssl.SSLSocketImpl.fatal(SSLSocketImpl.java:1949)
      	at sun.security.ssl.Handshaker.fatalSE(Handshaker.java:302)
      	at sun.security.ssl.Handshaker.fatalSE(Handshaker.java:296)
      	at sun.security.ssl.ClientHandshaker.serverCertificate(ClientHandshaker.java:1509)
      	at sun.security.ssl.ClientHandshaker.processMessage(ClientHandshaker.java:216)
      	at sun.security.ssl.Handshaker.processLoop(Handshaker.java:979)
      	at sun.security.ssl.Handshaker.process_record(Handshaker.java:914)
      	at sun.security.ssl.SSLSocketImpl.readRecord(SSLSocketImpl.java:1062)
      	at sun.security.ssl.SSLSocketImpl.performInitialHandshake(SSLSocketImpl.java:1375)
      	at sun.security.ssl.SSLSocketImpl.writeRecord(SSLSocketImpl.java:747)
      	at sun.security.ssl.AppOutputStream.write(AppOutputStream.java:123)
      	at java.io.BufferedOutputStream.flushBuffer(BufferedOutputStream.java:82)
      	at java.io.BufferedOutputStream.flush(BufferedOutputStream.java:140)
      	at org.apache.commons.httpclient.HttpConnection.flushRequestOutputStream(HttpConnection.java:828)
      	at org.apache.commons.httpclient.MultiThreadedHttpConnectionManager$HttpConnectionAdapter.flushRequestOutputStream(MultiThreadedHttpConnectionManager.java:1565)
      	at org.apache.commons.httpclient.HttpMethodBase.writeRequest(HttpMethodBase.java:2116)
      	at org.apache.commons.httpclient.HttpMethodBase.execute(HttpMethodBase.java:1096)
      	at org.apache.commons.httpclient.HttpMethodDirector.executeWithRetry(HttpMethodDirector.java:398)
      	at org.apache.commons.httpclient.HttpMethodDirector.executeMethod(HttpMethodDirector.java:171)
      	at org.apache.commons.httpclient.HttpClient.executeMethod(HttpClient.java:397)
      	at com.liferay.portal.util.HttpImpl.URLtoInputStream(HttpImpl.java:1665)
      	at com.liferay.portal.util.HttpImpl.URLtoByteArray(HttpImpl.java:1510)
      	at com.liferay.portal.util.HttpImpl.URLtoByteArray(HttpImpl.java:1222)
      	at com.liferay.portal.util.HttpImpl.URLtoByteArray(HttpImpl.java:1235)
      	at com.liferay.portal.util.HttpImpl.URLtoString(HttpImpl.java:1289)
      	at com.liferay.portal.kernel.util.HttpUtil.URLtoString(HttpUtil.java:341)
      	at com.liferay.portlet.blogs.util.LinkbackProducerUtil._discoverPingbackServer(LinkbackProducerUtil.java:223)
      	at com.liferay.portlet.blogs.util.LinkbackProducerUtil.sendQueuedPingbacks(LinkbackProducerUtil.java:79)
      	at com.liferay.blogs.web.messaging.LinkbackMessageListener.doReceive(LinkbackMessageListener.java:73)
      	at com.liferay.portal.kernel.messaging.BaseMessageListener.receive(BaseMessageListener.java:26)
      	at com.liferay.portal.kernel.scheduler.messaging.SchedulerEventMessageListenerWrapper.receive(SchedulerEventMessageListenerWrapper.java:65)
      	at com.liferay.portal.kernel.messaging.InvokerMessageListener.receive(InvokerMessageListener.java:74)
      	at com.liferay.portal.kernel.messaging.ParallelDestination$1.run(ParallelDestination.java:52)
      	at com.liferay.portal.kernel.concurrent.ThreadPoolExecutor$WorkerTask._runTask(ThreadPoolExecutor.java:756)
      	at com.liferay.portal.kernel.concurrent.ThreadPoolExecutor$WorkerTask.run(ThreadPoolExecutor.java:667)
      	at java.lang.Thread.run(Thread.java:745)
      Caused by: sun.security.validator.ValidatorException: PKIX path building failed: sun.security.provider.certpath.SunCertPathBuilderException: unable to find valid certification path to requested target
      	at sun.security.validator.PKIXValidator.doBuild(PKIXValidator.java:387)
      	at sun.security.validator.PKIXValidator.engineValidate(PKIXValidator.java:230)
      	at sun.security.validator.Validator.validate(Validator.java:260)
      	at sun.security.ssl.X509TrustManagerImpl.validate(X509TrustManagerImpl.java:324)
      	at sun.security.ssl.X509TrustManagerImpl.checkTrusted(X509TrustManagerImpl.java:229)
      	at sun.security.ssl.X509TrustManagerImpl.checkServerTrusted(X509TrustManagerImpl.java:124)
      	at sun.security.ssl.ClientHandshaker.serverCertificate(ClientHandshaker.java:1491)
      	... 32 more
      Caused by: sun.security.provider.certpath.SunCertPathBuilderException: unable to find valid certification path to requested target
      	at sun.security.provider.certpath.SunCertPathBuilder.build(SunCertPathBuilder.java:146)
      	at sun.security.provider.certpath.SunCertPathBuilder.engineBuild(SunCertPathBuilder.java:131)
      	at java.security.cert.CertPathBuilder.build(CertPathBuilder.java:280)
      	at sun.security.validator.PKIXValidator.doBuild(PKIXValidator.java:382)
      	... 38 more
      

      Using text with different links result in similar errors:

      22:32:54,858 ERROR [liferay/scheduler_dispatch-3][LinkbackProducerUtil:215] Unable to call HEAD of https://github.com/marcoscv-work/Liferay-6.2-with-Bootstrap-3.x-theme
      java.lang.NullPointerException
      	at com.liferay.portal.kernel.memory.EqualityWeakReference.<init>(EqualityWeakReference.java:38)
      	at com.liferay.portal.kernel.memory.FinalizeManager$3$1.<init>(FinalizeManager.java:82)
      	at com.liferay.portal.kernel.memory.FinalizeManager$3.createReference(FinalizeManager.java:82)
      	at com.liferay.portal.kernel.memory.FinalizeManager.register(FinalizeManager.java:113)
      	at com.liferay.portal.util.HttpImpl.URLtoInputStream(HttpImpl.java:1721)
      	at com.liferay.portal.util.HttpImpl.URLtoByteArray(HttpImpl.java:1510)
      	at com.liferay.portal.util.HttpImpl.URLtoByteArray(HttpImpl.java:1222)
      	at com.liferay.portal.kernel.util.HttpUtil.URLtoByteArray(HttpUtil.java:291)
      	at com.liferay.portlet.blogs.util.LinkbackProducerUtil._discoverPingbackServer(LinkbackProducerUtil.java:208)
      	at com.liferay.portlet.blogs.util.LinkbackProducerUtil.sendQueuedPingbacks(LinkbackProducerUtil.java:79)
      	at com.liferay.blogs.web.messaging.LinkbackMessageListener.doReceive(LinkbackMessageListener.java:73)
      	at com.liferay.portal.kernel.messaging.BaseMessageListener.receive(BaseMessageListener.java:26)
      	at com.liferay.portal.kernel.scheduler.messaging.SchedulerEventMessageListenerWrapper.receive(SchedulerEventMessageListenerWrapper.java:65)
      	at com.liferay.portal.kernel.messaging.InvokerMessageListener.receive(InvokerMessageListener.java:74)
      	at com.liferay.portal.kernel.messaging.ParallelDestination$1.run(ParallelDestination.java:52)
      	at com.liferay.portal.kernel.concurrent.ThreadPoolExecutor$WorkerTask._runTask(ThreadPoolExecutor.java:756)
      	at com.liferay.portal.kernel.concurrent.ThreadPoolExecutor$WorkerTask.run(ThreadPoolExecutor.java:667)
      	at java.lang.Thread.run(Thread.java:745)
      

      Reproduced on;
      Tomcat 8.0.32 + MySQL 5.6. Portal master GIT ID: 47ef4247949e5bada12bc68d2b065bd9051708aa
      JBoss EAP 6.4.0 + Oracle 12c. Portal ee-7.0.x GIT ID: 019befd01b4595875f373adbc76f2627c3d08fd0

        Attachments

          Activity

            People

            • Votes:
              0 Vote for this issue
              Watchers:
              1 Start watching this issue

              Dates

              • Created:
                Updated:
                Resolved:
                Days since last comment:
                4 years, 11 weeks ago

                Packages

                Version Package