dustinlacewell/logseq-guide

Java raises exception when running logseq.jar

bytersproblem opened this issue · 1 comments

I followed the instructions but I am stuck at running a jar file
Here is the error trace. Also I think that I exported environmental variables correctly (I doublecheked)

Exception in thread "main" clojure.lang.ExceptionInfo: Error in component :hikari in system com.stuartsierra.component.SystemMap calling #'com.stuartsierra.component/start {:reason :com.stuartsierra.component/component-function-threw-exception, :function #'com.stuartsierra.component/start, :system-key :hikari, :component #app.components.hikari.Hikari{:db-spec {:database-name "logseq", :adapter "postgresql", :auto-commit true, :register-mbeans false, :password nil, :port-number 5432, :username nil, :max-lifetime 1800000, :minimum-idle 10, :connection-init-sql "set time zone 'UTC'", :connection-timeout 30000, :server-name "127.0.0.1", :read-only false, :maximum-pool-size 48, :idle-timeout 600000, :validation-timeout 5000, :pool-name "logseq-clj-db-pool"}, :datasource nil}, :system #<SystemMap>}
        at com.stuartsierra.component$try_action.invokeStatic(component.cljc:120)
        at com.stuartsierra.component$try_action.invoke(component.cljc:117)
        at com.stuartsierra.component$update_system$fn__13727.invoke(component.cljc:140)
        at clojure.lang.ArraySeq.reduce(ArraySeq.java:116)
        at clojure.core$reduce.invokeStatic(core.clj:6827)
        at clojure.core$reduce.invoke(core.clj:6810)
        at com.stuartsierra.component$update_system.invokeStatic(component.cljc:136)
        at com.stuartsierra.component$update_system.doInvoke(component.cljc:130)
        at clojure.lang.RestFn.invoke(RestFn.java:445)
        at com.stuartsierra.component$start_system.invokeStatic(component.cljc:164)
        at com.stuartsierra.component$start_system.invoke(component.cljc:156)
        at com.stuartsierra.component$start_system.invokeStatic(component.cljc:162)
        at com.stuartsierra.component$start_system.invoke(component.cljc:156)
        at com.stuartsierra.component.SystemMap.start(component.cljc:179)
        at app.core$start.invokeStatic(core.clj:23)
        at app.core$start.invoke(core.clj:18)
        at app.core$_main.invokeStatic(core.clj:26)
        at app.core$_main.doInvoke(core.clj:25)
        at clojure.lang.RestFn.invoke(RestFn.java:397)
        at clojure.lang.AFn.applyToHelper(AFn.java:152)
        at clojure.lang.RestFn.applyTo(RestFn.java:132)
        at app.core.main(Unknown Source)
Caused by: com.zaxxer.hikari.pool.HikariPool$PoolInitializationException: Failed to initialize pool: The server requested password-based authentication, but no password was provided.
        at com.zaxxer.hikari.pool.HikariPool.throwPoolInitializationException(HikariPool.java:597)
        at com.zaxxer.hikari.pool.HikariPool.checkFailFast(HikariPool.java:576)
        at com.zaxxer.hikari.pool.HikariPool.<init>(HikariPool.java:115)
        at com.zaxxer.hikari.HikariDataSource.<init>(HikariDataSource.java:81)
        at hikari_cp.core$make_datasource.invokeStatic(core.clj:267)
        at hikari_cp.core$make_datasource.invoke(core.clj:264)
        at app.components.hikari.Hikari.start(hikari.clj:11)
        at com.stuartsierra.component$fn__13668$G__13662__13670.invoke(component.cljc:5)
        at com.stuartsierra.component$fn__13668$G__13661__13673.invoke(component.cljc:5)
        at clojure.lang.AFn.applyToHelper(AFn.java:154)
        at clojure.lang.AFn.applyTo(AFn.java:144)
        at clojure.lang.Var.applyTo(Var.java:705)
        at clojure.core$apply.invokeStatic(core.clj:667)
        at clojure.core$apply.invoke(core.clj:660)
        at com.stuartsierra.component$try_action.invokeStatic(component.cljc:118)
        ... 21 more
Caused by: org.postgresql.util.PSQLException: The server requested password-based authentication, but no password was provided.
        at org.postgresql.Driver$ConnectThread.getResult(Driver.java:409)
        at org.postgresql.Driver.connect(Driver.java:267)
        at java.sql/java.sql.DriverManager.getConnection(DriverManager.java:677)
        at java.sql/java.sql.DriverManager.getConnection(DriverManager.java:228)
        at org.postgresql.ds.common.BaseDataSource.getConnection(BaseDataSource.java:97)
        at org.postgresql.ds.common.BaseDataSource.getConnection(BaseDataSource.java:82)
        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)
        ... 34 more

Any help...

waynr commented

@nukedone it looks like something fails to authenticate with postgresql based on the stacktrace:

Exception in thread "main" clojure.lang.ExceptionInfo: Error in component :hikari in system com.stuartsierra.component.SystemMap calling #'com.stuartsierra.component/start {:reason :com.stuartsierra.component/component-function-threw-exception, :function #'com.stuartsierra.component/start, :system-key :hikari, :component #app.components.hikari.Hikari{:db-spec {:database-name "logseq", :adapter "postgresql", :auto-commit true, :register-mbeans false, :password nil, :port-number 5432, :username nil, :max-lifetime 1800000, :minimum-idle 10, :connection-init-sql "set time zone 'UTC'", :connection-timeout 30000, :server-name "127.0.0.1", :read-only false, :maximum-pool-size 48, :idle-timeout 600000, :validation-timeout 5000, :pool-name "logseq-clj-db-pool"}, :datasource nil}, :system #<SystemMap>}

then

Caused by: com.zaxxer.hikari.pool.HikariPool$PoolInitializationException: Failed to initialize pool: The server requested password-based authentication, but no password was provided.

then

Caused by: org.postgresql.util.PSQLException: The server requested password-based authentication, but no password was provided.

I see :password nil and :username nil, potentially because you didn't include a required username & password in the postgresql connection string?