Stack Exchange Network

Stack Exchange network consists of 175 Q&A communities including Stack Overflow, the largest, most trusted online community for developers to learn, share their knowledge, and build their careers.

Visit Stack Exchange

Questions tagged [amazon-ec2]

Amazon Elastic Compute Cloud (EC2), which allows users to rent virtual computer systems, is part of Amazon Web Services.

0
votes
0answers
11 views

How to resolve problems connecting to Samba4 Active Directory Domain Controller on Ubuntu Micro AWS Instance

I'm trying to set up a Active Directory Domain Controller on an Ubuntu 16.04 instance on Amazon's EC2 micro services. I do everything right (following at least three different tutorials) and get all ...
0
votes
0answers
19 views

How to set email alert for disk space usage for ubuntu instance on AWS?

I have an ubuntu instance on AWS and I want an email when 80% of disk space is consumed. I have checked the cloud watch but there is no such option to monitor disk space. There is only one option ...
1
vote
1answer
23 views

How to set environment variables permanently in Amazon Linux 2

I have experimented with many approaches to setting permanent environment variables EC2 instances running Amazon Linux 2, but none of the approaches are persistent across users and across login ...
2
votes
0answers
23 views

Can No Longer Login With Ec2-user After Creating A New User

I've tried looking in the forums before posting this but can't find anything that really addresses my issue. Very simply, my problem is in the topic: I created a new user, afterwards, I can login ...
1
vote
1answer
21 views

How does the BIOS work in a Xen virtualized environment?

On a physical machine, the BIOS is located on a chip that sits on the motherboard. How does with work in a Xen virtual environment? Any links to documentation/articles will be appreciated.
-1
votes
2answers
28 views

Unable to find a mapping between Ec2 volume and filesystem name from df

I am running out of space on a particular filesystem. I know this with the following command df -H $ sudo df -H Filesystem Size Used Avail Use% Mounted on udev 4.1G ...
1
vote
1answer
11 views

Return the private IP of an EC2 instance from within the EC2 instance

What specific syntax can be used to return the private IP address of an Amazon Linux EC2 instance from the command line within that instance? So far, I have come up with the following: # Get ...
0
votes
1answer
28 views

Ansible User module removes sudo configuration. Why?

An Amazon Linux 2 machine is configured with a user that can sudo without password as follows: # Add user sudo groupadd -g 2002 one-username sudo useradd -u 2002 -g 2002 -c "One Username Account" -...
0
votes
0answers
14 views

Run a section of AWS userdata as ec2-user

I am trying to pull some git repos in my EC2 userdata, but want to pull them as ec2-user rather than root. As I dont want the private key on the disk I am using ssh-agent to load a key from Parameter ...
-1
votes
1answer
20 views

Defining Ansible inventory on remote server

What specific changes need to be made to the code below so that the Ansible Playbook will know how to pull testFile.txt from ServerB into ServerA? These are both Amazon Linux servers. Note that ...
2
votes
1answer
191 views

yum lockfile is held by another user

Amazon Linux 2 instances are operated upon by an Ansible Playbook which performs multiple yum tasks one after the other. What specific changes need to be made to the syntax below in order for the ...
0
votes
1answer
21 views

multiple yum repos with name=packages-microsoft-com-prod

A group of Amazon Linux 2 instances have duplicate instances of name=packages-microsoft-com-prod in redundant yum repositories with different names. What is a safe way to remove the duplicate ...
0
votes
0answers
54 views

Automatically terminate lost SSH sessions

Sometimes when I'm on a sketchy internet connection like an airplane, my ssh session drops suddenly. When this happens, I want the sshd server to automatically kill the session after a few seconds, ...
1
vote
0answers
16 views

How to enable ZipArchive PHP class

Recently I have installed a PHP on Amazon Linux to run Chevereto. It's an image hosting service. When I wanted to install it on my EC2 instance, I got the following error: Aw, Snap! Your web ...
0
votes
0answers
15 views

Automatically java run if it stopped [duplicate]

Can i check java process using crontab (or other way) and if java process does not exist automatically perfom command: nohup java -jar /home/ec2-user/sringTestBoot-1.0-SNAPSHOT.jar
0
votes
1answer
21 views

How can i get alerted when EFS is unmounted fro Linux EC2 instance?

I do not want to use Cloudwatch want to use shell script for this , Could you please suggest? Actually i have written a script as below: But its not alerting me when the EFS is unmounted. #!/bin/...
0
votes
0answers
71 views

