Как отладить приложение в Heroku с помощью JHipster, которое отвечает: «Ваш запрос не может быть обработан»? - PullRequest
0 голосов
/ 23 мая 2018

У меня проблема при развертывании JHipster в Heroku.Я создаю новый проект с Jhipster, который отлично работает на моем локальном хосте:

? Which *type* of application would you like to create? Monolithic application (recommended for simple projects)

? What is the base name of your application? herokutest2

? What is your default Java package name? heroku

? Do you want to use the JHipster Registry to configure, monitor and scale your application? No

? Which *type* of authentication would you like to use? HTTP Session Authentication (stateful, default Spring Security mechanism)

? Which *type* of database would you like to use? SQL (H2, MySQL, MariaDB, PostgreSQL, Oracle, MSSQL)

? Which *production* database would you like to use? PostgreSQL

? Which *development* database would you like to use? H2 with in-memory persistence

? Do you want to use the Spring cache abstraction? Yes, with the Ehcache implementation (local cache, for a single node)

? Do you want to use Hibernate 2nd level cache? Yes

? Would you like to use Maven or Gradle for building the backend? Gradle

? Which other technologies would you like to use?

? Which *Framework* would you like to use for the client? Angular 5

? Would you like to enable *SASS* support using the LibSass stylesheet preprocessor? No

? Would you like to enable internationalization support? No

? Besides JUnit and Karma, which testing frameworks would you like to use?

? Would you like to install other generators from the JHipster Marketplace? No

Так что у меня есть работающее приложение, которое работает нормально.Затем я развертываю приложение в Heroku, не внося никаких изменений в исходный проект Jhipster.

Я делаю логин> heroku,> запускаю jhipster heroku, развертываю в США, с помощью GIT (скомпилировать в heroku), поэтомув конце я делаю свою героку открытой и домашний URL показывает следующую ошибку.

Your request cannot be processed
Sorry, an error has occurred.

Status: Not Found (Not Found)
Message: No message available

И в журналах говорится:

module: @oclif/config@1.6.18
task: runHook prerun
plugin: heroku
root: C:\Program Files\heroku\client
2018-05-23T08:54:09.105823+00:00 app[api]: Release v1 created by user ecorreos@hotmail.com
2018-05-23T08:54:09.105823+00:00 app[api]: Initial release by user ecorreos@hotmail.com
2018-05-23T08:54:09.419215+00:00 app[api]: Release v2 created by user ecorreos@hotmail.com
2018-05-23T08:54:09.419215+00:00 app[api]: Enable Logplex by user ecorreos@hotmail.com
2018-05-23T08:54:11.830176+00:00 app[api]: Release v3 created by user ecorreos@hotmail.com
2018-05-23T08:54:11.830176+00:00 app[api]: Attach DATABASE (@ref:postgresql-globular-46720) by user ecorreos@hotmail.com
2018-05-23T08:54:23.966535+00:00 app[api]: Release v4 created by user ecorreos@hotmail.com
2018-05-23T08:54:23.966535+00:00 app[api]: Set NPM_CONFIG_PRODUCTION config vars by user ecorreos@hotmail.com
2018-05-23T08:54:37.000000+00:00 app[api]: Build started by user ecorreos@hotmail.com
2018-05-23T08:57:51.024261+00:00 app[api]: Release v5 created by user ecorreos@hotmail.com
2018-05-23T08:57:51.024261+00:00 app[api]: Deploy ff0268cc by user ecorreos@hotmail.com
2018-05-23T08:57:51.038692+00:00 app[api]: Scaled to web@1:Free by user ecorreos@hotmail.com
2018-05-23T08:57:51.000000+00:00 app[api]: Build succeeded
2018-05-23T08:57:56.986887+00:00 heroku[web.1]: Starting process with command `java $JAVA_OPTS -Xmx256m -jar build/libs/*.war --spring.profiles.active=prod,heroku --server.port=39350`
2018-05-23T08:57:58.659062+00:00 app[web.1]: Setting JAVA_TOOL_OPTIONS defaults based on dyno size. Custom settings will override them.
2018-05-23T08:57:58.662162+00:00 app[web.1]: Picked up JAVA_TOOL_OPTIONS: -Xmx300m -Xss512k -Dfile.encoding=UTF-8
2018-05-23T08:58:00.746362+00:00 app[web.1]:
2018-05-23T08:58:00.746408+00:00 app[web.1]: ██╗ ██╗   ██╗ ████████��� ███████╗   ██████╗ ████████╗ ████████╗ ███████╗
2018-05-23T08:58:00.746410+00:00 app[web.1]: ██║ ██║   ██║ ╚══██╔══╝ ██╔═══██╗ ██╔════╝ ╚══██╔══╝ ██╔═════╝ ██╔═══██╗
2018-05-23T08:58:00.746414+00:00 app[web.1]: ██╗   ██║ ██╔═══██║    ██║    ██╔════╝   ╚═══██╗    ██║    ██╔═══╝   ██╔══██║
2018-05-23T08:58:00.746412+00:00 app[web.1]: ██║ ████████║    ██║    ███████╔╝ ╚█████╗     ██║    ██████╗   ███████╔╝
2018-05-23T08:58:00.746418+00:00 app[web.1]: ╚═════╝  ╚═╝   ╚═╝ ╚═══════╝ ╚═╝       ╚═════╝     ╚═╝    ╚═══════╝ ╚═╝   ╚═╝
2018-05-23T08:58:00.746420+00:00 app[web.1]:
2018-05-23T08:58:00.746416+00:00 app[web.1]: ╚██████╔╝ ██║   ██║ ████████�� ██║       ██████╔╝    ██║    ████████╗ ██║  ╚██╗
2018-05-23T08:58:00.746422+00:00 app[web.1]: :: JHipster ?  :: Running Spring Boot 1.5.12.RELEASE ::
2018-05-23T08:58:00.746424+00:00 app[web.1]: :: http://www.jhipster.tech ::
2018-05-23T08:58:00.746435+00:00 app[web.1]:
2018-05-23T08:58:00.982003+00:00 app[web.1]: 2018-05-23 08:58:00.975  INFO 4 --- [           main] heroku.Herokutest2App                    : Starting Herokutest2App on 51c5056d-8cde-42cf-a075-924e1c710e21 with PID 4 (/app/build/libs/herokutest-2-0.0.1-SNAPSHOT.war started by u45925 in /app)2018-05-23T08:58:00.982623+00:00 app[web.1]: 2018-05-23 08:58:00.982  INFO 4 --- [           main] heroku.Herokutest2App                    : The following profiles are active: prod,heroku
2018-05-23T08:58:06.548212+00:00 app[web.1]: 2018-05-23 08:58:06.546  INFO 4 --- [           main] heroku.config.WebConfigurer              : Web application configuration, using profiles: prod
2018-05-23T08:58:06.557755+00:00 app[web.1]: 2018-05-23 08:58:06.557  INFO 4 --- [           main] heroku.config.WebConfigurer              : Web application fully configured
2018-05-23T08:58:08.442500+00:00 app[web.1]: 2018-05-23 08:58:08.442  WARN 4 --- [st-2-Executor-1] i.g.j.c.liquibase.AsyncSpringLiquibase   : Starting Liquibase asynchronously, your database might not be ready at startup!
2018-05-23T08:58:21.497048+00:00 app[web.1]: 2018-05-23 08:58:21.496  INFO 4 --- [           main] heroku.Herokutest2App                    : Started Herokutest2App in 21.894 seconds (JVM running for 22.834)
2018-05-23T08:58:21.497770+00:00 app[web.1]: 2018-05-23 08:58:21.497  INFO 4 --- [           main] heroku.Herokutest2App                    :
2018-05-23T08:58:21.497774+00:00 app[web.1]: ----------------------------------------------------------
2018-05-23T08:58:21.497776+00:00 app[web.1]: Application 'herokutest2' is running! Access URLs:
2018-05-23T08:58:21.497778+00:00 app[web.1]: Local:             http://localhost:39350
2018-05-23T08:58:21.497780+00:00 app[web.1]: External:  http://172.18.158.210:39350
2018-05-23T08:58:21.497783+00:00 app[web.1]: Profile(s):        [prod, heroku]
2018-05-23T08:58:21.497785+00:00 app[web.1]: ----------------------------------------------------------
2018-05-23T08:58:22.237880+00:00 heroku[web.1]: State changed from starting to up
2018-05-23T08:59:16.114847+00:00 heroku[router]: at=info method=GET path="/" host=herokutest-2.herokuapp.com request_id=b7c438e8-75d8-486b-9e8b-2bfeb33f5c93 fwd="95.18.239.39" dyno=web.1 connect=1ms service=616ms status=404 bytes=1813 protocol=https
2018-05-23T08:59:16.949795+00:00 heroku[router]: at=info method=GET path="/$%7BbaseUrl%7D/favicon.ico" host=herokutest-2.herokuapp.com request_id=dea0cb4b-9fb9-4885-9b79-569e9f24bd07 fwd="95.18.239.39" dyno=web.1 connect=1ms service=90ms status=404 bytes=571 protocol=https

PD: Я дал номер своей кредитной карты Heroku; -D

Следуя инструкциям Джона, я попробовал это:

D:\BasuraTemporal\Borrar\BOOTSRAP\JHispter\herokugradleraro1>heroku config:set GRADLE_TASK="stage -Pprod" --app=herokugradleraro1
Setting GRADLE_TASK and restarting ⬢ herokugradleraro1... -
(node:15420) SyntaxError Plugin: heroku: C:\Users\usuario\AppData\Local\heroku\config.json: Unexpected string in JSON at position 72
module: @oclif/config@1.6.18
task: runHook prerun
plugin: heroku
Setting GRADLE_TASK and restarting ⬢ herokugradleraro1... !
 !    Couldn't find that app.

D:\BasuraTemporal\Borrar\BOOTSRAP\JHispter\herokugradleraro1>heroku config:set GRADLE_TASK="stage -Pprod" --app herokugradleraro1
Setting GRADLE_TASK and restarting ⬢ herokugradleraro1... -
(node:4544) SyntaxError Plugin: heroku: C:\Users\usuario\AppData\Local\heroku\config.json: Unexpected string in JSON at position 72
module: @oclif/config@1.6.18
task: runHook prerun
plugin: heroku
Setting GRADLE_TASK and restarting ⬢ herokugradleraro1... !
 !    Couldn't find that app.

Но это не сработало.Я думаю, что я буду ждать версии 5.

1 Ответ

0 голосов
/ 24 мая 2018

Исправление для этой проблемы - установить переменную конфигурации для проекта.Это можно сделать с помощью панели инструментов Heroku или с помощью интерфейса командной строки Heroku:

heroku config:set GRADLE_TASK="stage -Pprod" --app your-app-name-here

Это исправление не требуется в v5.0.0-beta.2 и более поздних версиях, исправленное этим запросом на извлечение .

...