Network compatibility issue between docker-compose and Vagrant
2xyo opened this issue · comments
By default, Vagrant can't start the win7 box because the network 10.0.2.0/24
is already defined by docker-compose.
First terminal:
% docker-compose up
Creating network "unfetter_unfetter-network" with driver "bridge"
...
Creating elasticsearch
Creating analytic-system
Creating kibana
Creating logstash
Attaching to elasticsearch, analytic-system, kibana, logstash
analytic-system | beginning analysis
...
Second terminal:
% vagrant up
...
Bringing machine 'default' up with 'virtualbox' provider...
==> default: Clearing any previously set network interfaces...
The specified host network collides with a non-hostonly network!
This will cause your specified IP to be inaccessible. Please change
the IP or name of your host only network so that it no longer matches that of
a bridged or non-hostonly network.
Retry with Vagrant public_network
:
% ip address show to 10.0.2.0/24
6: br-b1a1be0f6a56: <BROADCAST,MULTICAST,UP,LOWER_UP> mtu 1500 qdisc noqueue state UP group default
inet 10.0.2.1/24 scope global br-b1a1be0f6a56
valid_lft forever preferred_lft forever
% VBoxManage list bridgedifs |grep "10.0.2." -A7 -B3
Name: br-b1a1be0f6a56
GUID: 622d7262-6131-4231-a530-024268280895
DHCP: Disabled
IPAddress: 10.0.2.1
NetworkMask: 255.255.255.0
IPV6Address:
IPV6NetworkMaskPrefixLength: 0
HardwareAddress: 02:42:68:28:08:95
MediumType: Ethernet
Status: Up
VBoxNetworkName: HostInterfaceNetworking-br-b1a1be0f6a56
% vagrant up
Bringing machine 'default' up with 'virtualbox' provider...
==> default: Fixed port collision for 3389 => 3389. Now on port 2200.
==> default: Clearing any previously set network interfaces...
==> default: Available bridged network interfaces:
1) wlan0
2) br-99131e386e9d
3) veth5078f48
4) vethc962776
5) vethe64c0e0
6) vethaf00775
7) br-a8a867da601f
8) br-b1a1be0f6a56
9) docker0
==> default: When choosing an interface, it is usually the one that is
==> default: being used to connect to the internet.
default: Which interface should the network bridge to? 8
==> default: Preparing network interfaces based on configuration...
default: Adapter 1: nat
default: Adapter 2: bridged
==> default: Forwarding ports...
default: 3389 (guest) => 2200 (host) (adapter 1)
default: 5985 (guest) => 55985 (host) (adapter 1)
default: 5986 (guest) => 55986 (host) (adapter 1)
default: 22 (guest) => 2222 (host) (adapter 1)
==> default: Running 'pre-boot' VM customizations...
==> default: Booting VM...
==> default: Waiting for machine to boot. This may take a few minutes...
default: WinRM address: 127.0.0.1:55985
default: WinRM username: IEUser
...```
What is the recommended way to start both systems?
The hardcoded 10.x domain was so that the nxlog scripts knew the server location of Logstash.
if you have something else on that subnet, you would have to change the nxlog.conf files.
Were you able to follow these instructions? https://github.com/unfetter-analytic/unfetter/wiki/Setup
Dammit, I missed the wiki!
Instead of using an hardcoded IP, maybe you could use an hostname thanks to the alias feature?
The provisioning of the Vagrant doesn't work as expected on my laptop. I need more time to investigate :)
For example, according to the wiki "go to Kibana: https://localhost" but nothing is mapped to the port 80:
% docker-compose ps
Name Command State Ports
-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------
analytic-system /bin/sh -c /usr/share/unfe ... Up
elasticsearch /bin/bash bin/es-docker Up 0.0.0.0:9200->9200/tcp, 0.0.0.0:9300->9300/tcp
kibana /bin/sh -c /usr/local/bin/ ... Up 0.0.0.0:5601->5601/tcp
logstash /usr/local/bin/docker-entr ... Up 0.0.0.0:3515->3515/tcp, 0.0.0.0:3516->3516/tcp, 0.0.0.0:3517->3517/tcp, 0.0.0.0:5000->5000/tcp, 5044/tcp, 9600/tcp
I've finally a working config and I can see some CAR alerts on kibana :
- some fixes to nxlog (see issue and PR)
- list of elasticsearch indexes at
http://10.0.2.3:9200/_cat/indices?v
- setup kibana to use the
sitaware
index athttp://10.0.2.4:5601
And now, I have lot of stack trace, new issue is coming :)
I'm closing this, because I"m making a bunch of changes to how it all works.