eucuepo / vagrant-kafka

Vagrant config to setup a partitioned Apache Kafka installation with clustered Apache Zookeeper
103 stars 89 forks source link

broker2 installation fails #11

Closed billdiego closed 6 years ago

billdiego commented 6 years ago

Tried installing vagrant-kafka on macOS Sierra using VirtualBox 5.1.30 r118389 (Qt5.6.3) and Guest Additions 5.0.16. Installation went smoothly until broker2. Seems to be a case of an incorrect or missing RPM. Pasting pertinent log section below:

==> broker2: Importing base box 'puppetlabs/centos-6.6-64-puppet'...
==> broker2: Matching MAC address for NAT networking...
==> broker2: Checking if box 'puppetlabs/centos-6.6-64-puppet' is up to date...
==> broker2: Setting the name of the VM: vagrant-kafka-master_broker2_1513063725650_57316
==> broker2: Fixed port collision for 22 => 2222. Now on port 2203.
==> broker2: Clearing any previously set network interfaces...
==> broker2: Preparing network interfaces based on configuration...
    broker2: Adapter 1: nat
    broker2: Adapter 2: intnet
==> broker2: Forwarding ports...
    broker2: 22 (guest) => 2203 (host) (adapter 1)
==> broker2: Running 'pre-boot' VM customizations...
==> broker2: Booting VM...
==> broker2: Waiting for machine to boot. This may take a few minutes...
    broker2: SSH address: 127.0.0.1:2203
    broker2: SSH username: vagrant
    broker2: SSH auth method: private key
==> broker2: Machine booted and ready!
==> broker2: Checking for guest additions in VM...
    broker2: The guest additions on this VM do not match the installed version of
    broker2: VirtualBox! In most cases this is fine, but in rare cases it can
    broker2: prevent things such as shared folders from working properly. If you see
    broker2: shared folder errors, please make sure the guest additions within the
    broker2: virtual machine match the version of VirtualBox you have installed on
    broker2: your host and reload your VM.
    broker2:
    broker2: Guest Additions Version: 5.0.16
    broker2: VirtualBox Version: 5.1
==> broker2: Setting hostname...
==> broker2: Configuring and enabling network interfaces...
    broker2: SSH address: 127.0.0.1:2203
    broker2: SSH username: vagrant
    broker2: SSH auth method: private key
==> broker2: Mounting shared folders...
    broker2: /vagrant => /Users/bdiego/CO/Projects/Kafka/vagrant-kafka-master
==> broker2: Running provisioner: shell...
    broker2: Running: /var/folders/rd/m7t7bhts30qf7dn782_s6lh80000gp/T/vagrant-shell20171212-1689-1nb2rx3.sh
    broker2: Downloading kafka...0.9.0.1
    broker2: iptables: Setting chains to policy ACCEPT: filter
    broker2: [  OK  ]
    broker2: iptables: Flushing firewall rules:
    broker2: [  OK  ]
    broker2: iptables: Unloading modules:
    broker2: [  OK  ]
    broker2: installing jdk and kafka ...
    broker2: error:
    broker2: not an rpm package
    broker2: error:
    broker2: /vagrant/rpm/jdk-8u73-linux-x64.rpm: not an rpm package (or package manifest):
    broker2:
    broker2: gzip:
    broker2: stdin: unexpected end of file
    broker2: tar: Child returned status 1
    broker2: tar: Error is not recoverable: exiting now
    broker2: chown:
    broker2: cannot access `kafka_2.10-0.9.0.1'
    broker2: : No such file or directory
    broker2: done installing jdk and Kafka
==> broker2: Running provisioner: shell...
    broker2: Running: /var/folders/rd/m7t7bhts30qf7dn782_s6lh80000gp/T/vagrant-shell20171212-1689-nqf6xf.sh
    broker2: /tmp/vagrant-shell: line 5: /home/vagrant/kafka_2.10-0.9.0.1/bin/kafka-server-start.sh: No such file or directory
The SSH command responded with a non-zero exit status. Vagrant
assumes that this means the command failed. The output for this command
should be in the log above. Please read the output to determine what
went wrong.
imarios commented 6 years ago

Was this a one time issue? Can you try vagrant destroy and give it another try?

billdiego commented 6 years ago

Unfortunately it's not a one-time issue. I issued a vagrant destroy and then a vagrant up and now see similar messages for the three zookeeper installations (though they continue) and then it dies with a similar message on configuration of broker1. Example for zookeeper:

==> zookeeper1: Running provisioner: shell...
    zookeeper1: Running: /var/folders/rd/m7t7bhts30qf7dn782_s6lh80000gp/T/vagrant-shell20171212-6649-84hkgp.sh
    zookeeper1: Downloading kafka...0.9.0.1
    zookeeper1: iptables: Setting chains to policy ACCEPT: filter
    zookeeper1: [  OK  ]
    zookeeper1: iptables: Flushing firewall rules:
    zookeeper1: [  OK  ]
    zookeeper1: iptables: Unloading modules:
    zookeeper1: [  OK  ]
    zookeeper1: installing jdk and kafka ...
    zookeeper1: error:
    zookeeper1: not an rpm package
    zookeeper1: error:
    zookeeper1: /vagrant/rpm/jdk-8u73-linux-x64.rpm: not an rpm package (or package manifest):
    zookeeper1:
    zookeeper1: gzip:
    zookeeper1: stdin: unexpected end of file
    zookeeper1: tar: Child returned status 1
    zookeeper1: tar: Error is not recoverable: exiting now
    zookeeper1: chown:
    zookeeper1: cannot access `kafka_2.10-0.9.0.1'
    zookeeper1: : No such file or directory
    zookeeper1: done installing jdk and Kafka

