Coder Social home page Coder Social logo

tak-server's Introduction

TAK SERVER

TAK logo

This is a Docker wrapper for an official 'OG' TAK server from TAK Product Center intended for beginners. It will give you a turnkey TAK server with SSL which works with ATAK, iTAK, WinTAK.

IMPORTANT: Download the Official TAK Release

Before you can build this, you must download a TAKSERVER-DOCKER-X.X-RELEASE.

Releases are now public at https://tak.gov/products/tak-server

Please follow account registration process, and once completed go to the link above.

The integrity of the release will be checked at setup against the MD5/SHA1 checksums in this repo. THESE MUST MATCH. If they do not match, DO NOT proceed unless you trust the release.

TAK release download

TAK Server Release Checksums

The size blew up after 4.6 due to 900GB of DTED which was added to WebTAK and then shrank after 4.10 with a refactor

Release Filename Bytes MD5 Checksum SHA1 Checksum
takserver-docker-4.6-RELEASE-26.zip 462MB dc63cb315f950025707dbccf05bdf183 7ca58221b8d35d40df906144c5834e6d9fa85b47
takserver-docker-4.7-RELEASE-4.zip 759MB 5b011b74dd5f598fa21ce8d737e8b3e6 b688359659a05204202c21458132a64ec1ba0184
takserver-docker-4.7-RELEASE-18.zip 759MB 44b6fa8d7795b56feda08ea7ab793a3e cd56406d3539030ab9b9b3fbae08b56b352b9b53
takserver-docker-4.7-RELEASE-20.zip 759MB 1cb0208c62d4551f1c3185d00a5fd8bf f427ae3e860fddb8907047f157ada5764334c48d
takserver-docker-4.8-RELEASE-31.zip 772MB c07f01d74960287bfc7dc08ecd6cbc3a 387ea4f593763d3adcfda5128a89dda4fd82e937
takserver-docker-4.10-RELEASE-50.zip 528MB 5068d5fd70cbc9ecf53f2259dc9383f7 177ed55a66ce8126424937dd3bc7375feb12d3eb
takserver-docker-5.0-RELEASE-58.zip 660MB 2c80c289f67de4878ca596bf479ef698 944052011887101fd1019b3019f5c9583a1683f3

Requirements

Setup Video

Please use the below link to see a short video on a complete setup of TAK Server.

TAK Server install (Docker)

Prerequisites

Fetch the dependencies, then clone the git repository and cd into the directory

sudo apt update
sudo apt install net-tools unzip zip
git clone https://github.com/Cloud-RF/tak-server.git
cd tak-server

Setup Docker's apt repository

First, set up Docker's apt repository. These steps are already completed on the WarDragon. Open a terminal and run the following commands:

# Add Docker's official GPG key:
sudo apt-get update
sudo apt-get install ca-certificates curl gnupg
sudo install -m 0755 -d /etc/apt/keyrings
curl -fsSL https://download.docker.com/linux/ubuntu/gpg | sudo gpg --dearmor -o /etc/apt/keyrings/docker.gpg
sudo chmod a+r /etc/apt/keyrings/docker.gpg

# Add the repository to Apt sources:
echo \
  "deb [arch="$(dpkg --print-architecture)" signed-by=/etc/apt/keyrings/docker.gpg] https://download.docker.com/linux/ubuntu \
  "$(. /etc/os-release && echo "$VERSION_CODENAME")" stable" | \
  sudo tee /etc/apt/sources.list.d/docker.list > /dev/null
sudo apt-get update

# Install the Docker packages.
# To install the latest version, run:
sudo apt-get install docker-ce docker-ce-cli containerd.io docker-buildx-plugin docker-compose-plugin

Docker Security

IT IS NOT RECOMMENDED TO RUN PRIVILEGED CONTAINERS ON THE DOCKER HOST.

These scripts assume you don't need to sudo for docker and docker-compose. As such it is assumed that your user account is a member of the docker group as is indicated during the correct installation of Docker. This will allow you to run docker commands without sudo.

For more information please consult the official installation documentation provided by Docker.

To test if you are able to run docker commands without sudo you can test with the following command:

docker run hello-world

AMD64 & ARM64 (Pi4) setup

The script will auto-detect your architecture and use the ARM Docker file if the architecture is determined to be arm64.

Installation

You should copy your downloaded TAKSERVER-DOCKER-X.X-RELEASE ZIP file to the tak-server directory.

Assuming that your current working directory is the tak-server as cloned previously, you can then proceed to run the setup.sh script.

chmod +x scripts/setup.sh
./scripts/setup.sh

