Differences between TCP and UDP Protocol

Posted in Uncategorized on November 17, 2011 by Aparna Murthy

If you want to know the exact difference between TCP and UDP protocol, lets have a look below :

Firstly, What is TCP and UDP protocol :

Transmission Control Protocol (TCP) and User Datagram Protocol (UDP) are the major protocols operating at Transport Layer. Transmission Control Protocol (TCP) and User Datagram Protocol (UDP) operate very differently and you can choose Transmission Control Protocol (TCP) or User Datagram Protocol (UDP) depending on your requirement.

1. TCP Protocol : TCP stands for Transmission Control Protocol and it guarantees delivery of data packets. This protocol provides extensive error checking mechanisms such as flow control and acknowledgment of data. Transmission Control Protocol (TCP) is a connection oriented protocol. Before transmitting data, a connection must be established between the devices participating in data transmission. If your Application require guaranteed delivery of data, then you must choose TCP as the Transport layer protocol.

2. UDP Protocol : UDP stands for User Datagram protocol and it operates in Datagram mode. The main difference you should notice here is User Datagram Protocol (UDP) is a connection-less protocol. User Datagram protocol (UDP) has only the basic error checking mechanism using checksums.

Now I assume that you under stand what is TCP and UDP protocol more than there long forms ;)   Now see Difference between Transmission Control Protocol (TCP) and User Datagram Protocol (UDP) below :

        Transmission Control Protocol (TCP)

1) Transmission Control Protocol (TCP) is a connection oriented protocol, which means the devices should open a connection before transmitting data and should close the connection gracefully after transmitting the data.

2) Transmission Control Protocol (TCP) assure reliable delivery of data to the destination.

3) Transmission Control Protocol (TCP) protocol provides extensive error checking mechanisms such as flow control and acknowledgment of data.

4) Sequencing of data is a feature of Transmission Control Protocol (TCP).

5) Delivery of data is guaranteed if you are using Transmission Control Protocol (TCP).

6) Transmission Control Protocol (TCP) is comparatively slow because of these extensive error checking mechanisms

7) Multiplexing and Demultiplexing is possible in Transmission Control Protocol (TCP) using TCP port numbers.

8) Retransmission of lost packets is possible in Transmission Control Protocol (TCP).

   User Datagram Protocol (UDP)

1) User Datagram Protocol (UDP) is Datagram oriented protocol with no overhead for opening, maintaining, and closing a connection.

2) User Datagram Protocol (UDP) is efficient for broadcast/multicast transmission.

3) User Datagram protocol (UDP) has only the basic error checking mechanism using checksums.

4) There is no sequencing of data in User Datagram protocol (UDP) .

5) The delivery of data cannot be guaranteed in User Datagram protocol (UDP) .

6) User Datagram protocol (UDP) is faster, simpler and more efficient than TCP. However, User Datagram protocol (UDP) it is less robust then TCP

7) Multiplexing and Demultiplexing is possible in User Datagram Protcol (UDP) using UDP port numbers.

8) There is no retransmission of lost packets in User Datagram Protcol (UDP).

Cheers!!!! ;) ;)

How to install extension Managers on Cpanel Server

Posted in Cpanel/WHM on August 5, 2011 by Aparna Murthy

Installing extension managers like Zend Optimizer or Ion Cube loader without compiling apache on cPanel server is so easy, you can install them using just one script, and the script is located under the normal /scripts directory on Cpanel servers :

/scripts/phpextensionmgr

It provides the options to list, check status , install or remove any of the extensions.

Using below command you can get the list of extension managers available for installation :

root@CpanelServer[~]# /scripts/phpextensionmgr list
Available Extensions:
EAccelerator
IonCubeLoader
Zendopt
SourceGuardian
PHPSuHosin

Now you can check status of any extension using the below command :

root@CpanelServer[~]# /scripts/phpextensionmgr status IonCubeLoader
Determining status of IonCubeLoader
IonCubeLoader extension is NOT installed
root@CpanelServer[~]#

Now I can see that IonCubeLoader is not installed, To install the extension see below :

root@CpanelServer[~]# /scripts/phpextensionmgr install IonCubeLoader
Installing IonCubeLoader
Determining PHP version
Installing IonCube Loader binaries
Activating IonCube Loader extension in /usr/local/lib/php.ini
IonCube Loader extension activated

Now you can check status of any extension using the below command :

root@CpanelServer[~]# /scripts/phpextensionmgr status IonCubeLoader
Determining status of IonCubeLoader
IonCubeLoader extension is installed

Also you can check php version to check if its get complied with php.

Now you can see the required installation is installed.

How to install the GeoIP plugin to show country information in Awstats cPanel

Posted in Cpanel/WHM on June 26, 2011 by Aparna Murthy

Follow these instructions to install and enable the GeoIP plugin in awstats:

Requirement :

1.Root access to server (ssh access)
2. Install GNU Compiler Collection (gcc)
3.Install the GeoIP by executing the following commands in SSH:
Commands :

# wget http://maxmind.com/download/geoip/api/c/GeoIP.tar.gz
# tar xzvf GeoIP.tar.gz
# cd GeoIP*
# ./configure && make && make install

Install the GeoIP Perl module using CPAN :

command :

# cpan

NOTE:  If this is the first time you’re using CPAN, you will be prompted about automatic setup. If you see “Are you ready for manual configuration? [yes]” — type no. If you see “Would you like me to configure as much as possible automatically? [yes]” — type yes.

Then installed the GEoIP per module by executing the below command :

Command :

# install Geo::IP

Then

Command:

# quit

to exit the CPAN shell.

Once installed enable the plugin in the awstats.conf as below :
Command :
# vi /usr/local/cpanel/etc/awstats.conf

Insert this code end of the file :

LoadPlugin=”geoip GEOIP_STANDARD /usr/local/share/GeoIP/GeoIP.dat”

Save File.

To enable it for a specfic user then follow the insturction as below :

Command :

# vi /home/username/tmp/awstats/awstats.domainname.conf

NOTE: username and domainname will be replaced by your username and domainname.

Add the code end of the file :

LoadPlugin=”geoip GEOIP_STANDARD /usr/local/share/GeoIP/GeoIP.dat”

Save file.

Once done. Update the weblogs via executing command :

Command:

# /scripts/runweblogs username

Note : username will be replaced by your username.

You’re done now!!!!! You will be able to see the GeoIP in your stats page.

cPanel error “not a reference at /usr/local/cpanel/Cpanel/DIp/MainIP.pm line 198, Carp::croak(‘not a reference’) called at /usr/lib/perl5/site_perl/5.6.2/x86_64-linux/Storable.pm line 76″

Posted in Cpanel/WHM on April 16, 2011 by Aparna Murthy

Today I encountered an  error when I log into cpanel and click on “expand stats” as below :

Error :

==========================================================
not a reference at /usr/local/cpanel/Cpanel/DIp/MainIP.pm line 198
Carp::croak(‘not a reference’) called at /usr/lib/perl5/site_perl/5.6.2/x86_64-linux/Storable.pm line 76
Storable::logcroak(‘not a reference’) called at /usr/lib/perl5/site_perl/5.6.2/x86_64-linux/Storable.pm line 244
=========================================================

Solution :

Run and check the permission for “/”  “/sbin/”  “/sbin/ifconfig” file :

