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

Make standalone to advertise "localhost" to avoid failure when hostname is not resolvable #5856

Merged
merged 2 commits into from Jan 4, 2020

Conversation

@merlimat
Copy link
Contributor

merlimat commented Dec 13, 2019

Motivation

The standalone service is failing to startup when the hostname is not resolvable to an IP. This is common in laptops.

The reason is that the function worker in standalone is trying to connect to the advertised address rather than "localhost".

To fix this, we should make the standalone to always advertise "localhost" as the the broker address. This is ok because in any case the standalone treats the advertisement as the pulsar proxy, in that it forces the clients to always go through the same service url, so a client connecting from a different host won't have problems.

…me is not resolvable
@merlimat merlimat added the type/bug label Dec 13, 2019
@merlimat merlimat added this to the 2.5.0 milestone Dec 13, 2019
@merlimat merlimat self-assigned this Dec 13, 2019
@@ -67,7 +67,7 @@ public PulsarStandaloneStarter(String[] args) throws Exception {
zkServers = this.getAdvertisedAddress();
} else if (isBlank(config.getAdvertisedAddress())) {
// Use advertised address as local hostname
config.setAdvertisedAddress(ServiceConfigurationUtils.unsafeLocalhostResolve());
config.setAdvertisedAddress("localhost");

This comment has been minimized.

Copy link
@sijie

sijie Dec 14, 2019

Member

I feel it is better to try to add a method to ServiceConfigurationUtils to resolve localhost first. It is not resolved then fallback to use "localhost".

@codelipenghui

This comment has been minimized.

Copy link
Contributor

codelipenghui commented Dec 17, 2019

run java8 tests

9 similar comments
@aahmed-se

This comment has been minimized.

Copy link
Contributor

aahmed-se commented Dec 17, 2019

run java8 tests

@sijie

This comment has been minimized.

Copy link
Member

sijie commented Dec 19, 2019

run java8 tests

@sijie

This comment has been minimized.

Copy link
Member

sijie commented Dec 19, 2019

run java8 tests

@sijie

This comment has been minimized.

Copy link
Member

sijie commented Dec 20, 2019

run java8 tests

@sijie

This comment has been minimized.

Copy link
Member

sijie commented Dec 24, 2019

run java8 tests

@sijie

This comment has been minimized.

Copy link
Member

sijie commented Dec 24, 2019

run java8 tests

@sijie

This comment has been minimized.

Copy link
Member

sijie commented Dec 24, 2019

run java8 tests

@sijie

This comment has been minimized.

Copy link
Member

sijie commented Dec 25, 2019

run java8 tests

@sijie

This comment has been minimized.

Copy link
Member

sijie commented Dec 30, 2019

run java8 tests

…vice-url
@sijie

This comment has been minimized.

Copy link
Member

sijie commented Jan 2, 2020

retest this please

@sijie

This comment has been minimized.

Copy link
Member

sijie commented Jan 2, 2020

run java8 tests

3 similar comments
@tuteng

This comment has been minimized.

Copy link
Member

tuteng commented Jan 3, 2020

run java8 tests

@tuteng

This comment has been minimized.

Copy link
Member

tuteng commented Jan 3, 2020

run java8 tests

@wolfstudy

This comment has been minimized.

Copy link
Member

wolfstudy commented Jan 4, 2020

run java8 tests

@tuteng tuteng merged commit f95c71f into apache:master Jan 4, 2020
14 of 18 checks passed
14 of 18 checks passed
cpp-tests cpp-tests
Details
backwards-compatibility backwards-compatibility
Details
unit-test-flaky unit-test-flaky
Details
unit-tests unit-tests
Details
cli
Details
function-state
Details
messaging
Details
process
Details
schema
Details
sql
Details
standalone
Details
thread
Details
tiered-filesystem
Details
tiered-jcloud
Details
License check
Details
Jenkins: C++ / Python Tests SUCCESS
Details
Jenkins: Integration Tests SUCCESS
Details
Jenkins: Java 8 - Unit Tests SUCCESS
Details
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
You can’t perform that action at this time.