title: Problem with elasticsearch when deploying liferay ce 7.4 in kubernetes
body: <p>I'm trying to deploy liferay ce 7.4 in kubernetes and I can't connect elasticsearch 7.14.0. I get the following error:</p>
  <pre><code>2022-03-19 20:06:29.375 ERROR [main][ElasticsearchEngineConfigurator:93] bundle com.liferay.portal.search.elasticsearch7.impl:6.0.30 (1134)[com.liferay.portal.search.elasticsearch7.internal.ElasticsearchEngineConfigurator(3789)] : The activate method has thrown an exception
  java.lang.RuntimeException: org.elasticsearch.ElasticsearchException: ElasticsearchException[java.util.concurrent.ExecutionException: java.net.ConnectException: Timeout connecting to [search/10.110.10.150:9200]]; nested: ExecutionException[java.net.ConnectException: Timeout connecting to [search/10.110.10.150:9200]]; nested: ConnectException[Timeout connecting to [search/10.110.10.150:9200]];
       at org.elasticsearch.client.RestHighLevelClient.performClientRequest(RestHighLevelClient.java:2078) ~[?:?]
       at org.elasticsearch.client.RestHighLevelClient.internalPerformRequest(RestHighLevelClient.java:1732) ~[?:?]
       at org.elasticsearch.client.RestHighLevelClient.performRequest(RestHighLevelClient.java:1702) ~[?:?]
       at org.elasticsearch.client.RestHighLevelClient.performRequestAndParseEntity(RestHighLevelClient.java:1672) ~[?:?]
       at org.elasticsearch.client.ClusterClient.health(ClusterClient.java:119) ~[?:?]
       at com.liferay.portal.search.elasticsearch7.internal.search.engine.adapter.cluster.HealthClusterRequestExecutorImpl._getClusterHealthResponse(HealthClusterRequestExecutorImpl.java:112) ~[?:?]
  </code></pre>
  <p>I have verified that the elasticsearch is correctly deployed by running: kubectl port-forward search-59fcc9c4f6-brhcv 9200</p>
  <p>My file com.liferay.portal.search.elasticsearch7.configuration.ElasticsearchConfiguration.config:</p>
  <pre><code>additionalConfigurations=&quot;&quot;
  additionalIndexConfigurations=&quot;&quot;
  additionalTypeMappings=&quot;&quot;
  authenticationEnabled=&quot;false&quot;
  bootstrapMlockAll=&quot;false&quot;
  clusterName=&quot;LiferayElasticsearchCluster&quot;
  discoveryZenPingUnicastHostsPort=&quot;9300-9400&quot;
  embeddedHttpPort=&quot;9200&quot;
  httpCORSAllowOrigin=&quot;/https?:\\/\\/localhost(:[0-9]+)?/&quot;
  httpCORSConfigurations=&quot;&quot;
  httpCORSEnabled=&quot;true&quot;
  httpSSLEnabled=&quot;false&quot;
  indexNamePrefix=&quot;liferay-&quot;
  indexNumberOfReplicas=&quot;&quot;
  indexNumberOfShards=&quot;&quot;
  logExceptionsOnly=&quot;true&quot;
  networkBindHost=&quot;&quot;
  networkHost=&quot;&quot;
  networkHostAddresses=[ \
    &quot;&quot;, \
    ]
  networkPublishHost=&quot;&quot;
  nodeName=&quot;&quot;
  operationMode=&quot;REMOTE&quot;
  overrideTypeMappings=&quot;&quot;
  productionModeEnabled=&quot;true&quot;
  proxyHost=&quot;&quot;
  proxyPort=&quot;0&quot;
  proxyUserName=&quot;&quot;
  remoteClusterConnectionId=&quot;RemoteElasticSearchCluster&quot;
  restClientLoggerLevel=&quot;ERROR&quot;
  sidecarDebug=&quot;false&quot;
  sidecarDebugSettings=&quot;-agentlib:jdwp\=transport\=dt_socket,address\=8001,server\=y,suspend\=y,quiet\=y&quot;
  sidecarHeartbeatInterval=&quot;10000&quot;
  sidecarHome=&quot;elasticsearch7&quot;
  sidecarHttpPort=&quot;&quot;
  sidecarJVMOptions=[ \
    &quot;-Xms1g&quot;, \
    &quot;-Xmx1g&quot;, \
    &quot;-XX:+AlwaysPreTouch&quot;, \
    ]
  sidecarShutdownTimeout=&quot;10000&quot;
  trackTotalHits=&quot;true&quot;
  transportTcpPort=&quot;&quot;
  truststorePath=&quot;/path/to/localhost.p12&quot;
  truststoreType=&quot;pkcs12&quot;
  username=&quot;elastic&quot;
  </code></pre>
  <p>And my file com.liferay.portal.search.elasticsearch7.configuration.ElasticsearchConnectionConfiguration.config:</p>
  <pre><code>active=&quot;true&quot;
  authenticationEnabled=&quot;false&quot;
  connectionId=&quot;RemoteElasticSearchCluster&quot;
  httpSSLEnabled=&quot;false&quot;
  networkHostAddresses=[ \
    &quot;search:9200&quot; \
    ]
  proxyHost=&quot;&quot;
  proxyPort=&quot;0&quot;
  proxyUserName=&quot;&quot;
  truststorePath=&quot;/path/to/localhost.p12&quot;
  truststoreType=&quot;pkcs12&quot;
  username=&quot;elastic&quot;
  </code></pre>
  <p>To configure the elasticsearch connector I followed the page: <a href="http://www.liferaysavvy.com/2021/07/configure-remote-elasticsearch-cluster.html" rel="nofollow noreferrer">http://www.liferaysavvy.com/2021/07/configure-remote-elasticsearch-cluster.html</a> and <a href="https://liferay.dev/blogs/-/blogs/deploying-liferay-7-3-in-kubernetes" rel="nofollow noreferrer">https://liferay.dev/blogs/-/blogs/deploying-liferay-7-3-in-kubernetes</a></p>
  <p>Someone could help me?
  Thanks in advance.</p>