You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@pulsar.apache.org by GitBox <gi...@apache.org> on 2019/11/26 09:55:31 UTC

[GitHub] [pulsar] vishalananth07 opened a new issue #5749: Bookie does not start because of UnknownHostException

vishalananth07 opened a new issue #5749: Bookie does not start because of UnknownHostException
URL: https://github.com/apache/pulsar/issues/5749
 
 
   We are trying to set up Pulsar using 3 systems each with 8GB RAM and AMD A8 processors. We are planning on running bookkeeper, zookeeper, broker on the same machines.
   
   **Describe the bug**
   [main] ERROR org.apache.bookkeeper.server.Main - Failed to build bookie server
   java.net.UnknownHostException: Trying to listen on loopback address, 127.0.1.1:3181 but this is forbidden by default (see ServerConfiguration#getAllowLoopback()).
   
   **To Reproduce**
   Steps to reproduce the behavior:
   1. Follow the setup steps given at https://pulsar.apache.org/docs/en/deploy-bare-metal/
   2. We added the servers to the zookeeper.conf file and create data directory and id. We are using the following Zookeper configuration
   ```
   server.1=10.6.8.14:2888:3888
   server.2=10.6.8.13:2888:3888
   server.3=10.6.8.15:2888:3888
   ```
   
   3. We initialized cluster metadata as follows in the server.1 machine
   ```
   bin/pulsar initialize-cluster-metadata --cluster pulsar-cluster-1 --zookeeper 10.6.8.14:2181 --web-service-url http://10.6.8.14:8080,10.6.8.13:8080,10.6.8.15:8080 --broker-service-url pulsar://10.6.8.14:6650,10.6.8.13:6650,10.6.8.15:6650 --configuration-store 10.6.8.14:2181
   ```
   
   4. We changed bookkeeper.conf as follows
   ```
   zkServers=10.6.8.14:2181,10.6.8.13:2181,10.6.8.15:2181
   ```
   
   5. We started Bookie and got the following error
   ```
   bin/bookkeeper bookie
   JMX enabled by default
   JAVA_HOME not set, using java from PATH. (/usr/bin/java)
   15:02:38.366 [main] INFO  org.apache.bookkeeper.server.Main - Using configuration file /home/slave1fyp/apache-pulsar-2.4.1/conf/bookkeeper.conf
   15:02:38.371 [main] INFO  org.apache.bookkeeper.server.Main - Hello, I'm your bookie, listening on port 3181. Metadata service uri is zk+null://10.6.8.14:2181;10.6.8.13:2181;10.6.8.15:2181/ledgers. Journals are in [data/bookkeeper/journal]. Ledgers are stored in data/bookkeeper/ledgers.
   15:02:38.394 [main] INFO  org.apache.bookkeeper.server.Main - Load lifecycle component : org.apache.bookkeeper.server.service.StatsProviderService
   15:02:38.741 [main] INFO  org.apache.bookkeeper.proto.BookieServer - {
     "readBufferSizeBytes" : "4096",
     "statsProviderClass" : "org.apache.bookkeeper.stats.prometheus.PrometheusMetricsProvider",
     "majorCompactionThreshold" : "0.5",
     "numJournalCallbackThreads" : "8",
     "httpServerPort" : "8000",
     "lostBookieRecoveryDelay" : "0",
     "journalAlignmentSize" : "4096",
     "compactionRateByBytes" : "1000000",
     "httpServerClass" : "org.apache.bookkeeper.http.vertx.VertxHttpServer",
     "dbStorage_rocksDB_numFilesInLevel0" : "4",
     "minUsableSizeForIndexFileCreation" : "1073741824",
     "gcOverreplicatedLedgerWaitTime" : "86400000",
     "journalMaxGroupWaitMSec" : "1",
     "dbStorage_rocksDB_numLevels" : "-1",
     "dbStorage_rocksDB_bloomFilterBitsPerKey" : "10",
     "ledgerStorageClass" : "org.apache.bookkeeper.bookie.storage.ldb.DbLedgerStorage",
     "auditorPeriodicBookieCheckInterval" : "86400",
     "gcWaitTime" : "900000",
     "compactionRate" : "1000",
     "fileInfoFormatVersionToWrite" : "0",
     "entryLogFilePreallocationEnabled" : "true",
     "journalSyncData" : "true",
     "zkServers" : "[10.6.8.14:2181, 10.6.8.13:2181, 10.6.8.15:2181]",
     "compactionRateByEntries" : "1000",
     "dbStorage_rocksDB_maxSizeInLevel1MB" : "256",
     "diskCheckInterval" : "10000",
     "auditorPeriodicCheckInterval" : "604800",
     "dbStorage_rocksDB_writeBufferSizeMB" : "64",
     "autoRecoveryDaemonEnabled" : "true",
     "maxPendingAddRequestsPerThread" : "10000",
     "majorCompactionInterval" : "86400",
     "httpServerEnabled" : "false",
     "flushInterval" : "60000",
     "journalFlushWhenQueueEmpty" : "false",
     "minorCompactionInterval" : "3600",
     "dbStorage_rocksDB_blockCacheSize" : "",
     "isThrottleByBytes" : "false",
     "numAddWorkerThreads" : "0",
     "dbStorage_rocksDB_sstSizeInMB" : "64",
     "journalDirectory" : "data/bookkeeper/journal",
     "journalWriteBufferSizeKB" : "64",
     "diskUsageThreshold" : "0.95",
     "openFileLimit" : "0",
     "prometheusStatsHttpPort" : "8000",
     "zkLedgersRootPath" : "/ledgers",
     "journalMaxSizeMB" : "2048",
     "journalAdaptiveGroupWrites" : "true",
     "openLedgerRereplicationGracePeriod" : "30",
     "ledgerDirectories" : "data/bookkeeper/ledgers",
     "zkTimeout" : "30000",
     "dbStorage_rocksDB_blockSize" : "65536",
     "journalMaxBackups" : "5",
     "maxPendingReadRequestsPerThread" : "2500",
     "useHostNameAsBookieID" : "false",
     "rereplicationEntryBatchSize" : "100",
     "allowLoopback" : "false",
     "readOnlyModeEnabled" : "true",
     "journalRemoveFromPageCache" : "true",
     "dbStorage_readAheadCacheMaxSizeMb" : "",
     "zkEnableSecurity" : "false",
     "numHighPriorityWorkerThreads" : "8",
     "dbStorage_readAheadCacheBatchSize" : "1000",
     "journalFormatVersionToWrite" : "5",
     "writeBufferSizeBytes" : "65536",
     "bookiePort" : "3181",
     "dbStorage_writeCacheMaxSizeMb" : "",
     "pageLimit" : "0",
     "logSizeLimit" : "1073741824",
     "advertisedAddress" : "",
     "bookieDeathWatchInterval" : "1000",
     "numReadWorkerThreads" : "8",
     "minorCompactionThreshold" : "0.2",
     "serverTcpNoDelay" : "true",
     "journalBufferedWritesThreshold" : "524288",
     "compactionMaxOutstandingRequests" : "100000",
     "journalPreAllocSizeMB" : "16"
   }
   15:02:39.490 [main] ERROR org.apache.bookkeeper.server.Main - Failed to build bookie server
   java.net.UnknownHostException: Trying to listen on loopback address, 127.0.1.1:3181 but this is forbidden by default (see ServerConfiguration#getAllowLoopback()).
   If this happen, you can consider specifying the network interface to listen on (e.g. listeningInterface=eth0) or specifying the advertised address (e.g. advertisedAddress=172.x.y.z)
   	at org.apache.bookkeeper.bookie.Bookie.getBookieAddress(Bookie.java:570) ~[org.apache.bookkeeper-bookkeeper-server-4.9.2.jar:4.9.2]
   	at org.apache.bookkeeper.proto.BookieNettyServer.<init>(BookieNettyServer.java:164) ~[org.apache.bookkeeper-bookkeeper-server-4.9.2.jar:4.9.2]
   	at org.apache.bookkeeper.proto.BookieServer.<init>(BookieServer.java:104) ~[org.apache.bookkeeper-bookkeeper-server-4.9.2.jar:4.9.2]
   	at org.apache.bookkeeper.server.service.BookieService.<init>(BookieService.java:43) ~[org.apache.bookkeeper-bookkeeper-server-4.9.2.jar:4.9.2]
   	at org.apache.bookkeeper.server.Main.buildBookieServer(Main.java:301) ~[org.apache.bookkeeper-bookkeeper-server-4.9.2.jar:4.9.2]
   	at org.apache.bookkeeper.server.Main.doMain(Main.java:221) [org.apache.bookkeeper-bookkeeper-server-4.9.2.jar:4.9.2]
   	at org.apache.bookkeeper.server.Main.main(Main.java:203) [org.apache.bookkeeper-bookkeeper-server-4.9.2.jar:4.9.2]
   	at org.apache.bookkeeper.proto.BookieServer.main(BookieServer.java:314) [org.apache.bookkeeper-bookkeeper-server-4.9.2.jar:4.9.2]
   ```
   
   **Expected behavior**
   Bookkeeper starts
   
   **Desktop (please complete the following information):**
    - 3 PC's with 8GB RAM and AMD A8 processors
   
   

----------------------------------------------------------------
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
 
For queries about this service, please contact Infrastructure at:
users@infra.apache.org


With regards,
Apache Git Services