EC2 Ubuntu hangs on go install - amazon-ec2

I am running the golang rest api on ec2 instance which is working properly however when I make any changes in the code and run "go install" the ec2 console stops responding and I have to reboot the instance. ec2 instance is running with 4 GB ram and ubuntu 20.
Please suggest how to debug and fix the issue.

Related

How to keep running vagrant machine after restart

I have created a vagrant machine which is using the LAMP. So, every time I restart the computer I have to use vagrant up to run VM. Is this possible to keep running vagrant machine so when I restart the computer it should remain running in the background? As to keep running Docker container we use -d to detach it with the process. Is this possible in Vagrant?

Amazon's aws cli times out on macOS 10.12.5

I just installed the aws cli (via pip install awscli per Amazon's installation instructions) on macOS 10.12.5. The installation completed without issue. But when I run the app (e.g. $ aws help) it just hangs for about a minute and finally fails with:
$ aws help
ssh: connect to host xxx.xxx.xxx.xxx port 22: Operation timed out
I've tried running it from both Python 3.6.1 and 2.7.13 environments. The macOS firewall is disabled so I'm not blocking any outbound requests.
I'm not sure what else to try at this point.
That is very strange behaviour. The AWS CLI does not activate ssh.
I would suggest that you have another script called aws somewhere in your PATH that you previously used to connect to an Amazon EC2 instance, and that script is running rather than the AWS CLI.
Run this command to discover which one it is running:
$ which aws
/usr/local/bin/aws
In this case, mine is in $ /usr/local/bin/aws help, but yours is likely to be elsewhere.
To run the correct one, use:
$ /usr/local/bin/aws help

Running virtualbox/vagrant in a cloud instance

I've tried two things:
First, I tried to install virtualbox on a EC2 machine, which proved to be impossible.
Second, I was able to install both vagrant and virtualbox on a Digital Ocean droplet, but when I tried to run vagrant up, it got stuck on Booting VM.
Several sources on Internet say that it is not possible to run a VM inside a virtualized environment (both Amazon and Digital Ocean provide this).
Is there any way I can solve this with another provider, or is there a way to run vagrant/virtualbox in Amazon or Digital Ocean?
Install VirtualBox and Vagrant on a physical machine such as your desktop
Run the 3 commands from the command line:
vagrant init somenameyoumakeup file://urlToYour.box
vagrant up
vagrant halt
Open the VirtualBox UI
Export the Virtual machine to OVA format using the File -> Export menu
Follow the guide here for importing an OVA: https://aws.amazon.com/ec2/vm-import/

docker pull centos timeout on windows 8.1

When I run from command line
docker pull centos
I got timeout error. I have no proxy and try from different networks and stucked on this. What reason can be?
Since you wrote that you use Windows 8 I assume that you run boot2docker?
Can you first verify that you can connect to boot2docker itself? E.g. with docker ps? If you still get timeouts issuing that command, make sure boot2docker is running by typing boot2docker restart.
If you can connect to boot2docker without any problems and the docker pull centos problem remains then it seems you have other kind of networking problems on your site which block your connections.

Xorg seems to kill EC2 instances (CentOS 5.4)

My end goal is to run firefox in headless mode with xvfb.
But Xvfb requires Xorg, and I'm running into a problem with Xorg.
When I fire up an instance using this AMI:
ami-4a24d623
RightImage_CentOS_5.4_i386_v5.5.9_EBS
Then do:
yum install Xorg
Then reboot the instance, I get failed status checks, and I can't log into the instance.
Server Logs (Instance Actions->Get Server Log) are blank.
What am I doing wrong? Do I need to configure Xorg somehow?
I disabled SElinux which helped me bring instance up

Resources