Error "Failed while trying to construct the redirect URL to the log server" in Pivotal HD
search cancel

Error "Failed while trying to construct the redirect URL to the log server" in Pivotal HD

book

Article ID: 295119

calendar_today

Updated On:

Products

Services Suite

Issue/Introduction

This article discusses what to do when you receive the error message "Failed while trying to construct the redirect URL to the log server" when viewing logs in the Resource Manager.

When attempting to view logs for a job via the Resource Manager UI by clicking on "logs".

Error Message

"Failed while trying to construct the redirect URL to the log server. Log server url may not be configured"
 

This error message is displayed because yarn.log.server.url is not set correctly in yarn-site.xml.

Environment

Product Version: 2.1

Resolution

To resolve this issue, follow the steps below: 

1. Open /etc/gphd/hadoop/conf/yarn-site.xml in a text editor.

2. Add the following entry into yarn-site.xml:

<property>
<name>yarn.log.server.url</name>
<value>http://<LOG_SERVER_HOSTNAME>:19888/jobhistory/logs</value>
</property>

3. Restart the yarn node manager and resource manager:

sudo /etc/init.d/hadoop-yarn-nodemanager restart 
sudo /etc/init.d/hadoop-yarn-resourcemanager restart