maven build error

Not applicable
 
0 16 1,040
16 REPLIES 16

Not applicable

I am trying to deploy an api proxy using maven, but getting below error, any help ?

Request prepared for the server ************************** POST https://api.enterprise.apigee.com/v1/organizations/sample/apis?action=import&name=parent-pom&validat... 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: 41.706 s [INFO] Finished at: 2015-06-23T17:56:33-07:00

[INFO] Final Memory: 10M/227M [INFO] ------------------------------------------------------------------------ [ERROR] Failed to execute goal io.apigee.build-tools.enterprise4g:apigee-edge-maven-plugin:1.0.0:deploy (deploy-bundle) on project parent-pom: MojoExecutionException: connect timed out -> [Help 1] org.apache.maven.lifecycle.LifecycleExecutionException: Failed to execute goal io.apigee.build-tools.enterprise4g:apigee-edge-maven-plugin:1.0.0:deploy (deploy-bundle) on project parent-pom: at org.apache.maven.lifecycle.internal.MojoExecutor.execute(MojoExecutor.java:216) at org.apache.maven.lifecycle.internal.MojoExecutor.execute(MojoExecutor.java:153) at org.apache.maven.lifecycle.internal.MojoExecutor.execute(MojoExecutor.java:145) at org.apache.maven.lifecycle.internal.LifecycleModuleBuilder.buildProject(LifecycleMo

there is connect timed out error, try maven with a '-e' or '-X' swtich - like

mvn -e -X ..

Not applicable

Check your connection to

https://api.enterprise.apigee.com

Not applicable

Connection exists, I was able to deploy using apis

Here is the output the -X switch

=============Importing App================

[DEBUG] URL parameters API Versionv1

[DEBUG] URL parameters URL https://api.enterprise.apigee.com

[DEBUG] URL parameters Orgsample

[DEBUG] URL parameters App cricket

[INFO] Request prepared for the server **************************

POST https://api.enterprise.apigee.com/v1/organizations/sample/apis?action=import&name=cricket&validate=t... 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: 42.019 s [INFO] Finished at: 2015-06-23T20:30:19-07:00

[INFO] Final Memory: 17M/227M

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

[ERROR] Failed to execute goal io.apigee.build-tools.enterprise4g:apigee-edge-maven-plugin:1.0.0:deploy (deploy-bundle) on project cricket: MojoExecutionException: connect timed out -> [Help 1] org.apache.maven.lifecycle.LifecycleExecutionException: Failed to execute goal io.apigee.build-tools.enterprise4g:apigee-edge-maven-plugin:1.0.0:deploy (deploy-bundle) on project cricket: at org.apache.maven.lifecycle.internal.MojoExecutor.execute(MojoExecutor.java:216) at org.apache.maven.lifecycle.internal.MojoExecutor.execute(MojoExecutor.java:153) at org.apache.maven.lifecycle.internal.MojoExecutor.execute(MojoExecutor.java:145) at org.apache.maven.lifecycle.internal.LifecycleModuleBuilder.buildProject(Lifecycl

Not applicable

With the below configuration in settings.xml to increase the time out, build is passing now.

<server>

<id>api.enterprise.apigee.com</id>

<configuration>

<timeout>10000</timeout> <!-- 5 seconds -->

</configuration>

</server>

*10 seconds

Huh, I replied in hurry, it is still intermittent 😞 Is there any other way to specify timeout?

maybe your proxy bundle size is larger? how much is the size of the apiproxy.zip file? or a slow connection - i think you can keep the timeout still a higher value - maybe 30 seconds?

Proxy bundle size is just 1.20 KB, also cerrtainly not the connection speed as well. There is something else going on!! is there a way to figure out?

thats strange, do you have any scripts? nodejs? in your proxy.. can you attach your proxy?

I am using a bash script. I have tried without the script as well. Proxy is attached

Any suggestions regarding this after looking into the proxy ?

Not applicable

attached the proxy

Not applicable

Any suggestions regarding this after looking into the proxy ?

yeah, i looked at the proxy, its very simple - i was able to load it using the UI or the API really fast, i don think its proxy related issue.

> could it be because of the proxy? are you going thro the proxy specified in your settings.xml? Can you try directly connecting to apigee? maybe from another network?

> or maybe its something to do with org, is your org named 'sample'? and this slowness is consistent for you right? I would suggest to create a suuport ticket here, https://pages.apigee.com/request-support-general.html -- so support can check and rule out any org related issues, if any

Thanks,

Not applicable

Hi @maneesh.poyil. I've just tried your API proxy and it worked for me on a free org. Since you attached settings.xml, I wonder if you're leveraging an outdated version of the plugin.

Attached to this answer you can find your api proxy along with the pom and shared-pom.xml files. Give it a try, it's possible that your configuration is missing something. BTW, I'm using this command to deploy:

mvn install -Ptest -Dapigee.username=$ae_username -Dapigee.password=$ae_password

673-mavencommunity.png

If you keep running into this issue, let us know. There are other tools that can achieve the same purpose. But for now, let's stick to Maven plugin. Hope it helps!