Support Questions
Find answers, ask questions, and share your expertise
Announcements
Alert: Welcome to the Unified Cloudera Community. Former HCC members be sure to read and learn how to activate your account here.

Unable to determine the IP address of the Ambari server - Vagrant full port fowarding - 3 servers cluster

Unable to determine the IP address of the Ambari server - Vagrant full port fowarding - 3 servers cluster

New Contributor

Hi,

I'm in trouble with an error message i can't find the origin neither can i solve using bypass actions

I've got 3 servers.

o Each have it's public ip adress.

o Each have it's private network address.

o Each server host a vagrant driven VBox server :

Server 1 Vbox have an ambari-server and client installed

Server 2 and 3 Vboxes have an ambari-client installed

o Each server or Vbox can ping each other using public or private address.

o Each Vbox foward about 30 ports to similar ones on it's host thanks to the fact the hosting company ask more than 60 bucks for any additionnal virtual private network IP (if not i'd had each vbox having it's own published ip). For port 22, it's a bit different as its fowarded to port 2223)

Deploying the cluster, agents from server 2 and server 3 register with no trouble, but not the agent from server 1 (server 1 host the ambari-server too)

I really can't find why.

You'll find below the ambari server error log and the host etc/hosts

Ambari server logs :

INFO 2016-12-06 20:01:15,702 main.py:90 - loglevel=logging.INFO
INFO 2016-12-06 20:01:15,702 main.py:90 - loglevel=logging.INFO
INFO 2016-12-06 20:01:15,702 main.py:90 - loglevel=logging.INFO
INFO 2016-12-06 20:01:15,704 DataCleaner.py:39 - Data cleanup thread started
INFO 2016-12-06 20:01:15,705 DataCleaner.py:120 - Data cleanup started
INFO 2016-12-06 20:01:15,706 DataCleaner.py:122 - Data cleanup finished
INFO 2016-12-06 20:01:15,713 PingPortListener.py:50 - Ping port listener started on port: 8670
WARNING 2016-12-06 20:01:15,715 main.py:351 - Unable to determine the IP address of the Ambari server \'.ambarimaster.datadomain\'
ERROR 2016-12-06 20:01:15,715 main.py:392 - Exiting with exception:
Traceback (most recent call last):
  File "/usr/lib/python2.6/site-packages/ambari_agent/main.py", line 387, in <module>
    main(heartbeat_stop_callback)
  File "/usr/lib/python2.6/site-packages/ambari_agent/main.py", line 355, 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-06 20:01:15,715 ExitHelper.py:53 - Performing cleanup before exiting...
