-
-
Notifications
You must be signed in to change notification settings - Fork 365
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
Error when deployed from Windows #80
Comments
Hi, you will need to have a look into the logs on cloudwatch (or using |
I am getting the same error... here are my logs from cloudwatch 2018-11-05T02:23:18.961Z c2533785-e0a1-11e8-a0d3-edabfbcdb17b Error: spawn EACCES |
@g87andres is it with Laravel too? Have you changed Please try removing the |
@mnapoli and @g87andres. I have the same cloudwatch error logs as well. After researching online, it has something to do with the read permissions on the zip file generated and upload to S3. I am using a windows machine. Is there a way to ensure the zip file has the correct read permissions on it? Some of the suggestions I found were adding the "mode" property to the severless.yml file for this:
|
Oh that's interesting, @g87andres are you on Windows too? @paulkamau2015 you can edit the |
@mnapoli , I did try updating the serverless.yml but it did not work, unfortunately. the same error appears. I also tried to set the permissions to "everyone" on S3 for the zip file but that did not work as well. |
Yes I am on windows as well. If I deploy the same code via a Linux VM everything works fine. Very odd |
@mnapoli and @g87andres, Is there anything that can be done for people with windows machines? I would really love to get this working. |
@paulkamau2015 I have no idea as I do not work with Windows. We have to find a solution together :) Have you looked into the "serverless" project issues to see if there's an open issue there? Feel free to link interesting issues/links here so that others can investigate too. |
This is because the php binary needs to be given execute permissions which Windows is unable to do. The solution would be to deploy from a VM or container. |
Right that seems like a lost cause, though I'm not a Windows expert :/ See adieuadieu/serverless-chrome#21 they seem to have the same problem (I guess they deploy the Chrome binary, and if you deploy from Windows the binary is missing the execution permissions). Help is welcome! |
Hi, Just to unfortunately confirm the same bug. Just followed the sample on the readme and got "Internal server error" from API endpoint. Then tested directly in lambda and this is what it is shown (not really helpful) If this is permission issue from Windows then we need another way to deploy. Did the exact same tests on Ubuntu and no issue during deploy command, which kind of confirm this is Windows related issue. Maybe create a docker during deployment process to help to deploy to Lambda? |
Did more testings about this error using the Bref readme as sample. Test 1 Test 2 Test 3 Test 4 Test 5 Will continue to investigate as it is important to be able to use Bref from any OS to help having more people interested in it. But for now the best for Windows user (like me) is to develop in dual-boot or use VirtualBox with Ubuntu or LinuxMint or any other flavor to directly develop your app. |
More investigations by comparing a ZIP from Windows not working and a ZIP from Linux working. I think the issue is in the exec flag not set from a Windows ZIP on the php binary and the opcache modules. @mnapoli Should we continue to investigate this issue or will it be resolved if you change the logic to use a layer in lambda? |
Yes so in #99 I check out AWS SAM and this is a serious alternative to Serverless. I think it's very likely v0.3 of Bref goes that way. However I don't know if SAM works on Windows? https://github.com/mnapoli/bref-bootstrap-benchmarks uses SAM btw if you want to try it out. |
@mnapoli I did not try the 0.3 yet, but for what I read this should resolve this issue once and for all. Correct? |
At the moment it's not stable at all. But I don't know if AWS SAM is compatible with Windows. If it is then yes it will probably work much better. |
AWS SAM seems to be compatible with Windows so v0.3 should solve the problem (https://docs.aws.amazon.com/serverless-application-model/latest/developerguide/serverless-sam-cli-install-windows.html). |
I'll close this for now since 0.3 should fix this. If there are still issues let's open a separate issue because the whole discussion here will be obsolete (v0.3 changes a lot of things regarding deployment). |
After a successful completion of the entire Laravel set up and receiving my API endpoints when running "
vendor/bin/bref deploy
", I keep getting the following error when hitting my endpoint:The best thing i can find in the logs is this:
`Process exited before completing request
`Any ideas to fix this?
The text was updated successfully, but these errors were encountered: