apigee / apigee/apigeetool-node

deployproxy fails with a 500 error on large-ish proxy

Open
#71 0 comments 0 reactions 0 assignees View on GitHub

Nobody has claimed this yet.

Dominant language
JavaScript
Stars
91
Forks
91
PR merge metrics
No merged PRs in 30d

Description

I have a proxy which includes JWT creation (from https://github.com/apigee/iloveapis2015-jwt-jwe-jws) and thus includes some JARs, for a total of 2.7mb. When deploying this, it always fails with:

c:>apigeetool deployproxy -p password -u username@example.com-D -o organisation-name -n proxy-name -k -V -a 50 -i
...
Uploading java resource apigee-edge-callout-jwt-signed-1.0.6.jar
Uploading java resource json-smart-1.3.jar
Uploading java resource nimbus-jose-jwt-3.10.jar
Uploading java resource Utils-Callout.jar
...
Uploading policy VerifyAPIKey.xml
Error: Error uploading policy: 500
Error: Error uploading policy: 500
at Request._callback (C:..path..npm\node_modules\apigeetool\lib\commands\deployproxy.js:397:18)
at Request.self.callback (C:..path..npm\node_modules\apigeetool\node_modules\request\request.js:188:22)
at emitTwo (events.js:106:13)
at Request.emit (events.js:191:7)
at Request. (C:..path..npm\node_modules\apigeetool\node_modules\request\request.js:1171:10)
at emitOne (events.js:96:13)
at Request.emit (events.js:188:7)
at IncomingMessage. (C:..path..npm\node_modules\apigeetool\node_modules\request\request.js:1091:12)
at IncomingMessage.g (events.js:292:16)
at emitNone (events.js:91:20)

Uploading smaller proxies does work well.

Uploading a zip of the proxy via the Apigee UI works well (1-2 minutes).

Having looked at the Node source code, and tried uploading to a new proxy name, I'm expecting the uploader to make a zip file:

var zipBuf = ziputils.makeOneFileZip(ProxyBase, rootEntryName, rootDoc);

and upload that; however, it seems to upload the resources, policies, proxies and targets one by one.

Has anyone seen this behavior ?

Freddie Vander Elst

Contributor guide

Open the contributing guide

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

Research direction

Reproduce the failure with the reported 2.7 MB proxy, then inspect lib/commands/deployproxy.js around line 397 and the ziputils.makeOneFileZip entry point mentioned in the issue. Done means deploying a similarly large proxy succeeds through the CLI without the 500 error, while smaller proxies continue to work.

Written by the indexing model from the issue text.

Assessment

Tech stack
javascript
Domain
cli, cloud
Issue type
Bug
Difficulty
3/5
Estimated time
1-2 days
Activity status
Stale
Clarity
Mostly clear
Newbie friendliness
35/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.