tak-server icon indicating copy to clipboard operation
tak-server copied to clipboard

PI OS CM5 won't build now - had several working installs in the near past.

Open HookdomPonix opened this issue 10 months ago • 4 comments

Environment

Please provide as much information as possible about your environment:

  • Hardware Make/Model: pi CM5

  • Operating System and Version (e.g. cat /etc/os-release):

  • PRETTY_NAME="RAKPiOS 0.9.1 (bookworm)" NAME="RAKPiOS" VERSION="0.9.1" VERSION_ID="rakpios-0.9.1-arm64" VERSION_CODENAME="bookworm" BUILD_ID="20250220" ID="rakpios" ID_LIKE="debian" VARIANT="arm64" HOME_URL="http://www.rakwireless.com/" SUPPORT_URL="https://github.com/RAKWireless/rakpios" BUG_REPORT_URL="https://github.com/RAKWireless/rakpios/issues" COMMIT_SHA="6a9720b" COMMIT_DATE="2024-12-09" IMAGE_DATE="2025-02-20"

  • Docker Version (docker -v): Docker version 28.0.0, build f9ced58

  • Docker Compose Version (docker compose version) or (docker-compose version): Docker Compose version v2.33.0

  • CPU Details (make/model and/or speed/core count): XXX

  • RAM (e.g. free -h): 4gb

  • Disk Availability (e.g. df -h): 20gb

  • TAK Server Version From TAK.gov: 5.3

Description

Setup script locks up trying to get to the Database. This is a new issue for me, my other CM5 does not do this.

Steps to Reproduce

Fresh install of PiOS Download TAK server docker image. git clone from this repo copy Tak server image over run scripts/setup.sh

Debug Output

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:569) 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:202) at org.apache.ignite.internal.processors.service.GridServiceProxy$ProxyInvocationHandler.invoke(GridServiceProxy.java:511) at jdk.proxy2/jdk.proxy2.$Proxy40.getUsers(Unknown Source) at com.bbn.marti.takcl.AppModules.OnlineFileAuthModule.innerUserCertMod(OnlineFileAuthModule.java:151) at com.bbn.marti.takcl.AppModules.OnlineFileAuthModule.usermod(OnlineFileAuthModule.java:101) ... 8 more java.lang.reflect.InvocationTargetException exit status 1 No joy with DB at 192.168.1.32, will retry in 10s. If this loops more than 6 times go and get some fresh air...

`hammr@rakpios:~ $ docker logs tak-server-db-1

Usage: kill [options] [...]

Options: [...] send signal to every listed -, -s, --signal specify the to be sent -q, --queue integer value to be sent with the signal -l, --list=[] list all signal names, or convert one to a name -L, --table list all signal names in a nice table

-h, --help display this help and exit -V, --version output version information and exit

For more details see kill(1). Initializing the database... The files belonging to this database system will be owned by user "postgres". This user must also own the server process.

The database cluster will be initialized with locale "C". The default database encoding has accordingly been set to "SQL_ASCII". The default text search configuration will be set to "english".

Data page checksums are disabled.

creating directory /var/lib/postgresql/15/data ... ok creating subdirectories ... ok selecting dynamic shared memory implementation ... posix selecting default max_connections ... 100 selecting default shared_buffers ... 128MB selecting default time zone ... Etc/UTC creating configuration files ... ok running bootstrap script ... ok performing post-bootstrap initialization ... ok syncing data to disk ... ok

Success. You can now start the database server using:

/usr/lib/postgresql/15/bin/pg_ctl -D /var/lib/postgresql/15/data -l logfile start

initdb: warning: enabling "trust" authentication for local connections initdb: hint: You can change this by editing pg_hba.conf or using the option -A, or --auth-local and --auth-host, the next time you run initdb. Copying in our custom pg_hba.conf configuration file.. Starting the database... waiting for server to start.... done server started Configuring the database... TAK Server DB Setup grep: /opt/tak/CoreConfig.xml: binary file matches WARNING: Skipping schema changes, no DB password could be found! These can be manually applied by running sudo /opt/tak/db-utils/takserver-setup-db.sh Performing any TAK Server specific upgrades to the schema... 01:13:16.224 [main] INFO com.bbn.tak.schema.SchemaManager - trying to load configuration from file CoreConfig.xml 01:13:16.232 [main] INFO com.bbn.tak.schema.SchemaManager - trying to load CoreConfig.xml in /opt/tak 01:13:17.238 [main] WARN com.bbn.tak.schema.SchemaManager - Failure reading database configuration from file null trying command line optionsCommonOptions[database='null', password='******', username='null', jdbcUrl='null'] 01:13:17.267 [main] ERROR com.zaxxer.hikari.HikariConfig - HikariPool-1 - dataSource or dataSourceClassName or jdbcUrl is required. 01:13:17.272 [main] ERROR com.bbn.tak.schema.SchemaManager - dataSource or dataSourceClassName or jdbcUrl is required. Restarting the database... waiting for server to shut down.... done server stopped waiting for server to start.... done server started `

HookdomPonix avatar Feb 21 '25 01:02 HookdomPonix

Based on your debug output, you're not running the latest release as the relevant error message was changed in the release published last week.

You may have pulled the latest release but need to remove your docker images before attempting a clean build with --no-cache

FarrantAlex avatar Feb 24 '25 09:02 FarrantAlex

Same/similar error occurring on RPi 4B running raspbian 64-bit (4GB mem / 64G disk), Docker v28.0.1.

hostnamectl
 Static hostname: XXXXXX
       Icon name: computer
      Machine ID: f5e8f8653a444f07bcc4d7d08ee1e3f3
         Boot ID: d5a435436f2640478d8aa3c534f909a7
Operating System: Debian GNU/Linux 12 (bookworm)  
          Kernel: Linux 6.6.31+rpt-rpi-v8
    Architecture: arm64
..
Created certificate data package for user2 @ XX.XX.XX.XX as tak/certs/files/user2-XX.XX.XX.XX.dp.zip
Waiting for TAK server to connect to DB. This should loop several times only...
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:569)
	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:202)
	at org.apache.ignite.internal.processors.service.GridServiceProxy$ProxyInvocationHandler.invoke(GridServiceProxy.java:511)
	at jdk.proxy2/jdk.proxy2.$Proxy40.getUsers(Unknown Source)
	at com.bbn.marti.takcl.AppModules.OnlineFileAuthModule.innerUserCertMod(OnlineFileAuthModule.java:151)
	at com.bbn.marti.takcl.AppModules.OnlineFileAuthModule.usermod(OnlineFileAuthModule.java:101)
	... 8 more
java.lang.reflect.InvocationTargetException
exit status 1
No joy with DB at XX.XX.XX.XX, will retry in 5s. If this loops more than 10 times give up.
docker logs -n 23 tak-server-db-1
Success. You can now start the database server using:

    /usr/lib/postgresql/15/bin/pg_ctl -D /var/lib/postgresql/15/data -l logfile start

Copying in our custom pg_hba.conf configuration file..
Starting the database...
waiting for server to start.... done
server started
Configuring the database...
TAK Server DB Setup
grep: /opt/tak/CoreConfig.xml: binary file matches
WARNING: Skipping schema changes, no DB password could be found! These can be manually applied by running sudo /opt/tak/db-utils/takserver-setup-db.sh
Performing any TAK Server specific upgrades to the schema...
23:38:06.530 [main] INFO  com.bbn.tak.schema.SchemaManager - trying to load configuration from file CoreConfig.xml
23:38:06.550 [main] INFO  com.bbn.tak.schema.SchemaManager - trying to load CoreConfig.xml in /opt/tak
23:38:09.031 [main] WARN  com.bbn.tak.schema.SchemaManager - Failure reading database configuration from file null trying command line optionsCommonOptions[database='null', password='******', username='null', jdbcUrl='null']
23:38:09.082 [main] ERROR com.zaxxer.hikari.HikariConfig - HikariPool-1 - dataSource or dataSourceClassName or jdbcUrl is required.
23:38:09.096 [main] ERROR com.bbn.tak.schema.SchemaManager - dataSource or dataSourceClassName or jdbcUrl is required.
Restarting the database...
waiting for server to shut down.... done
server stopped
waiting for server to start.... done
server started

bcliang avatar Mar 10 '25 23:03 bcliang

I was able to get mine working by checking out the entire branch before the latest update. My situation looked like I was running a previous version as I was - to try troubleshooting the issue. But I didn’t check out the whole branch.

Once I did I made it work.

HookdomPonix avatar Mar 11 '25 05:03 HookdomPonix

Which branch are you talking about? I see main and develop as the same (minus the PR commit).

My assumption is that CoreConfig.xml is somehow invalid (I tried changing the jdbc url to jdbc:postgresql://tak-server-db-1:5432/cot with no luck). Maybe I'll try with an older release, or just install the RPi release directly

bcliang avatar Mar 11 '25 16:03 bcliang

Closing this as OP pulled latest

FarrantAlex avatar Oct 06 '25 14:10 FarrantAlex