eclecticiq / OpenTAXII

TAXII server implementation in Python from EclecticIQ
BSD 3-Clause "New" or "Revised" License
193 stars 92 forks source link

Error on starting OpenTaxii #221

Open phoenixml opened 2 years ago

phoenixml commented 2 years ago

Hi All,

I am getting a hard time on starting opentaxii, My setup is docker and the env is ubuntu 21.10 I followed the instructions in this blog and it looks straight forward but not sure what I missing: alyagomaa.github.io/blog/Create-and-test-your-own-TACII-server I updated the data-configuration.yml and added to the Dockerfile then i built the docker and run it I am not able to get a token when I ran : curl -d 'username=admin&password=admin' http://localhost:9000/management/auth Issue: `<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 3.2 Final//EN">

401 Unauthorized

Unauthorized

The server could not verify that you are authorized to access the URL requested. You either supplied the wrong credentials (e.g. a bad password), or your browser doesn't understand how to supply the credentials required.

then i installed gunicorn and I tried again with a new port 1234 gunicorn opentaxii.http:app --bin localhost:1234 2022-03-11 18:45:19 +1100] [122529] [INFO] Starting gunicorn 20.1.0 [2022-03-11 18:45:19 +1100] [122529] [INFO] Listening at: http://127.0.0.1:1234 (122529) [2022-03-11 18:45:19 +1100] [122529] [INFO] Using worker: sync [2022-03-11 18:45:19 +1100] [122533] [INFO] Booting worker with pid: 122533 [2022-03-11 18:45:19 +1100] [122533] [ERROR] Exception in worker process Traceback (most recent call last): File "/usr/lib/python3/dist-packages/gunicorn/arbiter.py", line 589, in spawn_worker worker.init_process() File "/usr/lib/python3/dist-packages/gunicorn/workers/base.py", line 134, in init_process self.load_wsgi() File "/usr/lib/python3/dist-packages/gunicorn/workers/base.py", line 146, in load_wsgi self.wsgi = self.app.wsgi() File "/usr/lib/python3/dist-packages/gunicorn/app/base.py", line 67, in wsgi self.callable = self.load() File "/usr/lib/python3/dist-packages/gunicorn/app/wsgiapp.py", line 58, in load return self.load_wsgiapp() File "/usr/lib/python3/dist-packages/gunicorn/app/wsgiapp.py", line 48, in load_wsgiapp return util.import_app(self.app_uri) File "/usr/lib/python3/dist-packages/gunicorn/util.py", line 384, in import_app mod = importlib.import_module(module) File "/usr/lib/python3.9/importlib/init.py", line 127, in import_module return _bootstrap._gcd_import(name[level:], package, level) File "", line 1030, in _gcd_import File "", line 1007, in _find_and_load File "", line 972, in _find_and_load_unlocked File "", line 228, in _call_with_frames_removed File "", line 1030, in _gcd_import File "", line 1007, in _find_and_load File "", line 986, in _find_and_load_unlocked File "", line 680, in _load_unlocked File "", line 850, in exec_module File "", line 228, in _call_with_frames_removed File "/home/testaccount/Desktop/OpenTAXII-master/opentaxii/init.py", line 7, in from .server import TAXIIServer File "/home/testaccount/Desktop/OpenTAXII-master/opentaxii/server.py", line 5, in import structlog ModuleNotFoundError: No module named 'structlog' [2022-03-11 18:45:19 +1100] [122533] [INFO] Worker exiting (pid: 122533) [2022-03-11 18:45:19 +1100] [122529] [INFO] Shutting down: Master [2022-03-11 18:45:19 +1100] [122529] [INFO] Reason: Worker failed to boot. ` Thank you in advance

erwin-eiq commented 2 years ago

Thank you for your bugreport. I really appreciate it when people take the time to create an issue when they find bugs.

I'll look at it as soon as possible, however I'm currently quite busy finishing up https://github.com/eclecticiq/OpenTAXII/pull/222. Once that is done, I plan to go through all the open issues and fix them.