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

Can not get real ip when use RackawareEnsemblePlacementPolicy #2784

Open
casuallc opened this issue Sep 3, 2021 · 1 comment
Open

Can not get real ip when use RackawareEnsemblePlacementPolicy #2784

casuallc opened this issue Sep 3, 2021 · 1 comment
Labels

Comments

@casuallc
Copy link

casuallc commented Sep 3, 2021

BUG REPORT

Describe the bug

  • set ensemblePlacementPolicy=org.apache.bookkeeper.client.RackawareEnsemblePlacementPolicy
  • set reppDnsResolverClass=myclass(implements DNSToSwitchMapping)

In some server, I get 127.0.0.1 when the method DNSToSwitchMapping.resolve called.
But the real ip (129.x.x.x) is expected.

Screenshots

image

Additional context

@casuallc
Copy link
Author

10:58:55.262 [BookieJournal-3181] INFO  org.apache.bookkeeper.bookie.JournalChannel - Opening journal data/bookkeeper/journal/current/17c2a57469c.txn
10:58:55.335 [main-EventThread] INFO  org.apache.bookkeeper.discover.ZKRegistrationClient - Update BookieInfoCache (writable bookie) 192.168.1.23:3181 -> BookieServiceInfo{properties={}, endpoints=[EndpointInfo{id=bookie, port=3181, host=192.168.1.23, protocol=bookie-rpc, auth=[], extensions=[]}]}
10:58:55.336 [BookKeeperClientScheduler-OrderedScheduler-0-0] INFO  org.apache.bookkeeper.net.NetworkTopologyImpl - Adding a new node: /default-rack/192.168.1.23:3181
10:58:55.350 [main-EventThread] INFO  org.apache.bookkeeper.discover.ZKRegistrationClient - Update BookieInfoCache (writable bookie) 192.168.1.16:3181 -> BookieServiceInfo{properties={}, endpoints=[EndpointInfo{id=bookie, port=3181, host=192.168.1.16, protocol=bookie-rpc, auth=[], extensions=[]}]}
10:58:55.350 [BookKeeperClientScheduler-OrderedScheduler-0-0] INFO  org.apache.bookkeeper.net.NetworkTopologyImpl - Adding a new node: /default-rack/192.168.1.16:3181


10:58:55.874 [main-EventThread] INFO  org.apache.bookkeeper.discover.ZKRegistrationClient - Update BookieInfoCache (writable bookie) 192.168.1.23:3181 -> BookieServiceInfo{properties={}, endpoints=[EndpointInfo{id=bookie, port=3181, host=192.168.1.23, protocol=bookie-rpc, auth=[], extensions=[]}]}
10:58:55.875 [main-EventThread] INFO  org.apache.bookkeeper.discover.ZKRegistrationClient - Update BookieInfoCache (writable bookie) 192.168.1.16:3181 -> BookieServiceInfo{properties={}, endpoints=[EndpointInfo{id=bookie, port=3181, host=192.168.1.16, protocol=bookie-rpc, auth=[], extensions=[]}]}
10:58:55.929 [AuditorElector-192.168.1.23:3181] INFO  org.apache.bookkeeper.replication.Auditor - AuthProvider used by the Auditor is null
10:58:55.952 [AuditorElector-192.168.1.23:3181] INFO  org.apache.bookkeeper.replication.Auditor - Initializing lostBookieRecoveryDelay zNode to the conif value: 0
10:58:55.954 [AuditorElector-192.168.1.23:3181] INFO  org.apache.bookkeeper.replication.Auditor - I'm starting as Auditor Bookie. ID: 192.168.1.23:3181
10:58:55.962 [AuditorElector-192.168.1.23:3181] INFO  org.apache.bookkeeper.replication.Auditor - Auditor periodic bookie checking enabled 'auditorPeriodicBookieCheckInterval' 86400 seconds
10:58:55.962 [AuditorElector-192.168.1.23:3181] INFO  org.apache.bookkeeper.replication.Auditor - Auditor periodic ledger checking enabled 'auditorPeriodicCheckInterval' 604800 seconds
10:58:55.964 [AuditorElector-192.168.1.23:3181] WARN  org.apache.bookkeeper.meta.ZkLedgerUnderreplicationManager - checkAllLedgersCtimeZnode is not yet available
10:58:55.964 [AuditorElector-192.168.1.23:3181] INFO  org.apache.bookkeeper.replication.Auditor - checkAllLedgers scheduling info.  checkAllLedgersLastExecutedCTime: -1 durationSinceLastExecutionInSecs: -1 initialDelay: 0 interval: 604800
10:58:55.964 [AuditorBookie-192.168.1.23:3181] INFO  org.apache.bookkeeper.replication.Auditor - Starting auditBookies
10:58:55.965 [AuditorElector-192.168.1.23:3181] INFO  org.apache.bookkeeper.replication.Auditor - Periodic placementPolicy check disabled
10:58:55.965 [AuditorElector-192.168.1.23:3181] INFO  org.apache.bookkeeper.replication.Auditor - Periodic replicas check disabled
10:58:55.994 [AuditorBookie-192.168.1.23:3181] INFO  org.apache.bookkeeper.replication.Auditor - Completed auditBookies
10:58:55.996 [AuditorBookie-192.168.1.23:3181] INFO  org.apache.bookkeeper.replication.Auditor - Starting checkAllLedgers

10:58:56.057 [AuditorBookie-192.168.1.23:3181] INFO  org.apache.bookkeeper.client.RackawareEnsemblePlacementPolicyImpl - Initialize rackaware ensemble placement policy @ <Bookie:127.0.0.1:0> @ /default-rack : org.apache.bookkeeper.client.TopologyAwareEnsemblePlacementPolicy$DefaultResolver.
10:58:56.057 [AuditorBookie-192.168.1.23:3181] INFO  org.apache.bookkeeper.client.RackawareEnsemblePlacementPolicyImpl - Not weighted
10:58:56.058 [AuditorBookie-192.168.1.23:3181] INFO  org.apache.bookkeeper.client.BookKeeper - Weighted ledger placement is not enabled

note
server ip is 192.168.1.23
hostname is 127.0.0.1

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

1 participant