Unable to Configure LCS Client 4.1.0 WAR File to Connect Through Proxy

This article outlines a specific known issue that exists within the LCS Client 4.1.0 in which proxy configuration settings made through portlet-ext.properties do not take effect.

The issue has been resolved in the LCS Client 4.1.1 app version.

Resolution

When configuring LCS 4.1.0 war by setting proxy values in portlet-ext.properties, as described under option 2 in the LCS Preconfiguration article, it will lead to the following error:

ERROR [LCS Worker 0][LCSUtil:333] Unable to connect to the test JSON web service
com.liferay.petra.json.web.service.client.JSONWebServiceTransportException$CommunicationFailure: Unable to transmit request
	at com.liferay.petra.json.web.service.client.internal.JSONWebServiceClientImpl.execute(JSONWebServiceClientImpl.java:607)
	at com.liferay.lcs.jsonwebserviceclient.OAuthJSONWebServiceClientImpl.execute(OAuthJSONWebServiceClientImpl.java:92)
	at com.liferay.petra.json.web.service.client.internal.JSONWebServiceClientImpl.doGet(JSONWebServiceClientImpl.java:281)
	at com.liferay.petra.json.web.service.client.internal.JSONWebServiceClientImpl.doGet(JSONWebServiceClientImpl.java:246)
	at com.liferay.lcs.jsonwebserviceclient.OAuthJSONWebServiceClientImpl.testOAuthRequest(OAuthJSONWebServiceClientImpl.java:54)
	at com.liferay.lcs.util.LCSUtil.isLCSPortletAuthorized(LCSUtil.java:322)
	at com.liferay.lcs.util.LCSUtil.isLCSPortletAuthorized(LCSUtil.java:282)
	at com.liferay.lcs.runnable.LCSConnectorRunnable._activateLCS(LCSConnectorRunnable.java:177)
	at com.liferay.lcs.runnable.LCSConnectorRunnable.run(LCSConnectorRunnable.java:61)
	at java.util.concurrent.Executors$RunnableAdapter.call(Executors.java:511)
	at java.util.concurrent.FutureTask.run(FutureTask.java:266)
	at java.util.concurrent.ScheduledThreadPoolExecutor$ScheduledFutureTask.access$201(ScheduledThreadPoolExecutor.java:180)
	at java.util.concurrent.ScheduledThreadPoolExecutor$ScheduledFutureTask.run(ScheduledThreadPoolExecutor.java:293)
	at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1149)
	at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:624)
	at java.lang.Thread.run(Thread.java:748)
Caused by: java.util.concurrent.ExecutionException: java.net.ConnectException: Connection timed out
	at org.apache.http.concurrent.BasicFuture.getResult(BasicFuture.java:70)
	at org.apache.http.concurrent.BasicFuture.get(BasicFuture.java:80)
	at org.apache.http.impl.nio.client.FutureWrapper.get(FutureWrapper.java:70)
	at com.liferay.petra.json.web.service.client.internal.JSONWebServiceClientImpl.execute(JSONWebServiceClientImpl.java:566)
	... 15 more
Caused by: java.net.ConnectException: Connection timed out
	at sun.nio.ch.SocketChannelImpl.checkConnect(Native Method)
	at sun.nio.ch.SocketChannelImpl.finishConnect(SocketChannelImpl.java:717)
	at org.apache.http.impl.nio.reactor.DefaultConnectingIOReactor.processEvent(DefaultConnectingIOReactor.java:171)
	at org.apache.http.impl.nio.reactor.DefaultConnectingIOReactor.processEvents(DefaultConnectingIOReactor.java:145)
	at org.apache.http.impl.nio.reactor.AbstractMultiworkerIOReactor.execute(AbstractMultiworkerIOReactor.java:348)
	at org.apache.http.impl.nio.conn.PoolingNHttpClientConnectionManager.execute(PoolingNHttpClientConnectionManager.java:194)
	at org.apache.http.impl.nio.client.CloseableHttpAsyncClientBase$1.run(CloseableHttpAsyncClientBase.java:64)
	... 1 more

To prevent this network communication issue we recommend using the latest version, LCS Client 4.1.1, when defining the proxy settings in the portlet-ext.properties file. 

Please follow the LCS Preconfiguration article for instructions on how to update your LCS Client app and how to configure proxy communication.

¿Fue útil este artículo?
Usuarios a los que les pareció útil: 0 de 0