What to update to fix "DB_PORT: port has type STRING rather than NUMBER"?

Solved!
Posted in Installation by ferrlin Fri Mar 04 2016 12:55:05 GMT+0000 (UTC)·3·Viewed 343 times

I am using the actor-server under actor-bootstrap. I built the docker image for it as well as I have a separate docker container running the database (ie postgresql). Now, I tried starting the container with actor-server. Unfortunately, it failed to run because of the issue. This is the output from the log: ==> app: Exception in thread "main" com.typesafe.config.ConfigException$WrongType: env var DB_PORT: port has type STRING rather than NUMBER ==> app: at com.typesafe.config.impl.SimpleConfig.findKeyOrNull(SimpleConfig.java:159) ==> app: at com.typesafe.config.impl.SimpleConfig.findOrNull(SimpleConfig.java:170) ==> app: at com.typesafe.config.impl.SimpleConfig.find(SimpleConfig.java:184) ==> app: at com.typesafe.config.impl.SimpleConfig.find(SimpleConfig.java:189) ==> app: at com.typesafe.config.impl.SimpleConfig.getConfigNumber(SimpleConfig.java:219) ==> app: 12:40:12.314UTC INFO akka.remote.Remoting akka.remote.Remoting Remoting shut down ==> app: [INFO] [03/04/2016 12:40:12.316] [actor-server-akka.remote.default-remote-dispatcher-6] [akka.tcp://actor-server@127.0.0.1:2552/system/remoting-terminator] Remoting shut down. ==> app: at com.typesafe.config.impl.SimpleConfig.getInt(SimpleConfig.java:230) ==> app: at com.github.kxbmap.configs.ConfigsInstances$$anonfun$1.apply(Configs.scala:50) ==> app: at com.github.kxbmap.configs.ConfigsInstances$$anonfun$1.apply(Configs.scala:50) ==> app: at com.github.kxbmap.configs.Configs$$anonfun$atPath$1$$anonfun$apply$1.apply(Configs.scala:43) ==> app: at com.github.kxbmap.configs.Configs$$anonfun$atPath$1$$anonfun$apply$1.apply(Configs.scala:43) ==> app: at com.github.kxbmap.configs.package$EnrichTypesafeConfig$.get$extension(package.scala:36) ==> app: at com.github.kxbmap.configs.ConfigsInstances$$anonfun$tryAtPath$1$$anonfun$apply$9.apply(Configs.scala:104) ==> app: at scala.util.Try$.apply(Try.scala:192) ==> app: at com.github.kxbmap.configs.ConfigsInstances$$anonfun$tryAtPath$1.apply(Configs.scala:104) ==> app: at com.github.kxbmap.configs.ConfigsInstances$$anonfun$tryAtPath$1.apply(Configs.scala:104) ==> app: at com.github.kxbmap.configs.Configs$$anonfun$atPath$1$$anonfun$apply$1.apply(Configs.scala:43) ==> app: at com.github.kxbmap.configs.Configs$$anonfun$atPath$1$$anonfun$apply$1.apply(Configs.scala:43) ==> app: at com.github.kxbmap.configs.package$EnrichTypesafeConfig$.get$extension(package.scala:36) ==> app: at im.actor.server.db.DbExtension$.im$actor$server$db$DbExtension$$$anonfun$3(DbExtension.scala:56) ==> app: at scala.util.Success.flatMap(Try.scala:231) ==> app: at im.actor.server.db.DbExtension$.initDs(DbExtension.scala:55) ==> app: at im.actor.server.db.DbExtension$.createExtension(DbExtension.scala:36) ==> app: at im.actor.server.db.DbExtension$.createExtension(DbExtension.scala:27) ==> app: at akka.actor.ActorSystemImpl.registerExtension(ActorSystem.scala:752) ==> app: at akka.actor.ActorSystemImpl$$anonfun$loadExtensions$1.apply(ActorSystem.scala:781) ==> app: at akka.actor.ActorSystemImpl$$anonfun$loadExtensions$1.apply(ActorSystem.scala:779) ==> app: at scala.collection.Iterator$class.foreach(Iterator.scala:742) ==> app: at scala.collection.AbstractIterator.foreach(Iterator.scala:1194) ==> app: at scala.collection.IterableLike$class.foreach(IterableLike.scala:72) ==> app: at scala.collection.AbstractIterable.foreach(Iterable.scala:54) ==> app: at akka.actor.ActorSystemImpl.loadExtensions(ActorSystem.scala:779) ==> app: at akka.actor.ActorSystemImpl.liftedTree2$1(ActorSystem.scala:667) ==> app: at akka.actor.ActorSystemImpl._start$lzycompute(ActorSystem.scala:660) ==> app: at akka.actor.ActorSystemImpl._start(ActorSystem.scala:660) ==> app: at akka.actor.ActorSystemImpl.start(ActorSystem.scala:676) ==> app: at akka.actor.ActorSystem$.apply(ActorSystem.scala:143) ==> app: at akka.actor.ActorSystem$.apply(ActorSystem.scala:120) ==> app: at im.actor.server.ActorServer.start(ActorServer.scala:58) ==> app: at im.actor.server.enterprise.Main$.delayedEndpoint$im$actor$server$enterprise$Main$1(Main.scala:6) ==> app: at im.actor.server.enterprise.Main$delayedInit$body.apply(Main.scala:5) ==> app: at scala.Function0$class.apply$mcV$sp(Function0.scala:34) ==> app: at scala.runtime.AbstractFunction0.apply$mcV$sp(AbstractFunction0.scala:12) ==> app: at scala.App$$anonfun$main$1.apply(App.scala:76) ==> app: at scala.App$$anonfun$main$1.apply(App.scala:76) ==> app: at scala.collection.immutable.List.foreach(List.scala:381) ==> app: at scala.collection.generic.TraversableForwarder$class.foreach(TraversableForwarder.scala:35) ==> app: at scala.App$class.main(App.scala:76) ==> app: at im.actor.server.enterprise.Main$.main(Main.scala:5) ==> app: at im.actor.server.enterprise.Main.main(Main.scala) I tried supplying "port: 5432" in the server.conf but to no avail. I hope you could help me on this. Thanks for this awesome project. Cheers,
Andrey Kuznetsov
Mar 4, 2016
you need to run image with argument "-e DB_PORT=5432". Keep it in mind that we currently don't update docker frequently, now registry hub has very old version. If you are building docker image on your own I recommend you to do it in the main actor-platform repository (actor-server dir).
ferrlin
Mar 5, 2016
Thanks for tip.

Andrey Kuznetsov marked this as solved
Markdown is allowed