-
Notifications
You must be signed in to change notification settings - Fork 165
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
AWS Beanstalk deploy permission error - node-pre-gyp #659
Comments
Hi. I'm experiencing a similar error, but I can see that in my install has an error when try to download this package https://mapbox-node-binary.s3.amazonaws.com/mapnik/v3.5.13/Release/node-v48-linux-x64.tar.gz I can see this message
The error log.
Regards. |
node-v48 is node 6, I am not sure node-mapnik has precompiled versions for node 6 yet. If you try node 4 you should be able to download https://mapbox-node-binary.s3.amazonaws.com/mapnik/v3.5.13/Release/node-v46-linux-x64.tar.gz no problem. I don't think your issue is identical to this one |
I also came across this original issue when updating the Elastic Beanstalk configuration to v2.1.3 which also required me to update npm and node versions to resolve some other unrelated errors. The |
FWIW I tried running the command:
...with the thought this would change the owner to the ec2-user and then this user would have access to the folder during the preinstall, but this did not work. :-/ |
I have spent way too much time trying to debug this issue due to the painfully slow deployments on Elastic Beanstalk. This is not specifically a mapnik issue, but is more of an issue on the AWS Elastic Beanstalk side. The This also makes Immutable updates impossible because initial deployment to the new instances always fails, as there is no retry, and AWS stops the deployment. Rolling updates attempt to retry the deployment and it is this second retry deploy that works. Node: 4.4.6 At some point I will try to create a post on the AWS support forums, but given this work around sort of works, I'm not sure when I may get to it. EDIT: Looks like BHare1985 already created a post on AWS forums, but it didn't get much attention. https://forums.aws.amazon.com/thread.jspa?messageID=734162򳏒 |
I agree, but thanks everyone for detailing the issue. i'm going to close this now since there is no clear action to be taken in node-mapnik. Bundling is not desirable and if it triggers other bugs, then those need to be solved in the tools causing them: npm or aws. |
In regards to the command failing the first time around , I believe commands are ran post-app deploy. I had luck with this. Also better to limit /tmp to ec2-user rather than 777
|
I believe that an alternative (better?) solution to changing the |
Recently ran into this issue as well. We tried setting permissions but that didn't seem to work, it seems the main reason is that the Here is what we did:
|
it is still not working |
@vimmisinghani it looks like that's not a permissions error. |
The pull request #658 solves the issue;
I am documenting that this node-pre-gyp permission issue was caused from preinstalling node-pre-gyp.
Node 4.4.3 on Linux 4.4.8-20.46.amzn1.x86_64 (AWS Beanstalk) and mapnik 3.5.13
I am getting permission errors when running the preinstall of mapnik.
It seems as if all the other node modules get installed into /tmp/npm- with root as the owner but node-pre-gyp gets it's own folder but ec2-user as the owner. ec2-user is the default user for AWS beanstalk, so I making the assumption that
preinstall
commands get ran as the non-root user (ec2-user) but node dependencies get ran as root.Therefore, you cannot install mapnik/node-pre-gyp on Amazon beanstalk because of permission issues. Possible work around is to include a ebextention script setting /tmp as 777 (not recommended)
The other work around I have success with is to fork node-mapnik and revert back to when node-pre-gyp wasn't preinstalled but bundled (Essentially what #658 is doing). This has been confirmed as installing without issue.
Issue was originally created at : mapbox/node-pre-gyp#220
The text was updated successfully, but these errors were encountered: