Open legendre6891 opened 4 years ago
I also have a connection issue with the main db. But the connection works if I use the in memory database by uncommenting line 14 in dev-config.edn instead of line 11:
; alternatively, you can use the datomic mem db for development: ; :database-url "datomic:mem://visitera_datomic_dev"
I've had trouble getting the console to work as well (it's thowing a jetty 503 error), but I'm not sure whether the two issues are connected or if that's simply a meatware issue.
Using: datomic-free-0.9.5703.21 openJDK jdk-13.0.1 Win10
@legendre6891 That's weird, it seems the app has some troubles communicating with datomic. I used version 0.9.5703 but I don't think the different version is the issue. Maybe try to test if you can connect to that port using telnet telnet localhost 4334
.
@ciaranbradley The same issue with connection?
@aliaksandr-s Similar, I think.
To my (novice) eye, this looks like a datomic issue with the jdk. There are various references to a netty issue (using reflection).
If I swap out openJDK jdk-13.01 (the latest openjdk) for the Azul compiled zulu8.42.0.23-ca-jdk8.0.232-win_x64 (Java 8 (LTS)) as recommended on the luminus site here: http://www.luminusweb.net/docs allows the connection to work, although datomic complains on start up:
WARNING: An illegal reflective access operation has occurred WARNING: Illegal reflective access by io.netty.util.internal.PlatformDependent0 (file:/D:/Software/datomic-free-0.9.5703/datomic-free-0.9.5703/lib/netty-all-4.0.39.Final.jar) to field java.nio.Buffer.address WARNING: Please consider reporting this to the maintainers of io.netty.util.internal.PlatformDependent0 WARNING: Use --illegal-access=warn to enable warnings of further illegal reflective access operations WARNING: All illegal access operations will be denied in a future release
If I was guessing, reflection was deprecated in Java 8, and perhaps has been removed since. And either something in netty hasn't been updated (or datomic are shipping an older version of netty with their free distribution). Again, novice. So take my assessment with a pinch of salt.
When I downloaded the Azul compiled jdk, and added it to my PATH (above the other open JDK so that it's selected first), opened "lein repl" and issued the (start) command, it appears to work. The data gets pushed to datomic. But the action is noisy, again with netty references in the debug output:
user=> (start)
2019-11-05 22:09:53,712 [nRepl-session-865eb768-93e1-4ed9-b845-014bb935cf9e] DEBUG datomic.peer - {:event :peer/transactor-admin-request, :cluster {:protocol :free, :db-name "visitera_dev", :system-root "127.0.0.1:4334", :host "127.0.0.1", :port 4334}, :request :create-database, :arg {:db-name "visitera_dev"}, :phase :begin, :pid 32564, :tid 20}
2019-11-05 22:09:53,732 [nRepl-session-865eb768-93e1-4ed9-b845-014bb935cf9e] DEBUG datomic.coordination - {:event :coord/lookup-transactor-endpoint, :phase :begin, :pid 32564, :tid 20}
2019-11-05 22:09:53,734 [clojure-agent-send-off-pool-3] DEBUG datomic.kv-cluster - {:event :kv-cluster/get-ref, :ref-key "pod-coord", :phase :begin, :pid 32564, :tid 18}
2019-11-05 22:09:53,819 [clojure-agent-send-off-pool-3] DEBUG datomic.kv-cluster - {:event :kv-cluster/get-ref, :ref-key "pod-coord", :msec 82.2, :phase :end, :pid 32564, :tid 18}
2019-11-05 22:09:53,820 [nRepl-session-865eb768-93e1-4ed9-b845-014bb935cf9e] DEBUG datomic.coordination - {:event :coord/lookup-transactor-endpoint, :msec 87.1, :phase :end, :pid 32564, :tid 20}
2019-11-05 22:09:53,820 [nRepl-session-865eb768-93e1-4ed9-b845-014bb935cf9e] DEBUG datomic.connector - {:event :peer/hornet-connect, :host "localhost", :pid 32564, :tid 20}
2019-11-05 22:09:54,129 [nRepl-session-865eb768-93e1-4ed9-b845-014bb935cf9e] DEBUG org.jboss.logging - Logging Provider: org.jboss.logging.Slf4jLoggerProvider
2019-11-05 22:09:54,131 [nRepl-session-865eb768-93e1-4ed9-b845-014bb935cf9e] DEBUG org.apache.activemq.artemis.logs - using hardware address 68:ffffffec:ffffffc5:ffffffdf:ffffff96:127
2019-11-05 22:09:54,166 [nRepl-session-865eb768-93e1-4ed9-b845-014bb935cf9e] DEBUG o.a.a.a.c.c.i.ClientSessionFactoryImpl - Trying reconnection attempt 0/1
2019-11-05 22:09:54,168 [nRepl-session-865eb768-93e1-4ed9-b845-014bb935cf9e] DEBUG o.a.a.a.c.c.i.ClientSessionFactoryImpl - Trying to connect with connector = org.apache.activemq.artemis.core.remoting.impl.netty.NettyConnectorFactory@51848cf6, parameters = {"trustStorePath" "datomic/transactor-trust.jks", "trustStorePassword" "transactor", "port" 4334, "sslEnabled" true, "keyStorePath" "datomic/transactor-key.jks", "keyStorePassword" "transactor", "host" "localhost"} connector = null
2019-11-05 22:09:54,193 [nRepl-session-865eb768-93e1-4ed9-b845-014bb935cf9e] DEBUG i.n.u.i.l.InternalLoggerFactory - Using SLF4J as the default logging framework
2019-11-05 22:09:54,197 [nRepl-session-865eb768-93e1-4ed9-b845-014bb935cf9e] DEBUG i.n.util.internal.PlatformDependent0 - java.nio.Buffer.address: available
2019-11-05 22:09:54,198 [nRepl-session-865eb768-93e1-4ed9-b845-014bb935cf9e] DEBUG i.n.util.internal.PlatformDependent0 - sun.misc.Unsafe.theUnsafe: available
2019-11-05 22:09:54,198 [nRepl-session-865eb768-93e1-4ed9-b845-014bb935cf9e] DEBUG i.n.util.internal.PlatformDependent0 - sun.misc.Unsafe.copyMemory: available
2019-11-05 22:09:54,199 [nRepl-session-865eb768-93e1-4ed9-b845-014bb935cf9e] DEBUG i.n.util.internal.PlatformDependent0 - java.nio.Bits.unaligned: true
2019-11-05 22:09:54,199 [nRepl-session-865eb768-93e1-4ed9-b845-014bb935cf9e] DEBUG i.n.util.internal.PlatformDependent0 - java.nio.DirectByteBuffer.
What version of jdk are you using @aliaksandr-s?
@ciaranbradley I'm using OpenJDK version 8 as recommended by leiningen. So you are probably right with your guess. I also had issues with latest java and some packages.
In the middle of Chapter 3, after adding in the changes and right before the section titled
Tryin REPL
, I could not getlein run
to work. I checked out the chapter3/end code, and it does not work there either. The log is below.I have datomic transactor running in a separate terminal, whose output is:
The error message is: