Sunday, 24 August 2014

I created a ELB in eucalyptus, i attached an instance to ELB: myloadbal after attaching i checked the status of instance its saying out of service . I tried to solve but its not getting worked. I need to attach another new instance to current ELB . where i can performance some http load and check the load is sharing with both instance in ELB .   
Here the details.

root@ubuntu:/# eulb-create-lb -z cloudenci -l "lb-port=80, protocol=HTTP, instance-port=80, instance-protocol=HTTP" myloadbal
DNS_NAME myloadbal-166758844768.lb.localhost

root@ubuntu:/# eulb-describe-lbs myloadbal
LOAD_BALANCER myloadbal myloadbal-166758844768.lb.localhost 2014-08-23T12:34:10.656Z

root@ubuntu:/# eulb-create-lb-listeners -l "lb-port=80, protocol=HTTP, instance-port=80, instance-protocol=HTTP" myloadbal 
eulb-create-lb-listeners: error (400): A Listener already exists

root@ubuntu:/# eulb-describe-lbs
LOAD_BALANCER myloadbal myloadbal-166758844768.lb.localhost 2014-08-23T12:34:10.656Z
root@ubuntu:/# eulb-register-instances-with-lb --instances i-011F3AE0 myloadbal
INSTANCE i-011F3AE0


root@ubuntu:/# eulb-describe-instance-health myloadbal
INSTANCE i-011F3AE0 OutOfService

Sunday, 17 August 2014

Installing Apache Benchmark and Wireshark

Installing Apache Benchmark Tool

Apache Benchmark is a benchmarking tool which can be used to stress the serve by generating Http requests to server.
ubuntu@euca-10-1-3-53:~$ sudo apt-get install apache2-utils


Installing Wireshark

Wireshark is a monitoring tool which will monitor different network attributes. Here we are using to monitor incoming Http requests to static website which is running on localhost.
ubuntu@euca-10-1-3-53:~$ sudo apt-get install wireshark
ubuntu@euca-10-1-3-53:~$ sudo groupadd wireshark
ubuntu@euca-10-1-3-53:~$ sudo usermod -a -G wireshark ubuntu
ubuntu@euca-10-1-3-53:~$ sudo chgrp wireshark /usr/bin/dumpcap
ubuntu@euca-10-1-3-53:~$ sudo chmod 750 /usr/bin/dumpcap
ubuntu@euca-10-1-3-53:~$ sudo setcap cap_net_raw,cap_net_admin=eip /usr/bin/dumpcap
ubuntu@euca-10-1-3-53:~$ sudo getcap /usr/bin/dumpcap
ubuntu@euca-10-1-3-53:~$ sudo dpkg-reconfigure wireshark-common


Installing XAMPP server on Instance

jaideep@ubuntu:~/Downloads$ ssh -i /home/jaideep/Downloads/x13109561-a.pem -l ubuntu 193.1.202.12

Welcome to Ubuntu 12.04.5 LTS (GNU/Linux 3.2.0-65-virtual x86_64)
 * Documentation:  https://help.ubuntu.com/
  System information as of Sun Aug 17 23:32:35 UTC 2014
System load:  0.0               Processes:           152
  Usage of /:   51.3% of 9.85GB   Users logged in:     0
  Memory usage: 28%               IP address for eth0: 10.1.3.53
  Swap usage:   36%
Graph this data and manage this system at:
    https://landscape.canonical.com/
 Get cloud support with Ubuntu Advantage Cloud Guest:
    http://www.ubuntu.com/business/services/cloud
6 packages can be updated.
6 updates are security updates.
New release '14.04.1 LTS' available.
Run 'do-release-upgrade' to upgrade to it.
Last login: Fri Aug 15 15:53:57 2014 from 109.255.221.201
ubuntu@euca-10-1-3-53:~$

Installing XAMPP server
XAMPP server is used to run the static website on localhost.
 ubuntu@euca-10-1-3-53:~$ sudo wget bit.ly/1cmyrUo -O xampp-64bit.run
ubuntu@euca-10-1-3-53:~$ chmod 777 xampp-64bit.run
ubuntu@euca-10-1-3-53:~$ sudo ./xampp-64bit.run
ubuntu@euca-10-1-3-55:~$ sudo /opt/lampp/lampp start
Starting XAMPP for Linux 1.8.3-4...
XAMPP: Starting Apache...ok.
XAMPP: Starting MySQL...ok.
XAMPP: Starting ProFTPD...ok.

ubuntu@euca-10-1-3-55:~$ 

There is a Volume Issues with Instance.

Now i am able to run the instance. But the things are not going well i m getting problem on every step. I think there is problem in ubuntu server images while i am trying to install Xampp server i am getting there is no sufficient space is available. I tried in Google but i didn't find exact solution,  Here below the error that i got. 
I used   cc1.4xlarge : 8 CPUs, 3072 memory (MB), 60 disk(GB, root device). also attached volume of 15 GB to instance 

