misp-modules not working due to socketio-client==0.5.6 install error
I recently built a MISP container following the instructions from https://github.com/MISP/docker-misp. When I run the container not in detached mode, I am seeing the following in the console:
2020-04-23 17:34:02,065 INFO exited: misp-modules (exit status 0; not expected)
2020-04-23 17:34:02,849 INFO exited: workers (exit status 0; expected)
2020-04-23 17:34:04,852 INFO spawned: 'misp-modules' with pid 323
2020-04-23 17:34:05,147 INFO exited: misp-modules (exit status 0; not expected)
2020-04-23 17:34:08,152 INFO spawned: 'misp-modules' with pid 325
2020-04-23 17:34:08,443 INFO exited: misp-modules (exit status 0; not expected)
2020-04-23 17:34:09,445 INFO gave up: misp-modules entered FATAL state, too many start retries too quickly
I attached a shell to the container, and tried to re-run the install steps to re-create the issue:
$ cd /usr/local/src
$ sudo -H git clone https://github.com/MISP/misp-modules.git
$ cd /misp-modules
$ sudo -H git checkout -b v2.4.104
$ sudo pip3 install -I -r REQUIREMENTS
The last step above is where I noticed the error, specifically, installing the socketio-client==0.5.6 library from the REQUIREMENTS file.
Traceback:
Collecting socketio-client==0.5.6
Using cached socketIO-client-0.5.6.tar.gz (12 kB)
ERROR: Command errored out with exit status 1:
command: /usr/bin/python3 -c 'import sys, setuptools, tokenize; sys.argv[0] = '"'"'/tmp/pip-install-dkmj9yk2/socketio-client/setup.py'"'"'; __file__='"'"'/tmp/pip-install-dkmj9yk2/socketio-client/setup.py'"'"';f=getattr(tokenize, '"'"'open'"'"', open)(__file__);code=f.read().replace('"'"'\r\n'"'"', '"'"'\n'"'"');f.close();exec(compile(code, __file__, '"'"'exec'"'"'))' egg_info --egg-base /tmp/pip-install-dkmj9yk2/socketio-client/pip-egg-info
cwd: /tmp/pip-install-dkmj9yk2/socketio-client/
Complete output (7 lines):
Traceback (most recent call last):
File "<string>", line 1, in <module>
File "/tmp/pip-install-dkmj9yk2/socketio-client/setup.py", line 6, in <module>
README = open(os.path.join(here, 'README.rst')).read()
File "/usr/lib/python3.6/encodings/ascii.py", line 26, in decode
return codecs.ascii_decode(input, self.errors)[0]
UnicodeDecodeError: 'ascii' codec can't decode byte 0xc3 in position 5786: ordinal not in range(128)
----------------------------------------
ERROR: Command errored out with exit status 1: python setup.py egg_info Check the logs for full command output.
I can also confirm the install is broken when running the following command both as root and www-data:
$ /bin/bash -c "/usr/local/bin/misp-modules -l '0.0.0.0' -s"
No module named 'pybgpranking'
2020-04-23 21:56:53,751 - misp-modules - INFO - Launch MISP modules server from package.
2020-04-23 21:56:53,753 - misp-modules - INFO - Helper loaded cache
2020-04-23 21:56:53,754 - misp-modules - INFO - Unable to load MISP modules from package.
I don't really understand why this is happening. Is anyone else noticing this error? Below are my specs.
Host OS:
$ lsb_release -d
Description: Ubuntu 18.04.4 LTS
Host Kernel Version:
$ uname -a
5.3.0-46-generic #38~18.04.1-Ubuntu SMP Tue Mar 31 04:17:56 UTC 2020 x86_64 x86_64 x86_64 GNU/Linux
Did you try following those steps?
https://github.com/MISP/misp-modules#how-to-install-and-start-misp-modules-in-a-python-virtualenv-recommended
(skip sudo -u www-data virtualenv -p python3 /var/www/MISP/venv if you already have a venv directory within /var/www/MISP)
Hi, I am having the same issue. Does someone know a working solution? @chrisr3d I think this would require several modifications to the Dockerfile, and I would have no idea what parts need to change.
Nevermind: found it! The solution is here: https://github.com/MISP/misp-modules/issues/387
@Hammelton Thanks for the feedback. We will update the documentation with this specific issue.