2
respostas

Application error

efetuei o deploy com sucesso pelo cmd :

remote:        [INFO] ------------------------------------------------------------------------
remote:        [INFO] BUILD SUCCESS
remote:        [INFO] ------------------------------------------------------------------------
remote:        [INFO] Total time:  15.406 s
remote:        [INFO] Finished at: 2020-02-12T04:49:55Z
remote:        [INFO] ------------------------------------------------------------------------
remote: -----> Discovering process types
remote:        Procfile declares types -> (none)
remote:
remote: -----> Compressing...
remote:        Done: 101.7M
remote: -----> Launching...
remote:        Released v5
remote:        https://cdcspringmvc-adriano.herokuapp.com/ deployed to Heroku
remote:
remote: Verifying deploy... done.
To https://git.heroku.com/cdcspringmvc-adriano.git
 * [new branch]      master -> master

porém no momento que acesso o link aparece a seguinte mensagem: Application error An error occurred in the application and your page could not be served. If you are the application owner, check your logs for details. You can do this from the Heroku CLI with the command heroku logs --tail

rodei o comando: --tail (segue abaixo nas respostas)...

2 respostas
C:\Work AD\casadocodigo>heroku logs --tail
2020-02-12T04:09:05.176416+00:00 app[api]: Initial release by user adodriano@gmail.com
2020-02-12T04:09:05.176416+00:00 app[api]: Release v1 created by user adodriano@gmail.com
2020-02-12T04:09:05.487012+00:00 app[api]: Enable Logplex by user adodriano@gmail.com
2020-02-12T04:09:05.487012+00:00 app[api]: Release v2 created by user adodriano@gmail.com
2020-02-12T04:49:34.000000+00:00 app[api]: Build started by user adodriano@gmail.com
2020-02-12T04:50:05.275595+00:00 app[api]: Attach DATABASE (@ref:postgresql-concave-60468) by user adodriano@gmail.com
2020-02-12T04:50:05.275595+00:00 app[api]: Running release v3 commands by user adodriano@gmail.com
2020-02-12T04:50:05.290092+00:00 app[api]: Release v4 created by user adodriano@gmail.com
2020-02-12T04:50:05.290092+00:00 app[api]: @ref:postgresql-concave-60468 completed provisioning, setting DATABASE_URL. by user adodriano@gmail.com
2020-02-12T04:50:05.597816+00:00 app[api]: Deploy e27bb9a4 by user adodriano@gmail.com
2020-02-12T04:50:05.597816+00:00 app[api]: Release v5 created by user adodriano@gmail.com
2020-02-12T04:50:10.000000+00:00 app[api]: Build succeeded

