It's my first time deploying something to AWS using Elastic Beanstalk and so far I've gotten to the point where I can run eb create and get started. The first time I did this I got Errno 13. Specifically, I got to the point where it tried to create the application and then:
Creating application version archive "app-150423_212419".
ERROR: IOError :: [Errno 13] Permission denied: './.viminfo'
I learned that this is a root access issue and so I followed a step found here that stated I should try the bash command:
sudo chown -R test /home/test
Here test = my user name and home = Users.
This got me to the error ERROR: OSError :: [Errno 2] No such file or directory: './.collab/ext'
I'm really not sure what that directory is supposed to be or why it's trying to access it. How can I choose a proper directory so that I can get things up and running?
eb create will attempt to zip up your entire directory and deploy it to an elastic beanstalk environment. I am not sure why certain files seem to not exist(maybe you have some symlinks?).
It also looks as if you might be trying to run eb create in your home directory. Dont do that. In fact remove the .elasticbeanstalk folder from your home directory right now.
All you need to do is go into your project directory, run eb init, then eb create.
Related
I'm trying to get a simple dotnet lambda up and running using the Rider AWS toolkit - starting with the SAM HelloWorld sample project, but in creating, I run into this error
java.util.concurrent.CompletionException: java.lang.RuntimeException: Could not execute `sam init`!: [Cloning from https://github.com/aws/aws-sam-cli-app-templates, Error: Unstable state when updating repo. Check that you have permissions to create/delete files in C:\Users\user_name\AppData\Roaming\AWS SAM directory or file an issue at https://github.com/aws/aws-sam-cli/issues]
I checked the permissions on that directory, and I should have full read/write. I'm not seeing anyone else running into this particular problem online. Is this indicative of any other steps I missed along the way?
The root cause is apparently a long filename issue. There is a workaround here: https://github.com/aws/aws-sam-cli/issues/3781#issuecomment-1081263942
What I did was:
Using regedit set HKLM:\SYSTEM\CurrentControlSet\Control\FileSystem\LongPathsEnabled" to 1
With admin permissions, run git config --system core.longpaths true
I'm trying to deploy laravel app to aws beanstalk, OS is Amazon Linux 2 AMI.
I've setup following files:
.ebextensions/01-deploy-script-permission.config
It contains below code:
container_commands:
01-storage-link:
command: 'sudo chmod +x .platform/hooks/postdeploy/post-deploy.sh'
And
.platform\hooks\postdeploy/01-post-deploy.sh
It contains below code:
php artisan optimize:clear
Upon deploying it fails with following entry in eb-engine.log file
[ERROR] An error occurred during execution of command [app-deploy] -
[RunAppDeployPostDeployHooks]. Stop running the command. Error:
Command .platform/hooks/postdeploy/post-deploy.sh failed with error
fork/exec .platform/hooks/postdeploy/post-deploy.sh: no such file or
directory
This answer is for users who are using Windows to deploy their files to elastic beanstalk.
I found this information after spending 6 precious hours. Probably not documented anywhere in official documentations
As per this link "https://forums.aws.amazon.com/thread.jspa?threadID=321653"
psss: most important that the file is saved with LF line separator.
CRLF makes "no file or directory found"
So I used Visual Studio Code to convert CRLF to LF for files in .platform/hooks/postdeploy
At the bottom right of the screen in VS Code there is a little button
that says “LF” or “CRLF”: Click that button and change it to your
preference.
I don't know for sure but I think you are running the command before the files are even created hence getting the following error.
A while ago I faced the same kind of problem where I wrote migration commands in .ebextension and it used to give me an error because my env file wasn't even created yet hence no DB connection is made so I was getting the error. Hope this will give you a direction.
By the way, I resolved the problem by creating env then pushing these commands through the pipeline.
Deploying my app on AppEngine locally from Terminal, I followed standard procedure with gcloud app deploy
However, after the initial deployment steps, I got an error:
ERROR: gcloud crashed (OSError): [Errno 2] No such file or directory: '/Users/my_username/Library/Caches/Google/Chrome/Default/Cache/f_029b9c'
I changed to that directory and ran ls and sure enough there were a ton of files, but not that one. I haven't changed anything since deploying it for the first time yesterday...any ideas?
I've setup a flask app on my mac and am trying to return data from the flickrapi (stuvel) to a page. I can run flickrapi functions successfully from command line. However, when flask tries, I get an internal 500 error which the logs show as being:
OSError: [Errno 13] Permission denied: '/Library/WebServer/.flickr'
Doing some searching, I found the the user running my script with flask has insufficient permissions. Whereas the user at the command line has sufficient permissions.
So, i got it working by editing my apache's conf file, and switching httpd to run as the same user and group as my command line, instead of "_www"
...Now... is this going to give me trouble later? Will I run into this when I deploy to a live server?
And finally, why is a ".flickr" file being created in OSX's default web server folder, as opposed to the folder I have set up for my development site via my virtual host settings? I suspect that if this file was being placed in the correct folder, this would not be a problem. Is that an flickrapi setting? Flask setting?
Thanks for any help!
For me location of this folder should be configurable.
I have created issue for that: https://github.com/sybrenstuvel/flickrapi/issues/68
You can disable this option by setting: store_token=False
flickr = flickrapi.FlickrAPI(self.KEY, self.SECRET, format='parsed-json', store_token=False)
The complete error is:
Failed to initialize central HHBC repository:
Failed to initialize schema in /home/shreeram/.hhvm.hhbc:
I am trying to configure hhvm ana apache2.
For that i am following this link how-to-setup-hhvm-on-ubuntu-14-04-server-with-apache-2-4-part-1/
In above link i am stuck in the step when i put this command in the terminal:
curl -sS https://getcomposer.org/installer | php
The result of that command is the error mentioned above.
The shreeram directory has both read and write permission.
Could anyone help me to understand what i am missing there?
Are you sure permissions are correct on /home/shreeram, and that /home/shreeram/.hhvm.hhbc is readable and writable by the user running php? This issue really does sound like a permissions problem.
As the same user that was running php, does touch /home/shreeram/.hhvm.hhbc work? What about echo > /home/shreeram/.hhvm.hhbc?
If that's all fine, try rm /home/shreeram/.hhvm.hhbc and then try to install Composer again. Although it's typically a permission error, there are cases when the repo can become corrupt (particularly if the enclosing directory is on NFS or some other network filesystem) and you can just remove it and start over.