# stat / /sbin/ /sbin/ifconfig | egrep -i “File:|(Access|Mode):.*id.*”
You will see output somwhat like below :
==============
# stat / /sbin/ /sbin/ifconfig | egrep -i “File:|(Access|Mode):.*id.*”
File: `/’
Access: (0711/drwx–x–x)  Uid: (    0/    root)   Gid: (    0/    root)
File: `/sbin/’
Access: (0711/drwx–x–x)  Uid: (    0/    root)   Gid: (    0/    root)
File: `/sbin/ifconfig’
Access: (0700/-rwx——)  Uid: (    0/    root)   Gid: (    0/    root)
==============
try resetting permission for the /sbin/ifconfig to 711 as below :

# chmod -vv 0711 /sbin/ifconfig

and restart cPanel

# service cpanel restart.

Error should be fixed now!!!!!!

Set custom error pages in IIS 7 for .aspx extension

Posted in Windows Server on April 4, 2011 by Aparna Murthy

Today I came across with an error while adding custom error pages in IIS 7, While adding custom error pages for 404 I found every extension is working just fine while adding except .aspx extension, It is come out with the error as follows :

Error :

=========================

Server Error “/” Application The resource can not be found

=========================

Cause :

Because the custom error pages in IIS7 do not work for .aspx.

 

Solution :

You need to setup the .NET Error Pages for it as follows :

Start >> Administrative Tool >> IIS >> Websites >> Domain name >> Click on .NET error pages and add it.

 

Once it is added, Error will be gone!!!!

 

ModSecurity: Rule execution error – PCRE limits exceeded (-8)

Posted in Apache, Cpanel/WHM on December 8, 2010 by Aparna Murthy

Today while working on one of client’s issue of getting blank page while browsing the website and apache error logs were showing following logs (tail -f /usr/local/apache/logs/error_log):

Error :

==============================================================================[Wed 08 12:15:37 2010] [error] [client XX.XX.XX.XX] ModSecurity: Rule execution error – PCRE limits exceeded (-8): (null). [hostname "www.testing.com"] [uri "/forum/login.php"] [unique_id "TDMQWW3LaKoAAGiQ0EYAAAAP"]

==============================================================================

Solution :

In order to solve this error I followed the steps given below :

1) Login to the server as root.

2)Go to directory /usr/local/apache/conf.

Run :

# [root@server~] # cd /usr/local/apache/conf
3)Then Create a file “pcre_modsecurity_exceeded_limits.conf” and paste following lines in it.

Run :

# [root@server conf]# vi pcre_modsecurity_exceeded_limits.conf

Code need to be paste :

#——————————

SecPcreMatchLimit 150000

SecPcreMatchLimitRecursion 150000

#——————————
4) Save and quit the file.(Esc+:wq!)

5) Make sure that the permissions assigned for the file are 600.

Run :

#[root@server ~]# chmod 600 /usr/local/apache/conf/pcre_modsecurity_exceeded_limits.conf

6) Now open the file /usr/local/apachec/conf/modsec2.user.conf .

Run :

# [root@server ~]# vi /usr/local/apachec/conf/modsec2.user.conf

7) Find the line “<IfModule mod_security2.c>“

8 ) Add following line just below the above mentioned line that is “<IfModule mod_security2.c>“
—————————————————–

Include “/usr/local/apache/conf/pcre_modsecurity_exceeded_limits.conf”

—————————————————–

9)Save and quit the file.(Esc+:wq!)

10) Now just restart your apache and mysql service.

Run :

# [root@server ~]# /etc/init.d/httpd restart

# [root@server ~]# /etc/init.d/mysqld restart
The issue should be fixed now.


Error connecting to MySQL: Access denied for user: ‘da_admin@localhost’ (Using password: YES):

Posted in Direct-Admin on December 5, 2010 by Aparna Murthy

Today When connecting to the MySQL in DirectAdmin , I got this error and that would indicated that the “da_admin” user has not been setup correctly. To resolve this I did following:

1) You need to Make sure the root mysql password works. If you know it, Go to mysql,  If you don’t..  then mysql root password can be found in the /usr/local/directadmin/scripts/setup.txt , if it has not been deleted.

It’s under the header “mysql=”.

If it cannot be found, then mysqld will have to be restarted with the –skip-grant-tables option as follows :

==========================================

# [root@test ~]# service mysqld stop

# [root@test ~]# mysqld_safe –skip-grant-tables &

===========================================

This will  start up mysql without the need for a root password. Then run

# [root@test ~]# mysql

You must be enetered to mysql prompt without password, Now run the following command once you’re in:

————————————–

# mysql > use mysql

# mysql > UPDATE user SET password=PASSWORD(‘newpass’) WHERE user=’root’;

# mysql > FLUSH PRIVILEGES;

# mysql > quit

—————————————-

That will reset the root password for you.

killl all process of mysqld and restart the mysqld
# [root@test ~]# killall -9 mysqld_safe

# [root@test ~]# killall -9 mysqld

and start it again :

# [root@test ~]# /sbin/service mysqld start

Now next
2)Once the root mysql password is set, then you can start resetting the da_admin mysql user.

Run :

#  [root@test ~]# mysql -uroot -p

Then press enter. You’ll be asked for the password. Enter the password that you’ve reset in step 1. Once in mysql,

Run:

# mysql > GRANT ALL PRIVILEGES ON *.* TO da_admin@localhost IDENTIFIED BY ‘newdapass’ WITH GRANT OPTION;

#  mysql > FLUSH PRIVILEGES;

# mysql > quit

This will  set the password for da_admin in mysql.

Next in step  3) Now you need to make sure it’s setup correctly for Direct Admin to use.

Edit /usr/local/directadmin/conf/mysql.conf and enter

===================

user=da_admin

passwd=newdapass

===================

4) Now test it in DirectAdmin. It should be fixed now!!!!!!!

 

 

yum upgade/update “Transaction Check Error:”

Posted in Cpanel/WHM on December 5, 2010 by Aparna Murthy

Today While updating yum on one of Centos server I got the following error :

Error :

———————————————————————————————-
Transaction Check Error:file /usr/share/man/man1/xdelta.1.gz from install of xdelta-1.1.4-1.el5.rf.x86_64 conflicts with file from package xdelta-1.1.3-20.i386

Error Summary

———————————————————————————————-

I’ve checked the xdelta package on the server by running the following command :

———————————————————————————————-
[root@server~]# rpm -qa | grep xdelta

xdelta-1.1.3-20

xdelta-1.1.3-20

———————————————————————————————-
I found two pacakages were installed, I tried to remove one xdelta package but I got the error as below :

———————————————————————————————-

[root@server  ~]# rpm –erase xdelta-1.1.3-20

error: “xdelta-1.1.3-20″ specifies multiple packages

———————————————————————————————-
I’ve tried following to resolve this by running following commands :

[root@server ~]# rpm -q xdelta

xdelta-1.1.3-20.x86_64

xdelta-1.1.3-20.i386

 

[root@server ~]# rpm -q –qf “%{NAME} %{VERSION} %{RELEASE} %{ARCH} %{VENDOR}\n” xdelta

xdelta 1.1.3 20 x86_64 CentOS

xdelta 1.1.3 20 i386 CentOS

And then removed unwanted rpm by running below command :

———————————————————————————————-
[root@server ~]# rpm -e xdelta-1.1.3-20.i386

———————————————————————————————-

And then again run
[root@server ~]# yum update

 

Its resolved. cheers!!!!!! :) :)

 

Fatal error: Call to undefined function mb_strtolower() on cPanel server

Posted in Cpanel/WHM on December 5, 2010 by Aparna Murthy

I was facing following error on my site :

=======================================================

Fatal error: Call to undefined function mb_strtolower() in

=======================================================

Cause :

The error was due to mbstring php module  was not installed.

Solution:

To resolve this issue need to recompile apache with Multibye string(mbstring) module.

Once apache is compiled your error should be gone…Cheers!!! :) :) :)

Error While installing FFMPEG on CentOS server “ffmpeg: error while loading shared libraries: libavdevice.so.52:”

Posted in VPS/Dedicated server on December 5, 2010 by Aparna Murthy

After  installing FFMPEG on one of my client server,  I faced following error :

Error :

=========================================================================================root@ip[~]#  ffmpegffmpeg: error while loading shared libraries: libavdevice.so.52: cannot open shared object file: No such file or directory

=========================================================================================

Solution :
Solution on the issue is very simple as follows, Just change your library path by running  below command :
=========================================================================================root@ip[~]#

root@ip[~]# export LD_LIBRARY_PATH=/usr/local/lib/

=========================================================================================
Its done!!!!! Cheers!!!!

Follow

Get every new post delivered to your Inbox.