get back sudo with Putty: /usr/bin/sudo must be owned by uid 0 and have the setuid bit set

apparently I messed up too much with my permissions and now I'm getting this while trying to use 'screen' again: /usr/bin/sudo must be owned by uid 0 and have the setuid bit set If I try: chown root:...
0
votes
1answer
20 views

Redirect all non-root routes to index.html on Amazon Linux 2 and Apache

An Amazon Linux 2 instance is using Apache to host an Angular 7 app. The Angular 7 app includes not just index.html, but also several .js files and a subdirectory named assets. What specific ...
0
votes
0answers
19 views

SSM send-command to install esrally on ec2

I am trying to use SSM's send command to start esrally on a remote ec2 instance(amazon-linux). I install the tool using pip pip3 install esrally. However the issue I am facing is that SSM runs as root ...
0
votes
1answer
236 views

“sudo shutdown now” in my crontab @reboot

Now whenever my EC2 instance starts, it shuts down immediately, anyway to salvage this situation? OS: Ubuntu18.04
1
vote
1answer
68 views

Syntax error checking if file exists [closed]

A bash script running in Amazon Linux 2 is trying to test if a file exists. Then if it does exist, the script should delete the file. The following error gets thrown every time the script runs. ...
0
votes
1answer
145 views

Setup IP and port forwarding in AWS

I have a web server in AWS EC2 for example with http://11.22.33.44 listening to port 80. I would like to do something like port forwarding such as if I'm browsing the website IP from my home network ...
0
votes
0answers
65 views

Routing outgoing traffic between two NIC

I'm looking for a solution to proxify all the outgoing connections through several network interfaces so that they would appear to come from different IP's and I'm using Ubuntu 18.04 EC2's. What I ...
0
votes
0answers
12 views

vsftp on ec2 - not able to list directory with passive mode

I have installed an vsftp on an EC@ Linux instance. I can connect with active mode no problem, but with passive mode I get: Disconnected from server Could not retrieve directory listing Error ...
0
votes
0answers
9 views

vsftp on linux ec2

I have installed vsftp on Linux on an EC2 instance. I need to revoke the list privilege from one of the users. How can it be done? What I need is for the user to be able to upload files but not ...
0
votes
0answers
18 views

How to render visuals running on AWS EC2 instance to local?

I have a linux ec2 instance that I am logging into using putty from my windows laptop. I would like to develop a graphics intensive game in ec2 instances using pygame, opengl and pangolin. How do I ...
0
votes
2answers
349 views

How do I switch users on Amazon Linux for EC2 instances?

I saw How to change to normal user in the command line when logged in as the root user? How to switch between users on one terminal? I have access to sudo. I tried [ec2-user@ip-172-99-99-99 Weekly ...
1
vote
0answers
905 views

Multiple static IPs with netplan

on Amazon EC2 I want to set up multiple IPs on secondary Network Interface. whatever I do it sometimes fail to connect to secondary IPs, main word here is sometimes, thats why its very complicated to ...
0
votes
0answers
18 views

How to use “netatalk” to share files between my Mac and AWS EC2?

When I use the ubuntu machine at the office, a very nice feature is that I can share files in my finder just by drag & drop between my laptop and the ubuntu machine. But it doesn't work when I try ...
1
vote
1answer
48 views

What is the purpose of auditctl -a never,task?

I see that whenever I start a new ec2 server the default rule for auditctl is auditctl -a never,task What is the purpose of having this rule?
0
votes
0answers
89 views

SSH Error on AWS EC2

After connecting succesfully to AWS on the latest iMac through Bash Script 1: chmod 400 ~/PEM.pem ssh -i "~/PEM.pem" ec2-user@address.com jupyter notebook --no-browser --port=8888 Then opening a ...
1
vote
2answers
1k views

How do I configure my Amazon Linux service to auto-restart if it fails?

I'm using Amazon Linux. I have a script to start and stop a service, written in bash, located at /etc/init.d/wildfly At the various run levels, I have symlinks to ensure the script starts and stops,...
3
votes
2answers
333 views

Why is systemd-resolved restarting frequently?

After upgrading an EC2 instance to Ubuntu 18.04 I started getting occasional errors Resolving DNS for my database server in my PHP scripts like the following: Uncaught Exception: PDOException: PDO::...
0
votes
1answer
182 views

httpd hogging all memory until server crash

The server in question is used for processing data into reports, it has three cron jobs which execute every minute to check the process queue and if anything is found they'll keep running until the ...
0
votes
2answers
71 views

How does a EC2 machine prevents ssh root access with a warning?

I've setup a machine on EC2 running Debian stretch. Upon trying to ssh as root, I get the following message: $ ssh -i "mykey" root@machine Please login as the user "admin" rather than the user "...
1
vote
3answers
818 views

How can we generate the session token in aws

i have aws access key and secret key with me. i wanted session token to be updated in aws credential file (~/.aws/credentials), how will i get it? I want them to be generated in command line.
-1
votes
1answer
18 views

Can't access parallel Linux setup/environment

I installed a new EC2 instance (Ubuntu 18), followed these instructions for connecting via Putty, updated NodeJS and installed pm2 (these instructions). Everything worked well. I even set up a pm2 ...
0
votes
1answer
117 views

Host of issues stemming from too many symlink levels errors

On an AWS EC2 instance, I was upgrading imagemagick. Current installation was 6.8.x which is vulnerable, and I was moving it to 6.9.10-12 which if I read properly, I think it's patched. Somewhere ...
2
votes
0answers
239 views

REPO Error: HTTP Error 403 - Forbidden during firefox-compat install from AWS EC2 instance

tmp]$ sudo yum --enablerepo=epll install firefox-compat Loaded plugins: priorities, update-motd, upgrade-helper Could not retrieve mirrorlist http://repo.lambda-linux.io/2018.03/epll/x86_64/os/mirror....
1
vote
1answer
62 views

