No sample data added to Apache Atlas Server: running apache quick_start.py

715 Views Asked by At

I have installed Apache-Atlas with embedded-hbase-solr on REHL. I am able to access http://localhost:21000 but when I run /apache-atlas-sources-2.0.0/distro/target/apache-atlas-2.0.0/bin/quick_start.py it throws below error.

log4j:WARN No such property [maxFileSize] in org.apache.log4j.PatternLayout.
log4j:WARN No such property [maxBackupIndex] in org.apache.log4j.PatternLayout.
log4j:WARN No such property [maxFileSize] in org.apache.log4j.PatternLayout.
log4j:WARN No such property [maxBackupIndex] in org.apache.log4j.PatternLayout.
log4j:WARN No such property [maxFileSize] in org.apache.log4j.PatternLayout.
log4j:WARN No such property [maxFileSize] in org.apache.log4j.PatternLayout.
log4j:WARN No such property [maxBackupIndex] in org.apache.log4j.PatternLayout.
Enter username for atlas :- atlas
Enter password for atlas :-

Creating sample types:
Exception in thread "main" org.apache.atlas.AtlasServiceException: Metadata service API org.apache.atlas.AtlasClientV2$API_V2@2507d7cd failed with status 401 (Unauthorized) Response Body ()
        at org.apache.atlas.AtlasBaseClient.callAPIWithResource(AtlasBaseClient.java:427)
        at org.apache.atlas.AtlasBaseClient.callAPIWithResource(AtlasBaseClient.java:353)
        at org.apache.atlas.AtlasBaseClient.callAPI(AtlasBaseClient.java:229)
        at org.apache.atlas.AtlasClientV2.createAtlasTypeDefs(AtlasClientV2.java:232)
        at org.apache.atlas.examples.QuickStartV2.createTypes(QuickStartV2.java:213)
        at org.apache.atlas.examples.QuickStartV2.runQuickstart(QuickStartV2.java:163)
        at org.apache.atlas.examples.QuickStartV2.main(QuickStartV2.java:147)
No sample data added to Apache Atlas Server.

Below is the quick_start.log

2020-07-11 23:03:25,336 INFO  - [main:] ~ Looking for atlas-application.properties in classpath (ApplicationProperties:110)
2020-07-11 23:03:25,341 INFO  - [main:] ~ Loading atlas-application.properties from file:/apache-atlas-sources-2.0.0/distro/target/apache-atlas-2.0.0/conf/atlas-application.properties (ApplicationProperties:123)
2020-07-11 23:03:25,387 INFO  - [main:] ~ Using graphdb backend 'janus' (ApplicationProperties:273)
2020-07-11 23:03:25,399 INFO  - [main:] ~ Using storage backend 'hbase2' (ApplicationProperties:284)
2020-07-11 23:03:25,399 INFO  - [main:] ~ Using index backend 'solr' (ApplicationProperties:295)
2020-07-11 23:03:25,399 INFO  - [main:] ~ Setting solr-wait-searcher property 'true' (ApplicationProperties:301)
2020-07-11 23:03:25,400 INFO  - [main:] ~ Setting index.search.map-name property 'false' (ApplicationProperties:305)
2020-07-11 23:03:25,400 INFO  - [main:] ~ Property (set to default) atlas.graph.cache.db-cache = true (ApplicationProperties:318)
2020-07-11 23:03:25,400 INFO  - [main:] ~ Property (set to default) atlas.graph.cache.db-cache-clean-wait = 20 (ApplicationProperties:318)
2020-07-11 23:03:25,400 INFO  - [main:] ~ Property (set to default) atlas.graph.cache.db-cache-size = 0.5 (ApplicationProperties:318)
2020-07-11 23:03:25,400 INFO  - [main:] ~ Property (set to default) atlas.graph.cache.tx-cache-size = 15000 (ApplicationProperties:318)
2020-07-11 23:03:25,400 INFO  - [main:] ~ Property (set to default) atlas.graph.cache.tx-dirty-size = 120 (ApplicationProperties:318)
2020-07-11 23:03:37,405 INFO  - [main:] ~ Client has only one service URL, will use that for all actions: http://localhost:21000 (AtlasBaseClient:321)
2020-07-11 23:03:37,930 INFO  - [main:] ~ method=POST path=api/atlas/v2/types/typedefs/ contentType=application/json; charset=UTF-8 accept=application/json status=401 (AtlasBaseClient:387)

Any help is appreciated

3

There are 3 best solutions below

1
On

Default user-name/password for Apache-Atlas is : admin/admin.

This is configurable from : conf/users-credentials.properties file, when using file based authentication.

0
On

The quick_start.py would ask for username and password. The default username and password is admin.

Enter username for atlas :- admin
Enter password for atlas :- admin

Then, you should see the following log in your terminal:

Creating sample types: 
Created type [DB]
Created type [Table]
Created type [StorageDesc]
Created type [Column]
Created type [LoadProcess]
Created type [LoadProcessExecution]
Created type [View]
Created type [JdbcAccess]
Created type [ETL]
Created type [Metric]
Created type [PII]
Created type [Fact]
Created type [Dimension]
Created type [Log Data]
Created type [Table_DB]
Created type [View_DB]
Created type [View_Tables]
Created type [Table_Columns]
Created type [Table_StorageDesc]

