neodix42 / MyLocalTon

Personal local TON blockchain
GNU General Public License v3.0
117 stars 20 forks source link

Can't start DHT server? #5

Closed ghost closed 2 years ago

ghost commented 2 years ago

OS: Mac OS X 10.12 JDK: Oracle OpenJDK 18

The first time start error log:

15:31:30.712 [main] INFO  org.ton.main.Main - myLocalTon lock file location: /Users/cdkfoxopensource/myLocalTon.lock
15:31:30.727 [MyLocalTon - main] INFO  org.ton.main.Main - Starting application at path /Users/cdkfoxopensource/Downloads/MyLocalTon.jar
15:31:33.347 [MyLocalTon - main] INFO  org.ton.utils.Utils - No settings.json found. Very first launch with default settings.
15:31:33.404 [MyLocalTon - main] INFO  org.ton.main.App - myLocalTon config file location: /Users/cdkfoxopensource/Library/Java/JavaVirtualMachines/openjdk-18.0.1.1/Contents/Home/bin/myLocalTon/settings.json
15:31:33.408 [MyLocalTon - main] INFO  org.ton.utils.Extractor - Working Directory = /Users/cdkfoxopensource/Library/Java/JavaVirtualMachines/openjdk-18.0.1.1/Contents/Home/bin
15:31:33.408 [MyLocalTon - main] INFO  org.ton.utils.Extractor - Detected OS: Mac OS X
Jun 03, 2022 3:31:33 PM com.sun.javafx.application.PlatformImpl startup
WARNING: Unsupported JavaFX configuration: classes were loaded from 'unnamed module @6671dc81'
15:31:33.504 [MyLocalTon - main] INFO  org.ton.utils.Utils - isMacOsArm: Intel(R) Core(TM) i5-7Y54 CPU @ 1.20GHz

15:31:33.505 [MyLocalTon - main] INFO  org.ton.utils.Extractor - extracting macos.zip on macos
15:31:33.741 [JavaFX Application Thread] INFO  org.ton.main.App - Starting application
15:31:35.224 [MyLocalTon - main] INFO  org.ton.db.DbPool - Spawning new DB b4c1fe48-e92a-4885-baa4-8b77aea9c969
15:31:35.558 [MyLocalTon - main] INFO  org.ton.utils.Extractor - Working Directory = /Users/cdkfoxopensource/Library/Java/JavaVirtualMachines/openjdk-18.0.1.1/Contents/Home/bin
15:31:35.559 [MyLocalTon - main] INFO  org.ton.utils.Extractor - Binaries already extracted.
15:31:35.565 [MyLocalTon - main] INFO  o.ton.executors.dhtserver.DhtServer - Initializing DHT server
15:31:35.581 [MyLocalTon - main] INFO  o.t.e.dhtserver.DhtServerExecutor - execute: /Users/cdkfoxopensource/Library/Java/JavaVirtualMachines/openjdk-18.0.1.1/Contents/Home/bin/myLocalTon/genesis/bin/dht-server -v 1 -t 1 -C /Users/cdkfoxopensource/Library/Java/JavaVirtualMachines/openjdk-18.0.1.1/Contents/Home/bin/myLocalTon/templates/example.config.json -l /Users/cdkfoxopensource/Library/Java/JavaVirtualMachines/openjdk-18.0.1.1/Contents/Home/bin/myLocalTon/genesis/db/dht-server/2022.06.03_15-31-35 -D /Users/cdkfoxopensource/Library/Java/JavaVirtualMachines/openjdk-18.0.1.1/Contents/Home/bin/myLocalTon/genesis/db/dht-server/ -I 127.0.0.1:6302
15:31:35.647 [DHT server on genesis] INFO  o.t.e.dhtserver.DhtServerExecutor - dht-server-genesis stopped
15:31:35.749 [MyLocalTon - main] ERROR o.ton.executors.dhtserver.DhtServer - Initialization of DHT server failed. File /Users/cdkfoxopensource/Library/Java/JavaVirtualMachines/openjdk-18.0.1.1/Contents/Home/bin/myLocalTon/genesis/db/dht-server/config.json was not created.
15:31:35.750 [Thread-0] INFO  org.ton.db.DbPool - Closing database...
15:31:35.751 [Thread-0] INFO  org.ton.utils.Utils - Destroying external processes...
Ran out of executable memory while allocating 160 bytes.
Trace/BPT trap: 5

The second time error log:

15:32:27.439 [main] INFO  org.ton.main.Main - myLocalTon lock file location: /Users/cdkfoxopensource/myLocalTon.lock
15:32:27.456 [MyLocalTon - main] INFO  org.ton.main.Main - Starting application at path /Users/cdkfoxopensource/Downloads/MyLocalTon.jar
15:32:29.070 [MyLocalTon - main] INFO  org.ton.main.App - myLocalTon config file location: /Users/cdkfoxopensource/Library/Java/JavaVirtualMachines/openjdk-18.0.1.1/Contents/Home/bin/myLocalTon/settings.json
15:32:29.073 [MyLocalTon - main] INFO  org.ton.utils.Extractor - Working Directory = /Users/cdkfoxopensource/Library/Java/JavaVirtualMachines/openjdk-18.0.1.1/Contents/Home/bin
15:32:29.074 [MyLocalTon - main] INFO  org.ton.utils.Extractor - Binaries already extracted.
Jun 03, 2022 3:32:29 PM com.sun.javafx.application.PlatformImpl startup
WARNING: Unsupported JavaFX configuration: classes were loaded from 'unnamed module @6671dc81'
15:32:29.294 [MyLocalTon - main] INFO  o.ton.executors.dhtserver.DhtServer - DHT server initialized. Skipping.
15:32:29.296 [MyLocalTon - main] INFO  org.ton.actions.MyLocalTon - Initializing genesis network
15:32:29.348 [MyLocalTon - main] INFO  o.t.e.v.ValidatorEngine - genesis, validatorPrvKeyHex dyld:, validatorPrvKeyBase64 lazy
15:32:29.376 [JavaFX Application Thread] INFO  org.ton.main.App - Starting application
Ran out of executable memory while allocating 160 bytes.
Trace/BPT trap: 5
neodix42 commented 2 years ago

MyLocalTon officially does not support Java 18, but this does not seem to be a problem. Also this error "Ran out of executable memory while allocating 160" indicates some memory issues. Are you sure you have enough RAM?

Also could you please check if binaries from here work on your PC? Pick any file and execute with -h option, e.g. "dht-server -h" https://github.com/ton-blockchain/ton/actions/runs/2386953344