天天看點

使用 cf push 部署應用到 SAP BTP 時遇到錯誤消息 No domains exist for route

我使用的 SAP BTP CloudFoundry 環境的 API endpoint 在 BTP cockpit 裡可以找到:

使用 cf push 部署應用到 SAP BTP 時遇到錯誤消息 No domains exist for route
https://api.cf.ap21.hana.ondemand.com/
使用 cf push 部署應用到 SAP BTP 時遇到錯誤消息 No domains exist for route

使用指令行 cf login 登入:

使用 cf push 部署應用到 SAP BTP 時遇到錯誤消息 No domains exist for route

建立一個 xsuaa 服務執行個體:

使用 cf push 部署應用到 SAP BTP 時遇到錯誤消息 No domains exist for route

之後使用 cf push 上傳應用,遇到錯誤消息:

For application ‘product-list’: No domains exist for route product-list-jerry.cfapps.eu10.hana.ondemand.com

使用 cf push 部署應用到 SAP BTP 時遇到錯誤消息 No domains exist for route

使用 cf routes 指令檢視路由資訊:

使用 cf push 部署應用到 SAP BTP 時遇到錯誤消息 No domains exist for route

官網連結

本主題中的術語域與其常見用法不同,它特定于 Cloud Foundry。 同樣,共享域和私有域指的是 Cloud Foundry 中具有特定含義的資源。 域名、根域和子域的使用是指 DNS 記錄。

域向開發人員表明對從域建立的任何路由的請求都路由到 Cloud Foundry。 這需要在帶外配置 DNS,以将域名解析為負載均衡器的 IP 位址,該負載均衡器配置為将請求轉發到 Cloud Foundry 路由器。 有關配置 DNS 的詳細資訊,請參閱域的 DNS。

List Domains for an Org

建立路由時,開發人員從可用的域中進行選擇。 使用 cf domains 檢視目标組織的可用域清單:

使用 cf push 部署應用到 SAP BTP 時遇到錯誤消息 No domains exist for route

這裡發現問題根源了,我的 manifest.yml 檔案裡,使用的 region 是 eu10,将所有的 eu10 改成我 BTP 的 region ap21,問題解決:

使用 cf push 部署應用到 SAP BTP 時遇到錯誤消息 No domains exist for route
使用 cf push 部署應用到 SAP BTP 時遇到錯誤消息 No domains exist for route

現在 cf push 成功執行了:

使用 cf push 部署應用到 SAP BTP 時遇到錯誤消息 No domains exist for route

繼續閱讀