Creating sample entities: 
Created entity of type [DB], guid: f0ff2e1a-bc50-40e0-84ac-926ca74258b7
Created entity of type [DB], guid: 6f7768af-604b-4628-ac3f-f40b3caed850
Created entity of type [DB], guid: 0cba0440-5ccb-43f3-b3fe-bd756afefeb1
Created entity of type [Table], guid: 64db3739-4a97-47f1-86e1-9882b4cefa33
Created entity of type [Table], guid: 199bc872-2eeb-4ec6-9f60-19b303edb06f
Created entity of type [Table], guid: c2ff0389-cb52-46c2-bb2a-d3aa712282f9
Created entity of type [Table], guid: 48b088de-ca96-43d9-bc13-8038c73409f8
Created entity of type [Table], guid: 023a8a69-ce0f-4c3c-bacb-f38c3d8ff725
Created entity of type [Table], guid: cac58477-fc1e-4b78-b3fa-7537b3a5d603
Created entity of type [Table], guid: 7a2863cf-3f2e-47e0-a33e-75cb906403c5
Created entity of type [Table], guid: bee4250d-c4bd-47b4-a7f1-b102cc440fb4
Created entity of type [View], guid: 2eeb8ffe-1fe2-499c-8b55-3e1b8c572d0b
Created entity of type [View], guid: da787577-ae9b-4d9b-b4b4-935fe92a8fe0
Created entity of type [LoadProcess], guid: c785a52a-69fc-4d8f-b1b0-704f25a583df
Created entity of type [LoadProcessExecution], guid: 169778ed-7ef1-4e28-b792-897f9a6d2a70
Created entity of type [LoadProcessExecution], guid: b8832398-812c-45ed-9223-ac3503263926
Created entity of type [LoadProcess], guid: 6a679027-f8af-4466-b620-768cfd3cd7eb
Created entity of type [LoadProcessExecution], guid: 5214dcea-37c4-48af-b8dd-46b9230d00cd
Created entity of type [LoadProcessExecution], guid: 9c4d95b0-cb3f-4d8a-8c90-14ab7fa7b545
Created entity of type [LoadProcess], guid: 334bcd6c-636d-4f16-9136-05b91020b055
Created entity of type [LoadProcessExecution], guid: c84f21c2-528e-4415-91cd-4fdecc7a3742
Created entity of type [LoadProcessExecution], guid: 3af888c1-4f56-48b3-b411-9ae25ebb21a8

Sample DSL Queries: 
query [from DB] returned [3] rows.
query [DB] returned [3] rows.
query [DB where name=%22Reporting%22] returned [1] rows.
query [DB where name=%22encode_db_name%22] returned [ 0 ] rows.
query [Table where name=%2522sales_fact%2522] returned [1] rows.
query [DB where name="Reporting"] returned [1] rows.
query [DB where DB.name="Reporting"] returned [1] rows.
query [DB name = "Reporting"] returned [1] rows.
query [DB DB.name = "Reporting"] returned [1] rows.
query [DB where name="Reporting" select name, owner] returned [1] rows.
query [DB where DB.name="Reporting" select name, owner] returned [1] rows.
query [DB has name] returned [3] rows.
query [DB where DB has name] returned [3] rows.
query [DB is JdbcAccess] returned [ 0 ] rows.
query [from Table] returned [8] rows.
query [Table] returned [8] rows.
query [Table is Dimension] returned [5] rows.
query [Column where Column isa PII] returned [3] rows.
query [View is Dimension] returned [2] rows.
query [Column select Column.name] returned [10] rows.
query [Column select name] returned [9] rows.
query [Column where Column.name="customer_id"] returned [1] rows.
query [from Table select Table.name] returned [8] rows.
query [DB where (name = "Reporting")] returned [1] rows.
query [DB where DB is JdbcAccess] returned [ 0 ] rows.
query [DB where DB has name] returned [3] rows.
query [DB as db1 Table where (db1.name = "Reporting")] returned [ 0 ] rows.
query [Dimension] returned [9] rows.
query [JdbcAccess] returned [2] rows.
query [ETL] returned [10] rows.
query [Metric] returned [4] rows.
query [PII] returned [3] rows.
query [`Log Data`] returned [4] rows.
query [Table where name="sales_fact", columns] returned [4] rows.
query [Table where name="sales_fact", columns as column select column.name, column.dataType, column.comment] returned [4] rows.
query [from DataSet] returned [10] rows.
query [from Process] returned [3] rows.

Sample Lineage Info: 
time_dim(Table) -> loadSalesDaily(LoadProcess)
loadSalesMonthly(LoadProcess) -> sales_fact_monthly_mv(Table)
sales_fact(Table) -> loadSalesDaily(LoadProcess)
sales_fact_daily_mv(Table) -> loadSalesMonthly(LoadProcess)
loadSalesDaily(LoadProcess) -> sales_fact_daily_mv(Table)
Sample data added to Apache Atlas Server.
0
On

Please find the steps to get admin password if the authentication is file based:

Stpe1: Goto the Atlas Conf Directory

$ATLAS_HOME/conf

Step2: Find the users-credentials.properties file and get the sha256-password information. In the below example, password is ** 8c6976e5b5410415bde908bd4dee15dfb167a9c873fc4bb8a81f6f2ab448a918**

#username=group::sha256-password
admin=ROLE_ADMIN:: 8c6976e5b5410415bde908bd4dee15dfb167a9c873fc4bb8a81f6f2ab448a918

Step3: Decrypt the above sha256 password using online tools. https://md5decrypt.net/en/Sha256/

Password is admin