Comments (6)
This looks strange, the bookie gets NoNodeException
for /ledgers/LAYOUT
, but the z-node appears to be there from the zk shell.
A couple of thoughts :
- Verify the bookie is configured with the right ZK connection string
- Verify all the ZK servers are using the same configuration (eg: if one of them is running as standalone.. you can have funny behaviors)
from pulsar.
Question then, do I need to run the ZooKeeper with Pulsar, like described in the readme? Or can I set my own zookeeper up and configure it to accept connections from Pulsar. Currently I'm doing the latter. Using 3.4.8 version. Would there be a difference?
from pulsar.
I found it, the problem was totally on my side. About to verify a fix.
from pulsar.
I have fixed my zookeepers, they now report leaders
and followers
correctly. However, what I see now is the following:
- on the bookkeeper:
...
2016-09-18 20:24:31,011 - INFO [main:ZooKeeper@438] - Initiating client connection, connectString=10.239.182.38:2181,10.239.182.39:2181,10.239.182.54:2181 sessionTimeout=10000 watcher=org.apache.bookkeeper.bookie.Bookie$7@3f3afe78
2016-09-18 20:24:31,028 - INFO [main-SendThread(10.239.182.54:2181):ClientCnxn$SendThread@1032] - Opening socket connection to server 10.239.182.54/10.239.182.54:2181. Will not attempt to authenticate using SASL (unknown error)
2016-09-18 20:24:31,100 - INFO [main-SendThread(10.239.182.54:2181):ClientCnxn$SendThread@876] - Socket connection established to 10.239.182.54/10.239.182.54:2181, initiating session
2016-09-18 20:24:31,108 - INFO [main-SendThread(10.239.182.54:2181):ClientCnxn$SendThread@1299] - Session establishment complete on server 10.239.182.54/10.239.182.54:2181, sessionid = 0x3573ee2302d05a4, negotiated timeout = 10000
2016-09-18 20:24:31,202 - INFO [main:Bookie@422] - INSTANCEID not exists in zookeeper. Not considering it for data verification
...
2016-09-18 20:28:47,484 - INFO [GarbageCollectorThread-1-1-SendThread(10.239.182.39:2181):ClientCnxn$SendThread@1299] - Session establishment complete on server 10.239.182.39/10.239.182.39:2181, sessionid = 0x2573ee2c2a9067f, negotiated timeout = 10000
2016-09-18 20:28:47,485 - INFO [GarbageCollectorThread-1-1:GarbageCollectorThread$LedgerManagerProviderImpl@636] - instantiate ledger manager org.apache.bookkeeper.meta.FlatLedgerManagerFactory
2016-09-18 20:28:47,490 - INFO [GarbageCollectorThread-1-1:ZooKeeper@684] - Session: 0x2573ee2c2a9067f closed
2016-09-18 20:28:47,490 - INFO [GarbageCollectorThread-1-1-EventThread:ClientCnxn$EventThread@519] - EventThread shut down for session: 0x2573ee2c2a9067f
2016-09-18 20:28:48,479 - INFO [GarbageCollectorThread-1-1:ZooKeeper@438] - Initiating client connection, connectString=10.239.182.38:2181,10.239.182.39:2181,10.239.182.54:2181 sessionTimeout=10000 watcher=org.apache.bookkeeper.zookeeper.ZooKeeperWatcherBase@15e7f5ee
2016-09-18 20:28:48,479 - INFO [GarbageCollectorThread-1-1-SendThread(10.239.182.39:2181):ClientCnxn$SendThread@1032] - Opening socket connection to server 10.239.182.39/10.239.182.39:2181. Will not attempt to authenticate using SASL (unknown error)
2016-09-18 20:28:48,480 - INFO [GarbageCollectorThread-1-1-SendThread(10.239.182.39:2181):ClientCnxn$SendThread@876] - Socket connection established to 10.239.182.39/10.239.182.39:2181, initiating session
2016-09-18 20:28:48,484 - INFO [GarbageCollectorThread-1-1-SendThread(10.239.182.39:2181):ClientCnxn$SendThread@1299] - Session establishment complete on server 10.239.182.39/10.239.182.39:2181, sessionid = 0x2573ee2c2a90680, negotiated timeout = 10000
...
And it keeps going on like this. I think it's not normal?
- On the broker, I get this:
2016-09-18 20:31:08,470 - WARN [main:ZkBookieRackAffinityMapping@140] - Error getting bookie info from zk, using default rack node /default-rack: KeeperErrorCode = NoNode for /bookies
2016-09-18 20:31:08,481 - INFO [main:RackawareEnsemblePlacementPolicy@339] - Initialize rackaware ensemble placement policy @ <Bookie:10.239.182.50:0> : com.yahoo.pulsar.zookeeper.ZkBookieRackAffinityMapping.
2016-09-18 20:31:08,579 - WARN [main-EventThread:ZkBookieRackAffinityMapping@140] - Error getting bookie info from zk, using default rack node /default-rack: KeeperErrorCode = NoNode for /bookies
2016-09-18 20:31:08,579 - INFO [main-EventThread:NetworkTopology@394] - Adding a new node: /default-rack/10.239.182.34:3181
2016-09-18 20:31:08,585 - WARN [main-EventThread:ZkBookieRackAffinityMapping@140] - Error getting bookie info from zk, using default rack node /default-rack: KeeperErrorCode = NoNode for /bookies
2016-09-18 20:31:08,585 - INFO [main-EventThread:NetworkTopology@394] - Adding a new node: /default-rack/10.239.182.47:3181
2016-09-18 20:31:08,595 - WARN [main-EventThread:ZkBookieRackAffinityMapping@140] - Error getting bookie info from zk, using default rack node /default-rack: KeeperErrorCode = NoNode for /bookies
2016-09-18 20:31:08,595 - INFO [main-EventThread:NetworkTopology@394] - Adding a new node: /default-rack/10.239.182.27:3181
2016-09-18 20:31:08,601 - ERROR [main:PulsarService@311] - Configured layout org.apache.bookkeeper.meta.HierarchicalLedgerManagerFactory does not match existing layout org.apache.bookkeeper.meta.FlatLedgerManagerFactory
java.io.IOException: Configured layout org.apache.bookkeeper.meta.HierarchicalLedgerManagerFactory does not match existing layout org.apache.bookkeeper.meta.FlatLedgerManagerFactory
at org.apache.bookkeeper.meta.LedgerManagerFactory.newLedgerManagerFactory(LedgerManagerFactory.java:159)
at org.apache.bookkeeper.client.BookKeeper.<init>(BookKeeper.java:299)
at org.apache.bookkeeper.client.BookKeeper.<init>(BookKeeper.java:266)
at org.apache.bookkeeper.client.BookKeeper.<init>(BookKeeper.java:243)
at com.yahoo.pulsar.broker.BookKeeperClientFactoryImpl.create(BookKeeperClientFactoryImpl.java:79)
at com.yahoo.pulsar.broker.ManagedLedgerClientFactory.<init>(ManagedLedgerClientFactory.java:38)
at com.yahoo.pulsar.broker.PulsarService.start(PulsarService.java:231)
at com.yahoo.pulsar.PulsarBrokerStarter.main(PulsarBrokerStarter.java:59)
2016-09-18 20:31:08,603 - ERROR [main:PulsarBrokerStarter@62] - Failed to start pulsar service.
com.yahoo.pulsar.broker.PulsarServerException: java.io.IOException: Configured layout org.apache.bookkeeper.meta.HierarchicalLedgerManagerFactory does not match existing layout org.apache.bookkeeper.meta.FlatLedgerManagerFactory
at com.yahoo.pulsar.broker.PulsarService.start(PulsarService.java:312)
at com.yahoo.pulsar.PulsarBrokerStarter.main(PulsarBrokerStarter.java:59)
Caused by: java.io.IOException: Configured layout org.apache.bookkeeper.meta.HierarchicalLedgerManagerFactory does not match existing layout org.apache.bookkeeper.meta.FlatLedgerManagerFactory
at org.apache.bookkeeper.meta.LedgerManagerFactory.newLedgerManagerFactory(LedgerManagerFactory.java:159)
at org.apache.bookkeeper.client.BookKeeper.<init>(BookKeeper.java:299)
at org.apache.bookkeeper.client.BookKeeper.<init>(BookKeeper.java:266)
at org.apache.bookkeeper.client.BookKeeper.<init>(BookKeeper.java:243)
at com.yahoo.pulsar.broker.BookKeeperClientFactoryImpl.create(BookKeeperClientFactoryImpl.java:79)
at com.yahoo.pulsar.broker.ManagedLedgerClientFactory.<init>(ManagedLedgerClientFactory.java:38)
at com.yahoo.pulsar.broker.PulsarService.start(PulsarService.java:231)
... 1 more
I don't see any way to specify the layout?
from pulsar.
Right, the setting I'm looking for is ledgerManagerType=hierarchical
from pulsar.
Referenced PR fixes the issues described here for the cluster setup.
from pulsar.
Related Issues (20)
- [Bug] Unable to initialize Stream metadata
- Jetty Upgrade: 12.x.x or latest HOT 6
- [Bug][broker] cursor will read in dead loop when do tailing-read with enableTransaction
- [Bug] Pulsar Functions ignores compressionType and crypto config for producers created with Context produce/newOutputMessage methods
- [Bug] Update partitions call is failing when topic level replication is disabled HOT 1
- As a websocket consumer I need to set InitialSubscriptionPosition to earliest HOT 1
- [Bug][broker] BrokerId npe when broker restart HOT 1
- [Bug] Unexpected Package Manager Behavior in Pulsar 3.3.0 Standalone Mode HOT 1
- [Bug] Dead lock error in Pulsar 3.0.
- [Bug] PulsarStandalone started with error if `--stream-storage-port` is not 4181
- [master branch] failed-test: OpenTelemetrySanityTest.testOpenTelemetryMetricsOtlpExport
- [Bug][broker] MessageDeduplication replay timeout would cause topic loading stuck and become unavailable
- [Bug] bin/pulsar-perf will cause the pulsar service to freeze
- [Bug][meta] Broker enter the loop to recreate zkSession failed, cause broker stuck
- [Doc] homepage 404
- [Bug][broker]PulsarRegistrationClient writableBookieInfo cache and readOnlyBookieInfo cache update fail causing broker to misjudge that the bookie is unavailable.
- [Bug][broker] Occur so many ERROR log in broker, which is confusing HOT 2
- [improve][broker] cursor read entry would trigger readMoreEntry() one more time when addWaitingCursor and notify
- [Bug] [broker] Non persistent topic will be lost when it is unloaded.
- [Bug] [broker]Sometime after reset cursor, unable to reconsume all messages in topic when ttl is less than retention time. HOT 1
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from pulsar.