Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Maven deployment failed: Jar file: edgemicro-auth proxy: "The revision is deployed, but traffic cannot flow" #155

Open
vdineshTM opened this issue Feb 18, 2021 · 2 comments

Comments

@vdineshTM
Copy link

vdineshTM commented Feb 18, 2021

We are trying to install MicroGateway. Out of box, edgemicro-auth proxy doesn't satisfy our business requirement. Hence we added extra policies and it was working fine.

To make production-ready, we created a repository for edgemicro-auth and tried to instal from Maven install command. edgemicro-auth deployment failed with Error in Apigee UI saying

"Error in deployment for environment dev. The revision is deployed, but traffic cannot flow"

Maven command failed with "Deployment failed: Bundle did not activate within the expected time. Please check deployment status manually before trying again "

We contacted the APIGEE support and they mentioned it is "steps.javacallout.JavaCalloutInstantiationFailed" from jar file(1)

If we manually upload the JAR file(1) from UI, the same deployment works fine.

Hence it is pointing to the problem in Maven deployment plugin.

APIGEE support can't investigate further as it is an open-source maven plugin issue.

Could you please help us to resolve the maven deployment error?

(1) The output of Jar file content.


├── META-INF
│   ├── MANIFEST.MF
│   └── maven
│   └── com.apigee.gateway
│   └── edge-micro-javacallout
│   ├── pom.properties
│   └── pom.xml
├── io
│   └── apigee
│   └── microgateway
│   └── javacallout
│   ├── Callout.class
│   └── Products.class
└── release.properties

@ssvaidyanathan
Copy link
Collaborator

@vdineshTM
The above info is not enough to investigate. I have deployed many proxies that has a Java callout policy. For example check this repo. It has the jar file in the resources/java directory and is referenced by the policy. You can try that to see if it gets deployed.

If you still see issues, please run the mvn command with "-X" to get the debug output and please share that. Make sure when you are sharing, you redact all the sensitive information like Apigee org, username, password, token, etc

@rad264
Copy link

rad264 commented Jun 10, 2021

I had the same or a very similar issue. Deployed with the plugin, the Maven command finished no problem, but in the Edge UI it said it failed to deploy with the same message. Called the management API to get more info and saw the same error: "steps.javacallout.JavaCalloutInstantiationFailed". If I updated the jar manually through the Edge UI, it deployed successfully.

In my case, it was because I had enabled filtering for the maven-resources-plugin (true) on the entire apiproxy folder, which included the jar. I guess it must have tried to filter the jar contents, and corrupted it, because once I disabled filtering, it deployed successfully.

It's unlikely this was the OP's exact issue, but thought I'd share in case anyone else happens to have a similar problem! Make sure nothing is potentially altering the jar in any way when copying or packaging the bundle! I'll stick to using config.json for substitutions, as recommended 😰

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants