Error in Docker container: Default journal plugin is not configured

411 views
Skip to first unread message

Jan-Terje Sørensen

unread,
Aug 2, 2017, 7:21:03 AM8/2/17
to Akka User List
Hi,

I am working on getting my akka-persistence app to run in Docker. When I run the application from Intellij it works as intended, but when i deploy the same files(jar & config) to Docker and try to run it from the container i get this error: 
```
[ERROR] [08/02/2017 11:04:10.226] [actor-system-akka.actor.default-dispatcher-2] [akka://actor-system/user/PersistenceActor] requirement failed: default journal plugin is not configured, see 'reference.conf'
akka.actor.ActorInitializationException: akka://actor-system/user/PersistenceActor: exception during creation
        at akka.actor.ActorInitializationException$.apply(Actor.scala:191)
        at akka.actor.ActorCell.create(ActorCell.scala:608)
        at akka.actor.ActorCell.invokeAll$1(ActorCell.scala:462)
        at akka.actor.ActorCell.systemInvoke(ActorCell.scala:484)
        at akka.dispatch.Mailbox.processAllSystemMessages(Mailbox.scala:282)
        at akka.dispatch.Mailbox.run(Mailbox.scala:223)
        at akka.dispatch.Mailbox.exec(Mailbox.scala:234)
        at akka.dispatch.forkjoin.ForkJoinTask.doExec(ForkJoinTask.java:260)
        at akka.dispatch.forkjoin.ForkJoinPool$WorkQueue.runTask(ForkJoinPool.java:1339)
        at akka.dispatch.forkjoin.ForkJoinPool.runWorker(ForkJoinPool.java:1979)
        at akka.dispatch.forkjoin.ForkJoinWorkerThread.run(ForkJoinWorkerThread.java:107)
Caused by: java.lang.reflect.InvocationTargetException
        at sun.reflect.NativeConstructorAccessorImpl.newInstance0(Native Method)
        at sun.reflect.NativeConstructorAccessorImpl.newInstance(NativeConstructorAccessorImpl.java:62)
        at sun.reflect.DelegatingConstructorAccessorImpl.newInstance(DelegatingConstructorAccessorImpl.java:45)
        at java.lang.reflect.Constructor.newInstance(Constructor.java:423)
        at akka.util.Reflect$.instantiate(Reflect.scala:65)
        at akka.actor.ArgsReflectConstructor.produce(IndirectActorProducer.scala:96)
        at akka.actor.Props.newActor(Props.scala:213)
        at akka.actor.ActorCell.newActor(ActorCell.scala:563)
        at akka.actor.ActorCell.create(ActorCell.scala:589)
        ... 9 more
Caused by: java.lang.IllegalArgumentException: requirement failed: default journal plugin is not configured, see 'reference.conf'
        at scala.Predef$.require(Predef.scala:224)
        at akka.persistence.Persistence.defaultJournalPluginId$lzycompute(Persistence.scala:163)
        at akka.persistence.Persistence.defaultJournalPluginId(Persistence.scala:161)
        at akka.persistence.Persistence.journalConfigFor(Persistence.scala:239)
        at akka.persistence.Eventsourced$class.$init$(Eventsourced.scala:61)
        at akka.persistence.AbstractPersistentActor.<init>(PersistentActor.scala:409)
        at no.jansoren.akka.persistence.eventsourcing.EventSourcedPersistenceActor.<init>(EventSourcedPersistenceActor.java:14)
        at no.jansoren.eventsourcing.PersistenceActor.<init>(PersistenceActor.java:21)
        ... 18 more
```

My `reference.conf` file looks like this:

```
akka {
  loggers = ["akka.event.slf4j.Slf4jLogger"]
  loglevel = "DEBUG"
  logging-filter = "akka.event.slf4j.Slf4jLoggingFilter"

  persistence {
    journal {
      plugin = "akka.persistence.journal.leveldb"
      leveldb.dir = "target/journal"
    }
    snapshot-store {
      plugin = "akka.persistence.snapshot-store.local"
      local.dir = "target/snapshots"
    }
  }
  actor {
    warn-about-java-serializer-usage = false
  }
}
```

Any suggestions on how to attack this issue?

Evgeny Shepelyuk

unread,
Aug 2, 2017, 3:47:42 PM8/2/17
to Akka User List
May I assume that you should use `application.conf` in your code, not `reference.conf` as you've mentioned in the post.

Jan-Terje Sørensen

unread,
Aug 2, 2017, 4:39:40 PM8/2/17
to Akka User List
If I change to application.conf then I get this error because reference.conf is missing:

INFO  [2017-08-02 20:36:38,089] akka.event.slf4j.Slf4jLogger: Slf4jLogger started
requirement failed: 'reference.conf' is missing persistence read journal plugin config path: 'akka.persistence.query.journal.leveldb'
INFO  [2017-08-02 20:36:38,130] akka.actor.CoordinatedShutdown: Starting coordinated shutdown from JVM shutdown hook
ERROR [2017-08-02 20:36:38,133] akka.actor.OneForOneStrategy: No configuration setting found for key 'max-concurrent-recoveries'
! com.typesafe.config.ConfigException$Missing: No configuration setting found for key 'max-concurrent-recoveries'
! at com.typesafe.config.impl.SimpleConfig.findKeyOrNull(SimpleConfig.java:152)
! at com.typesafe.config.impl.SimpleConfig.findOrNull(SimpleConfig.java:170)
! at com.typesafe.config.impl.SimpleConfig.find(SimpleConfig.java:184)
! at com.typesafe.config.impl.SimpleConfig.find(SimpleConfig.java:189)
! at com.typesafe.config.impl.SimpleConfig.getConfigNumber(SimpleConfig.java:219)
! at com.typesafe.config.impl.SimpleConfig.getInt(SimpleConfig.java:230)
! at akka.persistence.Persistence.<init>(Persistence.scala:156)
! at akka.persistence.Persistence$.createExtension(Persistence.scala:131)
! at akka.persistence.Persistence$.createExtension(Persistence.scala:128)
! at akka.actor.ActorSystemImpl.registerExtension(ActorSystem.scala:880)
! at akka.actor.ExtensionId$class.apply(Extension.scala:77)
! at akka.persistence.Persistence$.apply(Persistence.scala:128)
! at akka.persistence.Eventsourced$class.$init$(Eventsourced.scala:51)
! at akka.persistence.AbstractPersistentActor.<init>(PersistentActor.scala:409)
! at no.jansoren.akka.persistence.eventsourcing.EventSourcedPersistenceActor.<init>(EventSourcedPersistenceActor.java:14)
! at no.jansoren.eventsourcing.PersistenceActor.<init>(PersistenceActor.java:17)
! ... 18 common frames omitted
! Causing: java.lang.reflect.InvocationTargetException: null
! at sun.reflect.NativeConstructorAccessorImpl.newInstance0(Native Method)
! at sun.reflect.NativeConstructorAccessorImpl.newInstance(NativeConstructorAccessorImpl.java:62)
! at sun.reflect.DelegatingConstructorAccessorImpl.newInstance(DelegatingConstructorAccessorImpl.java:45)
! at java.lang.reflect.Constructor.newInstance(Constructor.java:423)
! at akka.util.Reflect$.instantiate(Reflect.scala:65)
! at akka.actor.ArgsReflectConstructor.produce(IndirectActorProducer.scala:96)
! at akka.actor.Props.newActor(Props.scala:213)
! at akka.actor.ActorCell.newActor(ActorCell.scala:563)
! at akka.actor.ActorCell.create(ActorCell.scala:589)
! ... 9 common frames omitted
! Causing: akka.actor.ActorInitializationException: akka://actor-system/user/PersistenceActor: exception during creation
! at akka.actor.ActorInitializationException$.apply(Actor.scala:191)
! at akka.actor.ActorCell.create(ActorCell.scala:608)
! at akka.actor.ActorCell.invokeAll$1(ActorCell.scala:462)
! at akka.actor.ActorCell.systemInvoke(ActorCell.scala:484)
! at akka.dispatch.Mailbox.processAllSystemMessages(Mailbox.scala:282)
! at akka.dispatch.Mailbox.run(Mailbox.scala:223)
! at akka.dispatch.Mailbox.exec(Mailbox.scala:234)
! at akka.dispatch.forkjoin.ForkJoinTask.doExec(ForkJoinTask.java:260)
! at akka.dispatch.forkjoin.ForkJoinPool$WorkQueue.runTask(ForkJoinPool.java:1339)
! at akka.dispatch.forkjoin.ForkJoinPool.runWorker(ForkJoinPool.java:1979)
! at akka.dispatch.forkjoin.ForkJoinWorkerThread.run(ForkJoinWorkerThread.java:107)

Jan-Terje Sørensen

unread,
Aug 2, 2017, 4:45:04 PM8/2/17
to Akka User List
Just figured it out. Filename should be "application.conf" as you stated. And the transformer name should be "reference.conf"

<transformer implementation="org.apache.maven.plugins.shade.resource.AppendingTransformer">
<resource>reference.conf</resource>
</transformer>

Evgeny Shepelyuk

unread,
Aug 2, 2017, 4:50:51 PM8/2/17
to Akka User List
Wtf is this XMl snippet ?

Jan-Terje Sørensen

unread,
Aug 2, 2017, 4:52:47 PM8/2/17
to Akka User List
That is the pom.xml file for transforming the config file.

Evgeny Shepelyuk

unread,
Aug 2, 2017, 5:04:28 PM8/2/17
to akka...@googlegroups.com
Ohh, maven. Unfortunately have no expirience how it works with akka and why `.conf` transformation needed.

2 серп. 2017 23:52 "Jan-Terje Sørensen" <jtbso...@gmail.com> пише:
That is the pom.xml file for transforming the config file.

onsdag 2. august 2017 22.50.51 UTC+2 skrev Evgeny Shepelyuk følgende:
Wtf is this XMl snippet ?

--
>>>>>>>>>> Read the docs: http://akka.io/docs/
>>>>>>>>>> Check the FAQ: http://doc.akka.io/docs/akka/current/additional/faq.html
>>>>>>>>>> Search the archives: https://groups.google.com/group/akka-user
---
You received this message because you are subscribed to a topic in the Google Groups "Akka User List" group.
To unsubscribe from this topic, visit https://groups.google.com/d/topic/akka-user/LzXwJv-nfcc/unsubscribe.
To unsubscribe from this group and all its topics, send an email to akka-user+unsubscribe@googlegroups.com.
To post to this group, send email to akka...@googlegroups.com.
Visit this group at https://groups.google.com/group/akka-user.
For more options, visit https://groups.google.com/d/optout.
Reply all
Reply to author
Forward
0 new messages