[
https://issues.apache.org/jira/browse/FLINK-10361?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=16679667#comment-16679667
]
ASF GitHub Bot commented on FLINK-10361:
----------------------------------------
zentol opened a new pull request #7057: [FLINK-10361][tests][ES] Properly wait
for ES to start
URL: https://github.com/apache/flink/pull/7057
## What is the purpose of the change
This PR fixes `elasticsearch-common.sh#wait_elasticsearch_working` not
actually waiting for ES to start up.
In light of the recent move towards `set -e` we no longer rely on the return
code and instead grep the curl output for expected contents (the returned JSON
contains a cluster_name field).
If not present we continue looping.
## Verifying this change
Locally verified by querying a bogus ports and ensuring that the test fails
early.
----------------------------------------------------------------
This is an automated message from the Apache Git Service.
To respond to the message, please log on GitHub and use the
URL above to go to the specific comment.
For queries about this service, please contact Infrastructure at:
[email protected]
> Elasticsearch (v6.3.1) sink end-to-end test instable
> ----------------------------------------------------
>
> Key: FLINK-10361
> URL: https://issues.apache.org/jira/browse/FLINK-10361
> Project: Flink
> Issue Type: Bug
> Components: Tests
> Affects Versions: 1.6.0, 1.7.0
> Reporter: Till Rohrmann
> Assignee: Chesnay Schepler
> Priority: Critical
> Labels: pull-request-available, test-stability
> Fix For: 1.7.0
>
> Attachments: flink-elasticsearch-logs.tgz
>
>
> The Elasticsearch (v6.3.1) sink end-to-end test is instable. Running it on an
> Amazon instance it failed with the following exception in the logs:
> {code}
> 2018-09-17 20:46:04,856 INFO org.apache.flink.runtime.taskmanager.Task
> - Source: Sequence Source -> Flat Map -> Sink: Unnamed (1/1)
> (cb23fdd9df0d4e09270b2ae9970efbac) switched from RUNNING to FAILED.
> java.io.IOException: Connection refused
> at
> org.elasticsearch.client.RestClient$SyncResponseListener.get(RestClient.java:728)
> at
> org.elasticsearch.client.RestClient.performRequest(RestClient.java:235)
> at
> org.elasticsearch.client.RestClient.performRequest(RestClient.java:198)
> at
> org.elasticsearch.client.RestHighLevelClient.performRequest(RestHighLevelClient.java:522)
> at
> org.elasticsearch.client.RestHighLevelClient.ping(RestHighLevelClient.java:275)
> at
> org.apache.flink.streaming.connectors.elasticsearch6.Elasticsearch6ApiCallBridge.createClient(Elasticsearch6ApiCallBridge.java:81)
> at
> org.apache.flink.streaming.connectors.elasticsearch6.Elasticsearch6ApiCallBridge.createClient(Elasticsearch6ApiCallBridge.java:47)
> at
> org.apache.flink.streaming.connectors.elasticsearch.ElasticsearchSinkBase.open(ElasticsearchSinkBase.java:296)
> at
> org.apache.flink.api.common.functions.util.FunctionUtils.openFunction(FunctionUtils.java:36)
> at
> org.apache.flink.streaming.api.operators.AbstractUdfStreamOperator.open(AbstractUdfStreamOperator.java:102)
> at
> org.apache.flink.streaming.api.operators.StreamSink.open(StreamSink.java:48)
> at
> org.apache.flink.streaming.runtime.tasks.StreamTask.openAllOperators(StreamTask.java:424)
> at
> org.apache.flink.streaming.runtime.tasks.StreamTask.invoke(StreamTask.java:290)
> at org.apache.flink.runtime.taskmanager.Task.run(Task.java:711)
> at java.lang.Thread.run(Thread.java:748)
> Caused by: java.net.ConnectException: Connection refused
> 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:192)
> at
> org.apache.http.impl.nio.client.CloseableHttpAsyncClientBase$1.run(CloseableHttpAsyncClientBase.java:64)
> ... 1 more
> {code}
> I assume that we should harden the test against connection problems a little
> bit better.
--
This message was sent by Atlassian JIRA
(v7.6.3#76005)