Server error

Solved!
Posted in General by Dan Thu Apr 07 2016 16:18:22 GMT+0000 (UTC)·5·Viewed 735 times

I installed skf on a Ubuntu 64b box by following the steps as described on https://skf.readme.io/v1.0/docs/installation - Ubuntu Manual installation and - Ubuntu Apache WSGI Setup I got no errors during the setup however I get a "Internal Server Error" when I try to connect. Here is what I get on the Apache error log: --------------------------------------------------------------------- mod_wsgi (pid=45287): Target WSGI script '/data/skf-flask/skf/skf.wsgi' cannot be loaded as Python module. mod_wsgi (pid=45287): Target WSGI script '/data/skf-flask/skf/skf.wsgi' cannot be loaded as Python module. mod_wsgi (pid=45287): Exception occurred processing WSGI script '/data/skf-flask/skf/skf.wsgi'. mod_wsgi (pid=45287): Exception occurred processing WSGI script '/data/skf-flask/skf/skf.wsgi'. Traceback (most recent call last): Traceback (most recent call last): File "/data/skf-flask/skf/skf.wsgi", line 4, in <module> File "/data/skf-flask/skf/skf.wsgi", line 4, in <module> from skf import app as application from skf import app as application File "/data/skf-flask/skf/skf.py", line 22, in <module> File "/data/skf-flask/skf/skf.py", line 22, in <module> import os, markdown, datetime, string, base64, re, sys, re, requests, mimetypes, smtplib import os, markdown, datetime, string, base64, re, sys, re, requests, mimetypes, smtplib ImportError: No module named markdown ImportError: No module named markdown ---------------------------------------------------------------------- If I stop Apache and run skf.py from the command line I get only some warmings about bcrypt. python skf.py /usr/local/lib/python2.7/dist-packages/flask/exthook.py:71: ExtDeprecationWarning: Importing flask.ext.bcrypt is deprecated, use flask_bcrypt instead. .format(x=modname), ExtDeprecationWarning * Running on http://127.0.0.1:5443/ (Press CTRL+C to quit)
Foobar
Apr 14, 2016
Hi Dan, Nice to hear you tried out the SKF project and to bad you got that issue. It seems looking at the debug information that you did not have the pip markdown module installed? What does happen when you try this inside a terminal: pip install markdown==2.6.2 Normally this pip dependancies are solved by running: sudo pip install owasp-skf Also it could be the case that you have a typo in the configuration of the web server, can you verify that you did replace my username foobar in the configuration examples? Please let me know if this solved your issue. Greets, Glenn
Dan
Apr 15, 2016
Hi Glenn, I think I figure it out. I installed SKF on a CIS hardened Ubuntu VM. I used strace to find that www-data could not read from "/usr/local/lib/python2.7/dist-packages/". So it was a permission issue.
Foobar
Apr 28, 2016
Aaah one check, thank you for reporting the fix for it ^^

Foobar marked this as solved
Diego Gomes
June 2, 2016
Hi Dan, did you install in the Ubuntu? I am trying here but now way :( After run pip install owasp-skf error: command 'x86_64-linux-gnu-gcc' failed with exit status 1 I have a fresh installation of Ubuntu here Any tips?
Diego Gomes
June 2, 2016
another red error message in the terminal/putty Command "/usr/bin/python -u -c "import setuptools, tokenize;__file__='/tmp/pip-build-B00A2w/cryptography/setup.py';exec(compile(getattr(tokenize, 'open', open)(__file__).read().replace('\r\n', '\n'), __file__, 'exec'))" install --record /tmp/pip-mVP5f7-record/install-record.txt --single-version-externally-managed --compile" failed with error code 1 in /tmp/pip-build-B00A2w/cryptography/
Markdown is allowed