The setup.sh script will populate configuration files, start up TAK server with a PostgreSQL database via Docker compose and generate the required certificates. There will be prompts and some input required from the user such as certificate names. At the end of the setup the user will be given random passwords and a link to access the web interface where further settings can be applied.

For more information on using TAK server refer to the documentation on the TAK Product Center GitHub.

Network Ports

TAK server needs the following port numbers to operate. Services already using these will cause a problem which the script will detect and offer a resolution for.

  • 5432
  • 8089
  • 8443
  • 8444
  • 8446
  • 9000
  • 9001

If you are going to expose these ports be careful. Not all of them run secure protocols. For peace of mind, and for working through firewalls and NAT routers run this on a VPN like OpenVPN or NordVPN.

Successful Installation

If your TAK Server was able to successfully be installed then you should see in your console a similar message:

Import the admin.p12 certificate from this folder to your browser as per the README.md file
Login at https://10.0.0.6:8443 with your admin account. No need to run the /setup step as this has been done.
Certificates and *CERT DATA PACKAGES* are in tak/certs/files 

Setup script sponsored by CloudRF.com - "The API for RF"

---------PASSWORDS----------------

Admin user name: admin
Admin password: <Your password here>
Postgresql password: <Your password here>

---------PASSWORDS----------------

MAKE A NOTE OF YOUR PASSWORDS. THEY WON'T BE SHOWN AGAIN.
Docker containers should automatically start with the docker service from now on.

Admin Login

The login to the web interface requires the certificate created during setup. The certificate needs to be uploaded to the browser first. The name of this certificate is the one which you have typed after specifying the State, City, and Company during the certificate creation.

Default certificate name is admin.p12. The certificates names can be checked by:

docker exec -it tak-server-tak-1 ls -hal /opt/tak/certs/files 

Installing Your Admin Certificate

The admin.p12 certificate needs to be copied from ./tak/certs/files/ and installed in a web browser for you to be able to administer your TAK Server. This not only provides TLS transport security with mutual authentication (Client > Server, Server > Client) but it proves your identity and saves you having to type a tedious password each time.

Google Chrome

  • Go to "Settings" --> "Privacy and Security" --> "Security" --> "Manage Certificates"
  • Navigate to "Your certificates"
  • Press "Import" button and choose your .p12 file (Default password is atakatak)

The web UI should be now accessible via the address given below.

Mozilla Firefox

  • Go to "Settings" --> "Privacy & Security" --> scroll down to "Certificates" section.
  • Click the button "View Certificates"
  • Choose "Your Certificates" section and "Import" your .p12 certificate (Default password is atakatak)
  • Choose the "Authorities" section
  • Locate "TAK" line, there should be your certificate name displayed underneath it
  • Click your certificate name and press button "Edit Trust"
  • TICK the box with "This certificate can identify web sites" statement, then click "OK"

The web UI should be now accessible via the address given below.

Web UI Access

The web user interface can be only accessed via SSL on port 8443.

The login prompt will not show up as the server authenticates the user based on the uploaded certificate.

The user interface is available at the below address and on all other NICs. Check your firewall as you may not want this exposed on a public NIC.

https://localhost:8443

Re-Starting Server After Shutdown

Make sure you are in the main tak-server directory and append the -d flag to run the process in the background.

cd tak-server
docker compose up -d

Shutting Down Running TAK Server

Make sure you are in the main tak-server directory.

cd tak-server
docker compose down

Logging

You can access a shell in the running Docker container with this command:

docker exec -it tak-server-tak-1 tail -f /opt/tak/logs/takserver.log

To tail the server log from OUTSITE the container as the tak folder is mapped:

tail -f ./tak/logs/takserver.log

Clean Up

sudo ./scripts/cleanup.sh

This script will stop the TAK Server container, remove the mapped database volume and remove the folder tak which is created in the project root directory (cloned from GitHub) during the setup process.

WARNING - If you have data in an existing TAK database container it will be lost.

Adding Your First EUD / ATAK Device

If you've never setup ATAK with a server before you need server and user certificates. You can load these manually as .p12 files or the easier way is with a .zip data package and a manifest.

You can find ready made data packages in the tak/certs/files directory. You need to copy these to your device's SD card then import the .zip into ATAK / iTAK with the "Import" function and choose "Local SD".

This will add a server, certificates and a user account. You will still need to create this user with the matching name for example, user1, in your TAK server user management dashboard and assign them to a common group.

Federated TAK server

