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.

Metron Single Node Vagrant SSH error

Highlighted

Metron Single Node Vagrant SSH error

New Contributor

I'm trying to run a developer instance of Metron in a single node VM on MacOS. I get an error saying "Failed to connect to the host via ssh". I've manually changed the centos version to 7. Below are the platform info script output and the error when i do "vagrant up". Any help will be appreciated. Thanks!

Platform Info:

9801a7a6b0f1:centos6 rohan$ ../../scripts/platform-info.sh 
Metron 0.6.1
--
* master
--
commit 9b6260fd4b9ecf355864b77c8889d27539623381 (HEAD -> master, origin/master, origin/HEAD)
Author: tiborm <tibor.meller@gmail.com>
Date:   Fri Nov 2 10:21:41 2018 -0600


    METRON-1803: Integrate Cypress with Travis (tiborm via mmiklavc) closes apache/metron#1226
--
 metron-deployment/development/centos6/Vagrantfile | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)
--
ansible 2.7.1
  config file = /Users/rohan/dev/metron/metron-deployment/development/centos6/ansible.cfg
  configured module search path = [u'/Users/rohan/dev/metron/metron-deployment/ansible/extra_modules']
  ansible python module location = /Library/Frameworks/Python.framework/Versions/2.7/lib/python2.7/site-packages/ansible
  executable location = /Library/Frameworks/Python.framework/Versions/2.7/bin/ansible
  python version = 2.7.12 (v2.7.12:d33e0cf91556, Jun 26 2016, 12:10:39) [GCC 4.2.1 (Apple Inc. build 5666) (dot 3)]
--
Vagrant 2.2.0
--
vagrant-hostmanager (1.8.9, global)
--
Python 2.7.12
--
Apache Maven 3.3.3 (7994120775791599e205a5524ec3e0dfe41d4a06; 2015-04-22T07:57:37-04:00)
Maven home: /Users/rohan/dev/apache-maven-3.3.3
Java version: 1.8.0_74, vendor: Oracle Corporation
Java home: /Library/Java/JavaVirtualMachines/jdk1.8.0_74.jdk/Contents/Home/jre
Default locale: en_US, platform encoding: UTF-8
OS name: "mac os x", version: "10.13.6", arch: "x86_64", family: "mac"
--
Docker version 17.12.0-ce, build c97c6d6
--
node
v10.13.0
--
npm
6.4.1
--
Configured with: --prefix=/Library/Developer/CommandLineTools/usr --with-gxx-include-dir=/usr/include/c++/4.2.1
Apple LLVM version 9.0.0 (clang-900.0.39.2)
Target: x86_64-apple-darwin17.7.0
Thread model: posix
InstalledDir: /Library/Developer/CommandLineTools/usr/bin
--
Compiler is C++11 compliant
--
Darwin 9801a7a6b0f1 17.7.0 Darwin Kernel Version 17.7.0: Thu Jun 21 22:53:14 PDT 2018; root:xnu-4570.71.2~1/RELEASE_X86_64 x86_64
--
Total System Memory = 16384 MB
Processor Model: Intel(R) Core(TM) i7-4870HQ CPU 
Processor Speed: 2.50GHz
Total Physical Processors: 4
Total cores: 4
Disk information:
/dev/disk1s1                         466Gi  191Gi  265Gi    42% 1724029 9223372036853051778    0%   /
/dev/disk1s4                         466Gi  9.1Gi  265Gi     4%       9 9223372036854775798    0%   /private/var/vm
/Users/rohan/Downloads/Postman.app  466Gi  182Gi  282Gi    40% 1717048 9223372036853058759    0%   /private/var/folders/sc/53zwz9v972nc297czx8ll1055hmgzl/T/AppTranslocation/32850EAE-812E-4FE1-99EF-AFFB756E2818
This CPU appears to support virtualization

Error:

9801a7a6b0f1:centos6 rohan$ vagrant up
 Running with ansible-skip-tags: ["sensors"]
Bringing machine 'node1' up with 'virtualbox' provider...
==> node1: Importing base box 'centos/7'...
==> node1: Matching MAC address for NAT networking...
==> node1: Checking if box 'centos/7' is up to date...
==> node1: Setting the name of the VM: centos6_node1_1541299575440_1915
==> node1: Clearing any previously set network interfaces...
==> node1: Preparing network interfaces based on configuration...
    node1: Adapter 1: nat
    node1: Adapter 2: hostonly
==> node1: Forwarding ports...
    node1: 22 (guest) => 2222 (host) (adapter 1)
==> node1: Running 'pre-boot' VM customizations...
==> node1: Booting VM...
==> node1: Waiting for machine to boot. This may take a few minutes...
    node1: SSH address: 127.0.0.1:2222
    node1: SSH username: vagrant
    node1: SSH auth method: private key
    node1: Warning: Connection reset. Retrying...
    node1: Warning: Remote connection disconnect. Retrying...
    node1: Warning: Connection reset. Retrying...
    node1: Warning: Remote connection disconnect. Retrying...
    node1: Warning: Connection reset. Retrying...
    node1: Warning: Remote connection disconnect. Retrying...
    node1: Warning: Connection reset. Retrying...
    node1: Warning: Remote connection disconnect. Retrying...
    node1: Warning: Connection reset. Retrying...
    node1: Warning: Remote connection disconnect. Retrying...
    node1: Warning: Connection reset. Retrying...
    node1: Warning: Remote connection disconnect. Retrying...
    node1: Warning: Connection reset. Retrying...
    node1: Warning: Remote connection disconnect. Retrying...
    node1: Warning: Connection reset. Retrying...
    node1: Warning: Remote connection disconnect. Retrying...
    node1: Warning: Connection reset. Retrying...
    node1: Warning: Remote connection disconnect. Retrying...
    node1: Warning: Connection reset. Retrying...
    node1: Warning: Remote connection disconnect. Retrying...
    node1: Warning: Connection reset. Retrying...
    node1: Warning: Remote connection disconnect. Retrying...
    node1: Warning: Connection reset. Retrying...
    node1: Warning: Remote connection disconnect. Retrying...
    node1: Warning: Connection reset. Retrying...
    node1: Warning: Remote connection disconnect. Retrying...
    node1: Warning: Connection reset. Retrying...
    node1: Warning: Remote connection disconnect. Retrying...
    node1: Warning: Connection reset. Retrying...
    node1: Warning: Remote connection disconnect. Retrying...
    node1: Warning: Connection reset. Retrying...
    node1: Warning: Remote connection disconnect. Retrying...
    node1: Warning: Connection reset. Retrying...
    node1: Warning: Remote connection disconnect. Retrying...
    node1: Warning: Connection reset. Retrying...
    node1: Warning: Remote connection disconnect. Retrying...
    node1: Warning: Connection reset. Retrying...
    node1: Warning: Remote connection disconnect. Retrying...
    node1: Warning: Connection reset. Retrying...
    node1: Warning: Remote connection disconnect. Retrying...
    node1: Warning: Connection reset. Retrying...
    node1: Warning: Remote connection disconnect. Retrying...
    node1: 
    node1: Vagrant insecure key detected. Vagrant will automatically replace
    node1: this with a newly generated keypair for better security.
    node1: 
    node1: Inserting generated public key within guest...
    node1: Removing insecure key from the guest if it's present...
    node1: Key inserted! Disconnecting and reconnecting using new SSH key...
==> node1: Machine booted and ready!
==> node1: Checking for guest additions in VM...
    node1: No guest additions were detected on the base box for this VM! Guest
    node1: additions are required for forwarded ports, shared folders, host only
    node1: networking, and more. If SSH fails on this machine, please install
    node1: the guest additions and repackage the box to continue.
    node1: 
    node1: This is not an error message; everything may continue to work properly,
    node1: in which case you may ignore this message.
==> node1: Setting hostname...
==> node1: Configuring and enabling network interfaces...
    node1: SSH address: 127.0.0.1:2222
    node1: SSH username: vagrant
    node1: SSH auth method: private key
==> node1: Rsyncing folder: /Users/rohan/dev/metron/metron-deployment/development/centos6/ => /vagrant
==> node1: [vagrant-hostmanager:guests] Updating hosts file on active guest virtual machines...
==> node1: [vagrant-hostmanager:host] Updating hosts file on your workstation (password may be required)...
==> node1: Running provisioner: ansible...
Vagrant has automatically selected the compatibility mode '2.0'
according to the Ansible version installed (2.7.1).


Alternatively, the compatibility mode can be specified in your Vagrantfile:
https://www.vagrantup.com/docs/provisioning/ansible_common.html#compatibility_mode


    node1: Running ansible-playbook...


PLAY [all] *********************************************************************


TASK [Gathering Facts] *********************************************************
fatal: [node1]: UNREACHABLE! => {"changed": false, "msg": "Failed to connect to the host via ssh: ssh: connect to host node1 port 22: Operation timed out\r\n", "unreachable": true}
	to retry, use: --limit @/Users/rohan/dev/metron/metron-deployment/development/centos6/ansible/playbook.retry


PLAY RECAP *********************************************************************
node1                      : ok=0    changed=0    unreachable=1    failed=0   


Ansible failed to complete successfully. Any error output should be
visible above. Please fix these errors and try again.

2 REPLIES 2

Re: Metron Single Node Vagrant SSH error

Contributor

You changed the what to centos 7? The image that metron builds into? That isn't going to work. Apache Metron only supports centos6 for the vagrant - ansible build.

Re: Metron Single Node Vagrant SSH error

New Contributor

I try test deploy Metron on my virtual machine on VMWare Workstation12

My OS is Ubuntu16.04 and I want deploy Metron on Ubuntu14 following https://github.com/apache/metron/tree/master/metron-deployment/development/ubuntu14

I have same issue?

I want make sure I can do that on my virtual machine Ubuntu16.04.

Error:

 Running with ansible-skip-tags: ["sensors"]
Bringing machine 'node1' up with 'virtualbox' provider...
==> node1: Importing base box 'ubuntu/trusty64'...
Progress: 90%
==> node1: Matching MAC address for NAT networking...
==> node1: Checking if box 'ubuntu/trusty64' is up to date...
==> node1: Setting the name of the VM: ubuntu14_node1_1541823428817_28945
==> node1: Clearing any previously set forwarded ports...
Vagrant is currently configured to create VirtualBox synced folders with
the `SharedFoldersEnableSymlinksCreate` option enabled. If the Vagrant
guest is not trusted, you may want to disable this option. For more
information on this option, please refer to the VirtualBox manual:
  https://www.virtualbox.org/manual/ch04.html#sharedfolders
This option can be disabled globally with an environment variable:
  VAGRANT_DISABLE_VBOXSYMLINKCREATE=1
or on a per folder basis within the Vagrantfile:
  config.vm.synced_folder '/host/path', '/guest/path', SharedFoldersEnableSymlinksCreate: false
==> node1: Clearing any previously set network interfaces...
==> node1: Preparing network interfaces based on configuration...
    node1: Adapter 1: nat
    node1: Adapter 2: hostonly
==> node1: Forwarding ports...
    node1: 22 (guest) => 2222 (host) (adapter 1)
==> node1: Running 'pre-boot' VM customizations...
==> node1: Booting VM...
==> node1: Waiting for machine to boot. This may take a few minutes...
    node1: SSH address: 127.0.0.1:2222
    node1: SSH username: vagrant
    node1: SSH auth method: private key
    node1: Warning: Connection reset. Retrying...
    node1: Warning: Remote connection disconnect. Retrying...
    node1: Warning: Connection reset. Retrying...
    node1: Warning: Remote connection disconnect. Retrying...
    node1: Warning: Connection reset. Retrying...
    node1: Warning: Remote connection disconnect. Retrying...
    node1: Warning: Connection reset. Retrying...
    node1: Warning: Remote connection disconnect. Retrying...
    node1: Warning: Connection reset. Retrying...
    node1: Warning: Remote connection disconnect. Retrying...
    node1: Warning: Connection reset. Retrying...
    node1: Warning: Remote connection disconnect. Retrying...
    node1: Warning: Connection reset. Retrying...
    node1: Warning: Remote connection disconnect. Retrying...
    node1: Warning: Connection reset. Retrying...
    node1: Warning: Remote connection disconnect. Retrying...
    node1: Warning: Connection reset. Retrying...
    node1: Warning: Remote connection disconnect. Retrying...
    node1: Warning: Connection reset. Retrying...
    node1: Warning: Remote connection disconnect. Retrying...
    node1: Warning: Connection reset. Retrying...
    node1: Warning: Remote connection disconnect. Retrying...
    node1: Warning: Connection reset. Retrying...
    node1: Warning: Remote connection disconnect. Retrying...
    node1: Warning: Connection reset. Retrying...
    node1: Warning: Remote connection disconnect. Retrying...
    node1: Warning: Connection reset. Retrying...
    node1: Warning: Remote connection disconnect. Retrying...
    node1: Warning: Connection reset. Retrying...
    node1: Warning: Remote connection disconnect. Retrying...
    node1: Warning: Connection reset. Retrying...
    node1: Warning: Connection reset. Retrying...
    node1: Warning: Remote connection disconnect. Retrying...
    node1: Warning: Connection reset. Retrying...
    node1: 
    node1: Vagrant insecure key detected. Vagrant will automatically replace
    node1: this with a newly generated keypair for better security.
    node1: 
    node1: Inserting generated public key within guest...
    node1: Removing insecure key from the guest if it's present...
    node1: Key inserted! Disconnecting and reconnecting using new SSH key...
==> node1: Machine booted and ready!
......
TASK [ambari_master : start ambari server] ************************************* changed: [node1] PLAY [ambari_slave] ************************************************************ TASK [Gathering Facts] ********************************************************* ok: [node1] TASK [java_jdk : include_tasks] ************************************************ skipping: [node1] TASK [java_jdk : include_tasks] ************************************************ included: /root/metron/metron-deployment/ansible/roles/java_jdk/tasks/install_jdk_ubuntu.yml for node1 TASK [java_jdk : Check for java at "/usr/jdk64/jdk1.8.0_77"] ******************* ok: [node1] TASK [java_jdk : Install openjdk repository] *********************************** changed: [node1] TASK [java_jdk : Update package cache] ***************************************** changed: [node1] TASK [java_jdk : Install openjdk] ********************************************** fatal: [node1]: UNREACHABLE! => {"changed": false, "msg": "Failed to connect to the host via ssh: ssh: connect to host node1 port 22: No route to host\r\n", "unreachable": true} to retry, use: --limit @/root/metron/metron-deployment/development/ubuntu14/ansible/playbook.retry PLAY RECAP ********************************************************************* node1 : ok=52 changed=33 unreachable=1 failed=0 Ansible failed to complete successfully. Any error output should be visible above. Please fix these errors and try again.