Issue deploying the edge-developer-training-backend proxy

Hi, I am going through the coursera course "API Design and Fundamentals of Google Cloud's Apigee API Platform", and I am having an issue when trying to setup the backend proxies in my environment for the labs.

Initially I had an access issue since it's my work computer and I installed the "setup" folder under C\program files, which required permission. After rextracting the "setup" folder to a more eneric path, the install went through, after running "npm install" again in new "setup" path.

Then I executed "node setup" and even though is started the install and it went through mostly ok, it threw 2errors, which I am not sure they are critical or not. Could you please help? Do I need to reinstall something or can I move on?

[...] -> first error in the middle of the download

Downloading from central: http://repo1.maven.org/maven2/org/apache/commons/commons-parent/35/commons-parent-35.pom Downloaded from central: http://repo1.maven.org/maven2/org/apache/commons/commons-parent/35/commons-parent-35.pom (58 kB at 434 kB/s) Downloading from central: http://repo1.maven.org/maven2/org/apache/apache/15/apache-15.pom n.Downloaoderdg fro/m central: http://rmeapvo1.maven.oen2/rgo/rmg/aavpean2/ocrgh/apaceh/ec/oampmaconhse//1c5/oapacmhmeo-n1s5.pom (1-5 kBp aart 142e kB/s)n t/35/commons-parent-35.pom (0 B at 0 B/s) Downloading from central: http://repo1.maven.org/maven2/org/bouncycastle/bcprov-jdk15on/1.55/bcprov-jdk15on-1.55.pom Downloading from central: http://repo1.maven.org/maven2/org/bouncycastle/bcprov-jdk15on/1.55/bcprov-jdk15on-1.55.pom Downloaded from central: http://repo1.maven.org/maven2/org/bouncycastle/bcprov-jdk15on/1.55/bcprov-jdk15on-1.55.pom (1.2 kB at 9.2 kB/s) [INFO] ------------------------------------------------------------------------ [INFO] BUILD FAILURE [INFO] ------------------------------------------------------------------------ [INFO] Total time: 36.D83o7wn lsoa aleIdNFO] Finished at: 2019 -06-07T15:44fr:o4m2+ 0c2e:n0t0r :[ httIpN:F/O/r]e po-1-.-m--a--v-e-n-.-o-r-g-/-m-a-v-e-n2-/-o-r-g-/-b-o-uncy-c-as--tle/b-cp-r-o-v---j-d-k-1-5-o-n-/-1-.-5-5-/-b-c-p-r-o-v---j-dk-1-5-o-n---1--------. [ERROR]5 Failed to execute goal io.apigee.build-tools.enterprise4g:apigee-edge-maven-plugin:1.1.6:configure (configure-bundle) on project edge-developer-training-idp: Execution configure-bundle 5of goal io.apigee.bui.ldp-otmo o(l0s .eBn taetrpri se40g :B/asp)i gee-edge-maven-plugin:1.1.6:configure failed: Plugin io.apigee.build-tools.enterprise4g:apigee-edge-maven-plugin:1.1.6 or one of its dependencies could not be resolved: Failed to collect dependencies at io.apigee.build-tools.enterprise4g:apigee-edge-maven-plugin:jar:1.1.6 -> org.apache.axis2:axis2-kernel:jar:1.3 -> annogen:annogen:jar:0.1.0: Failed to read artifact descriptor for annogen:annogen:jar:0.1.0: Could not transfer artifact annogen:annogen:pom:0.1.0 from/to central (http://repo1.maven.org/maven2): C:\Users\csfz\.m2\repository\annogen\annogen\0.1.0\annogen-0.1.0.pom.part.lock (Access is denied) -> [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/PluginResolutionException Downloading from central: http://repo1.maven.org/maven2/org/apache/maven/maven-plugin-api/2.0/maven-plugin-api-2.0.jar Downloading from central: http://repo1.maven.org/maven2/org/codehaus/jackson/jackson-core-asl/1.9.4/jackson-core-asl-1.9.4.jar Downloading from central: http://repo1.maven.org/maven2/org/apache/httpcomponents/httpcore/4.0.1/httpcore-4.0.1.jar Downloading from central: http://repo1.maven.org/maven2/org/apache/httpcomponents/httpclient/4.0.3/httpclient-4.0.3.jar Downloading from central: http://repo1.maven.org/maven2/com/google/http-client/google-http-client/1.10.3-beta/google-http-clie... Progress (4(node:7500) UnhandledPromiseRejectionWarning: #<Object>

[...] -> second error towards the end

Request prepared for the server ************************** POST https://api.enterprise.apigee.com/v1/organizations/carlosfernandez-eval/environments/test/targetserv... 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":"apigee-developer-trainin-cc200.firebaseio.com\/","sSLInfo":{"enabled":"true"}} [ERROR] Apigee call failed 400 Bad Request { "code" : "messaging.config.beans.InvalidHostName", "message" : "Invalid host name apigee-developer-trainin-cc200.firebaseio.com/.", "contexts" : [ ] } [INFO] ------------------------------------------------------------------------ [INFO] BUILD FAILURE [INFO] ------------------------------------------------------------------------ [INFO] Total time: 01:11 min [INFO] Finished at: 2019-06-07T15:45:16+02:00 [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 apigee-developer-trainin-cc200.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:7500) UnhandledPromiseRejectionWarning: #<Object> (node:7500) 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: 2)

Solved Solved
0 7 622
1 ACCEPTED SOLUTION

Hi. In the end my problem was that I haven't removed the final "/" from the hostname:

apigee-developer-trainin-cc200.firebaseio.com

When I realised I ran again node setup and it went through correctly. I did a first test using postman to try to connect to the db from the proxy and it works. So to me that was the issue.

Just in case someone had same problem.

Thanks for those who read/posted.

View solution in original post

7 REPLIES 7

I'm not familiar with the training courseware.

But here's what I see

[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",

And further on in the log, the hostname specifically referenced is:

apigee-developer-trainin-cc200.firebaseio.com

Does that look right to you? Do YOU have control over that hostname? Is that something you typed in somewhere? The reason I ask is because I would expect it to be "apigee-developer-traininG with a trailing G.

It looks like a mis-spelling. Is that possible? And is it possible for you to correct that in one of your configuration files?

Hi,

Thanks for the comment.

That surprised me as well, but is correct.

That’s the url i was given.

Also, i have tried a get request from the command line directly to that url and i can get the info back.

So it’s not that.

I also checked the version of the programs installed (maven, node, npm) and they all come back with a version, which to me indicates that they are also installed correctly.

I am having similar issue:

C:\Users\a346735\Downloads\setup>node setup
prompt: Please provide the Apigee Edge username: v.prabhakar@fmr.com
prompt: Please provide the Apigee Edge password: ************** prompt: Please provide the Apigee Edge Organization name: vprabhakar-eval
prompt: Please provide the Apigee Edge Environment name: test
prompt: Please provide the Firebase Host name: apigeeproject-534c1.firebaseio.com

[ERROR] Failed to execute goal io.apigee.build-tools.enterprise4g:apigee-edge-maven-plugin:1.1.6:configure (configure-bundle) on project edge-developer-training-backend: Execution configure-bundle of goal io.apigee.build-tools.enterprise4g:apigee-edge-maven-plugin:1.1.6:configure failed: A required class was missing while executing io.apigee.build-tools.enterprise4g:apigee-edge-maven-plugin:1.1.6:configure: org/apache/xml/serializer/TreeWalker
[ERROR] -----------------------------------------------------
/org/codehaus/plexus/plexus-utils/1.1/plexus-utils-1.1.jar
[ERROR] Number of foreign imports: 1
[ERROR] import: Entry[import from realm ClassRealm[maven.api, parent: null]]
[ERROR]
[ERROR] -----------------------------------------------------
[ERROR] : org.apache.xml.serializer.TreeWalker
[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/PluginContainerException
(node:26012) UnhandledPromiseRejectionWarning: Unhandled promise rejection (rejection id: 1): [object Object]
[ERROR] connect timed out
[INFO] =============Importing App================
[INFO]
Request prepared for the server
**************************
POST https://api.enterprise.apigee.com/v1/organizations/vprabhakar-eval/apis?action=import&name=edge-deve...
accept: application/json
accept-encoding: gzip
authorization: Basic [Not shown in log]
content-type: application/octet-stream
[Request body contains data, not shown] [ERROR]
* * * * * * * * * * * This deployment could have failed for a variety of reasons. * * * * * * * * * * *

[INFO] ------------------------------------------------------------------------
[INFO] BUILD FAILURE
[INFO] ------------------------------------------------------------------------
[INFO] Total time: 48.442 s
[INFO] Finished at: 2019-06-10T17:43:50-04:00
[INFO] ------------------------------------------------------------------------
[ERROR] Failed to execute goal io.apigee.build-tools.enterprise4g:apigee-edge-maven-plugin:1.1.6:deploy (deploy-bundle) on project edge-developer-training-idp: : MojoExecutionException: connect timed out -> [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/MojoExecutionException
(node:26012) UnhandledPromiseRejectionWarning: Unhandled promise rejection (rejection id: 2): [object Object]

Hi. In the end my problem was that I haven't removed the final "/" from the hostname:

apigee-developer-trainin-cc200.firebaseio.com

When I realised I ran again node setup and it went through correctly. I did a first test using postman to try to connect to the db from the proxy and it works. So to me that was the issue.

Just in case someone had same problem.

Thanks for those who read/posted.

Hi,

I got the same problem, any solution?

Thanks in advance

ESPC009998:setup sori$ node setup

prompt: Please provide the Apigee Edge username: xxxxxx@gmail.com

prompt: Please provide the Apigee Edge password: ************

prompt: Please provide the Apigee Edge Organization name: srferron-eval

prompt: Please provide the Apigee Edge Environment name: test

prompt: Please provide the Firebase Host name: apigee-developer-trainin-ce862.firebaseio.com

Modified files: [object Object]

[INFO] Scanning for projects...

[INFO]

[INFO] -----------------< apigee:edge-developer-training-idp >-----------------

[INFO] Building edge-developer-training-idp v1

[INFO] --------------------------------[ pom ]---------------------------------

Downloading from central: http://repo1.maven.org/maven2/io/apigee/build-tools/enterprise4g/apigee-edge-maven-plugin/1.1.6/apig...

[INFO] ------------------------------------------------------------------------

[INFO] BUILD FAILURE

[INFO] ------------------------------------------------------------------------

[INFO] Total time:0.689 s

[INFO] Finished at: 2020-02-02T08:55:45+01:00

[INFO] ------------------------------------------------------------------------

[ERROR] Plugin io.apigee.build-tools.enterprise4g:apigee-edge-maven-plugin:1.1.6 or one of its dependencies could not be resolved: Failed to read artifact descriptor for io.apigee.build-tools.enterprise4g:apigee-edge-maven-plugin:jar:1.1.6: Could not transfer artifact io.apigee.build-tools.enterprise4g:apigee-edge-maven-plugin:pom:1.1.6 from/to central (http://repo1.maven.org/maven2): Failed to transfer file http://repo1.maven.org/maven2/io/apigee/build-tools/enterprise4g/apigee-edge-maven-plugin/1.1.6/apig... with status code 501 -> [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/PluginResolutionException

(node:8014) UnhandledPromiseRejectionWarning: #<Object>

(node:8014) 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:8014) [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] Scanning for projects...

[INFO]

[INFO] ---------------< apigee:edge-developer-training-backend >---------------

[INFO] Building edge-developer-training-backend v1

[INFO] --------------------------------[ pom ]---------------------------------

Downloading from central: http://repo1.maven.org/maven2/com/cj/jshintmojo/jshint-maven-plugin/1.6.0/jshint-maven-plugin-1.6.0....

[INFO] ------------------------------------------------------------------------

[INFO] BUILD FAILURE

[INFO] ------------------------------------------------------------------------

[INFO] Total time:0.417 s

[INFO] Finished at: 2020-02-02T08:55:49+01:00

[INFO] ------------------------------------------------------------------------

[ERROR] Plugin com.cj.jshintmojo:jshint-maven-plugin:1.6.0 or one of its dependencies could not be resolved: Failed to read artifact descriptor for com.cj.jshintmojo:jshint-maven-plugin:jar:1.6.0: Could not transfer artifact com.cj.jshintmojo:jshint-maven-plugin:pom:1.6.0 from/to central (http://repo1.maven.org/maven2): Failed to transfer file http://repo1.maven.org/maven2/com/cj/jshintmojo/jshint-maven-plugin/1.6.0/jshint-maven-plugin-1.6.0.... with status code 501 -> [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/PluginResolutionException

(node:8014) UnhandledPromiseRejectionWarning: #<Object>

(node:8014) 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: 2)

Ok, I found the problem:

https://support.sonatype.com/hc/en-us/articles/360041287334

You should replace http://repo1.maven.orgon by https://repo1.maven.org on:

edge-developer-training-idp/pom.xml

edge-developer-training-backend/pom.xml

Thanks for the tip. Sounds like a bug. @Mike Dunker @Google - are you aware?