If you would like to federate TAK servers you will need to exchange ca.pem files between servers. On this docker setup, I find that I have to manually import the ca.pem from the command line as the webui seems unable to add the it to the fed truststore. Typically the fed-truststore is located in the project directory at tak-server/tak/certs/files. You'll likely find the ca.pem in that location as well, location may vary depending on install method.

keytool -importcert -file ca.pem -keystore fed-truststore.jks -alias "tak"

Transferring Your ZIP files Via HTTP

If you like to live dangerously, you can run a script to serve the .zip files on TCP port 12345, for example, http://0.0.0.0:12345. This launches a mini Python web server and serves the content of the share folder which will contain your certificates. Note that sharing certificates via insecure protocols is not secure.

./scripts/shareCerts.sh
Serving HTTP on 0.0.0.0 port 12345 (http://0.0.0.0:12345/) ...
10.0.0.5 - - [23/Nov/2022 15:49:52] "GET / HTTP/1.1" 200 -
10.0.0.5 - - [23/Nov/2022 15:49:54] "GET /user1-10.0.0.3.dp.zip HTTP/1.1" 200 

Stop the script with Ctrl-C once done to stop randoms fetching your certificates.

FAQ

See Frequently Asked Questions.

Contributing

Please feel free to open merge requests. A beginner's guide to GitHub.com is here:

https://www.freecodecamp.org/news/how-to-make-your-first-pull-request-on-github-3/

Authors and Acknowledgment

Thanks to the TAK product center for open-sourcing and maintaining all things TAK.

Thanks to James Wu 'wubar' on GitLab/Discord for publishing the Docker wrapper on which this was built.

Thanks to protectionist dinosaurs, on both sides of the pond, who are threatened by TAK's open source model for the motivation :p

Useful Links

tak-server's People

Contributors

35mpded avatar alexwinder avatar alphafox02 avatar appybara13 avatar farrantalex avatar joshuafuller avatar kubamiszcz avatar modernham avatar patrykcrf avatar rizeon avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar  avatar

tak-server's Issues

Unable to install on Ubuntu 18.04 4.8 tak

Unable to install on ubuntu 18.04, I get to input the cert information and then when creating the containers it gives this error:

[+] Building 0.4s (6/6) FINISHED
=> [tak-server-tak internal] load build definition from Dockerfile.takserver 0.0s
=> => transferring dockerfile: 250B 0.0s
=> [tak-server-db internal] load build definition from Dockerfile.takserver-db 0.1s
=> => transferring dockerfile: 224B 0.0s
=> [tak-server-tak internal] load .dockerignore 0.0s
=> => transferring context: 2B 0.0s
=> [tak-server-db internal] load .dockerignore 0.0s
=> => transferring context: 2B 0.0s
=> ERROR [tak-server-tak internal] load metadata for docker.io/library/openjdk:11-jdk-bullseye 0.1s
=> CANCELED [tak-server-db internal] load metadata for docker.io/library/postgres:15 0.0s

[tak-server-tak internal] load metadata for docker.io/library/openjdk:11-jdk-bullseye:


failed to solve: rpc error: code = Unknown desc = failed to solve with frontend dockerfile.v0: failed to create LLB definition: rpc error: code = Unknown desc = error getting credentials - err: exit status 1, out: Cannot autolaunch D-Bus without X11 $DISPLAY
load metadata for docker.io/library/openjdk:11-jdk-bullseye

any help would be greatly appreciated

UserManager when installing

UserManager when installing

error

LinkageError occurred while loading main class com.bbn.marti.UserManager java.lang.UnsupportedClassVersionError: com/bbn/marti/UserManager has been compiled by a more recent version of the Java Runtime (class file version 61.0), this version of the Java Runtime only recognizes class file versions up to 55.0

WebTAK not connecting

People are reporting webtak is failing to a bad value in the coreconfig.xml

This is likely a docker alias eg. takserver instead of a WAN IP.
Using the WAN IP was the previous method which caused issues elsewhere. Fun and games!

Password complexity check failed and failed to initialize pool

Thanks for this great project to help with setting up the TAK server. I'm running into a problem. I get the error below.

Password complexity check failed. Password must be a minimum of 15 characters including 1 uppercase, 1 lowercase, 1 number, and 1 special character from this list [-_!@#$%^&*(){}[]+=~`|:;<>,./?].
No joy with DB at , will retry in 10s. If this loops more than 6 times go and get some fresh air...

And it just loops like this forever. I went to get some fresh air, but it didn't work :)

I tried setting $password to one that manually met that criteria, but then I get

Waiting for TAK server to go live. This should take <1m with an AMD64, ~2min on a ARM64 (Pi)
[+] Running 1/1
 ⠿ Container tak-server-tak-1  Started                                                                                                                                       0.3s
java.lang.reflect.InvocationTargetException
java.lang.RuntimeException: java.lang.reflect.InvocationTargetException
	at com.bbn.marti.takcl.cli.CommandCommon.invokeMethodFromModuleWithParams(CommandCommon.java:85)
	at com.bbn.marti.takcl.cli.advanced.AdvancedParamParser.execute(AdvancedParamParser.java:279)
	at com.bbn.marti.takcl.cli.advanced.AdvancedCliMainHelper.main(AdvancedCliMainHelper.java:127)
	at com.bbn.marti.UserManager.main(UserManager.java:58)
Caused by: java.lang.reflect.InvocationTargetException
	at java.base/jdk.internal.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
	at java.base/jdk.internal.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:62)
	at java.base/jdk.internal.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
	at java.base/java.lang.reflect.Method.invoke(Method.java:566)
	at com.bbn.marti.takcl.cli.CommandCommon.invokeMethodFromModuleWithParams(CommandCommon.java:52)
	... 3 more
Caused by: class org.apache.ignite.IgniteException: Failed to find deployed service: distributed-user-file-manager
	at org.apache.ignite.internal.processors.service.GridServiceProxy.invokeMethod(GridServiceProxy.java:201)
	at org.apache.ignite.internal.processors.service.GridServiceProxy$ProxyInvocationHandler.invoke(GridServiceProxy.java:498)
	at com.sun.proxy.$Proxy43.getUsers(Unknown Source)
	at com.bbn.marti.takcl.AppModules.OnlineFileAuthModule.innerUserCertMod(OnlineFileAuthModule.java:137)
	at com.bbn.marti.takcl.AppModules.OnlineFileAuthModule.usermod(OnlineFileAuthModule.java:91)
	... 8 more
java.lang.reflect.InvocationTargetException
No joy with DB at , will retry in 10s. If this loops more than 6 times go and get some fresh air...
java.lang.reflect.InvocationTargetException
java.lang.RuntimeException: java.lang.reflect.InvocationTargetException
	at com.bbn.marti.takcl.cli.CommandCommon.invokeMethodFromModuleWithParams(CommandCommon.java:85)
	at com.bbn.marti.takcl.cli.advanced.AdvancedParamParser.execute(AdvancedParamParser.java:279)
	at com.bbn.marti.takcl.cli.advanced.AdvancedCliMainHelper.main(AdvancedCliMainHelper.java:127)
	at com.bbn.marti.UserManager.main(UserManager.java:58)
Caused by: java.lang.reflect.InvocationTargetException
	at java.base/jdk.internal.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
	at java.base/jdk.internal.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:62)
	at java.base/jdk.internal.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
	at java.base/java.lang.reflect.Method.invoke(Method.java:566)
	at com.bbn.marti.takcl.cli.CommandCommon.invokeMethodFromModuleWithParams(CommandCommon.java:52)
	... 3 more
