1. 程式人生 > >activemq報警告java.nio.channels.UnresolvedAddressException

activemq報警告java.nio.channels.UnresolvedAddressException

activemq叢集啟動一直報警告:
2018-08-23 22:13:04,153 | WARN | Unexpected session error: java.io.IOException: java.nio.channels.UnresolvedAddressException | org.apache.activemq.leveldb.replicated.SlaveLevelDBStore | hawtdispatch-DEFAULT-1

主要原因是activemq.xml中

  <persistenceAdapter>
    <replicatedLevelDB
directory="activemq-data" replicas="3" bind="tcp://0.0.0.0:0" zkAddress="zoo1.example.org:2181,zoo2.example.org:2181,zoo3.example.org:2181" zkPassword="password" zkPath="/activemq/leveldb-stores" hostname="broker1.example.org" />
</persistenceAdapter>

hostname中的值需要在系統的hosts檔案中配置,如果不想配置就直接寫當前機器的IP

想買雲伺服器的可以領個免費代金券:阿里雲、騰訊雲代金券領取地址