elastic / elasticsearch

Free and Open Source, Distributed, RESTful Search Engine
https://www.elastic.co/products/elasticsearch
Other
69.69k stars 24.66k forks source link

[CI] CopyBytesSocketChannelTests testSendAndReceive failing #113457

Open elasticsearchmachine opened 6 days ago

elasticsearchmachine commented 6 days ago

Build Scans:

Reproduction Line:

./gradlew ":modules:transport-netty4:pooledTest" --tests "org.elasticsearch.transport.netty4.CopyBytesSocketChannelTests.testSendAndReceive" -Dtests.seed=2F04274FD84C76CA -Dtests.locale=sv-FI -Dtests.timezone=Australia/Tasmania -Druntime.java=22

Applicable branches: main

Reproduces locally?: N/A

Failure History: See dashboard&_a=(controlGroupInput:(chainingSystem:HIERARCHICAL,controlStyle:twoLine,ignoreParentSettings:(ignoreFilters:!f,ignoreQuery:!f,ignoreTimerange:!f,ignoreValidations:!t),panels:('0c0c9cb8-ccd2-45c6-9b13-96bac4abc542':(explicitInput:(dataViewId:fbbdc689-be23-4b3d-8057-aa402e9ed0c5,enhancements:(),fieldName:task.keyword,grow:!t,id:'0c0c9cb8-ccd2-45c6-9b13-96bac4abc542',searchTechnique:wildcard,selectedOptions:!(),singleSelect:!t,title:'Gradle%20Task',width:medium),grow:!t,order:0,type:optionsListControl,width:small),'144933da-5c1b-4257-a969-7f43455a7901':(explicitInput:(dataViewId:fbbdc689-be23-4b3d-8057-aa402e9ed0c5,enhancements:(),fieldName:name.keyword,grow:!t,id:'144933da-5c1b-4257-a969-7f43455a7901',searchTechnique:wildcard,selectedOptions:!('testSendAndReceive'),title:Test,width:medium),grow:!t,order:2,type:optionsListControl,width:medium),'4e6ad9d6-6fdc-4fcc-bf1a-aa6ca79e0850':(explicitInput:(dataViewId:fbbdc689-be23-4b3d-8057-aa402e9ed0c5,enhancements:(),fieldName:className.keyword,grow:!t,id:'4e6ad9d6-6fdc-4fcc-bf1a-aa6ca79e0850',searchTechnique:wildcard,selectedOptions:!('org.elasticsearch.transport.netty4.CopyBytesSocketChannelTests'),title:Suite,width:medium),grow:!t,order:1,type:optionsListControl,width:medium)))))

Failure Message:

java.net.UnknownHostException: i-091f351c6828ec0c3.us-west-2.compute.internal: i-091f351c6828ec0c3.us-west-2.compute.internal: Name or service not known

Issue Reasons:

Note: This issue was created using new test triage automation. Please report issues or feedback to es-delivery.

elasticsearchmachine commented 6 days ago

Pinging @elastic/es-distributed (Team:Distributed)

DaveCTurner commented 4 days ago

The issue here is that the libc function gethostname(char*, size_t) returns i-04ed67b8496d913ba.us-west-2.compute.internal, a genuine hostname, but then doing a DNS lookup for this name yields no address:

CopyBytesSocketChannelTests > testSendAndReceive FAILED
    java.net.UnknownHostException: i-04ed67b8496d913ba.us-west-2.compute.internal: i-04ed67b8496d913ba.us-west-2.compute.internal: Name or service not known
        at java.base/java.net.InetAddress.getLocalHost(InetAddress.java:1924)
        at org.elasticsearch.transport.netty4.CopyBytesSocketChannelTests.setUp(CopyBytesSocketChannelTests.java:75)

        Caused by:
        java.net.UnknownHostException: i-04ed67b8496d913ba.us-west-2.compute.internal: Name or service not known
            at java.base/java.net.Inet6AddressImpl.lookupAllHostAddr(Native Method)
            at java.base/java.net.Inet6AddressImpl.lookupAllHostAddr(Inet6AddressImpl.java:52)
            at java.base/java.net.InetAddress$PlatformResolver.lookupByName(InetAddress.java:1221)
            at java.base/java.net.InetAddress.getAddressesFromNameService(InetAddress.java:1816)
            at java.base/java.net.InetAddress$NameServiceAddresses.get(InetAddress.java:1149)
            at java.base/java.net.InetAddress.getAllByName0(InetAddress.java:1806)
            at java.base/java.net.InetAddress.getLocalHost(InetAddress.java:1919)
            ... 1 more

I think this is a test infra problem, this DNS lookup should work. Maybe we're missing an entry in /etc/hosts?

elasticsearchmachine commented 4 days ago

Pinging @elastic/es-delivery (Team:Delivery)

mark-vieira commented 4 days ago

This looks like the same issue as https://github.com/elastic/elasticsearch/issues/113111