chrissanders / FlowBAT

Network Flow Basic Analysis Tool
GNU Affero General Public License v3.0
112 stars 26 forks source link

flowbat main process ended, respawning #25

Closed richb-hanover closed 7 years ago

richb-hanover commented 7 years ago

This sounds like #23, but I have new information, so I'm creating a separate issue.

I followed the FlowBAT installation instructions on my Ubuntu 14.04.3 box. Both silkinabox.sh and the FlowBAT installation script worked as expected and without surprises. (Congratulations!)

SiLK seems to be working: rwfilter --proto=0-255 --type=all --pass=stdout | rwcut shows information about traffic.

After the successful FlowBAT install, I tried to go to http://localhost:1800, but couldn't connect. When I issue sudo service flowbat start, /var/log/syslog shows:

Apr 14 01:28:14 ubuntu kernel: [ 1791.166427] init: flowbat main process (12715) terminated with status 1
Apr 14 01:28:14 ubuntu kernel: [ 1791.166436] init: flowbat main process ended, respawning
Apr 14 01:28:14 ubuntu kernel: [ 1791.218369] init: flowbat main process (12721) terminated with status 1
Apr 14 01:28:14 ubuntu kernel: [ 1791.218379] init: flowbat main process ended, respawning
Apr 14 01:28:15 ubuntu kernel: [ 1791.274604] init: flowbat main process (12727) terminated with status 1
Apr 14 01:28:15 ubuntu kernel: [ 1791.274614] init: flowbat main process ended, respawning
Apr 14 01:28:15 ubuntu kernel: [ 1791.325147] init: flowbat main process (12733) terminated with status 1
Apr 14 01:28:15 ubuntu kernel: [ 1791.325160] init: flowbat main process ended, respawning
Apr 14 01:28:15 ubuntu kernel: [ 1791.376849] init: flowbat main process (12739) terminated with status 1
Apr 14 01:28:15 ubuntu kernel: [ 1791.376857] init: flowbat main process ended, respawning
Apr 14 01:28:15 ubuntu kernel: [ 1791.429980] init: flowbat main process (12748) terminated with status 1
Apr 14 01:28:15 ubuntu kernel: [ 1791.429988] init: flowbat main process ended, respawning
Apr 14 01:28:15 ubuntu kernel: [ 1791.481163] init: flowbat main process (12754) terminated with status 1
Apr 14 01:28:15 ubuntu kernel: [ 1791.481172] init: flowbat main process ended, respawning
Apr 14 01:28:15 ubuntu kernel: [ 1791.531945] init: flowbat main process (12760) terminated with status 1
Apr 14 01:28:15 ubuntu kernel: [ 1791.531955] init: flowbat main process ended, respawning
Apr 14 01:28:15 ubuntu kernel: [ 1791.584680] init: flowbat main process (12766) terminated with status 1
Apr 14 01:28:15 ubuntu kernel: [ 1791.584692] init: flowbat main process ended, respawning
Apr 14 01:28:15 ubuntu kernel: [ 1791.635308] init: flowbat main process (12772) terminated with status 1
Apr 14 01:28:15 ubuntu kernel: [ 1791.635317] init: flowbat main process ended, respawning
Apr 14 01:28:15 ubuntu kernel: [ 1791.687643] init: flowbat main process (12778) terminated with status 1
Apr 14 01:28:15 ubuntu kernel: [ 1791.687652] init: flowbat respawning too fast, stopped

What other information could I provide? Thanks.

richb-hanover commented 7 years ago

Having written some node/Javascript in a previous life, I started rummaging through the /etc/init/flowbat file to figure out where the server portion of the Meteor application lives. Invoking the Meteor server from the command line gives:

richb@ubuntu:~/FlowBAT$ node /home/richb/FlowBAT/private/bundle/main.js
/home/richb/FlowBAT/private/bundle/programs/server/node_modules/fibers/fibers.js:16
    throw new Error('`'+ modPath+ '.node` is missing. Try reinstalling `node-fibers`?');
    ^

Error: `/home/richb/FlowBAT/private/bundle/programs/server/node_modules/fibers/bin/linux-ia32-v8-4.6/fibers.node` is missing. Try reinstalling `node-fibers`?
    at Object.<anonymous> (/home/richb/FlowBAT/private/bundle/programs/server/node_modules/fibers/fibers.js:16:8)
    at Module._compile (module.js:413:34)
    at Object.Module._extensions..js (module.js:422:10)
    at Module.load (module.js:357:32)
    at Function.Module._load (module.js:314:12)
    at Module.require (module.js:367:17)
    at require (internal/module.js:20:19)
    at Object.<anonymous> (/home/richb/FlowBAT/private/bundle/programs/server/boot.js:1:75)
    at Module._compile (module.js:413:34)
    at Object.Module._extensions..js (module.js:422:10)

So, time for version checks...

richb@ubuntu:~$ lsb_release -a
No LSB modules are available.
Distributor ID: Ubuntu
Description:    Ubuntu 14.04.5 LTS
Release:    14.04
Codename:   trusty
richb@ubuntu:~$ node --version
v5.12.0
richb@ubuntu:~$ npm --version
3.8.6

and the server's package.json has:

richb@ubuntu:~$ more FlowBAT/private/bundle/programs/server/package.json 
{
  "name": "meteor-dev-bundle",
  "version": "0.0.0",
  "dependencies": {
    "fibers": "1.0.5",
    "underscore": "1.5.2",
    "source-map-support": "0.2.8",
    "semver": "4.1.0"
  },
  "devDependencies": {
    "eachline": "https://github.com/meteor/node-eachline/tarball/ff89722ff94e6b6
a08652bf5f44c8fffea8a21da",
    "chalk": "0.5.1"
  }
}

Time to upgrade versions in Meteor/package.json? What's the "official" way to do this with Meteor?

richb-hanover commented 7 years ago

Newer Update: After seeing several ENOACCESS errors, I checked the permissions on my ~/FlowBAT directory, and everything was owned by root. (Same with /data, too.) I changed ownership to flowview:flowview on both directories, and restarted FlowBAT, and the web interface came up.

I don't remember installing with root/sudo, but perhaps I did. I will re-run the install on a clean VM to see how I ran astray, and report back.

richb-hanover commented 7 years ago

I'm going to close this in favor of a new (clean) report in #27. Any words of advice would be welcome.