Cloud-RF / tak-server

TAK Server docker setup
GNU General Public License v3.0
153 stars 52 forks source link

Password complexity check failed and failed to initialize pool #24

Closed jmugan closed 1 year ago

jmugan commented 1 year ago

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?

FarrantAlex commented 1 year ago

This line indicates the script was unable to fetch the host's WAN IP. This issue has been seen (and fixed) before on Digital Ocean who have two IP addresses for eth0 but you have a Mac which the script's linux network commands won't work on. Caused by: java.net.UnknownHostException: HOSTIP If you edit ./tak/CoreConfig.xml during the setup loop and enter your proper IP address where it says HOSTIP this will get you a connection to the database. As it was designed for Linux with the net tools package, it uses both route and ifconfig. There are Mac equivalents but this needs some work before its fit for a Mac. I'll create an issue for 'Mac support' #25

jmugan commented 1 year ago

Thanks for the great explanation! I'll close it.