FreeTAKTeam / FreeTakServer

Situational Awareness Server compatible with TAK clients
Eclipse Public License 2.0
639 stars 165 forks source link

Server Fails to start in CLI #88

Closed netgeak closed 3 years ago

netgeak commented 3 years ago

I am installing on Ubuntu 18 and when I run sudo python3 -m FreeTAKServer.controllers.services.FTS -DataPackageIP 192.168.1.2 it starts up. But if I use the CLI is get error in processing your request function returned bad data. I used install instructions from Pypi readme. is there something I am missing with the setup? Thanks.

naman108 commented 3 years ago

is the cli being run on the same machine? and what command are you running?

netgeak commented 3 years ago

Yes, same machine. I run sudo python3 -m FreeTAKServer.views.CLI, issue command start_all and enter the required info. at the end it gives the error.

greenwich90 commented 3 years ago

I also get this error.

I have not been able to get the server to start whatsoever though unfortunately.

$ sudo python3 -m FreeTAKServer.controllers.services.FTS -DataPackageIP "myIP" Creating directory at logs Traceback (most recent call last): File "/usr/lib/python3.8/runpy.py", line 194, in _run_module_as_main return _run_code(code, main_globals, None, File "/usr/lib/python3.8/runpy.py", line 87, in _run_code exec(code, run_globals) File "/usr/local/lib/python3.8/dist-packages/FreeTAKServer/controllers/services/FTS.py", line 9, in from FreeTAKServer.controllers.services.RestAPI import RestAPI File "/usr/local/lib/python3.8/dist-packages/FreeTAKServer/controllers/services/RestAPI.py", line 3, in from flask_socketio import SocketIO, emit ModuleNotFoundError: No module named 'flask_socketio'

FTS$ start_CoT_service enter CoT_service IP[0.0.0.0]: "myIP" enter CoT_service Port[8087]: 8087 error in processing your request function returned bad data

netgeak commented 3 years ago

Issue the following commands and you should be able to start the server using "sudo python3 -m FreeTAKServer.controllers.services.FTS -DataPackageIP "myIP" command. sudo -H python3 -m pip install flask_socketio sudo -H python3 -m pip install flask_cors Since version 1.1 those modules dont seam to get installed. Hope that helps.

greenwich90 commented 3 years ago

@netgeak That work,

Thank you.

netgeak commented 3 years ago

Just a side note. When I run the server I get constant reconnects with the atak client.

greenwich90 commented 3 years ago

@netgeak does the client actually drop connection? (TAK server turns red) How often does this happen?

I have not experienced this but have only done limited testing. Last night I had a stable connection with 4 clients, but I was only testing for around an hour.

naman108 commented 3 years ago

Just a side note. When I run the server I get constant reconnects with the atak client.

have you changed any user configurations like adding email or xmpp address?

netgeak commented 3 years ago

I am seeing this with WinTak, I added xmpp but it was doing the same thing prior. All I see in the server console is multiple "Handling conn data" statements. Yes, it turns red. Client disconnect happens every 30 seconds roughly.

naman108 commented 3 years ago

could you send the FTS error log please?

netgeak commented 3 years ago

FTS_warning.log

naman108 commented 3 years ago

It seems that you haven't disabled xmpp properly as it's still being sent on connection.

netgeak commented 3 years ago

I've disabled it in WinTak, still see the constant disconnects.

naman108 commented 3 years ago

try removing the logs restart FTS restart wintak and reconnect if the error persists send the error log.

netgeak commented 3 years ago

Will do. Thanks

netgeak commented 3 years ago

We can close this issue. I had to unload the Tak Chat plugin in WinTAK then the disconnects quit. Thanks for all your help.