独立运行Apache Atlas

时间:2017-11-30 17:46:01

标签: apache-atlas

我试图在Ubuntu上以独立的方式运行Apache Atlas - 这意味着无需设置Solr和/或HBase。 我所做的(根据文档:http://atlas.apache.org/0.8.1/InstallationSteps.html)克隆了Git存储库,用嵌入式HBase和dSolr构建了maven项目:

2017-11-30 17:14:24,093 INFO  - [main:] ~ >>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>> (Atlas:216)
2017-11-30 17:14:24,093 INFO  - [main:] ~ Server starting with TLS ? false on port 21000 (Atlas:217)
2017-11-30 17:14:24,093 INFO  - [main:] ~ <<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<< (Atlas:218)
2017-11-30 17:14:27,684 INFO  - [main:] ~ No authentication method configured.  Defaulting to simple authentication (LoginProcessor:102)
2017-11-30 17:14:28,527 INFO  - [main:] ~ Logged in user daniel (auth:SIMPLE) (LoginProcessor:77)
2017-11-30 17:14:31,777 INFO  - [main:] ~ Not running setup per configuration atlas.server.run.setup.on.start. (SetupSteps$SetupRequired:189)
2017-11-30 17:14:39,456 WARN  - [main-SendThread(localhost:2181):] ~ Session 0x0 for server null, unexpected error, closing socket connection and attempting reconnect (ClientCnxn$SendThread:110$
java.net.ConnectException: Connection refused
        at sun.nio.ch.SocketChannelImpl.checkConnect(Native Method)
        at sun.nio.ch.SocketChannelImpl.finishConnect(SocketChannelImpl.java:717)
        at org.apache.zookeeper.ClientCnxnSocketNIO.doTransport(ClientCnxnSocketNIO.java:361)
        at org.apache.zookeeper.ClientCnxn$SendThread.run(ClientCnxn.java:1081)
2017-11-30 17:14:39,594 WARN  - [main:] ~ Possibly transient ZooKeeper, quorum=localhost:2181, exception=org.apache.zookeeper.KeeperException$ConnectionLossException: KeeperErrorCode = Connecti$
2017-11-30 17:14:40,593 WARN  - [main-SendThread(localhost:2181):] ~ Session 0x0 for server null, unexpected error, closing socket connection and attempting reconnect (ClientCnxn$SendThread:110$
java.net.ConnectException: Connection refused
        at sun.nio.ch.SocketChannelImpl.checkConnect(Native Method)

解压缩resuting tar.gz文件并执行bin / atlas_start.py - 未更改任何配置。据我所知,应该实际启动HBase和Atlas的documentatino - 对吧?

这是我在logs / applocation.log中找到的:

        at sun.nio.ch.SocketChannelImpl.finishConnect(SocketChannelImpl.java:717)
        at org.apache.zookeeper.ClientCnxnSocketNIO.doTransport(ClientCnxnSocketNIO.java:361)
        at org.apache.zookeeper.ClientCnxn$SendThread.run(ClientCnxn.java:1081)
2017-11-30 17:14:56,185 WARN  - [main:] ~ Possibly transient ZooKeeper, quorum=localhost:2181, exception=org.apache.zookeeper.KeeperException$ConnectionLossException: KeeperErrorCode = Connecti$
2017-11-30 17:14:56,186 ERROR - [main:] ~ ZooKeeper exists failed after 4 attempts (RecoverableZooKeeper:277)
2017-11-30 17:14:56,186 WARN  - [main:] ~ hconnection-0x1dba4e060x0, quorum=localhost:2181, baseZNode=/hbase Unable to set watcher on znode (/hbase/hbaseid) (ZKUtil:544)
org.apache.zookeeper.KeeperException$ConnectionLossException: KeeperErrorCode = ConnectionLoss for /hbase/hbaseid
        at org.apache.zookeeper.KeeperException.create(KeeperException.java:99)
        at org.apache.zookeeper.KeeperException.create(KeeperException.java:51)
        at org.apache.zookeeper.ZooKeeper.exists(ZooKeeper.java:1045)
        at org.apache.hadoop.hbase.zookeeper.RecoverableZooKeeper.exists(RecoverableZooKeeper.java:221)
        at org.apache.hadoop.hbase.zookeeper.ZKUtil.checkExists(ZKUtil.java:541)
        at org.apache.hadoop.hbase.zookeeper.ZKClusterId.readClusterIdZNode(ZKClusterId.java:65)

...

this.gizi.karbohidrat

对我来说,它看起来就好像脚本没有启动HBase(和Zookeeper)。

我错过了什么吗?

感谢您的提示!

2 个答案:

答案 0 :(得分:5)

好的,同时我找出了问题。启动脚本显然不执行脚本conf / atlas-env.sh,它设置了一些环境变量。其中包括MANAGE_LOCAL_HBASE和MANAGE_LOCAL_SOLR。因此,如果您将这两个env变量设置为true(并且正确设置嵌入式HBase所需的JAVA_HOME),那么Atlas会自动启动HBase和Solr - 我们将获得一个本地运行的Atlas实例!

也许这可以帮助将来遇到同样问题的人!

答案 1 :(得分:0)

2021 年 3 月更新

apache atlas有两种运行方式:

A) 从头开始​​构建:

  1. git clone https://github.com/apache/atlas
  2. mvn clean install -DskipTests
  3. mvn clean package -Pdist -DskipTests
  4. 运行 atlas_start.py
    python <atlas-directory>/conf/atlas_start.py
    

B) 使用 docker image

docker-compose.yml

version: "3.3"

services:
  atlas:
    image: sburn/apache-atlas
    container_name: atlas
    ports:
      - "21000:21000"
    volumes:
      - "./bash_script:/app"
    command: bash -exc "/opt/apache-atlas-2.1.0/bin/atlas_start.py"
docker-compose up
相关问题