Comments (19)
Did more testings about this error using the Bref readme as sample.
Test 1
create in Windows and deploy from Windows => Internal server error
Test 2
create in Windows, use VirtualBox with LinuxMint with shared folder, deploy from Linux => Internal server error
Test 3
create in Windows, use VirtualBox with LinuxMint with shared folder, copy files into linux, deploy from Linux => Internal server error
Test 4
create in Linux, deploy from Linux => Success
Test 5
create in Windows, deploy from Windows adding the "mode" parameters in serverless.yml as discussed in this thread => Internal server error
I have checked the serverless doc and there is no reference to this "mode" variable (Serverless.yml Reference)
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.
from bref.
Hi, you will need to have a look into the logs on cloudwatch (or using vendor/bin/bref logs
).
from bref.
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
at exports._errnoException (util.js:1018:11)
at ChildProcess.spawn (internal/child_process.js:319:11)
at exports.spawn (child_process.js:378:9)
at exports.handle (/var/task/handler.js:39:18)
from bref.
@g87andres is it with Laravel too? Have you changed serverless.yml
or handler.js
in any way? What is your Bref version?
Please try removing the .bref
directory and try deploying again.
from bref.
@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:
mode: 0644 # change mode for all files
include:
- handler.js
- bref.php
from bref.
Oh that's interesting, @g87andres are you on Windows too?
@paulkamau2015 you can edit the serverless.yml
file and try that?
from bref.
@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.
from bref.
Yes I am on windows as well. If I deploy the same code via a Linux VM everything works fine.
Very odd
from bref.
@mnapoli and @g87andres, Is there anything that can be done for people with windows machines? I would really love to get this working.
from bref.
@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.
from bref.
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.
from bref.
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!
from bref.
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?
from bref.
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?
from bref.
@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.
from bref.
@mnapoli I did not try the 0.3 yet, but for what I read this should resolve this issue once and for all. Correct?
from bref.
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.
from bref.
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).
from bref.
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).
from bref.
Related Issues (20)
- Long running CLI commands repeat every 2 minutes HOT 1
- Troubleshooting Bref Docker Deployment with Octane Handler
- Symfony CLI DATABASE_URL Not Found HOT 1
- Can I fire putJobSuccessResult event from AWS Lambda which is developed with Bref? HOT 1
- Feedback for “Custom domain names” HOT 1
- I am getting this issue :-
- OPENSSL_3.3.0' not found (required by /opt/lib/libssl.so.3) HOT 10
- Stopping 1.x maintenance
- Feedback for “Serverless Laravel - Getting started” HOT 3
- NOTICE since upgrading to v2 HOT 1
- Brefv2 500 Errors Not In Logs HOT 5
- PHP ext-intl is required on layer 8.3 HOT 1
- CURL SSL_ERROR_SYSCALL calling another Lambda HOT 7
- Env always return null after update packages to bref 2 version
- max_execution_time not working HOT 3
- Laravel 11, PHP 8.3 mysql driver not enabled, also can't use postgress
- Bref Serverless v4 HOT 12
- php (not fpm) with BREF_LOOP_MAX=1 is 2x slower than php-fpm
- PDO_SQLITE version HOT 3
- Invalid configuration encountered: at 'functions.app.image': unsupported string format HOT 3
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from bref.