', None)
('  File "/usr/lib/python2.6/site-packages/ambari_agent/main.py", line 355, 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-06 19:59:49,810 ExitHelper.py:53 - Performing cleanup before exiting...
INFO 2016-12-06 20:01:15,702 main.py:90 - loglevel=logging.INFO
INFO 2016-12-06 20:01:15,702 main.py:90 - loglevel=logging.INFO
INFO 2016-12-06 20:01:15,702 main.py:90 - loglevel=logging.INFO
INFO 2016-12-06 20:01:15,704 DataCleaner.py:39 - Data cleanup thread started
INFO 2016-12-06 20:01:15,705 DataCleaner.py:120 - Data cleanup started
INFO 2016-12-06 20:01:15,706 DataCleaner.py:122 - Data cleanup finished
INFO 2016-12-06 20:01:15,713 PingPortListener.py:50 - Ping port listener started on port: 8670
WARNING 2016-12-06 20:01:15,715 main.py:351 - Unable to determine the IP address of the Ambari server \'.ambarimaster.datadomain\'
ERROR 2016-12-06 20:01:15,715 main.py:392 - Exiting with exception:
Traceback (most recent call last):
  File "/usr/lib/python2.6/site-packages/ambari_agent/main.py", line 387, in <module>
    main(heartbeat_stop_callback)
  File "/usr/lib/python2.6/site-packages/ambari_agent/main.py", line 355, 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-06 20:01:15,715 ExitHelper.py:53 - Performing cleanup before exiting...
', None)

Connection to ambarimaster.datadomain closed.

etc/hosts (vm = ambarimaster, real host = server01)

:

xxx.xxx.xxx.182   ambariagent3 ambariagent3.datadomain server03 server03.datadomain
xxx.xxx.xxx.180   ambariagent2 ambariagent2.datadomain server02 server02.datadomain
xxx.xxx.xxx.179   server01 server01.datadomain
127.0.0.1   ambarimaster.datadomain ambarimaster localhost localhost.localdomain localhost4 localhost4.localdomain4
::1         localhost localhost.localdomain localhost6 localhost6.localdomain6

also tried :

xxx.xxx.xxx.182  ambariagent3 ambariagent3.datadomain server03 server03.datadomain
xxx.xxx.xxx.180  ambariagent2 ambariagent2.datadomain server02 server02.datadomain
xxx.xxx.xxx.179  ambarimaster.datadomain ambarimaster server01 server01.datadomain
127.0.0.1  localhost localhost.localdomain localhost4 localhost4.localdomain4
::1  localhost localhost.localdomain localhost6 localhost6.localdomain6

xxx.xxx.xxx.179 is the private network ip of the host of the vm hosting ambari server and agent

SSH listen on port 22 and 2223 of localhost and is forwarder to port 2223 of xxx.xxx.xxx.179

List of vagrant fowarded ports from vbox ambarimaster to server01 :

  ambarimaster.vm.network "forwarded_port", guest: 22, host: 2223 #SSH
        #Ambari agent
  ambarimaster.vm.network "forwarded_port", guest: 8440, host: 8440 #Ambari agent cnx
  ambarimaster.vm.network "forwarded_port", guest: 8441, host: 8441 #Ambari agent secure cnx
        #Ambari Server
  ambarimaster.vm.network "forwarded_port", guest: 8080, host: 8080 #Ambari server WebUI
        #HDFS
  ambarimaster.vm.network "forwarded_port", guest: 8020, host: 8020 #NameNode Meta Data
  ambarimaster.vm.network "forwarded_port", guest: 9000, host: 9000 #Namenode Meta Data
  ambarimaster.vm.network "forwarded_port", guest: 50076, host: 50076 #DataNode Web UI
  ambarimaster.vm.network "forwarded_port", guest: 50010, host: 50010 #DataNode Data transfer
  ambarimaster.vm.network "forwarded_port", guest: 50020, host: 50020 #DataNode Metadata operations
  ambarimaster.vm.network "forwarded_port", guest: 50090, host: 50090 #Secondary nameNode metadata
        #YARN
  ambarimaster.vm.network "forwarded_port", guest: 8088, host: 8088 #Webmanager UI
  ambarimaster.vm.network "forwarded_port", guest: 8090, host: 8090 #Webmanager UI
  ambarimaster.vm.network "forwarded_port", guest: 8032, host: 8032 #Ressource Manager Admin interface
  ambarimaster.vm.network "forwarded_port", guest: 8033, host: 8033 #Ressource Manager Scheduler
  ambarimaster.vm.network "forwarded_port", guest: 8031, host: 8031 #Ressoucre Manager interface
        #HIVE
  ambarimaster.vm.network "forwarded_port", guest: 10001, host: 10001 #Hive Server 2
  ambarimaster.vm.network "forwarded_port", guest: 10000, host: 10000 #Hive Server
  ambarimaster.vm.network "forwarded_port", guest: 9083, host: 9083 #Hive Metastore
        #WebHCat
  ambarimaster.vm.network "forwarded_port", guest: 50111, host: 50111 #WebHCat API
        #HBase port
  ambarimaster.vm.network "forwarded_port", guest: 60000, host: 60000 #Hbase HMaster
  ambarimaster.vm.network "forwarded_port", guest: 60010, host: 60010 #HMaster Info WebUI
  ambarimaster.vm.network "forwarded_port", guest: 60020, host: 60020 #HBase region server
  ambarimaster.vm.network "forwarded_port", guest: 2888, host: 2888 #Zookeeper communication port
  ambarimaster.vm.network "forwarded_port", guest: 3888, host: 3888 #Zookeeper leader election port
  ambarimaster.vm.network "forwarded_port", guest: 2181, host: 2181 #Zookeeper configuration file
  ambarimaster.vm.network "forwarded_port", guest: 18080, host: 18080 #Spark UI
  ambarimaster.vm.network "forwarded_port", guest: 9995, host: 9995 #Zeppelin UI
  ambarimaster.vm.network "forwarded_port", guest: 19888, host: 19888 #MapReduce2 webui
2 REPLIES 2
Highlighted

Re: Unable to determine the IP address of the Ambari server - Vagrant full port fowarding - 3 servers cluster

New Contributor

Added port 8670 to fowarding as well without any success

Re: Unable to determine the IP address of the Ambari server - Vagrant full port fowarding - 3 servers cluster

New Contributor

Hi

/etc/ambari-agent/conf/ambari-agent.ini was incorrectly set, having a '.' before my server FQDN

Hard to see.

Regards.

Don't have an account?
Coming from Hortonworks? Activate your account here