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

SocketManager: Use new feature to select path automatically #4092

Merged

Conversation

daipom
Copy link
Contributor

@daipom daipom commented Mar 12, 2023

Use ServerEngine's new feature:

treasure-data/serverengine#143

On Windows, this prevents SocketManager from wrongly selecting an unavailable port, such as a port in excluded port range.

Which issue(s) this PR fixes:
Fixes treasure-data/serverengine#140
(Sorry, I made the issue in ServerEngine, and not made it here.)

What this PR does / why we need it:
On Windows, ServerEngine::SocketManager::generate_path sometimes generates an unavailable port.
This makes Fluentd fail to start.

To fix this, I made the fix for ServerEngine:

This is a fix on Fluentd's side.

Docs Changes:
Not needed.

Release Note:
Fix bug that Fluentd sometimes tries to use an unavailable port and fails to start on Windows.

@daipom
Copy link
Contributor Author

daipom commented Mar 12, 2023

@daipom
Copy link
Contributor Author

daipom commented Mar 12, 2023

treasure-data/serverengine#140 (comment)

Fluentd shouldn't open shared port if it's not configured using multi workers.

We should fix this too, but it seems difficult to do it before the next release...
I'll make the issue later.

@daipom daipom force-pushed the use-serverengine-socketmanager-open_auto_path branch from e481703 to 2a3f39d Compare March 14, 2023 01:57
@daipom daipom changed the title Draft: SocketManager: Use new feature: open_auto_path Draft: SocketManager: Use new feature to select path automatically Mar 14, 2023
@ashie
Copy link
Member

ashie commented Mar 14, 2023

I've released ServerEngine v2.3.2.
Please require it.

@daipom
Copy link
Contributor Author

daipom commented Mar 14, 2023

Thanks! I have updated the dependency.

Checking tests...

@daipom daipom changed the title Draft: SocketManager: Use new feature to select path automatically SocketManager: Use new feature to select path automatically Mar 14, 2023
@daipom daipom marked this pull request as ready for review March 14, 2023 05:05
@daipom
Copy link
Contributor Author

daipom commented Mar 14, 2023

The currently failing tests are not related to this issue.

Use ServerEngine's new feature:

treasure-data/serverengine#143

On Windows, this prevents SocketManager from wrongly selecting an
unavailable port, such as a port in excluded port range.

Signed-off-by: Daijiro Fukuda <[email protected]>
@ashie ashie force-pushed the use-serverengine-socketmanager-open_auto_path branch from 893101f to 34c3435 Compare March 14, 2023 07:05
@ashie
Copy link
Member

ashie commented Mar 14, 2023

Rebased.

@daipom
Copy link
Contributor Author

daipom commented Mar 14, 2023

Rebased.

Thanks!

Copy link
Member

@ashie ashie left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM

@ashie ashie merged commit 12ff819 into fluent:master Mar 14, 2023
@daipom daipom deleted the use-serverengine-socketmanager-open_auto_path branch March 14, 2023 08:38
@daipom
Copy link
Contributor Author

daipom commented Mar 14, 2023

Thanks for your review!

@ashie ashie added this to the v1.16.0 milestone Mar 15, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Windows: Apply excluded port range to SocketManager
2 participants