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
0
votes
0answers
12 views

How to forward path along with port

I'm willing to bet I have a fundamental misunderstanding here, but I am trying to do something akin to port-forwarding AND url-forwarding without using something like nginx. I have a remote linux ...
0
votes
2answers
57 views

What does “status=10/n/a” mean in systemd output?

I am developing a .service file so that systemd can manage an app as a service on Amazon Linux 2. But when I type systemctl start my-new-service, the following error is reported in the logs: Mar ...
-3
votes
1answer
28 views

mkdir permissions needed for script called by systemctl start service

How can I give mkdir permissions to a script that is called by sudo systemctl start <service-name> ?? Here is the error being thrown in the results of sudo journalctl -u jekyll -f when I type ...
-2
votes
1answer
62 views

Ubuntu Cronjob can't execute conda environment

Whenever I login to my ec2 Ubuntu instance my terminal is like this (base) ubuntu@ip-xx-xx-xx When I run my Python script which is converted from a Jupyter notebook with the default conda ...
0
votes
0answers
18 views

SSH into an AWS EC2 instance running a VPN

I want to use a third-party VPN service on a Amazon AWS EC2 instance, and set up NordVPN with OpenVPN. After following the top answer of this post: Route everything through VPN except SSH on Port 22 ...
1
vote
1answer
111 views

unable to recognize file. connection refused

On an Amazon Linux 2 instance, the command line is throwing the following connection refused error every time a command is run that references a file path. The same error is thrown when an https url ...
1
vote
2answers
35 views

Ability to halt/reboot server as user

I need to ability to halt an aws EC2 server as user. I found https://www.cyberciti.biz/tips/howto-linux-allow-users-to-shutdown-server.html but due to the fact that I need this feature on an aws EC2 ...
0
votes
0answers
59 views

EC2 SSH connection refused after changing elastic IP and reboot

I've browsed several dozen copies of this question but none of them seem to fix my situation. I have already checked: permissions on pem key (it worked before) checked correct new ip in ssh config ...
0
votes
1answer
37 views

Issue in configuring zpool ZFS in EC2

While executing command in ZFS - sudo zpool create -f alluxio /dev/xvda . Getting below error:/dev/xvda is in use and contains a unknown filesystem. Could you please help me in solving this. Need ...
0
votes
2answers
46 views

aws ec2 ls command is showing the user@ip:directory/folder on the last line - How can I remove this from my ls output?

When I perform an ls command in my aws ec2 server, I am getting the correct list of files which I need, but for some reason the user@ip:directory/folder is showing on the last line of my results? Is ...
0
votes
2answers
68 views

Install additional software in Amazon Linux

I have created Amazon Linux instance on Amazon Lightsail cloud. Now I would like to install Mosquitto buy entering command: sudo yum install mosquitto But system codn't find it. UPD I tried to add ...
0
votes
0answers
9 views

I am trying to redeploy a react application on an AWS ubuntu and the .sh file has permission denied error

I am trying to redeploy a react application in an aws EC2 ubuntu instance, but it says it has no permission for a .log, while running the .sh file. I tried chmod +x file.sh, but it says that the log ...
0
votes
0answers
558 views

Failed to start OpenBSD Secure Shell server

I have an EC2 instance which has been running for about 1 year. We have always been able to connect via SSH without issue until yesterday, when suddenly after a reboot all my connections are refused....
0
votes
0answers
49 views

Apache server at new AWS EC2 instance is not reachable even with “All source” and 0.0.0.0/0

I have installed Apache2 server and I am able to access my EC2 public DNS address from EC2 instance terminal with: curl http://ec2-xx-xxx-xx-xxx.us-east-2.compute.amazonaws.com/ which returns a ...
0
votes
0answers
37 views

EnvironmentFile not read in systemd - AWS EC2 Linux2 [duplicate]

I'm trying to configure environment variables to a service that's setup with systemd. The service is starting fine with systemctl start onboarding.service but somehow the environment file present in ...
0
votes
3answers
690 views

How do I resize this AWS EC2 ubuntu 18 instance from 16GB to 100GB

I need to resize /dev/nvme0n1p1 15G 10G 6G 64% / Filesystem 1G-blocks Used Available Use% Mounted on udev 16G 0G 16G 0% /dev tmpfs 4G ...
0
votes
0answers
11 views

What are some options for Localforward keeps changing?

Super noob here. I'm trying to do port forwarding using LocalForward method in the ssh config file. The issue is that the host address I am using has the potential to change if my aws ec2 instance ...
0
votes
0answers
91 views

Running cgroups inside EC2 c4.xlarge instances failed - operation not allowed

