CIRCL / AIL-framework

AIL framework - Analysis Information Leak framework. Project moved to https://github.com/ail-project
https://github.com/ail-project/ail-framework
GNU Affero General Public License v3.0
1.3k stars 282 forks source link

Web Interface not starting #454

Closed burakatabay closed 4 years ago

burakatabay commented 4 years ago

Hi,

I setup the CIRCL Ail corretly but not start any web interface Console outputis image

Where is the problem ?

Terrtia commented 4 years ago

Hi @burakatabay ! Can you check the output of the Flask Server ? screen -r Flask_AIL

burakatabay commented 4 years ago

image

OS : Ubuntu Server 1804 Python 3.6

Terrtia commented 4 years ago

It seem like your screen is already attached, you can access it with screen -r -d Flask_AIL

BeNeDeLuX commented 4 years ago

Have the same problem, no Webinterface on Port 7000 (Ubuntu 18.04, fresh installed with AIL 3.0) Here is the screen output from the Flask_AIL

Flask_base_template.py  create_new_web_module.py  static
Flask_server.py         modules                   templates
blueprints              server.crt                update_thirdparty.sh
create_default_user.py  server.key
Traceback (most recent call last):
  File "./Flask_server.py", line 26, in <module>
    import Tag
  File "/home/bene/AIL-framework//bin/packages/Tag.py", line 37, in <module>
    unsafe_tags = build_unsafe_tags()
  File "/home/bene/AIL-framework//bin/packages/Tag.py", line 29, in build_unsafe_tags
    taxonomies = Taxonomies()
  File "/home/bene/AIL-framework/AILENV/lib/python3.6/site-packages/pytaxonomies/api.py", line 242, in __init__
    self.manifest = self.loader(manifest_path)
  File "/home/bene/AIL-framework/AILENV/lib/python3.6/site-packages/pytaxonomies/api.py", line 269, in __load_path
    return json.load(f)
  File "/usr/lib/python3.6/json/__init__.py", line 296, in load
    return loads(fp.read(),
  File "/home/bene/AIL-framework//AILENV/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 4633: ordinal not in range(128)
Terrtia commented 4 years ago

Seem to be related to #355

On my machine, this is what I get:

In [1]: import locale

In [2]: locale.getpreferredencoding(False)
Out[2]: 'UTF-8'

In [3]: locale.getpreferredencoding()
Out[3]: 'UTF-8'

Does it return ASCII for you?

BeNeDeLuX commented 4 years ago

@Terrtia Thanks again! That fixed the problem! My locales was just "C" and not UTF-8

Should be mentioned on the ReadMe for "Know problems/issues" -> Check locales for UTF.8 if no Webserver is coming up -> Don´t install as root because of permissions problems during

Or better, add these to check to the "installing_deps.sh"

BeRambo commented 4 years ago

I've got this problem as well. Trying to solve it for 2 days now... Tried a fresh install on Ubuntu 18.04, as well as the AIL 2.5 vm from the CIRCL.LU website.

bram@ail-test:~$ cat test.py
#!user/bin/python

import locale
print(locale.getpreferredencoding(False))
print(locale.getpreferredencoding())

bram@ail-test:~$ sudo python test.py
ANSI_X3.4-1968
UTF-8

bram@ail-test:~$ locale
LANG=en_US.UTF-8
LANGUAGE=
LC_CTYPE="en_US.utf-8"
LC_NUMERIC="en_US.utf-8"
LC_TIME="en_US.utf-8"
LC_COLLATE="en_US.utf-8"
LC_MONETARY="en_US.utf-8"
LC_MESSAGES="en_US.utf-8"
LC_PAPER="en_US.utf-8"
LC_NAME="en_US.utf-8"
LC_ADDRESS="en_US.utf-8"
LC_TELEPHONE="en_US.utf-8"
LC_MEASUREMENT="en_US.utf-8"
LC_IDENTIFICATION="en_US.utf-8"
LC_ALL=en_US.utf-8

I tried installing Apache2 and I am able to see it's web page, so it's not like a firewall issue I assume. When running I get this:

bram@ail-test:~/AIL-framework/bin$ ./LAUNCH.sh -l
        * Checking configuration
Config File: Nothing to update
Config File: Nothing to update
        * Configuration up-to-date
******************************************************************
*                        Updating AIL ...                        *
******************************************************************
Check if this repository is a fork:
    This repository is a clone of https://github.com/CIRCL/AIL-framework.git

Current Version: v3.0

    v3.0: 1f8c858c777a7da59134d257d7defb464dc487e5

git checkout master:
Your branch is up to date with 'origin/master'.

git pull:
Already up to date.

****************  AIL Sucessfully Updated  *****************

        * Launching Redis servers
        * Launching ARDB servers
        * Launching logging process
        * Launching all the queues
        * Checking configuration
Config File: Nothing to update
Config File: Nothing to update
        * Configuration up-to-date
        * Launching scripts
        * Launching Flask server

screen -r Flask_AIL Gives me the following:

 * Serving Flask app "Flask_server" (lazy loading)
 * Environment: production
   WARNING: This is a development server. Do not use it in a production deployment.
   Use a production WSGI server instead.
 * Debug mode: off
 * Running on https://0.0.0.0:7000/ (Press CTRL+C to quit)

Anybody has a fix for this? 🙏

gallypette commented 4 years ago

Looks like everything is fine from your output.

BeRambo commented 4 years ago

Looks like everything is fine from your output.

Yeah I'd expect it to be so, but why isn't the web page available for me? Even when I use the curl command it seems like the page is just not up.

bram@ail-test:~/AIL-framework/bin$ curl 127.0.0.1:7000
curl: (56) Recv failure: Connection reset by peer
bram@ail-test:~/AIL-framework/bin$

2020-03-05 13_11_40-Window

gallypette commented 4 years ago

Using https may solve your issue.

BeRambo commented 4 years ago

Using https may solve your issue.

yeah it did lol