Questions tagged [amazon-ec2]

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

Filter by
Sorted by
Tagged with
1
vote
0answers
28 views

crontab only running first 2 of multiple python scripts (ubuntu)?

I have a crontab in ubuntu (EC2 AWS instance). It runs a different python script on the hour. Each python script ends with a file being overwritten in /home/ubuntu/bandsintown via writeJSON.write. ...
1
vote
1answer
20 views

Install google chrome in Amazon linux EC2 instance - CentOS

I am currently facing troubles in installing google chrome/chromium in Amazon EC2 instance. I tried the command, [ec2-user@ip-XXXX yum.repos.d]$ sudo yum install google-chrome-stable Loaded plugins: ...
0
votes
0answers
54 views

CUDA not available on Deep Learning AMI (DLAMI) running on an Amazon EC2 P2 instance

I am running the Ubuntu 18.04 Deep Learning AMI (DLAMI) on AWS, and am attempting to run it on a p2.xlarge EC2 instance, but CUDA is not available in my Python interpreter. I was assuming that CUDA ...
0
votes
1answer
28 views

Linux 2 GB RAM AWS EC2 Debian ARM64 instance showing incorrect total memory

I have provisioned a 2 GB RAM AWS EC2 instance and using a ARM64 Debian 10 AMI. When I do top and grep MemTotal /proc/meminfo. I get total memory of 1898 instead of 2048 MB. Even if the reserved ...
0
votes
0answers
10 views

write script in AWS linux server once port is kill then automatically that script is run and start server

I had deploy jar file on AWS EC2 instance server. and start it using this command. nohup java -jar /home/ec2-user/project/example.jar & Using above command process is running in background. But ...
3
votes
0answers
43 views

What could cause EROFS error for an openat call of a symlinked path, but only sometimes?

I'm trying to debug an issue which I see only intermittently, often only once or twice per server and then it goes away. I have an application which attempts to open a lock file using openat() with ...
2
votes
1answer
46 views

SSH Public Key Authorization error Permission denied (publickey,gssapi-keyex,gssapi-with-mic)

I am trying to SSH onto my server with the command ssh -i key.pem ec2-user@ip_address as I did with no issues last week but this week it is giving me an error of only ec2-user@ip_address:Permission ...
0
votes
0answers
20 views

I installed the python3.8 version for my application and deleted the python2.7 in amazon linux 2 , now yum command is not working

I installed the python3.8 version for my application and deleted the python2.7 in amazon linux 2 , now yum command is not working.
-1
votes
1answer
20 views

What happens if choose only my Ip in the security group inbound rule for ssh & http in AWS EC2 instance

I am a student and trying to get a grasp on how does the inbound rule in the security group for EC2 instance in AWS work. I tried setting up couple of rules SSH & HTTP for only My IP but when I do ...
0
votes
1answer
37 views

Ezjail network in aws ec2 instance

I am trying to connect a jail to the internet in a aws ec2 instance. I am able to create the jail and execute a console inside, the problem is that the jail does not have any connection to the outside....
0
votes
0answers
46 views

High avgqu-sz & utilisation on mdadm RAID 0 in AWS EC2 I3.8x large instance

