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

Ambari Agent start fails with local variable 'server_url' referenced before assignment

Attach filesAttach ScreenshotVotersWatch issueWatchersCreate sub-taskLinkCloneUpdate Comment AuthorReplace String in CommentUpdate Comment VisibilityDelete Comments
    XMLWordPrintableJSON

Details

    • Bug
    • Status: Resolved
    • Major
    • Resolution: Fixed
    • 2.5.0
    • 2.5.0
    • ambari-agent
    • None

    Description

      ambari-server-2.5.0.0-496.x86_64

      When starting Ambari Agent, getting this error.
      The server host is accessible.

      [root@c6405 ~]# ambari-agent start
      Verifying Python version compatibility...
      Using python  /usr/bin/python
      Checking for previously running Ambari Agent...
      Starting ambari-agent
      Verifying ambari-agent process status...
      ERROR: ambari-agent start failed. For more details, see /var/log/ambari-agent/ambari-agent.out:
      ====================
      Traceback (most recent call last):
        File "/usr/lib/python2.6/site-packages/ambari_agent/main.py", line 407, in <module>
          main(heartbeat_stop_callback)
        File "/usr/lib/python2.6/site-packages/ambari_agent/main.py", line 375, in main
          (retries, connected, stopped) = netutil.try_to_connect(server_url, MAX_RETRIES, logger)
      UnboundLocalError: local variable 'server_url' referenced before assignment
      ====================
      Agent out at: /var/log/ambari-agent/ambari-agent.out
      Agent log at: /var/log/ambari-agent/ambari-agent.log
      

      ambari-agent.log:

      INFO 2016-12-19 23:53:42,640 PingPortListener.py:50 - Ping port listener started on port: 8670
      WARNING 2016-12-19 23:53:42,761 main.py:371 - Unable to determine the IP address of the Ambari server 'c6404.ambari.apache.org'
      ERROR 2016-12-19 23:53:42,762 main.py:412 - Exiting with exception:
      Traceback (most recent call last):
        File "/usr/lib/python2.6/site-packages/ambari_agent/main.py", line 407, in <module>
          main(heartbeat_stop_callback)
        File "/usr/lib/python2.6/site-packages/ambari_agent/main.py", line 375, in main
          (retries, connected, stopped) = netutil.try_to_connect(server_url, MAX_RETRIES, logger)
      UnboundLocalError: local variable 'server_url' referenced before assignment
      INFO 2016-12-19 23:53:42,762 ExitHelper.py:53 - Performing cleanup before exiting...
      

      cc Andrew Onischuk

      Attachments

        Issue Links

        Activity

          This comment will be Viewable by All Users Viewable by All Users
          Cancel

          People

            aonishuk Andrew Onischuk
            afernandez Alejandro Fernandez
            Votes:
            0 Vote for this issue
            Watchers:
            4 Start watching this issue

            Dates

              Created:
              Updated:
              Resolved:

              Slack

                Issue deployment