Caused by: class org.apache.ignite.IgniteException: Failed to find deployed service: distributed-user-file-manager
	at org.apache.ignite.internal.processors.service.GridServiceProxy.invokeMethod(GridServiceProxy.java:201)
	at org.apache.ignite.internal.processors.service.GridServiceProxy$ProxyInvocationHandler.invoke(GridServiceProxy.java:498)
	at com.sun.proxy.$Proxy43.getUsers(Unknown Source)
	at com.bbn.marti.takcl.AppModules.OnlineFileAuthModule.innerUserCertMod(OnlineFileAuthModule.java:137)
	at com.bbn.marti.takcl.AppModules.OnlineFileAuthModule.usermod(OnlineFileAuthModule.java:91)
	... 8 more
java.lang.reflect.InvocationTargetException
...

and then eventually

org.postgresql.util.PSQLException: The connection attempt failed.
	at org.postgresql.core.v3.ConnectionFactoryImpl.openConnectionImpl(ConnectionFactoryImpl.java:331)
	at org.postgresql.core.ConnectionFactory.openConnection(ConnectionFactory.java:49)
	at org.postgresql.jdbc.PgConnection.<init>(PgConnection.java:223)
	at org.postgresql.Driver.makeConnection(Driver.java:468)
	at org.postgresql.Driver.connect(Driver.java:267)
	at com.zaxxer.hikari.util.DriverDataSource.getConnection(DriverDataSource.java:138)
	at com.zaxxer.hikari.pool.PoolBase.newConnection(PoolBase.java:353)
	at com.zaxxer.hikari.pool.PoolBase.newPoolEntry(PoolBase.java:201)
	at com.zaxxer.hikari.pool.HikariPool.createPoolEntry(HikariPool.java:473)
	at com.zaxxer.hikari.pool.HikariPool.checkFailFast(HikariPool.java:562)
	at com.zaxxer.hikari.pool.HikariPool.<init>(HikariPool.java:115)
	at com.zaxxer.hikari.HikariDataSource.<init>(HikariDataSource.java:81)
	at com.bbn.tak.schema.SchemaManager.configure(SchemaManager.java:325)
	at com.bbn.tak.schema.SchemaManager.processCommandLine(SchemaManager.java:264)
	at com.bbn.tak.schema.SchemaManager.main(SchemaManager.java:65)