Sorry, this is a repost of same question from serverfault as I am not sure where this question should go. I have an AWS EC2 i3.8xlarge with 4x1.9TB ephemeral storage volumes tied in mdadm RAID-0 (Yes, ...
0
votes
0answers
25 views

Display desktop using X11?

Client: MacOS latest. Server: Ubuntu 18.04 EC2 I have somehow managed to test out that X forwarding is working. It took a lot of time as I am new to MacOS, finally realised I need XQuartz. I am unable ...
1
vote
0answers
48 views

Why all terminal text editors could stop working (AWS EC2 Ubuntu 16.04)?

Maybe stupid question. But I'll try. Can't open any files by any text editors (vi/vim/nano/less/touch) after restart OS (AWS EC2/Ubuntu 16.04.6 LTS). But cat and tail still work. I don't see any ...
0
votes
0answers
173 views

Install libsodium on EC2

I am trying to install R and related packages on an AWS Ec2 (Linux) instance . The packages fail with a dependency on libsodium . R failure ------------------------- ANTICONF ERROR ----------------...
0
votes
2answers
129 views

Successfully installed amazon-efs-utils but cannot find it

$ sudo yum install -y amazon-efs-utils --verbose Loading "extras_suggestions" plugin Loading "langpacks" plugin Loading "priorities" plugin Loading "update-mood"...
0
votes
0answers
68 views

curl hangs on centos 7 ec2 instance

I am trying to run the following bash command: seq 1 200 | parallel --eta -j 16 'echo url: {} && curl -s -o /dev/null https://www.google.com' Towards the end of the run, the command hangs, ...
0
votes
1answer
15 views

Restore mysql db from AWS AMI?

We have one EC2 instance running our mysql database server. due to a security incident we had to delete the current EC2 instance as database was completely messed up with some sort of encryption. So ...
0
votes
1answer
60 views

99 % CPU taken up by “ps”

I have an EC2 t2.micro (Linux AMI) instance. Since a few days I noticed that RAM is being 99% used by "ps" . When that happens : $ free -m total used free ...
7
votes
3answers
884 views

How to fix infinite bash loop (bashrc + bash_profile) when ssh-ing into an ec2 server?

I mistakenly have source .bash_profile in the bashrc file and vice versa. Now when I tried to ssh into the machine (ec2), it will stuck at loading bash and get connection closed in a second. Is there ...
0
votes
0answers
76 views

auditctl doesn't log anything

I am trying to find app/activity on a server for failed connection to external mysql host. For that I decided to use auditctl. I'm running the following command: [nir]$ sudo auditctl -A exit,always -F ...
0
votes
1answer
61 views

can not install docker-ce in AWS EC2 instance : Error: package: containerd.io (docker-ce-stable) Need: container SELinux

I was trying to install Docker on g4dnx4xlarge, which is a GPU instance. Following the blog posted here original blog, I could not get it run. The error I got is: Error: package: containerd.io -1.4.3-...
0
votes
1answer
21 views

trying to copy file from one Gnu/Linux to another (on VMs), but getting ssh Permission denied

I have been trying to transfer file from one ec2 linux instance to another, so far I have tried ssh -l ec2-user@<ip address> in my source VM I get Permission denied (publickey,gssapi-keyex,...
1
vote
0answers
74 views

Connecting to EC2 via SSH with keypair

I have been trying to connect to EC2 via SSH with a key, but whenever I type the command chmod 400 key.pair.pem, I got this message: chmod : cannot access ' kp.pem': no such file or directory. In ...
0
votes
1answer
393 views

nohup ends when I close the SSH terminal and doesn't show up on ps/job when running

I have an AWS EC2 Ubuntu 20.04 instance, accessed via puTTY SSH. Running a Python process via OpenMPI through the following command on non root: nohup mpirun python3 job.py When the shell is open it ...
0
votes
0answers
269 views

Obscuring password in cloud-init userdata startup of AWS EC2 instance

An AWS EC2 instance creates a new user during its cloud-init startup process, and sets the password for that new user. Terraform is being used to trigger the creation of the new EC2 instance, which ...
1
vote
0answers
41 views

SSH Permissions Issue on AWS EC2 Linus Instance

When running trying to connect to github I get the following: $ ssh -T git@github.com Permission denied (publickey). Here are my permissions on the directory: $ ls -la ~/.ssh total 24 drwxr-xr-x 2 ...
0
votes
1answer
63 views

Expanded root volume but tmpfs and devtmpfs is limited

I have expanded root volume in my Amazon ec2 machine (Amazon Linux 2) but the space in tmpfs and devtempfs is still limited. Here is what output of df -h command looks like: $ df -h Filesystem ...
2
votes
2answers
37 views

How do I add an additional SSH user with a non-standard home directory to Centos 7 AWS Machine?

I have a CentOS 7 instance on AWS, and I connect using a .pem file. When I create a new user and follow the standard steps, (create .ssh directory, chmod 700 it, create authorized_keys file, copy the ...
0
votes
1answer
15 views

SSH Connection starts a bash process but wanted to start a process as soon as instance is launched on Amazon EC2 Instance

I have created an AMI of my instance on AWS and had shared that with my teammate and he wanted to start the server with exact my configuration. I have also written a bash script which starts the tmux ...
0
votes
3answers
6k views

Failed to get D-Bus connection: Connection refused

A sudo user named my-host is getting the following error message when trying to reload systemctl on an Amazon Linux 2 EC2 image. [my-host@ip-12-3-4-56 ~]$ systemctl --user daemon-reload Failed to get ...
1
vote
1answer
518 views

Start systemd service from Ansible Playbook

What specific syntax must be used to get an Ansible playbook to successfully start a systemd service and make sure that the systemd service is running on an Amazon EC2 instance? CURRENT SYNTAX: The ...
0
votes
2answers
34 views

How to store usage and memory percentage that are shown after login in AWS EC2

ec2 stats when we ssh into our instance we can see these stats displaying. Is there any way to get the same percentage stats with a terminal command?
0
votes
0answers
21 views

Investigating runaway traffic

On RHEL I have a server that every few days for few minutes sends 50x connection requests to the db. I couldn't find a lead in: crontab history of the users /var/log/messages nor secure How can I ...
0
votes
1answer
80 views

SSH pem/private-key based login error?

I just created an ec2-instance with Amazon Linux 2 OS, then logged in to the system using login: ec2-user and an associated privatekey. Next, I created a new user x and copied the .ssh/authorized_keys ...
1
vote
1answer
478 views

Reset Linux EC2 Server Password

Unable to login to EC2 ubuntu server due to permission issue. Issue: My EC2 ubuntu server has (root & ubuntu) user and I use to login to ubuntu using ssh. By mistake I have changed the ownership ...
0
votes
0answers
48 views

Access mounted directory in Linux

I have mounted 2 directories in my Linux system. $ df -h Filesystem Size Used Avail Use% Mounted on devtmpfs 7.7G 0 7.7G 0% /dev tmpfs 7.7G 0 7.7G 0% /dev/shm ...
0
votes
0answers
2k views

sudo service sshd restart failed on AWS EC2 instance

I have created AWS EC2 instance and deployed Asp.Net Core Web API application. It works when deploying into server. After an hour, I was not able to connect my server using PUTTY or WinSCP. When i am ...
1
vote
1answer
1k views

No package systemd available on Amazon linux EC2

I am using AWS Linux machine to host Web API application. I need to make my application keep on run, so that i need systemd has to be installed on my linux machine.I tried sudo yum install systemd but ...
0
votes
0answers
80 views

aws ec2 describe-security-groups + awk sed

I am sure this is not the most efficient method, but I need help formatting the results of this aws command: aws ec2 describe-security-groups --group-ids sg-xxxxxxxxxxxxx --region=us-east-1 --profile=...
1
vote
2answers
459 views

Why does `pip` throw `ModuleNotFoundError` even though `setuptools` appears to be installed?

On an EC2 instance, I am attempting to install a Python package using pip, but receive an exception that states ModuleNotFoundError: No module named 'setuptools'. For context, the command I run is pip ...
4
votes
2answers
11k views

DISPLAY environment variable not set

I am using a Amazon Linux 2 (a Fedora/Cent OS like distro) EC2 machine with the Deep Learning AMI (Amazon Linux 2) Version 30.1 AMI. I want to use xclip and gedit in the remote instance. But if I type ...
1
vote
1answer
37 views

how to add password to an account that was created using --disabled-password?

I am following the guide add new user accounts with SSH access to my Amazon EC2 the point 2 has this note If you add the new_user to an Ubuntu instance, include the --disabled-password option to ...
5
votes
2answers
336 views

Setting ownership when copying or syncing files

When moving or copying files as root I often want to set the ownership for those files based on the owner of the directory I am moving the files to. Before I go off and write a script that parses the ...
0
votes
2answers
76 views

How to run an app automatically on reboot for different user?

I have a ec2 machine/redhat with Tomcat installed. I want only userX to start this app, not ec2-user. However, ec2 automatically boots with ec2-user after restart. How can I make my userX to execture ...
0
votes
1answer
66 views

ansible show hostnames in play recap summary instead of IPs when using ec2 dynamic inventory?

how to make ansible show host names from ec2 dynamic inventory tags or /etc/hosts instead of IPs in PLAY RECAP SUMMARY: Output: PLAY RECAP **************************************************************...
1
vote
1answer
160 views

Disconnected: No supported authentication methods for sudo user who authenticates using password

On an Amazon Linux 2 EC2 instance, password authentication from remote users has been enabled by running the following command during the cloud-init startup script: sed -i 's/PasswordAuthentication no/...
0
votes
2answers
134 views

Missing chrony package in Ubuntu Bionic

I am using HashiCorp Packer to build a new AWS AMI. I want to preinstall the NTP client Chrony (it's popular in our organization and it will get config support from people outside our team). But when ...
0
votes
0answers
127 views

How to encrypt nfs which is mounted on AWS ec2

We have netapp volumes attached to EC2 instance. these are nfs , which are sync with on premise and make sure data in on premise and that of NFS which is mounted on EC2 are in sync. even though ...
0
votes
0answers
59 views

Rsync performance on on two Linux Machines

I am having two Virtual Machines (VM-source and VM-destination) and each with an NFS filesystem. I want to sync data (1TB) between the two machines and I am worried about the CPU/Memory needed for ...
0
votes
0answers
82 views

How to keep mac prompt customization when sshing into aws ec2 instances whose ip addresses change when I stop and restart the instance?

Summary: my goal is to have a prompt that's got a different color so I can easily distinguish between command line and output at a glance. Details: I have configured my mac terminal to show the ...

1
2 3 4 5
7