amazon-ec2

Document base /home/ec2-user/myproject/web does not exist or is not a readable directory

[亡魂溺海] 提交于 2021-01-28 12:20:51
问题 I am deploying my project to AWS with Apache Tomcat 7. I added the ROOT.xml into Catalina/localhost/ like this <Context path="/" docBase="/home/ec2-user/myproject/web" workDir="/home/ec2-user/myproject/work" crossContext="true"> </Context> Starting Tomcat gives me the famous exception of Tomcat, but sadly, I cannot resolve it java.lang.IllegalArgumentException: Document base /home/ec2-user/myproject/web does not exist or is not a readable directory at org.apache.naming.resources

Error: The provided credentials do not have permission to create the service-linked role for EC2 Spot Instances

老子叫甜甜 提交于 2021-01-28 12:01:50
问题 I'm running into an error when creating a spot fleet request through cloudformation. The request is created but I'm getting the error mentioned in the title when the fleet attempts to request an instance. The permissions needed are described in here, however when I try to follow the steps to create the AWSServiceRoleForEC2SpotFleet role I don't have the option to choose "EC2 - Spot Fleet", only EC2 FLeet. What's odd is that when I create the CF stack it actually does create that service

springboot application shutsdown automatically on ec2

给你一囗甜甜゛ 提交于 2021-01-28 11:23:11
问题 I deployed my springboot application on ec2 (ubuntu as t2.medium size, AWS AMI as t3.medium size) In my local pc, there is no problem.. but on the ec2, after few hours (during I dont work) It died by itself I just wanted to check what happened when shutdown so I made a below java class as ContextClosedHandler.. but It seems no help for me @Component public class ContextClosedHandler implements ApplicationListener<ContextClosedEvent> { @Override public void onApplicationEvent

Where is my jar in Elastic Beanstalk EC2

两盒软妹~` 提交于 2021-01-28 09:19:32
问题 I'm new to Elastic Beanstalk, but not to AWS. I just spawn new EBS with sample java app (Java SE) and managed to make it run. Since I'm used to create EC2 instance manually, I login into my EC2 but couldn't find where my sample jar app is deployed. My question is: where is my JAR deployed within EC2, in which directory? Best regards, Bromo 回答1: This will be AMI dependent you will need to check the document for the specific AMI you are using. It will either run your app with an embedded

APACHE, PHP Server return randomly empty response

感情迁移 提交于 2021-01-28 08:40:21
问题 I'm having 9 ubuntu servers (EC2) working behind a ELB, The servers seem to response a empty response randomly even if the request is send not from the ELB, No error log was captured on the Apache monitor, No special timeout, or 408 is captured on the access log, Both return status 200, The only thing i can see different between a request with a response and a request with an empty response is the headers which: Good Response headers: Cache-Control: no-cache, must-revalidate Connection: close

how to create a policy of ec2 cloudformation with instancetype t2.micro

回眸只為那壹抹淺笑 提交于 2021-01-28 05:24:56
问题 I am trying to create a policy where some user can lauch instance with amid:ami-0fc61db8544a617ed specific and instancetype:t2.micro in a specific region with specific storage like 8gb I have this template AWSTemplateFormatVersion: 2010-09-09 Description: --- Policita para usuarios test Parameters: GroupTest1Parameter: Type: String Default: GroupTest1 Description: Este es el valor de entrada GroupTest1Parameter Resources: PolictyTest1: Type: AWS::IAM::Policy Properties: PolicyName:

How to get all security groups through AWS CLI of an EC2 to show in a table

核能气质少年 提交于 2021-01-28 05:06:32
问题 I am trying to show all instances along with attached security groups, block device name and their deleteontermination status. I need to show this data in table format but I am continuously getting the below error. Kindly help me to understand what I am missing here. PR-MacBook-Pro:~ pr$ aws ec2 describe-instances --output table --query 'Reservations[*].Instances[*].[InstanceId,SecurityGroups[].GroupName,Placement.AvailabilityZone,BlockDeviceMappings[].DeviceName, BlockDeviceMappings[].Ebs

pip installs modules for python2.7 instead of python3.4

拟墨画扇 提交于 2021-01-28 04:40:12
问题 I have an Amazon EC2 instance. On that was just python 2.7 installed. So I installed Python3 with the command "sudo yum install python34". Then I tried to install modules with "pip install package". The terminal told me, that I can upgrade pip. So i upgraded pip. No my instance either find the command pip or pip3. I googled and find that I have to use "python -m pip install SomePackage" I installed a module and tried to start one of my scripts with "python3 script.py" I got the information

Lambda function to check if specific tag do NOT exists-python

给你一囗甜甜゛ 提交于 2021-01-28 04:01:55
问题 I'm trying to get following: Get all EC2 instances that either: are Tagged with tag Owner and value Unknown or unknown are missing tag Owner I'm able to accomplish 1) but no idea how to get 2) import boto3 import collections import datetime import time import sys ec = boto3.client('ec2', 'eu-west-1') ec2 = boto3.resource('ec2', 'eu-west-1') def lambda_handler(event, context): instance_ids = [] reservations = ec.describe_instances( Filters=[ {'Name': 'tag:Owner', 'Values': ['Unknown', 'unknown

Android: How to solve the emulator error while installing it on ec2 instance?

时光怂恿深爱的人放手 提交于 2021-01-28 03:11:32
问题 i am trying to run following command $ANDROID_HOME/tools/bin/sdkmanager "emulator" getting error Warning: Failed to find package emulator trying to install android SDK viva command line I did install a build tool, platform tool . but when I am trying to install emulator its shows no package available. When I run /sdkmanager --list it's not showing emulator in Available Packages. Does the emulator depend upon CPU n OS ? 来源: https://stackoverflow.com/questions/61065034/android-how-to-solve-the