Caused by: java.net.UnknownHostException: HOSTIP
	at java.base/java.net.AbstractPlainSocketImpl.connect(AbstractPlainSocketImpl.java:229)
	at java.base/java.net.SocksSocketImpl.connect(SocksSocketImpl.java:392)
	at java.base/java.net.Socket.connect(Socket.java:609)
	at org.postgresql.core.PGStream.createSocket(PGStream.java:241)
	at org.postgresql.core.PGStream.<init>(PGStream.java:98)
	at org.postgresql.core.v3.ConnectionFactoryImpl.tryConnect(ConnectionFactoryImpl.java:109)
	at org.postgresql.core.v3.ConnectionFactoryImpl.openConnectionImpl(ConnectionFactoryImpl.java:235)
	... 14 common frames omitted
05:59:48.463 [main] ERROR com.bbn.tak.schema.SchemaManager - Failed to initialize pool: The connection attempt failed. The connection attempt failed.

Note that this is on a mac. We just tried it on an ubuntu machine and it worked if we manually changed the password. Anyone know why it "Failed to initialize pool" on the mac?

Exception during pool initialization

Hello,
I was trying to setup tak-server following the steps instructed in README.md.

The error I got:

[main] ERROR com.bbn.tak.schema.SchemaManager - Failed to initalize pool: Connection to tak-database:5432 refused. Check that hostname and port are correct and the postmaster is accepting TCP/IP connections. Connection to tak-database:5432 refused. Check that the hostname and port are correct and that the postmaster is accepting TCP/IP connections.

The tak release used: takserver-docker-4.7-RELEASE-18.zip
machine tested:

  • AWS c5.xlarge:
    • 4vCPU
    • 8 GB RAM
    • Up to 10 Gbps network bandwidth
    • 50gb storage

I tried two different OS since the recommended one by tak was RHEL but README.md mentions Debian as well.

in RHEL 8:
image
in Debian 11:
image

I'm stuck here during ./script/setup.sh, any help greatly appreciated.

Password complexity check failed.

Installing the takserver-docker-4.8-RELEASE-31, after the container starts I get most of the time:

Password complexity check failed. Password must be a minimum of 15 characters including 1 uppercase, 1 lowercase, 1 number, and 1 special character from this list [-_!@#$%^&*(){}[]+=~|:;<>,./?].

Tak server not onnecting with my database

When installing the TAK server on digital ocean droplet i get this error both with 4.8 and 4.9 version, tried multiple times. Is this a java -> postgreSQL connector issue?

Environment

Please provide as much information as possible about your environment:

  • Hardware Make/Model: Digital Ocean droplet
  • Operating System and Version (e.g. cat /etc/os-release): Ubuntu 22.10
  • Docker Version (docker -v): 20.10.21
  • Docker Compose Version (docker compose version) or (docker-compose version): 1.28.5
  • CPU Details (make/model and/or speed/core count): Digital ocean hosting
  • RAM (e.g. free -h): 2 Gib
  • Disk Availability (e.g. df -h): 50 GB
  • TAK Server Version From TAK.gov: takserver-docker-4.9-RELEASE-23.zip & takserver-docker-4.8-RELEASE-56.zip

Description

Steps to Reproduce

Error output

image
No joy with DB at IP (it is the right one), will retry in 10s. If this loops more than 6 times go and get some fresh air...
java.lang.reflect.InvocationTargetException
java.lang.RuntimeException: java.lang.reflect.InvocationTargetException
at com.bbn.marti.takcl.cli.CommandCommon.invokeMethodFromModuleWithParams(CommandCommon.java:85)
at com.bbn.marti.takcl.cli.advanced.AdvancedParamParser.execute(AdvancedParamParser.java:279)
at com.bbn.marti.takcl.cli.advanced.AdvancedCliMainHelper.main(AdvancedCliMainHelper.java:127)
at com.bbn.marti.UserManager.main(UserManager.java:58)
Caused by: java.lang.reflect.InvocationTargetException
at java.base/jdk.internal.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
at java.base/jdk.internal.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:62)
at java.base/jdk.internal.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
at java.base/java.lang.reflect.Method.invoke(Method.java:566)
at com.bbn.marti.takcl.cli.CommandCommon.invokeMethodFromModuleWithParams(CommandCommon.java:52)
... 3 more
Caused by: class org.apache.ignite.IgniteException: Failed to find deployed service: distributed-user-file-manager
at org.apache.ignite.internal.processors.service.GridServiceProxy.invokeMethod(GridServiceProxy.java:201)
at org.apache.ignite.internal.processors.service.GridServiceProxy$ProxyInvocationHandler.invoke(GridServiceProxy.java:498)
at com.sun.proxy.$Proxy43.getUsers(Unknown Source)
at com.bbn.marti.takcl.AppModules.OnlineFileAuthModule.innerUserCertMod(OnlineFileAuthModule.java:137)
at com.bbn.marti.takcl.AppModules.OnlineFileAuthModule.usermod(OnlineFileAuthModule.java:91)
... 8 more
java.lang.reflect.InvocationTargetException
ERROR: 1

