You are viewing a plain text version of this content. The canonical link for it is here.
Posted to user@knox.apache.org by Aneela Saleem <an...@platalytics.com> on 2015/07/09 21:40:35 UTC

Cannot access the Knox Login service

I was trying to connect to Knox gateway using Knox login() service. Service
was successfully deployed and running. But after sometime it started
throwing exception "Http://101 unauthorized"

I don't know what's the cause. Gateway.log file is not giving any logs
about 'access granted or not'.

I have reconfigured my LDAP server. I have reconfigured Knox. I have
restarted Tomcat. But still unable to resolve the issue.

Following is the code:

def login(username: String, password: String): String = {
    try {
      val gateway = "https://localhost:8443/gateway/cluster1"
      val hadoop = Hadoop.login(gateway, username, password)
   println(Hdfs.ls(hadoop).dir("/").now().toString)
        return "successfully logged in"
    } catch {
      case ex: Exception => {
        println(ex.getCause().toString())
        ex.getMessage()
      }
    }
  }

Re: Cannot access the Knox Login service

Posted by Aneela Saleem <an...@platalytics.com>.
Thanks issue resolved

On Fri, Jul 10, 2015 at 1:31 AM, Kevin Minder <ke...@hortonworks.com>
wrote:

>   Not enough info to help yet.  Try turning up the logging
> in conf/gateway-log4j.properties and see if that helps provide something
> useful.
>
>   From: Aneela Saleem
> Reply-To: "user@knox.apache.org"
> Date: Thursday, July 9, 2015 at 3:41 PM
> To: "user@knox.apache.org"
> Subject: Re: Cannot access the Knox Login service
>
>   Sorry hit "Send" too early.
>
>  Can anyone please help what could be the issue?
>

Re: Cannot access the Knox Login service

Posted by Kevin Minder <ke...@hortonworks.com>.
Not enough info to help yet.  Try turning up the logging in conf/gateway-log4j.properties and see if that helps provide something useful.

From: Aneela Saleem
Reply-To: "user@knox.apache.org<ma...@knox.apache.org>"
Date: Thursday, July 9, 2015 at 3:41 PM
To: "user@knox.apache.org<ma...@knox.apache.org>"
Subject: Re: Cannot access the Knox Login service

Sorry hit "Send" too early.

Can anyone please help what could be the issue?

Re: Cannot access the Knox Login service

Posted by Aneela Saleem <an...@platalytics.com>.
Sorry hit "Send" too early.

Can anyone please help what could be the issue?