Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[CI] minio fails due to port clashes #37680

Closed
costin opened this issue Jan 22, 2019 · 8 comments
Closed

[CI] minio fails due to port clashes #37680

costin opened this issue Jan 22, 2019 · 8 comments
Assignees
Labels
:Delivery/Build Build or test infrastructure Team:Delivery Meta label for Delivery team >test-failure Triaged test failures from CI

Comments

@costin
Copy link
Member

costin commented Jan 22, 2019

Looks like minio is failing again due to clashes with already opened port.
This seems to have been already handled through
#32701 and #32208 but it still occurred in master.

For example:
https://elasticsearch-ci.elastic.co/job/elastic+elasticsearch+master+intake/1411/console

Unable to start the server: Port :36076 is already in use.

It doesn't seem like the port is hardcoded:

ServerSocket serverSocket = new ServerSocket(0, 1, InetAddress.getByName(minioAddress))

Maybe it's a race condition when gradle runs in parallel?

@costin costin added the >test-failure Triaged test failures from CI label Jan 22, 2019
@alpar-t alpar-t added the :Delivery/Build Build or test infrastructure label Jan 22, 2019
@elasticmachine
Copy link
Collaborator

Pinging @elastic/es-core-infra

@original-brownbear original-brownbear self-assigned this Jan 22, 2019
@alpar-t
Copy link
Contributor

alpar-t commented Jan 22, 2019

We don't yet run this part in parallel.
It's odd that we hit a race condition here, but the code as it's written would theoretically allow for it.
We could use the testfixtures plugin https://github.com/elastic/elasticsearch/blob/7394892b4c36f44d5addb2abd2dbca7453cb2d79/buildSrc/src/main/java/org/elasticsearch/gradle/testfixtures/TestFixturesPlugin.java
to start minio in a docker container. That would take care of port allocation and mappings.

Right now, that would imply creating a minio-fixture simmilar to smb-fixture which already uses the plugin, but we could also update the plugin to allow defining and using the fixture within the same Gradle project.

@costin
Copy link
Member Author

costin commented Jan 22, 2019

Looks like another failure on the 6.x line:
https://elasticsearch-ci.elastic.co/job/elastic+elasticsearch+6.x+multijob-unix-compatibility/os=oraclelinux/195/console

 Port 60925 for Minio process is already taken
07:22:48 java.net.BindException: Address already in use (Bind failed)

original-brownbear added a commit to original-brownbear/elasticsearch that referenced this issue Jan 23, 2019
* Retry starting Minio five times in case we run into a race between finding the free port and starting it up
* Closes elastic#37680
@original-brownbear
Copy link
Member

@atorok went for a slightly less exciting solution for now in #37747 for the time being. I'd be all for using Docker here though in general :)

original-brownbear added a commit that referenced this issue Jan 23, 2019
* Retry starting Minio five times in case we run into a race between finding the free port and starting it up
* Closes #37680
@original-brownbear
Copy link
Member

Reopening this as it's still failing with the current solution, I'm on it fixing it for good in #37783 now though.

original-brownbear added a commit to original-brownbear/elasticsearch that referenced this issue Jan 25, 2019
original-brownbear added a commit that referenced this issue Jan 25, 2019
* Use TestFixturesPlugin to Run Minio in Tests

* Closes #37680
* Closes #37783
@matriv
Copy link
Contributor

matriv commented Jan 29, 2019

New occurrence for :plugins:repository-s3:startMinio: https://elasticsearch-ci.elastic.co/job/elastic+elasticsearch+6.5+release-tests/386/console


> Task :plugins:repository-s3:startMinio FAILED
Task ':plugins:repository-s3:startMinio' is not up-to-date because:
  Task has not declared any outputs despite executing actions.
�7ERROR �8�[6CUnable to start the server: Port :60920 is already in use.
�7      �8�[6C> Please ensure no other program uses the same address/port.
:plugins:repository-s3:startMinio (Thread[Task worker for ':',5,main]) completed. Took 0.034 secs.

@matriv matriv reopened this Jan 29, 2019
@original-brownbear
Copy link
Member

original-brownbear commented Jan 29, 2019

Fix is incoming for 6.x, master is fine already, will back port this today or tomorrow :)

original-brownbear added a commit to original-brownbear/elasticsearch that referenced this issue Jan 29, 2019
* Use TestFixturesPlugin to Run Minio in Tests

* Closes elastic#37680
* Closes elastic#37783
original-brownbear added a commit that referenced this issue Jan 29, 2019
* Use TestFixturesPlugin to Run Minio in Tests

* Closes #37680
* Closes #37783
@original-brownbear
Copy link
Member

Fixed in 6.x via 4b6678f

talevy pushed a commit to talevy/elasticsearch that referenced this issue Feb 15, 2019
* Use TestFixturesPlugin to Run Minio in Tests

* Closes elastic#37680
* Closes elastic#37783
talevy added a commit that referenced this issue Mar 11, 2019
* Use TestFixturesPlugin to Run Minio in Tests  (#37852)

* Use TestFixturesPlugin to Run Minio in Tests

* Closes #37680
* Closes #37783

* Fix S3 Repository ITs When Docker is not Available (#37878)

* Disable Minio fixture and tests that require it when fixtures are disabled or Docker is not available
* Relates #37852

* add explicit composeUp dependsOn
@mark-vieira mark-vieira added the Team:Delivery Meta label for Delivery team label Nov 11, 2020
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
:Delivery/Build Build or test infrastructure Team:Delivery Meta label for Delivery team >test-failure Triaged test failures from CI
Projects
None yet
Development

No branches or pull requests

6 participants