Atlas Metadata Server error HTTP 503 response from http://localhost:21000/api/atlas/admin/status in 0.000s (HTTP Error 503: Service Unavailable)
Category : atlas
In case if you are not able to access your atlas portal or you see following error in your browser or logs.
HTTP 503 response from http://localhost:21000/api/atlas/admin/status in 0.000s (HTTP Error 503: Service Unavailable)
Then please check application.log file in /var/log/atlas location and if you see following error in logs then do not worry,following the given steps and you would resolve it easily.
Caused by: org.springframework.beans.factory.BeanCreationException: Error creating bean with name ‘userService’: Injection of autowired dependencies failed; nested exception is org.springframework.beans.factory.BeanCreationException: Could not autowire field: private org.apache.atlas.web.dao.UserDao org.apache.atlas.web.service.UserService.userDao; nested exception is org.springframework.beans.factory.BeanCreationException: Error creating bean with name ‘userDao’: Invocation of init method failed; nested exception is java.lang.RuntimeException: org.apache.atlas.AtlasException: /usr/hdp/current/atlas-server/conf/users-credentials.properties not found in file system or as class loader resource
/usr/hdp/current/atlas-server/conf/policy-store.txt not found in file system or as class loader resource
Step 1: login as atlas user or sudo to atlas then goto /usr/hdp/current/atlas-server/conf/ dir and create these files.
[s0998dnz@m1 ~]$ sudo su – atlas
[atlas@m1 ~]$ cd /usr/hdp/current/atlas-server/conf/
[atlas@m1 conf]$ touch users-credentials.properties
[atlas@m1 conf]$ touch policy-store.txt
Step 2: Now you have to update users-credentials.properties files according to your requirement. but formate would be like “username=group::sha256-password “
e.x in my case I have following
Users group can be either ADMIN, DATA_STEWARD OR DATA_SCIENTIST
Note:-password is encoded with sha256 encoding method and can be generated using unix tool.
echo -n “Password” | sha256sum
And policy-store.txt should have following values.
The policy store file format is as follows:
eg. of my policy file:
Now restart atlas and you should be good with atlas.
Leave a Reply