Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

NPE with fdb-storage-type set as s3 #518

Open
anujsrc opened this issue Jun 27, 2023 · 0 comments
Open

NPE with fdb-storage-type set as s3 #518

anujsrc opened this issue Jun 27, 2023 · 0 comments

Comments

@anujsrc
Copy link

anujsrc commented Jun 27, 2023

Configured Fluree with :fdb-storage-type "s3"and started a single instance. It gets connected to S3 and can also write snapshots to the configured S3 bucket at shutdown but while starting it gives a java.lang.NullPointerException: null at fluree.db.ledger.storage.s3store$connection_storage_list$fn__42297$fn__42298.invoke(s3store.clj:165).

Here are the logs that have the server settings/config as well:

2023-06-27 12:26:43,448 INFO  f.db.server-settings - Properties file ./fluree_sample.properties successfully loaded. -
2023-06-27 12:26:43,450 INFO  fluree.db.server - Starting Fluree in mode: dev -
2023-06-27 12:26:43,513 INFO  fluree.db.server - Starting with config:
 {:fdb-api-open "true",
 :fdb-api-port 8090,
 :fdb-consensus-type "raft",
 :fdb-encryption-secret nil,
 :fdb-group-catch-up-rounds "10",
 :fdb-group-config-path "./",
 :fdb-group-heartbeat nil,
 :fdb-group-log-directory "./data/group",
 :fdb-group-log-history "5",
 :fdb-group-port nil,
 :fdb-group-private-key nil,
 :fdb-group-private-key-file "default-private-key.txt",
 :fdb-group-servers "myserver@localhost:9790",
 :fdb-group-snapshot-path "data/group/snapshots",
 :fdb-group-snapshot-threshold "200",
 :fdb-group-this-server "myserver",
 :fdb-group-timeout "2000",
 :fdb-join? false,
 :fdb-json-bigdec-string "true",
 :fdb-ledger-private-keys nil,
 :fdb-ledger-servers nil,
 :fdb-license-key nil,
 :fdb-memory-cache "200mb",
 :fdb-memory-reindex "1mb",
 :fdb-memory-reindex-max "2mb",
 :fdb-mode "dev",
 :fdb-pw-auth-enable "true",
 :fdb-pw-auth-jwt-max-exp "1y",
 :fdb-pw-auth-jwt-max-renewal "1y",
 :fdb-pw-auth-jwt-secret nil,
 :fdb-pw-auth-secret "fluree",
 :fdb-pw-auth-signing-key nil,
 :fdb-query-peer-servers "localhost:8090",
 :fdb-stats-report-frequency "1m",
 :fdb-storage-file-directory nil,
 :fdb-storage-file-group-path "group/",
 :fdb-storage-file-ledger-path "ledger/",
 :fdb-storage-file-root "./data/",
 :fdb-storage-s3-bucket "fckb",
 :fdb-storage-s3-group-prefix "group/",
 :fdb-storage-s3-ledger-prefix "ledger/",
 :fdb-storage-type "s3"}
 -
