这个脚本的问题是使用atlas_start.py 启动atlas 大约需要10 分钟。虽然它的过程没有完成,但你会面临connection refused 错误。
为了查看是否完成,可以使用tail -n 10 application.log或cat 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**.