Symlink causing Unknown job: gunicorn error - symlink

I followed the instructions given me here: https://stackoverflow.com/a/29371878/2532070
But the use of a symlink with my gunicorn.conf file is causing my startup script not to work, giving the Unknown job: gunicorn error.
I've tried using init-checkconf /etc/init/gunicorn.conf which returns syntax ok.
I'm guessing there's some kind of error with references or permissions but I can't figure it out via googling or searching here. Thanks for any help!

Symlinks don't automatically work if you're using upstart.
The solution was to use:
initctl reload-configuration to enable symlinks with gunicorn

Related

Trouble getting started with AWS Lambda locally

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

AWS Beanstalk Laravel post deploy hooks no such file or directory

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.

Vagrant up - execute sh file fails

I have a simple vagrant file which calls sh file in the provision phase:
Inside script.sh I have wget command that fails with error 403 (Forbidden).
Same error I get when running the script manually from the VM. But If I create new sh file with the SAME CONTENT, then wget will pass successfully!
*I know there is several ways in vagrant to do provisions, but please stick on this specific use case.
Your help is much appreciated.
I found the root cause of this strange behaviour.
Since I have created the sh file in MAC env it was not compatible with unix line endings format. running "dos2unix script.sh".
For detialed information visit:
http://dos2unix.sourceforge.net/

Fatal error: Class 'Magento_Db_Adapter_Pdo_Mysql' not found in app\code\core\Mage\Core\Model\Resource.php on line 165

I've done quite a bit of searching and have been unable to find anything out about this error.
When i try to disable the compiler in the shell like so:
compiler.php disable
My cmd just keeps running and eventually crashes everything.
Any help would be greatly appreciated.
I've also cleared my cache and restarted the server several times. I need to figure this out.
Try changing rights of files.
I was getting this error prior to chown all files.
chown webuser:webuser -R .

WKHTMLTOPDF and "Error: Unable to create temporery file"

I've written a piece of code in PHP to generate PDF using WKHTMLTOPDF binary file. It was working fine till I had to recompile my Apache. Now it fails with error Error: Unable to create temporery file (this is the exact wording).
The situation in which the error is reproducible is a little complicated. I managed to narrow down the error and now I'm pretty sure that the error happens because of the user that Apache runs as. It seems to me that when WKTHMLTOPDF is running as a user with no home folder, it's unable to access a temporary folder within the user's home folder.
Surely I can change the Apache's user but I would rather resolve this problem once and for all. To this end it would be great if I could somehow set the temp folder for WKHTMLTOPDF or at least print its current value to make it valid! Does anyone know how to do any of these two?
BTW, I'm using WKHTMLTOPDF 0.11.0 rc1.
I saw the same error today in Rails4 + pdfkit gem(0.8.2) + wkhtmltopdf(0.12.2.1) under CentOS 6.7.
This error came from wkhtmltopdf and the reason was it couldn't create temporary file. wkhtmltopdf depends on some temporary filename creation API (I'm not sure), but probably following shows some hints:
$ man tempfile
$ man tempnam
In my case, my TMPDIR environment variable showed wrong path (I had accidentaly deleted the directory!) so that wkhtmltopdf couldn't create work file.
When I unset TMPDIR, then it worked! Of course, setting correct existence directory to TMPDIR should be OK too.

Resources