strongloop / strong-pm

deployer for node applications
http://strong-pm.io
Other
1k stars 71 forks source link

slc deploy always getting "error: RPC failed; result=55" #335

Closed bachirelkhoury closed 4 years ago

bachirelkhoury commented 8 years ago

I'm getting the below error when deploying with git to a docker strong-pm-container Been stuck for days! Anyone else having this issue?!

We have 4 other deployments, similar apps, on different machines with same docker setup. They all work fine. Only this machine and setup. Driving us mad. Any pointers would be helpful.

I've looked up every issue with Git, increased the buffer size but still no same problem:

$ git config http.postBuffer 524288000

Here's the command:

$ slc deploy http://myserver.com

Counting objects: 8864, done.
Delta compression using up to 4 threads.
Compressing objects: 100% (7900/7900), done.
Writing objects: 100% (8864/8864), 44.86 MiB | 9.35 MiB/s, done.
Total 8864 (delta 2215), reused 71 (delta 5)
error: RPC failed; result=56, HTTP code = 0
fatal: The remote end hung up unexpectedly
fatal: The remote end hung up unexpectedly
Everything up-to-date
Failed to deploy `deploy` as `myapp-api` to `http://myserver.com:8701/` via `http://myserver.com:8701/`

Tried running it with curl verbose, got this at the end "select/poll returned error":

$ GIT_CURL_VERBOSE=1 GIT_TRACE=1 slc deploy http://myserver.com

....
Content-Length: 47040935

* select/poll returned error
* Closing connection 1
error: RPC failed; result=55, HTTP code = 0
fatal: The remote end hung up unexpectedly
fatal: The remote end hung up unexpectedly
Everything up-to-date
Failed to deploy `deploy` as `myapp-api` to `http://myserver.com:8701/` via `http://myserver.com:8701/`
bachirelkhoury commented 8 years ago

slc build seems to be including all Examples inside the node_modules including Android apks and huge images part of loopback-component-push and loopback-component-storage.

Cleaning those up manually has reduced the deployment significantly and seem to throw that error much less now.

Anyone knows how to have .gitignore for the slc build script? Seems to include everything it wants.

pungoyal commented 8 years ago

try .npmignore https://docs.npmjs.com/misc/developers#keeping-files-out-of-your-package

bachirelkhoury commented 8 years ago

Thanks @pungoyal. I will try that. Ideally package maintainers should be adding that to ignore their samples and test data.

In conclusion, it was a git problem. Which was obvious but wasn't clear why. The cause was that slc build, was including all node_modules and some had massive files like apks and 10Mb images. Which is really not acceptable and should be cleanedup by their maintainer:

I might have had an older version of these packages as well. Anyway 16 hours later we've got a successful deployment.

fmtoffolo commented 8 years ago

I'm getting the exact same issue. Did you just delete big useless files in the node_modules directory?

bachirelkhoury commented 8 years ago

@fmtoffolo yes I just deleted useless files in push and storage components. They had and still have an entire apk Android app in the examples.

slc deploy should ignore all examples in node_modules or give us a way to do so. Examples in some cases are bigger than the library itself.

fmtoffolo commented 8 years ago

Thanks. I was able to get the folder size down considerably but was still getting the error. Ended up just building a .tgz, uploading it and deploying it locally from the server. Pretty annoying workaround, but it works ok.

ebarault commented 8 years ago

yes, me too. reduced the folder size down, but cannot get it to deploy remotely. for now we are pulling our repo on the production virtual machines and then build and deploy from there and it works ok. could someone from the loopback team drop in this conversation?

bachirelkhoury commented 8 years ago

yeah that just happened again, and reducing directory size is not helping. @ebarault how to do you deploy straight on the server? we've pulled the repo but there's no slc on the server, only that sl-pm

mbilbille commented 8 years ago

Got the same issue. Any help on this? (no slc on the server)

ebarault commented 8 years ago

@bachirelkhoury @mbilbille now you've pulled the repo on your server, what don't you do npm install -g strongloop ? you will get slc just do all the rest as usual, npm install, slc build, slc deploy, etc.

mbilbille commented 8 years ago

Yes, this is a bypass but it doesn't solve the initial issue.

ebarault commented 8 years ago

As the situation does not seem to progress, we decided to move away from strong-pm and package our api app in docker instead

2016-09-28 15:05 GMT+02:00 Matthieu Bilbille notifications@github.com:

Yes, this is a bypass but it doesn't solve the initial issue.

— You are receiving this because you were mentioned. Reply to this email directly, view it on GitHub https://github.com/strongloop/strong-pm/issues/335#issuecomment-250160586, or mute the thread https://github.com/notifications/unsubscribe-auth/ALcep3XDLJb2jK9sZdolMcISr59dhigMks5qumYlgaJpZM4H9Req .

stale[bot] commented 4 years ago

This issue has been automatically marked as stale because it has not had recent activity. It will be closed if no further activity occurs. Thank you for your contributions.

stale[bot] commented 4 years ago

This issue has been closed due to continued inactivity. Thank you for your understanding.