Java

Hi,

I'm currently setting up tak-server, but encountered an issue after running ./script/setup.sh. During a check for fully initialized Java, I got this error:

Error: LinkageError occurred while loading main class com.bbn.marti.UserManager java.lang.UnsupportedClassVersionError: com/bbn/marti/UserManager has been compiled by a more recent version of the Java Runtime (class file version 61.0), this version of the Java Runtime only recognizes class file versions up to 55.0

Even after updating Java to the recommended version, I still get this message consistently. Any solutions to fix this error?

Support for TAK Server 4.10

This is more of a suggestion/advice than a bug report.

With a very minor change, I got TAK Server 4.10 to run using this script.
The only change that was required is bumping OpenJDK version in "docker/<architecture>/Dockerfile.takserver" from "openjdk:11-jdk-bullseye" to "openjdk:17-jdk-bullseye".
tak.gov hasn't been yet updated with system requirements for version 4.10, but judging from the class version errors I get when attempting to run 4.10 on OpenJDK 11, the required Java version is now OpenJDK 17.

The only major problem I see with bumping the JDK version in Dockerfile is that you will likely need separate Dockerfiles to support older versions which still run on OpenJDK 11.

Upgrade without reinstalling.

I have an older TAK Server 4.7 installation installed using the Cloud-RF script which I wish to upgrade to version 4.10. However, the current script seems to only support new installations. We have over 30 users on the server, each with their own device (mostly smartphones, but there are a few tablets and laptops). And I do not wish to reconfigure every single one of these end-user devices manually.

Is there an easy way to alter the script so that it would upgrade an existing installation instead of re-installing ?

java.lang.reflect.InvocationTargetException

When running the script after the certificate creation I get the following error

java.lang.reflect.InvocationTargetException
java.lang.RuntimeException: java.lang.reflect.InvocationTargetException
      at com.bbn.marti.takcl.cli.CommandCommon.invokeMethodFromModuleWithParams(CommandCommon.java:85)
      at com.bbn.marti.takcl.cli.advanced.AdvancedParamParser.execute(AdvancedParamParser.java:279)
      at com.bbn.marti.takcl.cli.advanced.AdvancedCliMainHelper.main(AdvancedCliMainHelper.java:127)
      at com.bbn.marti.UserManager.main(UserManager.java:58)
Caused by: java.lang.reflect.InvocationTargetException
      at java.base/jdk.internal.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
      at java.base/jdk.internal.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:62)
      at java.base/jdk.internal.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
      at java.base/java.lang.reflect.Method.invoke(Method.java:566)
      at com.bbn.marti.takcl.cli.CommandCommon.invokeMethodFromModuleWithParams(CommandCommon.java:52)
      ... 3 more
Caused by: class org.apache.ignite.IgniteException: Failed to find deployed service: distributed-user-file-manager
      at org.apache.ignite.internal.processors.service.GridServiceProxy.invokeMethod(GridServiceProxy.java:201)
      at org.apache.ignite.internal.processors.service.GridServiceProxy$ProxyInvocationHandler.invoke(GridServiceProxy.java:498)
      at com.sun.proxy.$Proxy43.getUsers(Unknown Source)
      at com.bbn.marti.takcl.AppModules.OnlineFileAuthModule.innerUserCertMod(OnlineFileAuthModule.java:137)
      at com.bbn.marti.takcl.AppModules.OnlineFileAuthModule.usermod(OnlineFileAuthModule.java:91)
      ... 8 more
java.lang.reflect.InvocationTargetException

-->

Environment

Please provide as much information as possible about your environment:

Docker version 20.10.21, build 20.10.21-0ubuntu1~22.04.3
On Ubuntu 22.04
1 vCPU
2GB
on DigitalOcean Droplet

Cannot reach DB when running setup script (TAK 5.0 and 5.1)

No joy with DB at (redacted), will retry in 10s. If this loops more than 6 times go and get some fresh air...
java.lang.reflect.InvocationTargetException
java.lang.RuntimeException: java.lang.reflect.InvocationTargetException
      at com.bbn.marti.takcl.cli.CommandCommon.invokeMethodFromModuleWithParams(CommandCommon.java:85)
      at com.bbn.marti.takcl.cli.advanced.AdvancedParamParser.execute(AdvancedParamParser.java:285)
      at com.bbn.marti.takcl.cli.advanced.AdvancedCliMainHelper.main(AdvancedCliMainHelper.java:131)
      at com.bbn.marti.UserManager.main(UserManager.java:61)
Caused by: java.lang.reflect.InvocationTargetException
      at java.base/jdk.internal.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
      at java.base/jdk.internal.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:77)
      at java.base/jdk.internal.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
      at java.base/java.lang.reflect.Method.invoke(Method.java:568)
      at com.bbn.marti.takcl.cli.CommandCommon.invokeMethodFromModuleWithParams(CommandCommon.java:52)
      ... 3 more
Caused by: class org.apache.ignite.IgniteClientDisconnectedException: Failed to execute task, client node disconnected.
      at org.apache.ignite.internal.util.IgniteUtils$15.apply(IgniteUtils.java:1046)
      at org.apache.ignite.internal.util.IgniteUtils$15.apply(IgniteUtils.java:1042)
      at org.apache.ignite.internal.util.IgniteUtils.convertException(IgniteUtils.java:1145)
      at org.apache.ignite.internal.processors.service.GridServiceProxy.invokeMethod(GridServiceProxy.java:257)
      at org.apache.ignite.internal.processors.service.GridServiceProxy$ProxyInvocationHandler.invoke(GridServiceProxy.java:511)
      at jdk.proxy2/jdk.proxy2.$Proxy40.addOrUpdateUser(Unknown Source)
      at com.bbn.marti.takcl.AppModules.OnlineFileAuthModule.innerUserCertMod(OnlineFileAuthModule.java:189)
      at com.bbn.marti.takcl.AppModules.OnlineFileAuthModule.usermod(OnlineFileAuthModule.java:91)
      ... 8 more
Caused by: class org.apache.ignite.internal.IgniteClientDisconnectedCheckedException: Failed to execute task, client node disconnected.
      at org.apache.ignite.internal.processors.task.GridTaskProcessor.disconnectedError(GridTaskProcessor.java:230)
      at org.apache.ignite.internal.processors.task.GridTaskProcessor.onDisconnected(GridTaskProcessor.java:218)
      at org.apache.ignite.internal.IgniteKernal.onDisconnected(IgniteKernal.java:3166)
      at org.apache.ignite.internal.managers.discovery.GridDiscoveryManager$3.onDiscovery0(GridDiscoveryManager.java:831)
      at org.apache.ignite.internal.managers.discovery.GridDiscoveryManager$3.access$7300(GridDiscoveryManager.java:547)
      at org.apache.ignite.internal.managers.discovery.GridDiscoveryManager$3$NotificationTask.run(GridDiscoveryManager.java:980)
      at org.apache.ignite.internal.managers.discovery.GridDiscoveryManager$DiscoveryMessageNotifierWorker.body0(GridDiscoveryManager.java:2822)
      at org.apache.ignite.internal.managers.discovery.GridDiscoveryManager$DiscoveryMessageNotifierWorker.body(GridDiscoveryManager.java:2860)
      at org.apache.ignite.internal.util.worker.GridWorker.run(GridWorker.java:125)
      at java.base/java.lang.Thread.run(Thread.java:833)
java.lang.reflect.InvocationTargetException
No joy with DB at (redacted), will retry in 10s. If this loops more than 6 times go and get some fresh air...

Environment

