0
私のherokuアプリをローカルで実行している間に突然この問題に直面していましたが、Play/Scalaアプリが動作しません。原因とされるこのエラーを見ることはSSLコンテキストをロードすることはできません。HerokuのPlay/scalaアプリの実行が中止されました
22:27:05 web.1 | Caused by: com.typesafe.config.ConfigException$WrongType: system properties: path has type OBJECT rather than STRING
Procfile:
web: target/universal/stage/bin/myapp -Dhttps.port=${PORT} -Dhttp.port=disabled -Dhttps.keyStore.path=conf/generated.keystore
私もリモートでも同じエラーを取得します。私がHerokuなしでローカルにアプリを実行すると、何も問題は見られません(sbt -Dhttps.port = $ 1 -Dhttp.port = disabled〜run)。どの設定プロパティを参照しているのか明確ではありません。バージョン2.5.4を再生します。
全ログ:
$ heroku local web
[OKAY] Loaded ENV .env File as KEY=VALUE Format
22:26:38 web.1 | 2017-08-17 22:26:38,177 [debug] p.a.l.c.ActorSystemProvider - Starting application default Akka system: application
22:26:39 web.1 | 2017-08-17 22:26:39,289 [debug] p.a.d.s.DefaultSlickApi - Created Slick database config for key admin.
22:26:40 web.1 | 2017-08-17 22:26:40,049 [debug] p.a.d.s.DefaultSlickApi - Created Slick database config for key default.
22:26:40 web.1 | 2017-08-17 22:26:40,276 [info] play.api.Play - Application started (Prod)
22:26:40 web.1 | 2017-08-17 22:26:40,394 [info] p.c.s.NettyServer - Listening for HTTPS on /0.0.0.0:5000
22:27:05 web.1 | 2017-08-17 22:27:05,481 [error] p.c.s.NettyServer - cannot load SSL context
22:27:05 web.1 | java.lang.reflect.InvocationTargetException: null
22:27:05 web.1 | at sun.reflect.NativeConstructorAccessorImpl.newInstance0(Native Method)
22:27:05 web.1 | at sun.reflect.NativeConstructorAccessorImpl.newInstance(NativeConstructorAccessorImpl.java:62)
22:27:05 web.1 | at sun.reflect.DelegatingConstructorAccessorImpl.newInstance(DelegatingConstructorAccessorImpl.java:45)
22:27:05 web.1 | at java.lang.reflect.Constructor.newInstance(Constructor.java:423)
22:27:05 web.1 | at play.core.server.ssl.ServerSSLEngine$.createScalaSSLEngineProvider(ServerSSLEngine.scala:96)
22:27:05 web.1 | at play.core.server.ssl.ServerSSLEngine$.createSSLEngineProvider(ServerSSLEngine.scala:32)
22:27:05 web.1 | at play.core.server.NettyServer.liftedTree1$1(NettyServer.scala:91)
22:27:05 web.1 | at play.core.server.NettyServer.play$core$server$NettyServer$$sslEngineProvider$lzycompute(NettyServer.scala:90)
22:27:05 web.1 | at play.core.server.NettyServer.play$core$server$NettyServer$$sslEngineProvider(NettyServer.scala:89)
22:27:05 web.1 | at play.core.server.NettyServer$$anonfun$channelSink$1.apply(NettyServer.scala:158)
22:27:05 web.1 | Caused by: com.typesafe.config.ConfigException$WrongType: system properties: path has type OBJECT rather than STRING
22:27:05 web.1 | at com.typesafe.config.impl.SimpleConfig.findKeyOrNull(SimpleConfig.java:159)
22:27:05 web.1 | at com.typesafe.config.impl.SimpleConfig.findOrNull(SimpleConfig.java:170)
22:27:05 web.1 | at com.typesafe.config.impl.SimpleConfig.find(SimpleConfig.java:184)
22:27:05 web.1 | at com.typesafe.config.impl.SimpleConfig.find(SimpleConfig.java:189)
22:27:05 web.1 | at com.typesafe.config.impl.SimpleConfig.getString(SimpleConfig.java:246)
22:27:05 web.1 | at play.core.server.ssl.DefaultSSLEngineProvider.createSSLContext(DefaultSSLEngineProvider.scala:34)
22:27:05 web.1 | at play.core.server.ssl.DefaultSSLEngineProvider.<init>(DefaultSSLEngineProvider.scala:24)
22:27:05 web.1 | at sun.reflect.NativeConstructorAccessorImpl.newInstance0(Native Method)
22:27:05 web.1 | at sun.reflect.NativeConstructorAccessorImpl.newInstance(NativeConstructorAccessorImpl.java:62)
22:27:05 web.1 | at sun.reflect.DelegatingConstructorAccessorImpl.newInstance(DelegatingConstructorAccessorImpl.java:45)
22:27:05 web.1 | 2017-08-17 22:27:05,531 [debug] application - Client Error: code: 400, msg: text is empty
22:27:05 web.1 | 2017-08-17 22:27:05,531 [debug] application - Request: GET /bad-request
22:27:05 web.1 | 2017-08-17 22:27:05,533 [debug] application - content-type: None
22:27:05 web.1 | 2017-08-17 22:27:05,533 [debug] application - headers: ArrayBuffer()
22:27:05 web.1 | 2017-08-17 22:27:05,533 [debug] application - Request: GET /bad-request
22:27:05 web.1 | 2017-08-17 22:27:05,534 [debug] application - query string:
$ find . -type f -name "*.keystore"
./conf/generated.keystore
./target/scala-2.11/classes/generated.keystore
./target/universal/stage/conf/generated.keystore
$
専用スペースを使用していない限り、HerokuでHTTPSを実装する必要はありません。 HerokuはあなたのためにHTTPSを(ルータで終わる)あなたのアプリが安全にHTTPを使用できるようにします。 – codefinger
@codefingerありがとう - それを知らなかった – srvy