2023-06-27 12:26:43,519 INFO  fluree.db.server - JVM arguments:  {:jvm "OpenJDK 64-Bit Server VM", :input ["-Xmx2g" "-Xms1g" "-XX:+UseG1GC" "-XX:MaxGCPauseMillis=50" "-Dfdb.properties.file=./fluree_sample.properties" "-Dfdb.log.ansi" "-Dfluree.db.log.level=INFO" "-Dfluree.raft.log.level=INFO" "-Dlogback.configurationFile=./logback.xml"]} -
2023-06-27 12:26:43,542 INFO  fluree.db.server - Memory Info:  {:used 0.3 GB, :committed 1.4 GB, :max 2.0 GB, :init 1.0 GB, :time 2023-06-27T06:56:43.542487Z} -
2023-06-27 12:26:43,624 INFO  f.d.l.storage.s3store - Connecting to S3 bucket fckb -
2023-06-27 12:26:44,305 INFO  f.d.l.storage.s3store - Connecting to S3 bucket fckb -
. 2023-06-27 12:26:46,351 INFO  fluree.db.peer.http-api - Starting web server on port: 8090 with an open API. -
2023-06-27 12:26:46,351 INFO  fluree.db.peer.http-api -  -
2023-06-27 12:26:46,351 INFO  fluree.db.peer.http-api - http://localhost:8090 -
2023-06-27 12:26:46,352 INFO  fluree.db.peer.http-api -  -
2023-06-27 12:26:49,885 INFO  f.d.l.consensus.raft - Ledger group leader change: {:cause :become-leader, :server myserver, :new-leader myserver, :old-leader nil, :event :become-leader, :message This server, myserver, received the majority of the votes to become leader. New term: 1, latest index: 0.} -
2023-06-27 12:26:49,886 INFO  fluree.db.server - This server just became leader of the raft group. -
2023-06-27 12:26:49,925 INFO  f.d.l.consensus.raft - Brand new Fluree instance. -
2023-06-27 12:26:49,926 INFO  f.d.l.consensus.raft - Using default private key obtained from configuration settings. -
2023-06-27 12:26:49,936 ERROR fluree.db.server - Uncaught exception on async-thread-macro-2 - java.lang.NullPointerException: null\n    at clojure.java.io$as_relative_path.invokeStatic(io.clj:414)\n  at clojure.java.io$file.invokeStatic(io.clj:426)\n at clojure.java.io$file.invoke(io.clj:418)\n    at fluree.db.ledger.storage.s3store$connection_storage_list$fn__42297$fn__42298.invoke(s3store.clj:165)\n       at clojure.core.async$thread_call$fn__6142.invoke(async.clj:484)\n at clojure.lang.AFn.run(AFn.java:22)\n  at java.base/java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1128)\n  at java.base/java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:628)\n     at java.base/java.lang.Thread.run(Thread.java:829)\n

2023-06-27 12:27:46,370 INFO  fluree.db.ledger.stats - Memory:  {"used":"0.1 GB","committed":"1.4 GB","max":"2.0 GB","init":"1.0 GB","time":"2023-06-27T06:57:46.370628Z"} -
2023-06-27 12:27:46,372 INFO  fluree.db.ledger.stats - Group state:  {"version":3,"leases":{"servers":{"myserver":{"id":"myserver","expire":1687849069013}}}} -
2023-06-27 12:28:46,375 INFO  fluree.db.ledger.stats - Memory:  {"used":"0.1 GB","committed":"1.4 GB","max":"2.0 GB","init":"1.0 GB","time":"2023-06-27T06:58:46.374721Z"} -
2023-06-27 12:28:46,375 INFO  fluree.db.ledger.stats - Group state:  {"version":3,"leases":{"servers":{"myserver":{"id":"myserver","expire":1687849129094}}}} -

2023-06-27 12:29:11,895 INFO  fluree.db.server - SHUTDOWN Start -
2023-06-27 12:29:11,899 INFO  fluree.raft - Shutting down raft -
2023-06-27 12:29:11,901 INFO  f.d.l.consensus.raft - Ledger group snapshot write triggered for index: 49 -
2023-06-27 12:29:13,279 INFO  f.d.l.consensus.raft - Ledger group snapshot completed for index 49 in 1378 milliseconds. -
2023-06-27 12:29:13,279 INFO  fluree.raft - Wrote final snapshot at for index 49 -
. 2023-06-27 12:29:13,522 INFO  f.d.ledger.consensus.tcp - Shutting down tcp server on port 9790 -
2023-06-27 12:29:13,524 INFO  f.d.l.storage.s3store - Closing connection to S3 -
2023-06-27 12:29:13,525 INFO  fluree.db.util.log - :conn-closed -
2023-06-27 12:29:13,527 INFO  fluree.db.server - SHUTDOWN Complete -
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant