FreeTAKTeam / FreeTakServer

Situational Awareness Server compatible with TAK clients
Eclipse Public License 2.0
649 stars 166 forks source link

TypeError: an integer is required (got type str) #205

Closed cadreher76 closed 2 years ago

cadreher76 commented 2 years ago

I have FTS server running, but can't get UI running --> error code below. Can some assist please?

File "/usr/local/lib/python3.8/dist-packages/FreeTAKServer-UI/run.py", line 107, in wsgi.server(sock = eventlet.listen((app_config.APPIP, app_config.APPPort)), site=app) File "/usr/local/lib/python3.8/dist-packages/eventlet/convenience.py", line 78, in listen sock.bind(addr)

I have only change the IP address in the MainConfig.py and config.py

Running latest FTS build and Ubuntu 20.04

Thanks in advance

naman108 commented 2 years ago

please send your UI config file

cadreher76 commented 2 years ago

config.txt

cadreher76 commented 2 years ago

-- encoding: utf-8 --

""" License: MIT Copyright (c) 2019 - present AppSeed.us """

import os from os import environ

class Config(object):

basedir    = os.path.abspath(os.path.dirname(__file__))

SECRET_KEY = 'key'

# This will connect to the FTS db
SQLALCHEMY_DATABASE_URI = 'sqlite:///' + '/opt/FTSServer-UI.db'

# certificates path
certpath = "/usr/local/lib/python3.8/dist-packages/FreeTAKServer/certs/"

# crt file path
crtfilepath = f"{certpath}pubserver.pem"

# key file path
keyfilepath = f"{certpath}pubserver.key.unencrypted"

# this IP will be used to connect with the FTS API
IP = '192.168.242.128'

# Port the  UI uses to communicate with the API
PORT = '19023'

# the public IP your server is exposing
APPIP = '0.0.0.0'

# webmap IP
WEBMAPIP = "127.0.0.1"

# webmap port
WEBMAPPORT = '8000'

# this port will be used to listen
APPPort = '5000'

# the webSocket  key used by the UI to communicate with FTS.
WEBSOCKETKEY = 'YourWebsocketKey'

# the API key used by the UI to comunicate with FTS. generate a new system user and then set it
APIKEY = 'Bearer token'

# For 'in memory' database, please use:
# SQLALCHEMY_DATABASE_URI = 'sqlite:///:memory:'

SQLALCHEMY_TRACK_MODIFICATIONS = False

# THEME SUPPORT
#  if set then url_for('static', filename='', theme='')
#  will add the theme name to the static URL:
#    /static/<DEFAULT_THEME>/filename
# DEFAULT_THEME = "themes/dark"
DEFAULT_THEME = None

class ProductionConfig(Config): DEBUG = False

# Security
SESSION_COOKIE_HTTPONLY = True
REMEMBER_COOKIE_HTTPONLY = True
REMEMBER_COOKIE_DURATION = 3600

# PostgreSQL database
SQLALCHEMY_DATABASE_URI = 'postgresql://{}:{}@{}:{}/{}'.format(
    environ.get('APPSEED_DATABASE_USER', 'appseed'),
    environ.get('APPSEED_DATABASE_PASSWORD', 'appseed'),
    environ.get('APPSEED_DATABASE_HOST', 'db'),
    environ.get('APPSEED_DATABASE_PORT', 5432),
    environ.get('APPSEED_DATABASE_NAME', 'appseed')
)

class DebugConfig(Config): DEBUG = True

config_dict = { 'Production': ProductionConfig, 'Debug': DebugConfig }

brothercorvo commented 2 years ago

port is a string

port = '123'

it's supposed to be an int

port = 123
cadreher76 commented 2 years ago

Thank you for the feedback! The server works now.