Support Questions

Find answers, ask questions, and share your expertise

yarn run logs - error getting logs at hostname:8041

avatar
Expert Contributor

hello cloudera community,

 

we have a problem

 

we are not able to view the execution logs of the jobs that were executed in yarn by the resourcemanager of yarn

 

when we click on logs it presents the error:

 

"Error getting logs at hostname:8041"

 

how can we solve this problem?

 

we are using cdh express 5.16.2

1 ACCEPTED SOLUTION

avatar
Expert Contributor

hi @AyazHussain 

since the problem is old, I don't remember what was done to fix it.

if the problem returns, I will test.

thanks!

View solution in original post

3 REPLIES 3

avatar
Expert Contributor

There could be multiple cause of this issue.
But at first please check the permission of the log directory for that node manager.

The Node Manager enforces that the remote root log directory exists and it has the correct permission settings. A warning is emitted in the Node Manager logs if the folder does not exist or exists but with incorrect permissions (e.g. 1777).


If created, the directory’s owner and the group will be the same user as the Node Manager’s user, and group. The group is configurable, which is useful in scenarios where the Job History Server (or JHS in short) is running in a different UNIX group than the Node Manager that can prevent aggregated logs from being deleted.


Because directly under the filesystem's root, each user has its own directory, everything under the user’s directory is created with 
0770 permissions, so that only the specific user and the hadoop group are allowed to access those directories and files.


Each individual aggregated log file will be created with 0640 permissions - providing 
rw access to the user and read-only access to the hadoop group. Since the directory has 0770 permission, the members of the hadoop group will be able to delete these files, which is important for the automatic deletion

avatar
Expert Contributor

@yagoaparecidoti 
If my suggestion helped Please accept it as a solution 

avatar
Expert Contributor

hi @AyazHussain 

since the problem is old, I don't remember what was done to fix it.

if the problem returns, I will test.

thanks!