Please provide as much information as possible about your environment:

  • Hardware Make/Model: linode VPS
  • Operating System and Version (e.g.cat /etc/os-release`) :Ubuntu 20.04 LTS
  • Docker Version (docker -v): Docker version 26.0.2,
  • Docker Compose Version (docker compose version) or (docker-compose version): Docker Compose version v2.26.1
  • CPU Details (make/model and/or speed/core count): 2 cores
  • RAM (e.g. free -h): 4GB RAM
  • Disk Availability (e.g. df -h):
  • TAK Server Version From TAK.gov: 5.0 & also tried 5.1

Description

When running the setup script postgres cannot be reached. getting this java error. (see above)

Steps to Reproduce

run the setup script

Importing Certificate issue

Hello,

I am using a Ubuntu 20.04. I have followed all the steps in the README. I am not trying to import the certificate to the Fire Fox. However, it is not importing. I am using admin.p12 and typed the password atakatak but I will not import. Can someone assist with this issue?

Secure Connection Fail Issue

I am attempting to connect to the ATAK server from a different machine. However, I receive an error that states, "Secure Connection Failed"

And the error code is "SSL_EEROR_BAD_CERT_ALERT"

How can I resolve this issue of getting pass this error?

System agnostic logo replacement script

The logo-replacement.sh script installs openjdk-11-jdk and imagemagick natively on the host if they don't exist.

jar 2>/dev/null
if [ $? -ne 0 ];
then
sudo apt-get install openjdk-11-jdk -y
fi
convert >/dev/null
if [ $? -ne 0 ];
then
sudo apt-get install imagemagick -y
fi

A better solution would be to have a Docker container to handle the replacement. This would make the script completely independent of the host operating system.

Unable to locate package postgresql-15-postgis-3

Environment

Please provide as much information as possible about your environment:

  • Hardware Make/Model: XXX
  • Operating System and Version (e.g. cat /etc/os-release): XXX
  • Docker Version (docker -v): XXX
  • Docker Compose Version (docker compose version) or (docker-compose version): XXX
  • CPU Details (make/model and/or speed/core count): XXX
  • RAM (e.g. free -h): XXX
  • Disk Availability (e.g. df -h): XXX
  • TAK Server Version From TAK.gov: XXX

Description

Steps to Reproduce

Debug Output

running on macos under docker - the setup script keeps saying it is using port 9000 even though nothing is running on that port??

Environment

Please provide as much information as possible about your environment:

  • Hardware Make/Model: Macos Pro x64
  • Operating System and Version Mac Sonoma
  • Docker Version (docker -v): 4.29.0 (145265)
  • Docker Compose Version (docker compose version) or (docker-compose version): v2.26.1-desktop.1
  • CPU Details (make/model and/or speed/core count): 2.4 GHz 8-Core Intel Core i9
  • RAM (e.g. free -h): 32 GB 2400 MHz DDR4
  • Disk Availability (e.g. df -h): 400GB
  • TAK Server Version From TAK.gov: 5.1

Description

Steps to Reproduce

Debug Output

user dp zip files do not import certs in atak or itak

Although the data package zip files correctly import the server locations and unzip the certs into atak and itak, the packages do not import the certificates so the connection is not functional. I manually created a atak zip and a itak zip for user1 and was able to get them to work correctly.

I dont mind making a pull request , but I would like to make sure I am following your direction on the approach.

Atak dp files
MANIFEST/manifest.xml
server.pref
takserver.p12
user1.p12

iTak dp files:
manifest.xml
server.pref
takserver.p12
user1.p12

I have not tested including the manifest.xml and the MANIFEST/manifest.xml in the same package. but its probably the next logical step as it could prevent making two os specific data packages.

Mac support

People are trying the setup on a Mac with limited success due to different syntax with route and ifconfig utilities, needed for fetching the IP. Mac detection and substitutes are required.

cant install certificates with UserManager - error with java

it doesnt work with TAK server 4.10-release50 and 4.8 as well - some issues with java during line 339 in setup.sh:
sudo java -jar /opt/tak/utils/UserManager.jar certmod -A /opt/tak/certs/files/admin.pem

like:
Error: LinkageError occurred while loading main class com.bbn.marti.UserManager java.lang.UnsupportedClassVersionError: com/bbn/marti/UserManager has been compiled by a more recent version of the Java Runtime (class file version 61.0), this version of the Java Runtime only recognizes class file versions up to 55.0

I have java 17 installed JDK and JRE

  • Hardware Make/Model: LXC on proxmox
  • Operating System and Version (e.g. cat /etc/os-release): Debian11
  • RAM (e.g. free -h): 4GB
  • Disk Availability (e.g. df -h): 6GB
  • TAK Server Version From TAK.gov: 4.10-release50

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.