2020-02-12T04:50:31.439219+00:00 heroku[router]: at=error code=H14 desc="No web processes running" method=GET path="/" host=cdcspringmvc-adriano.herokuapp.com request_id=8b9551e6-9174-4035-bfd3-3ea9e22050ee fwd="191.183.201.14" dyno= connect= service= status=503 bytes= protocol=https
2020-02-12T04:50:32.180501+00:00 heroku[router]: at=error code=H14 desc="No web processes running" method=GET path="/favicon.ico" host=cdcspringmvc-adriano.herokuapp.com request_id=d1510009-f545-4a42-952d-6a9f9e4c43b8 fwd="191.183.201.14" dyno= connect= service= status=503 bytes= protocol=https
2020-02-12T04:51:09.010109+00:00 heroku[router]: at=error code=H14 desc="No web processes running" method=GET path="/" host=cdcspringmvc-adriano.herokuapp.com request_id=8e00d9a0-83b9-46b6-8080-2e02efdf71a9 fwd="191.183.201.14" dyno= connect= service= status=503 bytes= protocol=https
2020-02-12T04:51:09.342965+00:00 heroku[router]: at=error code=H14 desc="No web processes running" method=GET path="/favicon.ico" host=cdcspringmvc-adriano.herokuapp.com request_id=5d3984c7-37bd-4a18-8116-090b8778782c fwd="191.183.201.14" dyno= connect= service= status=503 bytes= protocol=https
2020-02-12T04:51:45.698423+00:00 heroku[router]: at=error code=H14 desc="No web processes running" method=GET path="/" host=cdcspringmvc-adriano.herokuapp.com request_id=9d91f0ff-bf61-47be-91d7-4eaf7ef4c586 fwd="191.183.201.14" dyno= connect= service= status=503 bytes= protocol=https
2020-02-12T04:51:45.987415+00:00 heroku[router]: at=error code=H14 desc="No web processes running" method=GET path="/favicon.ico" host=cdcspringmvc-adriano.herokuapp.com request_id=e7c63851-93f3-4e2c-bd67-478d9af08eb0 fwd="191.183.201.14" dyno= connect= service= status=503 bytes= protocol=https
2020-02-12T04:57:19.126684+00:00 heroku[router]: at=error code=H14 desc="No web processes running" method=GET path="/" host=cdcspringmvc-adriano.herokuapp.com request_id=9df8bca3-34e0-489d-b6a3-36fc191ea20b fwd="191.183.201.14" dyno= connect= service= status=503 bytes= protocol=https
2020-02-12T04:57:19.379022+00:00 heroku[router]: at=error code=H14 desc="No web processes running" method=GET path="/favicon.ico" host=cdcspringmvc-adriano.herokuapp.com request_id=ca261e05-c4a1-42ff-ae1b-7fb842e86a4d fwd="191.183.201.14" dyno= connect= service= status=503 bytes= protocol=https
2020-02-12T05:00:23.050597+00:00 heroku[router]: at=error code=H14 desc="No web processes running" method=GET path="/" host=cdcspringmvc-adriano.herokuapp.com request_id=1094a931-2b84-49c2-8573-2b2499b7eba6 fwd="191.183.201.14" dyno= connect= service= status=503 bytes= protocol=https
2020-02-12T05:00:23.307394+00:00 heroku[router]: at=error code=H14 desc="No web processes running" method=GET path="/favicon.ico" host=cdcspringmvc-adriano.herokuapp.com request_id=c52fea21-47fe-4cfb-9dce-0a5bf8d0ff73 fwd="191.183.201.14" dyno= connect= service= status=503 bytes= protocol=https
2020-02-12T05:00:25.835072+00:00 heroku[router]: at=error code=H14 desc="No web processes running" method=GET path="/" host=cdcspringmvc-adriano.herokuapp.com request_id=1ab5a06c-9bd9-475f-9487-6c6cc966e645 fwd="191.183.201.14" dyno= connect= service= status=503 bytes= protocol=https
2020-02-12T05:00:26.088544+00:00 heroku[router]: at=error code=H14 desc="No web processes running" method=GET path="/favicon.ico" host=cdcspringmvc-adriano.herokuapp.com request_id=f295203d-a463-4f81-8a5d-e536a010f016 fwd="191.183.201.14" dyno= connect= service= status=503 bytes= protocol=https

Pela mensagem de erro o problema é que não está executando nenhuma aplicação web.

No build deu essa mensagem:

remote: -----> Discovering process types
remote:        Procfile declares types -> (none)

mas deveria ter dado types -> web:

Você colocou o plugin no seu pom.xml?

<plugin>
    <groupId>org.apache.maven.plugins</groupId>
    <artifactId>maven-dependency-plugin</artifactId>
    <version>2.3</version>
    <executions>
        <execution>
            <phase>package</phase>
            <goals><goal>copy</goal></goals>
            <configuration>
                <artifactItems>
                    <artifactItem>
                        <groupId>com.github.jsimone</groupId>
                        <artifactId>webapp-runner</artifactId>
                        <version>7.0.57.2</version>
                        <destFileName>webapp-runner.jar</destFileName>
                    </artifactItem>
                </artifactItems>
            </configuration>
        </execution>
    </executions>
</plugin>

Além desse plugin, precisamos criar um arquivo que é requerido pelo Heroku para indicar como a nossa aplicação será executada quando esta for inicializada no servidor. Este arquivo deve se chamar Procfile e deve conter o seguinte conteúdo:

web: java $JAVA_OPTS -jar -Dspring.profiles.active=prod target/dependency/webapp-runner.jar --port $PORT target/*.war