Example for broker1:

==> broker1: Running provisioner: shell...
    broker1: Running: /var/folders/rd/m7t7bhts30qf7dn782_s6lh80000gp/T/vagrant-shell20171212-6649-1x6qbc9.sh
    broker1: Downloading kafka...0.9.0.1
    broker1: iptables: Setting chains to policy ACCEPT: filter
    broker1: [  OK  ]
    broker1: iptables: Flushing firewall rules:
    broker1: [  OK  ]
    broker1: iptables: Unloading modules:
    broker1: [  OK  ]
    broker1: installing jdk and kafka ...
    broker1: error:
    broker1: not an rpm package
    broker1: error:
    broker1: /vagrant/rpm/jdk-8u73-linux-x64.rpm: not an rpm package (or package manifest):
    broker1:
    broker1: gzip:
    broker1: stdin: unexpected end of file
    broker1: tar: Child returned status 1
    broker1: tar: Error is not recoverable: exiting now
    broker1: chown:
    broker1: cannot access `kafka_2.10-0.9.0.1'
    broker1: : No such file or directory
    broker1: done installing jdk and Kafka
==> broker1: Running provisioner: shell...
    broker1: Running: /var/folders/rd/m7t7bhts30qf7dn782_s6lh80000gp/T/vagrant-shell20171212-6649-iwehd4.sh
    broker1: /tmp/vagrant-shell: line 5: /home/vagrant/kafka_2.10-0.9.0.1/bin/kafka-server-start.sh: No such file or directory
The SSH command responded with a non-zero exit status. Vagrant
assumes that this means the command failed. The output for this command
should be in the log above. Please read the output to determine what
went wrong.
imarios commented 6 years ago

I just nuked all the VMs and did a basicvagrant up and worked fine. Are you behind a firewall or anything that would prevent you from accessing those repositories?

imarios commented 6 years ago

Ok, I take it back. I had everything downloaded locally and we don't redownload if they are there (caching). So yes, all the main download resources are outdated. Let me see how hard is to bring the examples up to date with Kafka 1.0.0.

imarios commented 6 years ago

Hey @billdiego, thank you for reporting the issues. I have upgraded all the script to point to the latest java8 and Kafka 1.0.0 repos. You can use it from here: https://github.com/imarios/vagrant-kafka/tree/kafka_1_0_0 until we get the PR merged. thank you again

imarios commented 6 years ago

Will be addressed when #12 gets merged.

billdiego commented 6 years ago

@imarios Just got around to trying it out again - worked as advertised! Thank you so much for the quick turnaround on updating it and getting it working. Really appreciated.

imarios commented 6 years ago

thank you for testing it @billdiego ! Just merged everything in the main repo #11. Please do let us know if you find anything else that is not working for you.