ubuntu@euca-10-1-3-61:/tmp$ wget bit.ly/1cmyrUo -O xampp-64bit.run
--2014-08-11 18:49:22--  http://bit.ly/1cmyrUo
Resolving bit.ly (bit.ly)... 69.58.188.39, 69.58.188.40
Connecting to bit.ly (bit.ly)|69.58.188.39|:80... connected.
HTTP request sent, awaiting response... 301 Moved Permanently
Location: http://goo.gl/CAXLhV [following]
--2014-08-11 18:49:23--  http://goo.gl/CAXLhV
Resolving goo.gl (goo.gl)... 74.125.24.113, 74.125.24.100, 74.125.24.101, ...
Connecting to goo.gl (goo.gl)|74.125.24.113|:80... connected.
HTTP request sent, awaiting response... 301 Moved Permanently
Location: http://cdn.mirror.garr.it/sf/project/xampp/XAMPP%20Linux/1.8.3/xampp-linux-1.8.3-2-installer.run [following]
--2014-08-11 18:49:23--  http://cdn.mirror.garr.it/sf/project/xampp/XAMPP%20Linux/1.8.3/xampp-linux-1.8.3-2-installer.run
Resolving cdn.mirror.garr.it (cdn.mirror.garr.it)... 193.206.139.45, 193.206.140.45, 2001:760:ffff:b0::45, ...
Connecting to cdn.mirror.garr.it (cdn.mirror.garr.it)|193.206.139.45|:80... connected.
HTTP request sent, awaiting response... 200 OK
Length: 126657636 (121M) [application/x-makeself]
Saving to: ‘xampp-64bit.run’

 0% [                                                                                                        ] 38,720      --.-K/s   in 0.03s   


Cannot write to ‘xampp-64bit.run’ (No space left on device).
ubuntu@euca-10-1-3-61:/tmp$ 

Solving Error with Networking Issues

It’s working now on both instances,
 
I am trying to fix the problem with DHCP now.
 
If you are starting anymore instances open /etc/resolv.conf
 
Sudo vi /etc/resolv.conf
 
And change:
Nameserver 127.0.0.1
 
To nameserver 8.8.8.8

Networking Issues in Instance.

There is a networking issue in the instance, There is no net connectivity in the instance,
 
Last login: Mon Aug 11 15:57:53 2014 from 109.255.221.201
ubuntu@euca-10-1-3-59:~$ sudo apt-get update
sudo: unable to resolve host euca-10-1-3-59
Err http://archive.ubuntu.com precise Release.gpg
  Temporary failure resolving 'archive.ubuntu.com'
Err http://security.ubuntu.com precise-security Release.gpg
  Temporary failure resolving 'security.ubuntu.com'
Err http://archive.ubuntu.com precise-updates Release.gpg
  Temporary failure resolving 'archive.ubuntu.com'
Reading package lists... Done
W: Failed to fetch http://archive.ubuntu.com/ubuntu/dists/precise/Release.gpg  Temporary failure resolving 'archive.ubuntu.com'
 
W: Failed to fetch http://archive.ubuntu.com/ubuntu/dists/precise-updates/Release.gpg  Temporary failure resolving 'archive.ubuntu.com'
 
W: Failed to fetch http://security.ubuntu.com/ubuntu/dists/precise-security/Release.gpg  Temporary failure resolving 'security.ubuntu.com'
 
W: Some index files failed to download. They have been ignored, or old ones used instead.
ubuntu@euca-10-1-3-59:~$
 
ubuntu@euca-10-1-3-59:~$ ping google.com
ping: unknown host google.com

Successfully Launched Instance in Eucalyptus.

jaideep@ubuntu:~$ ssh -i /home/jaideep/Downloads/x13109561.pem ubuntu@193.1.202.14
Welcome to Ubuntu 14.04 LTS (GNU/Linux 3.13.0-30-generic x86_64)

 * Documentation:  https://help.ubuntu.com/

  System information as of Mon Aug 11 15:39:37 UTC 2014

  System load:  0.0               Processes:           77
  Usage of /:   55.7% of 1.32GB   Users logged in:     0
  Memory usage: 3%                IP address for eth0: 10.1.3.50
  Swap usage:   0%

  Graph this data and manage this system at:
    https://landscape.canonical.com/

  Get cloud support with Ubuntu Advantage Cloud Guest:
    http://www.ubuntu.com/business/services/cloud

0 packages can be updated.
0 updates are security updates.


Last login: Mon Aug 11 15:39:38 2014 from 109.255.221.201
ubuntu@euca-10-1-3-50:~$