I have a few elastic beanstalk components being monitored and I occasionally get the EnvironmentHealth alerts. When I get that alert, how do I figure out what was the root cause of the alert? In other words what triggered the alert. I tired looking through this documentation: https://docs.aws.amazon.com/elasticbeanstalk/latest/dg/environments-health.html. Couldn't figure out.
Related
I tried to setup-up a custom jenkins image, based on the redhat jenkins image. The redhat jenkins image, has the Openshift Login Plugin, installed already.
After, the image started up properly, I tried to login, with my Openshift credentials, but it didn't work.
I just saw the the following error message:
"error":"invalid_request","error_description":"The request is missing a required parameter, includes an invalid parameter value, includes a parameter more than once, or is otherwise malformed.","state":"xxxxxxxxxxxxxxxxxxx"
and there was another message in the OS terminal of the running pod.
I read about several other issues from the Openshift Login Plugin, but also an update to Version 1.0.12 didn't fix my problems.
My Problem was, that I didn't knew, that each Openshift Service Account has a redirect reference - specially configured for one deployment.
I already used the Service Account, I used for the above mentioned Jenkins, for another Jenkins Deployment, because of this Openshift added the redirect reference, configured for this "older" deployment.
In our Openshift Setup (3.11), you aren't able to find the redirection configuration within the Service Account settings that you can find under Resources --> Membership --> Service Accounts. Instead you have to look and edit the YAML File of the Service Account, that you can find under Resources --> Other Resources --> Service Account.
serviceaccounts.openshift.io/oauth-redirectreference.jenkins
Since this is quite tricky to find out, I hope that I could possibly save somebody a few hours of searching.
I have a starter (free) tier account with Openshift online. I have an application consisting of two pods, a Node and a Mongo. The pods build and deploy; from the terminal that executes in the web console on the running Node pod I can run curl localhost:8080 and the Node process obligingly spits back my base page.
I have a route that was autogenerated; the web console gives me a link to <myappname>.stuff.starter-east-1.openshiftapps.com and appears to correctly reference the Node service that sits on top of the running Node pod.
However, when I point my browser at that hostname, I get the Openshift error page that tells me that either the route or path was not typed correctly, or the pod isn't running.
I have tried this with my own code and with the example node packages and I see the same thing.
When I use the oc tool to query things about my application, I see that I don't have a router resource - but the route claims to have been exposed on a router. So I think I'm using some kind of default router in the node, and I don't have to launch one in my project, but I'm not sure. Most of the other questions around this topic are for people using the Enterprise product and running on their own hardware, where they have more control at the admin layer over the router package; all the suggestions seem to imply that for the Online product this 'just works'. Any ideas what I am missing?
Update : After some period of time, the example project did work and a browser request was serviced with the basic example page. Looking at the two setups I cannot see any differences, or why my route (in my custome app) never gets activated but the sample project route does.
Turns out the issue was that my application (node) was listening to localhost:8080, when it needs to be listening to 0.0.0.0:8080. I'm not enough of a networking guy to explain why that matters to the router but it does.
Elastic Beanstalk notifications to an SNS topic do not send all the log messages.
For example when deploying a new version, it only sends:
"New application version was deployed to running EC2 instances."
However I don't get messages like this even though they seem to be the same log level:
"Environment update is starting."
"Environment update completed successfully."
Is there a way to rig it to send all logged messages, or do I have to do that with some CloudWatch alert?
Messages like "Environment update is starting" and "Environment update completed successfully" should appear on your console in Elastic Beanstalk. Are you saying you never see this event messages? Is it possible that they scroll past very fast in your console?
These events are archived so you can click on "Show all" in the console to see old events. You can also use the DescribeEvents API to get archived messages for your environment.
Does deploying via eclipse on elastic beanstalk with "Rolling updates" enabled on beanstalk work?
I am trying to use eclipse sdk to push out updates i make in a rolling fashion to elastic beanstalk and somehow all my instances are getting updated instantaneously instead of the rolling fashion..
Rolling updates are not supported in beanstalk for app version changes.. They are supported for only env changes.. See the blogs below.. As on today web deployments or version updates cause a brief downtime because beanstalk updates all servers at once..
Following URLs are https urls: I cant add the entire link coz outlook is acting over smart and mod'ing the links
https://forums.aws.amazon.com/thread.jspa?messageID=502158񺦎
https://forums.aws.amazon.com/thread.jspa?messageID=328344񐊘
https://forums.aws.amazon.com/thread.jspa?messageID=506438񻩆
You can do something like this:
https://forums.aws.amazon.com/message.jspa?messageID=258782
I am trying to customize the default AMI of beanstalk, but everytime I get server restarts after some random time. I went so far as not to change anything, but nothing works.
I have tried the following:
find the instance of running beanstalk, create AMI, modify the AMI of beanstalk-crashing
create new instance with same AMI as on beanstalk, create AMI, modify configuration-crashing
I have tried both stopping the instance before creating AMI, and creating AMI of running instance.
Edit: I found the answer here: Can't generate a working customized EC2 AMI from Amazon Beanstalk sample appl
From personal experience, place the health status page to point to a dummy, static .html file. Although not recommended, this will prevent the health checks from restarting the machine and you could make more inside inspection.
AWS captures into the S3 logs only the ones output via java.util.logging. It means all console logging is not transferred.
That said, make sure you define an private key in your environment config, so you could ssh to it easily and see its output (it changes - for Tomcat 7, it is at /opt/tomcat7. For tomcat6, it is under /usr/share/tomcat6)
Just to add to what aldrinleal wrote (can't comment yet): In the past, I would often find a failed Healthcheck would also disable my site. By which I mean: If you have the health check on your actual app and that app threw an exception, you wouldn't actually get to see anything, the environment would just report a failed state. Only after I changed to a static file for the health check, did I manage to see the errors.
Now I obviously this is more a problem with a dev environment and you can always just pull the logs. But especially in the beginning as someone new to AWS/Beanstalk this helped me a lot.