Uploaded image for project: 'Ambari'
  1. Ambari
  2. AMBARI-25200

Ambari returns stack trace in HTML doc when an error occurs retrieving details for a user resource that does not exist

    XMLWordPrintableJSON

Details

    Description

      Ambari returns stack trace in HTML doc when an error occurs retrieving details for a user resource that does not exist. The acting user must be an Ambari Administrator:

      curl -u admin:admin -X GET http://localhost:8080/api/v1/users/doesnotexist/authorizations?fields=*
      
      <html>
      <head>
      <meta http-equiv="Content-Type" content="text/html;charset=utf-8"/>
      <title>Error 500 Server Error</title>
      </head>
      <body><h2>HTTP ERROR 500</h2>
      <p>Problem accessing /api/v1/users/anyotheruser/authorizations. Reason:
      <pre>    Server Error</pre></p><h3>Caused by:</h3><pre>com.google.common.cache.CacheLoader$InvalidCacheLoadException: CacheLoader returned null for key anyotheruser.
      at com.google.common.cache.LocalCache$Segment.getAndRecordStats(LocalCache.java:2350)
      at com.google.common.cache.LocalCache$Segment.loadSync(LocalCache.java:2320)
      at com.google.common.cache.LocalCache$Segment.lockedGetOrLoad(LocalCache.java:2282)
      at com.google.common.cache.LocalCache$Segment.get(LocalCache.java:2197)
      at com.google.common.cache.LocalCache.get(LocalCache.java:3937)
      at com.google.common.cache.LocalCache.getOrLoad(LocalCache.java:3941)
      at com.google.common.cache.LocalCache$LocalLoadingCache.get(LocalCache.java:4824)
      at com.google.common.cache.LocalCache$LocalLoadingCache.getUnchecked(LocalCache.java:4830)
      at org.apache.ambari.server.controller.internal.UserPrivilegeResourceProvider.getResources(UserPrivilegeResourceProvider.java:282)
      ...
      

      Attachments

        Activity

          People

            dmitriusan Dmitry Lysnichenko
            dmitriusan Dmitry Lysnichenko
            Votes:
            0 Vote for this issue
            Watchers:
            3 Start watching this issue

            Dates

              Created:
              Updated:
              Resolved:

              Time Tracking

                Estimated:
                Original Estimate - Not Specified
                Not Specified
                Remaining:
                Remaining Estimate - 0h
                0h
                Logged:
                Time Spent - 50m
                50m