mysqldump on mariadb 10 extremely slow [closed]

I'm running a MariaDB 10.1.34 instance on AWS RDS. Instance specs are as follows: Instance Class: db.t2.large Storage: 100GiB gp2 DB Size: 1.2 GiB I'm trying to create a mysqdump from an EC2 ...
1
vote
1answer
160 views

local vs non-local chsh

How do I get chsh in Amazon EC2 (Linux 2)? $ chsh -s /bin/zsh zsh: command not found: chsh Here's what I see: $ ls -ahl /usr/bin/ | grep chsh -rwxr-xr-x 1 root root 16K Jul 27 21:02 lchsh ...
0
votes
1answer
53 views

RHEL Apache Test Page shown on navigation to EC2 IP address

I have a Django app that runs on 8080, apachectl configtest shows no errors and python manage.py runserver runs it without any errors. However the regardless of whether the app is running or not, the ...
2
votes
2answers
180 views

yum stopped wokring on my ec2 instance

I have an EC2 instance on which I was trying to install spark.I removed the required system python version from the system by mistake and nothing relying on python seems to work now including yum and ...
0
votes
1answer
64 views

What are potential reason where linux send SIGINT SIGTERM or SIGHUP to a python script that is not user initiated?

I am seeing that my python script in ec2 linux getting terminated for some reason. I am not sure why and how to debug it. I tried sending the output of nohup to a file nohup python my_script.py >...
0
votes
1answer
37 views

Allow a group to su to a user without a password in Amazon Linux

In Amazon linux on my ec2 server, how do I allow a group of restricted users to su to a specific user. Also I would like for them not to be prompted for password. I have a group called 'my-users' ...
0
votes
2answers
38 views

Unable to establish SSH connection between two AMI ec2 instances

Trying to establish ssh connection between two ec2 instances. Copied Host A id_rsa.pub key to Host B's authorized_keys file [root@ip-172-31-9-173 .ssh]# cat id_rsa.pub ssh-rsa ...
2
votes
1answer
46 views

Extend partition into grown volume

I had an Ubuntu VM which I imported into Amazon AWS. I then increased the volume size from 100GB to 1500GB. How can I extend the partition to use all of the new space. root@pbx-a:~# lsblk NAME ...
1
vote
0answers
60 views

What is “!!” command shown in top result

I run two drupal 8 websites on an amazon ec2 instance. They are portfolio sites. below is server details. [ec2-user@ip-xx-0-0-xx ~]$ uname -a Linux ip-xx-0-0-xx 4.4.15-25.57.amzn1.x86_64 #1 SMP Wed ...
0
votes
1answer
236 views

GLIBC 2.14 installation error: forced unwind support is required - RHEL 7.5

I have upgraded my RHEL OS from 6.7 to 7.5. After upgrading, I found some issues when trying to run yum. Below are the details. # yum repolist There was a problem importing one of the Python modules ...
0
votes
1answer
1k views

sudo yum remove php linux in aws

When I was trying to upgrade PHP version in amazon web server I got this kind of error. I'm trying to up upgrade PHP version 5.6 to 7.0 in amazon web server and I am using to putty to upgrade. [root@...