Logstash Installation hangs forever

47 views
Skip to first unread message

Enav D

unread,
Apr 28, 2018, 8:20:13 AM4/28/18
to Vagrant
Hi there, 

I'm new to vagrant and starting my first project with ELK stack. 
started off with this vagrant file: 
----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------
# -*- mode: ruby -*-
# vi: set ft=ruby :

Vagrant.configure("2") do |config|  
config.vm.provider "virtualbox" do |v|
v.memory = 512
v.cpus = 2
end 
#Enter the web tier cluster size here for better scalability: 
#NOTE: if you choose to scale up while the environment is up and runnig - 
#make sure to re-provision the haproxy server for the new configuration to apply. (vagrant provision <apacheservername>)
WebFarm = 3
config.vm.define :haproxy do |haproxyserver|
haproxyserver.vm.box = "ubuntu/precise64"
haproxyserver.vm.network :private_network, ip: "192.168.50.2"
haproxyserver.vm.provision "shell", path: "haproxy.sh", env: {"WEB_CLUSTER_SIZE" => WebFarm}, run: "always"
haproxyserver.vm.hostname = "HAproxyServer"
end
(1..WebFarm).each do |i|
config.vm.define "apacheserver0#{i}" do |node|
node.vm.box = "ubuntu/precise64"
node.vm.hostname = "apacheserver0#{i}"
node.vm.network "private_network", ip: "192.168.50.10#{i}"
node.vm.provision "shell", path: "apache.sh", run: "always", args: "apacheserver0#{i} 192.168.50.10#{i}"
end
end 
config.vm.define :logstash do |logstashserver|
logstashserver.vm.box = "centos/7"
logstashserver.vm.box_version = "1803.01"
logstashserver.vm.network :private_network, ip: "192.168.50.3"
logstashserver.vm.provision "shell", path: "logstash.sh", run: "always"
logstashserver.vm.hostname = "logstashserver"
end
config.vm.define :elasticsearch do |elasticsearchserver|
elasticsearchserver.vm.box = "centos/7"
elasticsearchserver.vm.box_version = "1803.01"
elasticsearchserver.vm.network :private_network, ip: "192.168.50.4"
elasticsearchserver.vm.provision "shell", path: "elastic.sh", run: "always"
elasticsearchserver.vm.hostname = "elasticsearchserver"
end

end
----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------

The issue I'm having is with installing the logstash onto Centos 7 as declared. 
I'm using the instructions from formal sites, thus - I created this provision shell script: 

#!/bin/bash

# Install Java "1.8.0_161"
sudo yum install -y java 

# Install logstash    
sudo cp -f /vagrant/logstash.repo /etc/yum.repos.d
sudo yum update
sudo yum --enablerepo=logstash-6.x clean metadata
sudo yum install -y logstash
sudo cp -f /vagrant/logstashbeats-input.conf /etc/logstash/conf.d
sudo mkdir /etc/logstash/patterns
sudo cp -f /vagrant/iptables.patterns /etc/logstash/patterns
sudo /usr/share/logstash/bin/system-install
sudo systemctl start logstash.service
As well as this repo file copied to the host machine: 
[logstash-6.x]
name=Elastic repository for 6.x packages
gpgcheck=1
enabled=1
autorefresh=1
type=rpm-md

Every time I run 'vagrant up' command the installation hangs on the logstash yum  install command. 
When I exit the installation and run it from the host (e.g.vagrant ssh) it works just fine.  

any ideas? 

Thanks in advance,
Enav

Alvaro Miranda Aguilera

unread,
Apr 29, 2018, 3:31:28 PM4/29/18
to vagra...@googlegroups.com
can you create a github repo and share a link?

will be easier to test and check what may be failing

--
This mailing list is governed under the HashiCorp Community Guidelines - https://www.hashicorp.com/community-guidelines.html. Behavior in violation of those guidelines may result in your removal from this mailing list.
 
GitHub Issues: https://github.com/mitchellh/vagrant/issues
IRC: #vagrant on Freenode
---
You received this message because you are subscribed to the Google Groups "Vagrant" group.
To unsubscribe from this group and stop receiving emails from it, send an email to vagrant-up+unsubscribe@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/vagrant-up/f0bc9879-ef20-4193-b665-1e2cb537cee8%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.



--
Alvaro

Reply all
Reply to author
Forward
0 new messages