Problem I'm currently trying to restrict the resource of of a specific user on an AWS EC2 instance. After doing some research online, I thought the following was enough to add a user to a cgroup that ...
2
votes
1answer
66 views

unable to setup gunicorn daemon process

I am unable to set up the gunicorn daemon process in an ec2 instance. Below are sample code and error/log messages. myproject-backend/gunicorn.conf import os import multiprocessing from dotenv ...
3
votes
0answers
35 views

Restrict special user and host of the ftp in the Linux Instance

I am using WinScp for connecting FTP to a Linux Instance and I want to restrict special user and host. I installed plesk on my Linux EC2 instance and I thought it uses proftpd for ftp service and ...
3
votes
1answer
40 views

Restrict special user and host of ftp in the Linux Instance

I am using WinSCP for connecting ftp to Linux Instance and I want to restrict special user and host. I install plesk on my Linux Ec2 instance and I thought it is using proftpd for ftp service and ...
0
votes
0answers
24 views

Where to install the CSR in the server cluster?

Background is that currently i have a basic AWS server cluster that consists of 1 RDB , two EC2 instances , 1 Load Balancer with SSL installed and this server cluster is sitting within an OPENVPN. ...
1
vote
0answers
353 views

Enormously large in-use dentry cache

We have an EC2 instance that has a very large (50+GB) dentry cache and most of it is in use (99%). "drop_cache" commands (sysctl -w vm.drop_caches=2 or sysctl -w vm.drop_caches=3) don't help much, ...
2
votes
1answer
659 views

What is exactly difference between INotify max_user_instances and max_user_watches?

After reading some articles on the internet I am a little lost in understanding the difference between INotify max_user_instances and max_user_watches. From official Linux man: /proc/sys/fs/...
0
votes
1answer
27 views

Cron logs show activity, but app logs show nothing

I'm trying to run a daily cron app. What I did: crontab -e Inside file, I have: 0 0 * * * cd /home/ec2-user/myapp && docker-compose up when I check /var/log/cron, I get: Jul 29 00:00:...
0
votes
1answer
47 views

How to copy CentOS server using SSH from one hosting to AWS EC2?

I have like 15 VPS CentOS machines with SSH access on one hosting and I need to move them all to Amazon Web Services to EC2 That hosting is not supporting anything expect of SSH Which the easiest ...
0
votes
1answer
516 views

xterm error loading font: which font package includes iso10646 fonts?

Everytime I start an xterm on my Amazon Linux release 2 (Karoo) server, I get an error complaining about a missing font: xterm: cannot load font '-misc-fixed-medium-r-semicondensed--13-120-75-75-c-60-...
0
votes
0answers
183 views

AWS Batch: cgroup-parent for systemd cgroup should be a valid slice named as “xxx.slice”

For some reasons, I need to use Linux kernel 3.10.X for my AWS batch host. I follow this post and created my AMI based on Centos7. What I did was simply created an EC2 instance with Centos 7 and the ...
0
votes
1answer
41 views

openvpn connected successfullry but machine not reachable

I am trying to understand why the following is a problem. I have an EC2 machine with Open VPN client running. I'm able to connect the EC2 machine within the same VPC machines but not able to connect ...
5
votes
1answer
526 views

Yum in Amazon Linux 2 still asks for GPG key even after “rpm --import” when adding Kubernetes repo

I'm trying to add a kubernetes repo to my Amazon Linux 2 instance and struggle with automatically adding GPG keys. This is my /etc/yum.repos.d/kubernetes.repo... [kubernetes] name=Kubernetes baseurl=...
7
votes
2answers
1k views

What overwrites /etc/resolv.conf roughly every hour?

I'm trying to add a search line to /etc/resolv.conf I've added it directly, as an append command in /etc/dhcp/dhclient.conf and as a nameservers block in /etc/netplan/50-cloud-init.yaml. After ...
3
votes
1answer
195 views

Why does SSH_AUTH_SOCK and SSH_AGENT_PID unsets after a while in Amazon Linux?

We have a build system that needs an active ssh connection with mercurial and to do so, it needs an ssh-agent loaded with a key constantly.. The thing is that, even though that after creating the ssh ...
0
votes
1answer
252 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 ...
2
votes
1answer
551 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 ...
2
votes
2answers
3k 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
1answer
97 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
28 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
vote
2answers
153 views

Mapping between EC2 volume and your mounted filesystem

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 ...
2
votes
1answer
1k 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
107 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" -...
1
vote
0answers
1k 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
29 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 ...
3
votes
1answer
3k 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
246 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
90 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
169 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
35 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
43 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
449 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
83 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 ...

1
2 3 4 5 6