Where can I find the equivalent of detailed Heroku logs on AWS? - amazon-web-services

I have a ruby application that I used to deploy and run on Heroku, but recently switched to AWS by using Opsworks. The application is running just fine, but I had a question about detailed error logs.
On Heroku, I could just type heroku logs and get detailed logs that would help me troubleshoot errors I saw in my application. However, I can't quite find the equivalent in AWS. I've tried going into my ec2 instance and into /var/log/ to find the detailed logs I need. The closest thing I found was going into the /ngninx folder and viewing the [app_name].com.acess.log file. I get logs, but they are not nearly as detailed as what I saw on Heroku.
As a result, troubleshooting is really difficult so far on AWS. Does anyone know of a location to some detailed logs or a way to enable some if they do not exist by default?
Any insight would be really helpful : )

You can find the log on AWS OpsWorks by doing something like this :
sudo su deploy
cd /srv/www/[app_name]/shared/log/
There you can find the logs, for example probably a production.log or unicorn.stdout.log

Related

Check which ebextensions have been run

I have an environment in Amazon Elastic Beanstalk that is proving problematic. I'm trying to check which ebextensions have run because there is an oddity where I see a logrotate conf file created but the contents are not what I've written.
Does anyone know which log file I can find that information in? I've tried /var/log/eb-engine.log but that doesn't seem to have anything about running ebextensions. eb-activity, and eb-commandprocessor are mentioned in the docs but they don't exist on the instance.
Platform: Ruby 2.6 running on 64bit Amazon Linux 2/3.0.3
As Amazon Linux 2 is still being worked on some log files aren't available yet. So says AWS Support.
However, you can see which ebextensions have been run by looking in cfn-init.log, and cfn-init-cmd.log.
I was searching for the file names rather than the command names so I couldn't see where the results were being logged.

Elastic Beanstalk Degraded error not showing any details with Laravel install

I'm currently uploading a Laravel package to Elastic Beanstalk and I am receiving a "Degraded" error with no details. Here is what I've done.
When I upload the package status is Ok when I go to the url provided by EB I get a "forbidden" message on my browser.
This is to be expected since the actual path for Laravel is /public.
I then go to Configuration: Software then I modify Document root to /public this then gives me a Degraded errorunder Health Degraded Causes there are no errors. I've also followed AWS way of enabling the enhanced monitoring and it still doesn't show anything. Any ideas what I'm doing wrong?
I found the solution for this. The problem was that I was manually compressing my directory with .zip
According to AWS Documentation it should be done like so:
~/myapp$ zip ../myapp.zip -r * .[^.]*
More details found here:
creating a source bundle

BlockChain : Issue setting up dev environment for hyperledger fabric

I am a beginner in the blockchain technology and wanted to get some hands on by setting up a dev environment for hyperledger fabric.
I tried to setup the dev environment and was following the official documentation at https://hyperledger-fabric.readthedocs.io/en/latest/getting_started.html
In the step when I call the script network_setup.sh to bring the network up, It fails at the last step with an error as -
...
...
Trying to pull repository docker.io/hyperledger/fabric-testenv ..
Pulling repository docker.io/hyperledger/fabric-testenv
ERROR: Error: image hyperledger/fabric-testenv not found
The image itself is not available in the repository and hence the script fails.
Can someone guide me on how to overcome this and where can I find good references for setting up a fabric dev environment.
Yes, something blew up, so the URL had to be changed. The instructions have been updated, and the curl command points to a new URL now. Try it again, should work now. change logged here https://gerrit.hyperledger.org/r/#/c/8591/

Update Parse-Server-Example

I thought it would be a topic to find easily on the web, but I couldnt find a solution..
I deployed the parse-server-example on AWS Elastic Beanstalk according to the original documentation and it works perfectly. Can anyone give me a hint how to update this server to the newest version? I try to use the parse-dashboard and I get the error "server version too low".
I cloned the parse server with eb cli already. But I do not know how / which files to update.
Thanks for any hint!
In package.json, you update the version next to 'parse-server'. I think by default this is '~2.0'?
Parse Dashboard requires Parse-Server to be '>=2.1.4', HOWEVER, currently I'm having issues when changing the parse-server version, it breaks my AWS server instance. Currently have an issue open on GitHub (https://github.com/ParsePlatform/parse-server-example/issues/109#issuecomment-198001722), so keep an eye on that.
But yeah, that's where you update your Parse-Server version, I believe!
Once you've done this locally on your machine, you obviously need to deploy the updates to AWS via the Beanstalk Dashboard, as this will install/update any node modules from package.json.

Deploying django project on AWS elastic beanstalk

I am following the tutorial for deploying a django project on AWS elastic beanstalk here:
http://docs.amazonwebservices.com/elasticbeanstalk/latest/dg/create_deploy_Python_django.html
My app works when I test locally but when I deploy, I'm getting a 404 error. Looking at the event logs, I see this message:
Error running user's commands : An error occurred running '. /opt/python/ondeck/env && PYTHONPATH=/opt/python/ondeck/app: django-admin.py syncdb --noinput' (rc: 127) /bin/sh: django-admin.py: command not found
That leads me to believe that the tutorial is missing a part about installing django files on the server or at least configuring my project to recognize django-admin.py. I have django installed on my local machine so it works there.
I know python support is brand new for elastic beanstalk but has anyone deployed django to it?
I believe you don't need to put container_commands in .config because there is no database or table at this moment.
Did you made the step?: Freeze the requirements.txt file.
(djangodev)# pip freeze > requirements.txt
Note
Make sure your requirements.txt file contains the following:
Django==1.4.1
MySQL-python==1.2.3
I had the same problem because I skipped it. Once I did it, add, commit and push. It works!
I followed the same tutorial recently and had a similar result.
At step 6, upon seeing the default django 'congrats' page render locally, I deployed to EB as instructed and got a 404 instead of the default 'congrats' page.
I decided to use the code up to that point as a foundation for following the 'getting started with django tutorial' which led me to a successful rendering of a 'home' view. This is a much more useful place to be anyway. I do agree that there is something wrong with the AWS tutorial and posted to the AWS forums here.
If you can, you should try to access the log file; it might give you a better idea of what's going on. Here's a link that might help:
http://docs.aws.amazon.com/elasticbeanstalk/latest/dg/using-features.loggingS3.title.html