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

Agent can not download modified stack files if wrong http_proxy is set up

    XMLWordPrintableJSON

Details

    • Task
    • Status: Resolved
    • Major
    • Resolution: Fixed
    • 1.6.0
    • 1.6.1
    • ambari-agent
    • None

    Description

      Agent can not download (update) modified stack scripts/templates from the server if there is a problem with proxy configuration. That is because python's urllib2.urlopen() function also tries to make use of proxies.
      From the docs:

      The urlopen() function works transparently with proxies which do not require authentication. In a Unix or Windows environment, set the http_proxy, or ftp_proxy environment variables to a URL that identifies the proxy server before starting the Python interpreter
      

      I've created a separate jira to be able to provide fix for BUG-17737 as soon as possible

      STR:

      1. Create 2-node cluster
      2. Install server&agent
      3. Define wrong proxy on both hosts e.g.
        export http_proxy="http://8.8.8.8:23"
        
      4. Restart ambari-agent from the same shell to make use of this proxy
      5. Try modifying some service scripts at ambari-server
      6. Restart ambari-server
      7. Ambari-agent should download updated scripts to a local cache (during installation of the relevant stack), but he can not do that due to proxy settings. There are error messages at log about that.

      Possible solution: Disable proxy settings when creating urllib2 opener (at FileCache)
      The same urllib2 is used at Controller, so agent might not be able to connect to ambari-server at all with wrong proxy settings. But I did not notice such behaviour for some reason

      Attachments

        Issue Links

          Activity

            People

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

              Dates

                Created:
                Updated:
                Resolved: