apigee / apigee-config-maven-plugin

apigee-config-maven-plugin
Apache License 2.0
55 stars 108 forks source link

Apigee Network call error #161

Open srinivasmurari opened 1 year ago

srinivasmurari commented 1 year ago

hi, when we tried to deploy API proxies using the cicd pipeline we are not able to deploy and got Apigee Network to call error and connection timed out issue,we need to connect via proxy to do any deployments from cicd server we had added proxy in our seetings.xml file and using 2.3.0 maven deploy plugin.

we have tested sample management APIs using bearer token we can make post & get from the same cicd server, but using the plugin we are getting the below-attached issue deploy command used mvn clean install -phybrid-apiproxy -Dorg=orgname -Denv=envname -Dbearer=token

Screenshot 2022-11-01 195413

ssvaidyanathan commented 1 year ago

@srinivasmurari - am not sure why thats coming on your end. That class is available in org/apache/httpcomponents/httpclient/4.5.5 and its a dependency coming from com.google.http-client:google-http-client-apache:jar:2.0.0 which is part of the config plugin pom.xml

When I run mvn dependency:tree on that config plugin pom, I see the following

[INFO] +- com.google.http-client:google-http-client-apache:jar:2.0.0:compile
[INFO] |  \- org.apache.httpcomponents:httpclient:jar:4.5.5:compile

By any chance - in your Maven repo that you are pointing to, is this jar not availabe? Or by any change do you have an <exclusions> section added to your pom where this does not get downloaded?

srinivasmurari commented 1 year ago

@ssvaidyanathan we are not sure all the dependencies are available in the local .m2 repository while using 2.4.4 we are getting time out and while using the 2.4.5-rc1 we are getting http- client related issue. there is no section in our pom.xml. path org.apache.httpcomponents:httpclient. MicrosoftTeams-image (6) path com.google.http-client:google-http-client MicrosoftTeams-image (7)

ssvaidyanathan commented 1 year ago

Probably try adding this to your pom under dependencies

<dependency>
  <groupId>org.apache.httpcomponents</groupId>
  <artifactId>httpclient</artifactId>
  <version>4.5.5</version>
</dependency>
srinivasmurari commented 1 year ago

currently, in our pom.xml under dependencies, we have that httpclient-4.5.5, but we are facing the same error.

ssvaidyanathan commented 1 year ago

Can you try

<dependency>
  <groupId>org.apache.httpcomponents</groupId>
  <artifactId>httpclient</artifactId>
  <version>4.5.13</version>
</dependency>
srinivasmurari commented 1 year ago

after adding the dependency 4.5.13 also we are facing the same above error.

ssvaidyanathan commented 1 year ago

@srinivasmurari - as one last attempt, I just released v2.4.5-rc2 with the httpclient jar as a direct dependency to the plugin. Try that and see. Even if that doesn't work, then generating the token using the script and passing that to the plugin is the only option we are left with.

ssvaidyanathan commented 1 year ago

any luck?

srinivasmurari commented 1 year ago

no luck, we have used 2.4.5-rc2 also we are unable to generate the token. we have directly passed the access token by using the script, and now it is working fine.

ssvaidyanathan commented 1 year ago

this is not a plugin issue from what I see. Its a network issue. Is it possible for you to try from your laptop? Just push from your laptop without corporate network

srinivasmurari commented 1 year ago

as of now, it may not be possible to try from my laptop with the same proxy configuration that we have in our client environment.

ssvaidyanathan commented 1 year ago

ok.. in that case, I am going to close this issue

srinivasmurari commented 1 year ago

ok, you can close the issue, thanks for your help.

ssvaidyanathan commented 1 year ago

@srinivasmurari - if I push a new change (version), will you be able to test it for me pls?

ssvaidyanathan commented 1 year ago

I just released "v2.4.6-rc1", can you test if you are able to generate the token by just passing the service account file with your Maven proxy setup

srinivasmurari commented 1 year ago

Hi @ssvaidyanathan , we are checking for that using v2.4.6-rc1 and will give you an update once our testing is done.

ssvaidyanathan commented 1 year ago

Any update?

ssvaidyanathan commented 1 year ago

@srinivasmurari - do you have any updates on this?

srinivasmurari commented 1 year ago

Hi @ssvaidyanathan, sorry for the delay in responding, We have completed the setup in the client environment and we have delivered to the client with previous version. now we have explained to them regarding this updated version plugin use as you suggested and we have requested them to provide access to modify the files with an updated version plugin, Currently, we have requested client but the approval is pending. Once we get the approval from the client we can test in the client environment. Hope you understand.

ssvaidyanathan commented 11 months ago

@srinivasmurari - I have re-implemented the token generation code and released a version v2.4.6-rc3

Please try using this if you can

anaik91 commented 8 months ago

@ssvaidyanathan : one of my customers is facing this issue with 2.5.0 , and they are using http proxy

ssvaidyanathan commented 8 months ago

@anaik91 - can you please share more details? like logs, the command they are passing. Version used, pom.xml etc

Just mentioning "facing issues", will not be of any help unfortunately.