在尝试将Java应用程序推送到Cloud Foundry时收到404 Not Found错误消息。

huangapple go评论82阅读模式
英文:

Getting 404 Not Found error message when trying to push a Java application to Cloud Foundry

问题

我一直在部署一个Java应用,并尝试使用PaaS Cloud Foundry将其推送到云端,但当我尝试推送应用程序时,似乎无法访问其中的一个路由。
此外,我正在使用Anynines(https://www.anynines.com/)来处理Cloud Foundry部分(我已经检查过,这不是身份验证问题)。
当我打开详细模式时,我得到的精确错误日志是:

请求:[2020-07-27T14:48:16+02:00]
GET /v2/routes/reserved/domain/21d14133-2acd-462e-84ff-2a0d56bbd9ae?host=logicielgestionformations HTTP/1.1
Host: api.de.a9s.eu
Accept: application/json
Authorization: [PRIVATE DATA HIDDEN]
User-Agent: cf/6.51.0+2acd15650.2020-04-07 (go1.13.8; amd64 windows)

响应:[2020-07-27T14:48:16+02:00]
HTTP/1.1 404 Not Found
Connection: keep-alive
Content-Length: 86
Content-Type: application/json;charset=utf-8
Date: Mon, 27 Jul 2020 12:48:15 GMT
Keep-Alive: timeout=20
Server: nginx
X-Content-Type-Options: nosniff
X-Vcap-Request-Id: 5eb75dbe-96ec-40df-61ec-ac37b158d47c::5a0552f3-22cb-4c76-b234-c72b29010a1e
{
  "code": 10000,
  "description": "Unknown request",
  "error_code": "CF-NotFound"
}

我已经到处搜索,试图找到解决我的问题的答案,但似乎没有人和我有相同的问题…
如果你能帮助我,我将非常感激:)

编辑:

我找到了问题所在,我只需要删除我的manifest.yml开头的“-”,就像这里所写的一样:https://docs.cloudfoundry.org/devguide/deploy-apps/manifest-attributes.html(注意:如果您的应用程序名称以破折号字符(-)开头,则无法使用cf CLI与应用程序进行交互,因为cf CLI将破折号解释为标志)。

不过现在我还有另一个问题要解决:似乎我需要选择一个构建包…

“错误的分期应用程序:没有任何可用的构建包能够成功检测到应用程序”

祝好,
德博拉·贾贝斯

英文:

I've been deploying a Java application and trying to push it to the Cloud using the PaaS Cloud Foundry but it seems like one of the routes can't be accessed when I am trying to push my application.
Also, I am using Anynines (https://www.anynines.com/) for the Cloud Foundry part (and I checked, this is not an authentication problem).
The exact error log I get when putting the verbose mode on is :

REQUEST: [2020-07-27T14:48:16+02:00]
GET /v2/routes/reserved/domain/21d14133-2acd-462e-84ff-2a0d56bbd9ae?host=logicielgestionformations HTTP/1.1
Host: api.de.a9s.eu
Accept: application/json
Authorization: [PRIVATE DATA HIDDEN]
User-Agent: cf/6.51.0+2acd15650.2020-04-07 (go1.13.8; amd64 windows)

RESPONSE: [2020-07-27T14:48:16+02:00]
HTTP/1.1 404 Not Found
Connection: keep-alive
Content-Length: 86
Content-Type: application/json;charset=utf-8
Date: Mon, 27 Jul 2020 12:48:15 GMT
Keep-Alive: timeout=20
Server: nginx
X-Content-Type-Options: nosniff
X-Vcap-Request-Id: 5eb75dbe-96ec-40df-61ec-ac37b158d47c::5a0552f3-22cb-4c76-b234-c72b29010a1e
{
  "code": 10000,
  "description": "Unknown request",
  "error_code": "CF-NotFound"
}

I've been searching everywhere I could to get an answer to my problem but no one seems to have the same as me...
If you could help me that would be extremely nice of you 在尝试将Java应用程序推送到Cloud Foundry时收到404 Not Found错误消息。

EDIT :

I have found the problem, I only had to remove the "-" at the beginning of my manifest.yml, as it was written here : https://docs.cloudfoundry.org/devguide/deploy-apps/manifest-attributes.html (Note: If your app name begins with the dash character (-), you cannot interact with the app using the cf CLI. This is because the cf CLI interprets the dash as a flag).

Now I have another problem to solve though : it seems like I have to choose a buildpack...

Error staging application: An app was not successfully detected by any available buildpack

Regards,
Déborah Jabès

答案1

得分: 1

我已找到问题,我只需要移除我在 manifest.yml 开头的"-",就像这里所写的一样:https://docs.cloudfoundry.org/devguide/deploy-apps/manifest-attributes.html(注意:如果您的应用名称以破折号字符(-)开头,则无法使用 cf CLI 与该应用进行交互。这是因为 cf CLI 将该破折号解释为标志)。

英文:

I have found the problem, I only had to remove the "-" at the beginning of my manifest.yml, as it was written here : https://docs.cloudfoundry.org/devguide/deploy-apps/manifest-attributes.html (Note: If your app name begins with the dash character (-), you cannot interact with the app using the cf CLI. This is because the cf CLI interprets the dash as a flag).

huangapple
  • 本文由 发表于 2020年7月27日 21:23:08
  • 转载请务必保留本文链接:https://go.coder-hub.com/63116281.html
匿名

发表评论

匿名网友

:?: :razz: :sad: :evil: :!: :smile: :oops: :grin: :eek: :shock: :???: :cool: :lol: :mad: :twisted: :roll: :wink: :idea: :arrow: :neutral: :cry: :mrgreen:

确定