scVENUS / PeekabooAV-Installer

This repository provides scripts and configuration files to install, update and test a Peekaboo installation
GNU General Public License v3.0
7 stars 9 forks source link

Installation aborts when starting Peekaboo.service #44

Closed thegrillmaster closed 4 years ago

thegrillmaster commented 4 years ago

Hello, I've been trying for days to get an executable version with the Peekaboo AV installer. The requirements are exactly as described on your page, Ubuntu 18.04, installation as root. There are a few copy errors during installation, but I was able to fix them manually, but I always fail at the last point:

TASK [Start Peekaboo] *** fatal: [localhost]: FAILED! => {"changed": false, "msg": "Unable to start service peekaboo: Job for peekaboo.service failed because a timeout was exceeded.\nSee \"systemctl status peekaboo.service\" and \"journalctl -xe\" for details.\n"} to retry, use: --limit @/tmp/tmp.shh6Vbzxc3-PeekabooAV-Installer/peekabooav-installer/PeekabooAV-install.retry

PLAY RECAP ** localhost : ok=50 changed=13 unreachable=0 failed=1

Sep 03 12:30:23 mail24intra peekaboo[13660]: peekaboo.queuing - (Worker-1) - DEBUG - Worker 1: Ready Sep 03 12:30:23 mail24intra peekaboo[13660]: peekaboo.queuing - (MainThread) - DEBUG - Create Worker 2 Sep 03 12:30:23 mail24intra peekaboo[13660]: peekaboo.queuing - (MainThread) - INFO - Created 3 Workers. Sep 03 12:30:23 mail24intra peekaboo[13660]: peekaboo.queuing - (MainThread) - DEBUG - Disabling cluster dupl Sep 03 12:30:23 mail24intra peekaboo[13660]: peekaboo.queuing - (Worker-2) - DEBUG - Worker 2: Ready Sep 03 12:30:23 mail24intra peekaboo[13660]: peekaboo.toolbox.cuckoo - (MainThread) - DEBUG - Requesting cuck Sep 03 12:30:23 mail24intra peekaboo[13660]: urllib3.connectionpool - (MainThread) - DEBUG - Starting new HTT Sep 03 12:30:23 mail24intra cuckoo[12513]: 2019-09-03 12:30:23,510 [werkzeug] INFO: 127.0.0.1 - - [03/Sep/201 Sep 03 12:30:23 mail24intra peekaboo[13660]: urllib3.connectionpool - (MainThread) - DEBUG - http://127.0.0.1 Sep 03 12:30:23 mail24intra peekaboo[13660]: urllib3.connectionpool - (MainThread) - DEBUG - Starting new HTT Sep 03 12:30:23 mail24intra cuckoo[12513]: 2019-09-03 12:30:23,514 [werkzeug] INFO: 127.0.0.1 - - [03/Sep/201 Sep 03 12:30:23 mail24intra peekaboo[13660]: urllib3.connectionpool - (MainThread) - DEBUG - http://127.0.0.1 Sep 03 12:30:23 mail24intra peekaboo[13660]: urllib3.connectionpool - (MainThread) - DEBUG - Starting new HTT Sep 03 12:30:23 mail24intra cuckoo[12513]: 2019-09-03 12:30:23,517 [werkzeug] INFO: 127.0.0.1 - - [03/Sep/201 Sep 03 12:30:23 mail24intra peekaboo[13660]: urllib3.connectionpool - (MainThread) - DEBUG - http://127.0.0.1 Sep 03 12:30:23 mail24intra peekaboo[13660]: Traceback (most recent call last): Sep 03 12:30:23 mail24intra peekaboo[13660]: File "/opt/peekaboo/bin/peekaboo", line 10, in Sep 03 12:30:23 mail24intra peekaboo[13660]: sys.exit(run()) Sep 03 12:30:23 mail24intra peekaboo[13660]: File "/opt/peekaboo/local/lib/python2.7/site-packages/peekaboo Sep 03 12:30:23 mail24intra peekaboo[13660]: config.cuckoo_poll_interval) Sep 03 12:30:23 mail24intra peekaboo[13660]: File "/opt/peekaboo/local/lib/python2.7/site-packages/peekaboo Sep 03 12:30:23 mail24intra peekaboo[13660]: self.reported = self.status()["tasks"]["reported"] Sep 03 12:30:23 mail24intra peekaboo[13660]: TypeError: 'NoneType' object has no attribute 'getitem__'

peekaboo.service - Peekaboo Extended Email Attachment Behavior Observation Owl Loaded: loaded (/etc/systemd/system/peekaboo.service; enabled; vendor preset: enabled) Active: activating (start) since Tue 2019-09-03 12:33:24 CEST; 1min 14s ago Main PID: 13683 (peekaboo) Tasks: 4 (limit: 4674) CGroup: /system.slice/peekaboo.service └─13683 /opt/peekaboo/bin/python2 /opt/peekaboo/bin/peekaboo -c /opt/peekaboo/etc/peekaboo.conf -D

Sep 03 12:33:24 mail24intra peekaboo[13683]: urllib3.connectionpool - (MainThread) - DEBUG - Starting new HTT Sep 03 12:33:24 mail24intra peekaboo[13683]: urllib3.connectionpool - (MainThread) - DEBUG - http://127.0.0.1 Sep 03 12:33:24 mail24intra peekaboo[13683]: Traceback (most recent call last): Sep 03 12:33:24 mail24intra peekaboo[13683]: File "/opt/peekaboo/bin/peekaboo", line 10, in Sep 03 12:33:24 mail24intra peekaboo[13683]: sys.exit(run()) Sep 03 12:33:24 mail24intra peekaboo[13683]: File "/opt/peekaboo/local/lib/python2.7/site-packages/peekaboo Sep 03 12:33:24 mail24intra peekaboo[13683]: config.cuckoo_poll_interval) Sep 03 12:33:24 mail24intra peekaboo[13683]: File "/opt/peekaboo/local/lib/python2.7/site-packages/peekaboo Sep 03 12:33:24 mail24intra peekaboo[13683]: self.reported = self.status()["tasks"]["reported"] Sep 03 12:33:24 mail24intra peekaboo[13683]: TypeError: 'NoneType' object has no attribute 'getitem__' lines 1-18/18 (END)

Unfortunately I haven't found a solution yet. Do you know what is going wrong here? Of course it would be great for me if I could get a completely installed Virtualbox image from you, then the installation would already be finished :)

Clevero commented 4 years ago

Hello :)

