Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

FreeTAKServer Install Error #192

Closed
homefall opened this issue Aug 23, 2021 · 14 comments
Closed

FreeTAKServer Install Error #192

homefall opened this issue Aug 23, 2021 · 14 comments
Labels
help wanted Extra attention is needed

Comments

@homefall
Copy link

getting the following error when trying to install on a clean instance of Debian 11 following setup instructions:

prospectfire@prospectfiretak:~$ sudo python3 -m FreeTAKServer.controllers.services.FTS 
Traceback (most recent call last):
  File "/usr/lib/python3.9/runpy.py", line 197, in _run_module_as_main
    return _run_code(code, main_globals, None,
  File "/usr/lib/python3.9/runpy.py", line 87, in _run_code
    exec(code, run_globals)
  File "/usr/local/lib/python3.9/dist-packages/FreeTAKServer/controllers/services/FTS.py", line 6, in <module>
    from FreeTAKServer.controllers.services.TCPDataPackageService import TCPDataPackageService as TCPFlaskFunctions
  File "/usr/local/lib/python3.9/dist-packages/FreeTAKServer/controllers/services/TCPDataPackageService.py", line 1, in <module>
    from .DataPackageServer import FlaskFunctions, Path, dp_directory, os, app, eventlet, const
  File "/usr/local/lib/python3.9/dist-packages/FreeTAKServer/controllers/services/DataPackageServer.py", line 50, in <module>
    os.mkdir(MainConfig.ExCheckMainPath)
FileNotFoundError: [Errno 2] No such file or directory: '/usr/local/lib/python3.8/dist-packages/FreeTAKServer/ExCheck'

Any idea what is needed to resolve this?

@naman108
Copy link
Collaborator

the simplest way is to downgrade to python 3.8, alternatively you can set the MainPath to /usr/local/lib/python3.9/dist-packages/FreeTAKServer in the configuration at /opt/FTSConfig.yaml

@homefall
Copy link
Author

Thank you for the quick response. So I managed to downgrade python to 3.8.2 with a little poking around. Now I am getting an error that it didn't install an SSL module. Sorry but I am very green at dealing with python. Was there a flag I needed to modify in the files I downloaded for 3.8.2 before I compiled and installed it? Below is the output I received:

Collecting FreeTAKServer[ui]
  WARNING: Retrying (Retry(total=4, connect=None, read=None, redirect=None, status=None)) after connection broken by 'SSLError("Can't connect to HTTPS URL because the SSL module is not available.")': /simple/freetakserver/
  WARNING: Retrying (Retry(total=3, connect=None, read=None, redirect=None, status=None)) after connection broken by 'SSLError("Can't connect to HTTPS URL because the SSL module is not available.")': /simple/freetakserver/
  WARNING: Retrying (Retry(total=2, connect=None, read=None, redirect=None, status=None)) after connection broken by 'SSLError("Can't connect to HTTPS URL because the SSL module is not available.")': /simple/freetakserver/
  WARNING: Retrying (Retry(total=1, connect=None, read=None, redirect=None, status=None)) after connection broken by 'SSLError("Can't connect to HTTPS URL because the SSL module is not available.")': /simple/freetakserver/
  WARNING: Retrying (Retry(total=0, connect=None, read=None, redirect=None, status=None)) after connection broken by 'SSLError("Can't connect to HTTPS URL because the SSL module is not available.")': /simple/freetakserver/
  Could not fetch URL https://pypi.org/simple/freetakserver/: There was a problem confirming the ssl certificate: HTTPSConnectionPool(host='pypi.org', port=443): Max retries exceeded with url: /simple/freetakserver/ (Caused by SSLError("Can't connect to HTTPS URL because the SSL module is not available.")) - skipping
  ERROR: Could not find a version that satisfies the requirement FreeTAKServer[ui] (from versions: none)
ERROR: No matching distribution found for FreeTAKServer[ui]
WARNING: pip is configured with locations that require TLS/SSL, however the ssl module in Python is not available.
Could not fetch URL https://pypi.org/simple/pip/: There was a problem confirming the ssl certificate: HTTPSConnectionPool(host='pypi.org', port=443): Max retries exceeded with url: /simple/pip/ (Caused by SSLError("Can't connect to HTTPS URL because the SSL module is not available.")) - skipping

@homefall
Copy link
Author

homefall commented Aug 23, 2021

So i got the install to proceed after installing 3.8.2 over the top of the included python and then doing the following so that SSL would work with my 3.8.2 build

sudo apt install build-essential zlib1g-dev libncurses5-dev libgdbm-dev libnss3-dev libssl-dev libreadline-dev libffi-dev wget
then re-run the ./configure --enable-optimizations --enable-loadable-sqlite-extensions and make install steps

However now when I try to run the "sudo python3 -m FreeTAKServer.controllers.services.FTS " step I get the following error. Google/Duck Duck Go have not turned up anything useful on this as the file is specific to FreeTAK server:

prospectfire@prospectfiretak:~/Python-3.8.2$ sudo python3 -m FreeTAKServer.controllers.services.FTS 
Traceback (most recent call last):
  File "/usr/local/lib/python3.8/runpy.py", line 193, in _run_module_as_main
    return _run_code(code, main_globals, None,
  File "/usr/local/lib/python3.8/runpy.py", line 86, in _run_code
    exec(code, run_globals)
  File "/usr/local/lib/python3.8/site-packages/FreeTAKServer/controllers/services/FTS.py", line 6, in <module>
    from FreeTAKServer.controllers.services.TCPDataPackageService import TCPDataPackageService as TCPFlaskFunctions
  File "/usr/local/lib/python3.8/site-packages/FreeTAKServer/controllers/services/TCPDataPackageService.py", line 1, in <module>
    from .DataPackageServer import FlaskFunctions, Path, dp_directory, os, app, eventlet, const
  File "/usr/local/lib/python3.8/site-packages/FreeTAKServer/controllers/services/DataPackageServer.py", line 50, in <module>
    os.mkdir(MainConfig.ExCheckMainPath)
FileNotFoundError: [Errno 2] No such file or directory: '/usr/local/lib/python3.8/dist-packages/FreeTAKServer/ExCheck'

@guitarpicva
Copy link

the simplest way is to downgrade to python 3.8, alternatively you can set the MainPath to /usr/local/lib/python3.9/dist-packages/FreeTAKServer in the configuration at /opt/FTSConfig.yaml

The simplest way is actually to adjust the base python version as noted above by changing the paths in a few places. Also check the UI's config.py and the MainConfig.py. Even though you may be using the yaml, if anything unusual happens, it will revert to these files.

Python 3.9 seems to work fine with FTS 1.9.1 on x64 Linux (Ubuntu 21.04). I never like to downgrade, particularly system packages.

@AnT1ThesIs
Copy link

Use Ubuntu server, I was able to get it installed on 21.04 with 3.8. Now on to my SSL issues.

@naman108
Copy link
Collaborator

got the install to proceed after installing 3.8.2 over the top of the included python and then doing the following so that SSL would work with my 3.8.2 build

sudo apt install build-essential zlib1g-dev libncurses5-dev libgdbm-dev libnss3-dev libssl-dev libreadline-dev libffi-dev wget
then re-run the ./configure --enable-optimizations --enable-loadable-sqlite-extensions and make install steps

However now when I try to run the "sudo python3 -m FreeTAKServer.controllers.services.FTS " step I get the following error. Google/Duck Duck Go have not turned up anything useful on this as the file is specific to FreeTAK server:

are you running with sudo

@homefall
Copy link
Author

as I recall I was running this after running a "sudo su" to make myself root.

@naman108
Copy link
Collaborator

ok and can you send the output of running sudo python3?

@homefall
Copy link
Author

Sure thing, thanks for the help
image

@homefall
Copy link
Author

homefall commented Sep 2, 2021

So I guess we can mark this closed... I have abandoned this install of debian and moved to the mentioned Ubuntu 20.04 server. Have the server MOSTLY working now but getting odd errors when trying to connect clients via TCP or SSL. Assume you would prefer start a new item for these issues OR join the apparently similar thread on server disconnects.

@guitarpicva
Copy link

did you try to change the python path in the config files? It works swimmingly here with Ubuntu 21.04 which uses python 3.9.

@brothercorvo brothercorvo added the help wanted Extra attention is needed label Sep 10, 2021
@NullVibes
Copy link

I've run into the same roadblock with Python versions. The /opt/FTSConfig.yaml file does not (yet) exist. Can you specify the locations of where to fix the config to reflect Python version 3.9?

@guitarpicva
Copy link

the yaml doesn't exist unless you create it AFAIK

both of the two main config files have Python environment variables to adjust, see above, Aug. 24 post.

@NullVibes
Copy link

NullVibes commented Nov 16, 2021

(Solved)
Path: /usr/local/lib/python3.9/dist-packages/FreeTAKServer/controllers/configuration/
File: Edit MainConfig.py, Line 18, to reflect your version of Python.

python_version = 'python 3.9'

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
help wanted Extra attention is needed
Projects
None yet
Development

No branches or pull requests

6 participants