I am trying to deploy a simple web application written using the Play Framework in Scala, an Amazon web service.
The web application is working fine in development mode and production mode on my local computer, and I changed its default port to 80.
I used Boxfuse to deploy to AWS, as suggested.
First I run sbt dist then " boxfuse run -env = prod "
Everything went well. The image is merged and placed in AWS. Created by AMI. The instance was started and the application was started.
i-0f696ff22df4a2b71 => 2017-07-13 01: 28: 23.940 [info] play.api.Play - The application (Prod) has been launched
Then an error message appeared:
WARNING: Healthcheck ( http://35.156.38.90/ ) returned 400 instead of 200. Retrying within the next 300 seconds ...
i-0f696ff22df4a2b71 => 2017-07-13 01: 28: 24.977 [info] pcsAkkaHttpServer - Listening to HTTP at /0.0.0.0:80
i-0f696ff22df4a2b71 => 2017-07-13 01: 28: 25.512 [warn] pfhAllowedHostsFilter - The host is not allowed: 35.156.38.90
The instance was interrupted after retrying after 3 minutes. He gave a warning:
Make sure your application responds with an HTTP port of 80 at / on
But I made sure that the application is responding on the local computer, and I tried both Windows and Ubuntu, everything works well.
Also, when I run "boxfuse run" on the local computer, I can connect to it using " http: // localhost ", but it still has an error.
Hope someone with experience can give me some advice. Thanks in advance.
ps: not sure if necessary, I added these parameters to application.conf
http { address = 0.0.0.0 port = 80 }
scala amazon-web-services playframework boxfuse
haijin
source share