What copy errors did you have and how did you manage to fix them?

thegrillmaster commented 4 years ago

hello clevero, thanks for the quick answer. i had to start the installation again, i didn't document it exactly. so here's the first bug:

TASK [Copy Peekaboo systemd unit to /etc] ** An exception occurred during task execution. To see the full traceback, use -vvv. The error was: AnsibleFileNotFound: Could not find or access '/opt/peekaboo/share/doc/peekaboo/systemd/peekaboo.service' fatal: [localhost]: FAILED! => {"changed": false, "msg": "Could not find or access '/opt/peekaboo/share/doc/peekaboo/systemd/peekaboo.service'"} to retry, use: --limit @/tmp/tmp.ooIWpEQQfX-PeekabooAV-Installer/peekabooav-installer/PeekabooAV-install.retry

PLAY RECAP ***** localhost : ok=37 changed=25 unreachable=0 failed=1

The folder structure below /opt/peekaboo/share/ is not created, I create it manually and copy the required files there manually. then the installation runs completely without errors until peekaboo is started, but the service cannot be started

Clevero commented 4 years ago

Did you get errors when executing these lines?

git clone --recurse-submodules https://github.com/scvenus/peekabooav-installer
cd peekabooav-installer/
git checkout --recurse-submodules v1.7
thegrillmaster commented 4 years ago

i didn't see any errors, i use the bash-script pstrap.sh. Now I have entered the commands manually, there is an error at

git checkout --recurse-submodules v1.7

root@mail24intra:/tmp/peekabooav-installer# git checkout --recurse-submodules v1.7 fatal: not a git repository: ../.git/modules/PeekabooAV fatal: could not reset submodule index root@mail24intra:/tmp/peekabooav-installer#

Clevero commented 4 years ago

Yeah, I also got those errors in an updated 18.04 VM. This seems to be the reason why the installer fails

Sadly I don't have enough time to investigate further, this week. Will look into it and report again

Maybe @Jack28 or @michaelweiser know about this issue and can help earlier?

thegrillmaster commented 4 years ago

All right, I hope there's a solution. Thank you very much!

Jack28 commented 4 years ago

Hi everybody the bug you have discovered is that pstrap.sh gets the most recent version of the installer which installs the last peekabooav release via pip. There have been slight changes so they don't work well together.

The submodule has been removed from the installer. Default behaviour is to install peekabooav via pip. In addition peekaboo can be supplied via a PeekabooAV subdirectory, for testing and development the installer respects and installs from there.

So. If you want the latest release: git clone -b v1.7 https://github.com/scvenus/peekabooav-installer and go from there.

If you want the most recent changes:

git clone https://github.com/scvenus/peekabooav-installer
cd peekabooav-installer
git clone https://github.com/scvenus/peekabooav PeekabooAV

I will push a patch for pstrap.sh as soon as possible.

Please let me know how you are getting on

thegrillmaster commented 4 years ago

Hello Jack, works now without problems, the installation runs completely through, without errors. thank you very much!