No chef commands work after amazon ec2 instance restart - amazon-ec2

I restarted the amazon ec2 instance and now none of the my knife commands work.
Please help me experts. Thanks

This happened for me to. Worked after chef restart. But restart all service list.
Check all service list with below command.
sudo chef-server-ctl service-list
chef-server-ctl restart SERVICE_NAME

If you are installing ChefDK and using Bash as your shell, run this:
echo 'eval "$(chef shell-init bash)"' >> ~/.bashrc

Related

Failed to start ansibled.service: Unit not found

I couldn't start my ansible server installed in Centos/7 yet the installation works properly, any help plz
[vagrant#ansible-server ~]$ sudo systemctl status ansibled
Unit ansibled.service could not be found.
[vagrant#ansible-server ~]$ sudo systemctl start ansibled
Failed to start ansibled.service: Unit not found.
Ansible is not a Linux system Service. The command you are using is use for any service which is install on the linux. Just use Ansible command to run your playbook or adhoc command.

'Appscale up' stuck at 'Waiting for head node to initialize'

I was trying to start appscale on ec2 instance for deploying my python app. First of all I installed appscale-tools and initiated cluster which made AppScaleFile. Then I used appscale up command which is stuck at this point Waiting for head node to initialize.... Here is the screenshot:
Screenshot
It is some sort of an infinite loop. Any help?
If using Ubuntu you may be running into an issue with the version of monit that they distribute, as described here:
https://bugs.launchpad.net/ubuntu/+source/monit/+bug/1786910
If so, then this AppScale blog has more information on workarounds:
https://blog.appscale.com/monit-bug-impacting-appscale-deployments
To check if you are using the broken monit (version 1:5.16-2ubuntu0.1):
# dpkg -l monit
To downgrade (on all hosts running AppScale):
# sudo apt-get install monit=1:5.16-2
# sudo apt-mark hold monit
Keep in mind that this is reverting a security fix, so may not always be an acceptable solution.

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

apache mesos is not recognized as a service in a ubuntu linux environment

Hi I am trying to install apache mesos in my ubuntu based system. I have installed zookeeper and marathon along with this setup.
apt-get install mesos marathon
it says its success but when i try to see available services systems does not show mesos-master or slaves as available services. also
service mesos-master/slave start
says unrecognized service. any idea?
I had the same issue, so after trying multiple tricks .. I found that you can start the mesos-master using the following command:
mkdir ~/workdir; sudo mesos master --work_dir=/home/azureuser/wokdir&
Some documentation has not matched actual installations for me - Mesos may installed to be managed by upstart/systemd kinds of commands rather than service. Most recently for me, a CentOS 6.6 install of Mesos has landed in upstart-managed territory, e.g.:
start mesos-master
stop mesos-master
status mesos-master
YMMV, but that's what I've recently seen.
I faced same issue, I was not able to start mesos-master on UBUNTU-14.04 although I double checked installation and zookeeper service started successfully and tested well.
I found work around to start mesos-master service.
$ cd /usr/sbin/
$ sudo ./mesos-master --work_dir=/var/lib/mesos --log_dir=/home/rajeev/logs/mesos/
above command run mesos-master service successfully [But sudo service mesos-master start command failed to start mesos master node]

how to get GUI on Amazon ec2 ubuntu instance

I have an Amazon ec2 instance in which I can login through putty. I want GUI on that instance. Please anyone help me, how can I get GUI on ec2 instance.
Install VNC and connect using VNC. View the video here.
You can also use an X11 server like MobaXTerm: http://mobaxterm.mobatek.net/ ot Xming: http://sourceforge.net/projects/xming/ (assuming you work on a PC running Windows).
login ec2 instance and execute below commands
Sudo apt-get update
Sudo apt-get install lxde
sudo start lxdm
sudo apt-get install xrdp
sudo passwd ubuntu
then open RDC
username -- hostname which you provided in putty

Resources