【问题标题】:Connection refused for apache atlas serverapache atlas 服务器的连接被拒绝
【发布时间】:2019-09-29 02:10:41
【问题描述】:

我已经在 EC2 上设置了 apache atlas。设置完成后,我使用命令 python2 atlas_start.py 启动了 apache atlas,并成功启动了以下日志:

configured for local hbase.
hbase started.
configured for local solr.
solr started.
setting up solr collections...
starting atlas on host localhost
starting atlas on port 21000
..............................................................................................................................................................................................................................................................................................................
Apache Atlas Server started!!!

但是,当我尝试点击服务器 URL 以验证 apache atlas 是否已启动并运行时。它给了我连接被拒绝的错误。以下是我用来访问服务器的命令: curl -u 用户名:密码http://localhost:21000/api/atlas/admin/version

另外,在设置时它没有要求我输入用户名和密码,所以我使用 admin:admin 作为用户名密码。

【问题讨论】:

  • netstat -a 应该能够告诉你是否有东西正在监听端口 21000。
  • 您能看看我发布的答案吗?我已经完全解释了这个问题!谢谢。

标签: amazon-ec2 solr hbase apache-atlas


【解决方案1】:

您必须使用“mvn clean install -Pdist”来构建服务器,一旦完成,您需要导航到 distro/target/ 文件夹,然后从那里运行 atlas_start.py。

这里解决办法

https://community.cloudera.com/t5/Support-Questions/Apache-Atlas-Started-but-with-Errors-and-Warnings/td-p/134183

【讨论】:

    【解决方案2】:

    这个脚本的问题是使用atlas_start.py 启动atlas 大约需要10 分钟。虽然它的过程没有完成,但你会面临connection refused 错误。

    为了查看是否完成,可以使用tail -n 10 application.logcat application.log查看logs目录下的application.log文件。 2.1.0版本application.log最后10行如下:

    2021-03-28 06:00:06,536 INFO  - [main:] ~ Starting service org.apache.atlas.web.service.ActiveInstanceElectorService (Services:68)
    2021-03-28 06:00:06,540 INFO  - [NotificationHookConsumer thread-0:] ~ [atlas-hook-consumer-thread]: Starting (Logging$class:66)
    2021-03-28 06:00:06,542 INFO  - [main:] ~ HA is not enabled, no need to start leader election service (ActiveInstanceElectorService:103)
    2021-03-28 06:00:06,542 INFO  - [NotificationHookConsumer thread-0:] ~ ==> HookConsumer doWork() (NotificationHookConsumer$HookConsumer:530)
    2021-03-28 06:00:06,544 INFO  - [NotificationHookConsumer thread-0:] ~ Atlas Server is ready, can start reading Kafka events. (NotificationHookConsumer$HookConsumer:936)
    2021-03-28 06:00:06,628 WARN  - [NotificationHookConsumer thread-0:] ~ [Consumer clientId=consumer-1, groupId=atlas] Error while fetching metadata with correlation id 2 : {ATLAS_HOOK=LEADER_NOT_AVAILABLE} (NetworkClient$DefaultMetadataUpdater:968)
    2021-03-28 06:00:06,757 WARN  - [NotificationHookConsumer thread-0:] ~ [Consumer clientId=consumer-1, groupId=atlas] Error while fetching metadata with correlation id 4 : {ATLAS_HOOK=LEADER_NOT_AVAILABLE} (NetworkClient$DefaultMetadataUpdater:968)
    2021-03-28 06:00:06,932 WARN  - [NotificationHookConsumer thread-0:] ~ [Consumer clientId=consumer-1, groupId=atlas] Error while fetching metadata with correlation id 6 : {ATLAS_HOOK=LEADER_NOT_AVAILABLE} (NetworkClient$DefaultMetadataUpdater:968)
    2021-03-28 06:00:07,585 INFO  - [main:] ~ AuditFilter initialization started (AuditFilter:64)
    2021-03-28 06:00:07,585 INFO  - [main:] ~ REST_API_ENABLE_DELETE_TYPE_OVERRIDE=false (AuditFilter:69)
    

    之后就可以看到登录页面http://localhost:21000

    或使用 curl 命令:

    ~ ➤ curl -u admin:admin http://localhost:21000/api/atlas/admin/version         
    
    {"Description":"Metadata Management and Data Governance Platform over Hadoop","Revision":"release","Version":"2.1.0","Name":"apache-atlas"}%   
    default username and password are **admin**.
    

    【讨论】:

      【解决方案3】:

      有很多原因 - 做以下检查

      1. 请根据您的设置方式检查logs 目录中的日志。 (如果你只是通过 mvn 运行它)

      2. 您需要 hbase(至少)和 solr/elastic/cassandra(atlas 后端)。检查您是否正在运行嵌入式模式 - atlas 将在其中启动自己的后端。它通常设置为环境变量。即:MANAGE_LOCAL_HBASE

      3. 在启动之前确保atlas-application.properties 具有正确的配置。

        希望这会有所帮助!

      编辑: 我注意到你提到了 ec2。确保您已配置正确的安全组。

      【讨论】:

        猜你喜欢
        • 1970-01-01
        • 2019-02-18
        • 1970-01-01
        • 1970-01-01
        • 2016-05-02
        • 2014-08-30
        • 2016-11-28
        • 2017-01-04
        • 1970-01-01
        相关资源
        最近更新 更多