D:\ysl-team\Krishna\Apigee\Coursera\Firebase setup\setup\setup>node setup prompt: Please provide the Apigee Edge username: kmirajkar@******.com prompt: Please provide the Apigee Edge password: ************* prompt: Please provide the Apigee Edge Organization name: kmirajkar-eval prompt: Please provide the Apigee Edge Environment name: test prompt: Please provide the Firebase Host name: https://apigee-developer-trainin-53357.firebaseio.com/ Modified files: [object Object] [INFO] Scanning for projects... [INFO] Scanning for projects... [INFO] [INFO] ------------------------------------------------------------------------ [INFO] Building edge-developer-training-backend v1 [INFO] ------------------------------------------------------------------------ [INFO] [INFO] ------------------------------------------------------------------------ [INFO] Building edge-developer-training-idp v1 [INFO] ------------------------------------------------------------------------ [INFO] [INFO] --- maven-clean-plugin:2.5:clean (default-clean) @ edge-developer-training-idp --- [INFO] [INFO] --- maven-clean-plugin:2.5:clean (default-clean) @ edge-developer-training-backend --- [INFO] Deleting D:\ysl-team\Krishna\Apigee\Coursera\Firebase setup\setup\setup\edge-developer-training-idp\target [INFO] [INFO] --- maven-resources-plugin:2.6:copy-resources (default) @ edge-developer-training-idp --- [INFO] Deleting D:\ysl-team\Krishna\Apigee\Coursera\Firebase setup\setup\setup\edge-developer-training-backend\target [INFO] [INFO] --- jshint-maven-plugin:1.6.0:lint (jslint) @ edge-developer-training-backend --- [INFO] Using 'UTF-8' encoding to copy filtered resources. [INFO] Copying 4 resources [INFO] [INFO] --- apigee-edge-maven-plugin:1.1.6:configure (configure-bundle) @ edge-developer-training-idp --- [INFO] using jshint version 2.5.6 [INFO] D:\ysl-team\Krishna\Apigee\Coursera\Firebase setup\setup\setup\edge-developer-training-backend\apiproxy\resources\jsc\AddProductNameToURI.js [INFO] D:\ysl-team\Krishna\Apigee\Coursera\Firebase setup\setup\setup\edge-developer-training-backend\apiproxy\resources\jsc\FormatLikeBaaS.js [INFO] D:\ysl-team\Krishna\Apigee\Coursera\Firebase setup\setup\setup\edge-developer-training-backend\apiproxy\resources\jsc\ProductAvailability.js [INFO] D:\ysl-team\Krishna\Apigee\Coursera\Firebase setup\setup\setup\edge-developer-training-backend\apiproxy\resources\jsc\UpdateTargetUrl.js [INFO] [INFO] --- maven-resources-plugin:2.6:copy-resources (default) @ edge-developer-training-backend --- [INFO] Using 'UTF-8' encoding to copy filtered resources. [INFO] Copying 25 resources [INFO] No config.json found. Skipping package configuration. [INFO] =============Checking for node.js app================ [INFO] =============Now zipping the App Bundle================ [INFO] [INFO] --- apigee-edge-maven-plugin:1.1.6:configure (configure-bundle) @ edge-developer-training-backend --- [INFO] [INFO] --- maven-install-plugin:2.4:install (default-install) @ edge-developer-training-idp --- [INFO] Installing D:\ysl-team\Krishna\Apigee\Coursera\Firebase setup\setup\setup\edge-developer-training-idp\pom.xml to d:\nextgen\apigee\edge-developer-training-idp\v1\edge-developer-training-idp-v1.pom [INFO] [INFO] --- apigee-edge-maven-plugin:1.1.6:deploy (deploy-bundle) @ edge-developer-training-idp --- [INFO] =============Initializing Maven Deployment================ [INFO] Request prepared for the server ************************** GET https://api.enterprise.apigee.com/v1/organizations/kmirajkar-eval/apis/edge-developer-training-idp/d... accept: application/json accept-encoding: gzip authorization: Basic [Not shown in log] [INFO] ============= Reading the config file located at ================ D:\ysl-team\Krishna\Apigee\Coursera\Firebase setup\setup\setup\edge-developer-training-backend\config.json [INFO] =============Checking for node.js app================ [INFO] =============Now zipping the App Bundle================ [INFO] [INFO] --- apigee-config-maven-plugin:1.2.1:caches (create-config-cache) @ edge-developer-training-backend --- [INFO] ************************************************************************ [INFO] Apigee Cache [INFO] ************************************************************************ [INFO] No cache config found. [INFO] [INFO] --- apigee-config-maven-plugin:1.2.1:targetservers (create-config-targetserver) @ edge-developer-training-backend --- [INFO] ************************************************************************ [INFO] Apigee Target Servers [INFO] ************************************************************************ [INFO] Retrieving existing environment Target Servers - test [INFO] Request prepared for the server ************************** GET https://api.enterprise.apigee.com/v1/organizations/kmirajkar-eval/environments/test/targetservers accept: application/json accept-encoding: gzip authorization: Basic [Not shown in log] [INFO] Active Revision: 1 [INFO] Updating Active Revision: 1 [INFO] =============Updating App================ [INFO] Request prepared for the server ************************** POST https://api.enterprise.apigee.com/v1/organizations/kmirajkar-eval/apis/edge-developer-training-idp/r... accept: application/json accept-encoding: gzip authorization: Basic [Not shown in log] content-type: application/octet-stream [Request body contains data, not shown] [INFO] Creating Target Server - edge-developer-training-backend [INFO] Request prepared for the server ************************** POST https://api.enterprise.apigee.com/v1/organizations/kmirajkar-eval/environments/test/targetservers accept: application/json accept-encoding: gzip authorization: Basic [Not shown in log] content-type: application/json [Request body] {"port":443,"isEnabled":true,"name":"edge-developer-training-backend","host":"https:\/\/apigee-developer-trainin-53357.firebaseio.com\/","sSLInfo":{"enabled":"true"}} [ERROR] Apigee call failed 400 Bad Request { "code" : "messaging.config.beans.InvalidHostName", "message" : "Invalid host name https://apigee-developer-trainin-53357.firebaseio.com/.", "contexts" : [ ] } [INFO] ------------------------------------------------------------------------ [INFO] BUILD FAILURE [INFO] ------------------------------------------------------------------------ [INFO] Total time: 5.854 s [INFO] Finished at: 2019-06-23T21:40:36+05:30 [INFO] Final Memory: 19M/98M [INFO] ------------------------------------------------------------------------ [ERROR] Failed to execute goal com.apigee.edge.config:apigee-config-maven-plugin:1.2.1:targetservers (create-config-targetserver) on project edge-developer-training-backend: Apigee network call error 400 Bad Request [ERROR] { [ERROR] "code" : "messaging.config.beans.InvalidHostName", [ERROR] "message" : "Invalid host name https://apigee-developer-trainin-53357.firebaseio.com/.", [ERROR] "contexts" : [ ] [ERROR] } [ERROR] -> [Help 1] [ERROR] [ERROR] To see the full stack trace of the errors, re-run Maven with the -e switch. [ERROR] Re-run Maven using the -X switch to enable full debug logging. [ERROR] [ERROR] For more information about the errors and possible solutions, please read the following articles: [ERROR] [Help 1] http://cwiki.apache.org/confluence/display/MAVEN/MojoFailureException (node:25816) UnhandledPromiseRejectionWarning: #<Object> (node:25816) UnhandledPromiseRejectionWarning: Unhandled promise rejection. This error originated either by throwing inside of an async function without a catch block, or by rejecting a promise which was not handled with .catch(). (rejection id: 1) (node:25816) [DEP0018] DeprecationWarning: Unhandled promise rejections are deprecated. In the future, promise rejections that are not handled will terminate the Node.js process with a non-zero exit code. [INFO] Response returned by the server ************************** 200 OK accept-encoding: gzip content-length: 1232 content-type: application/json date: Sun, 23 Jun 2019 16:10:46 GMT server: [Apigee LB] access-control-allow-origin: [*] access-control-allow-methods: [GET, PUT, POST, DELETE] connection: [keep-alive] access-control-max-age: [3628800] access-control-allow-headers: [origin, x-requested-with, accept] { "configurationVersion": { "majorVersion": 4, "minorVersion": 0 }, "contextInfo": "Revision 1 of application -NA-, in organization -NA-", "createdAt": 1560930689142, "createdBy": "kmirajkar@******.com", "lastModifiedAt": 1561306234510, "lastModifiedBy": "kmirajkar@******.com", "policies": [ "AM-Failure-Response", "AM-Success-Response" ], "proxyEndpoints": [ "default" ], "resources": [], "revision": "1", "targetEndpoints": [], "targetServers": [], "type": "Application" } [INFO] ------------------------------------------------------------------------ [INFO] BUILD SUCCESS [INFO] ------------------------------------------------------------------------ [INFO] Total time: 16.802 s [INFO] Finished at: 2019-06-23T21:40:47+05:30 [INFO] Final Memory: 12M/75M [INFO] ------------------------------------------------------------------------ ./edge-developer-training-idp successfully configured!
The curl operation to firebase url works as seen below. So, its valid URL. Not sure why Apigee is complains that way during build. curl -X GET https://apigee-developer-trainin-53357.firebaseio.com/db/carts/4b1e4bda.json {"cart_id":"4b1e4bda-498a-11e6-b771-5da5ca0b03e9","cart_items":[{"discount":0.18,"name":"S40321974","price":158.99,"quantity":8,"sku_id":"S40321974"},{"quantity":2,"sku_id":"S16421452"}],"created_at":1468477018,"name":"4b1e4bda","session_id":"233-234sf-2-sd-2","total_base_price":"100","total_discount":"0","total_price":"100","updated_at":1468477018,"user_id":"retailuser"}
The tool tries to create a TargetServer in your Apigee env with the name as 'edge-developer-training-backend'
While creating a TargetServer, we should not mention the protocol, it is taken care of by the port number (443|80).
Remove the https protocol and the slash at the end of the URL.
apigee-developer-trainin-53357.firebaseio.com