Drop Down MenusCSS Drop Down MenuPure CSS Dropdown Menu

Friday, 21 February 2014

[FIXED]Exim Line Mismatch Error

While we try to delete mail from the Queue it showing "Line Mismatch Error" as below
root@mailserver [~]# exiqgrep  -f  "<>" -i| xargs exim -Mrm
Line mismatch: 5h 1Qmr1H-0005ql-So

If we try to delete that mail Id as below,Defenetely it will delete but may another mail id will occupies that place again.

Example:
  root@mailserver [~]# exim -Mrm 1Qmr1H-0005ql-So
  Spool data file for 1Qmr1H-0005ql-So does not exist
  Continuing, to ensure all files removed
  Message 1Qmr1H-0005ql-So has been removed or did not exist

This is very annoying for that we could delete mails from "<>" (mailnull) through the mails by,
root@mailserver [~]# exim -bpru | grep '<>' | awk '{print $3}'|xargs exim -Mrm
We could add deleting mail by tim,
root@mailserver [~]# exim -bpru | grep '10h' | awk '{print $3}'|xargs exim -Mrm
Do add concerned parameter to delete mails from the Queue.

Example:
root@mailserver [~]# exim -bpru | grep 'user@domain' | awk '{print $3}'|xargs exim -Mrm

:-)

Friday, 7 February 2014

DNS: Command to delete a line containg specific from all *.db files in server


If you want to delete line containing the string "ns1.<domain_name>.com" from all *.db extention in the server.

Change directory by,
# cd  /var/named/
Run the command below,
# sed -i '/ns1.<domain_name>.com./d' *.db
Note: The above commamd will delete the line specified by the string "ns1.<domain_name>.com "  from all *.db files in the server .

[FIXED]mytop Error in option spec: “long|!”

Sometimes after installing "mytop" , it may show the following error,
Error in option spec: "long|!"

To fix this error , edit " /usr/local/bin/mytop " , by

# vim /usr/local/bin/mytop

Find the line  "long|!" and comment that line by adding '#' to that line.

Example :


#  "long|!"              =&gt; \$config{long_nums},

That's it, Now run mytop. :-)

Thursday, 6 February 2014

[FIXED]ERROR: Message not sent. Server replied: Connection timed out 110 Can’t open SMTP stream.


" Message not sent. Server replied: Connection timed out 110 Can’t open SMTP stream."

If you have got the above ERROR while trying to send mails from your account,


Login to the server as root and Edit the csf.conf,

# vi /etc/csf/csf.conf

 Search for the line " SMTP_BLOCK = "1" " and change it into " SMTP_BLOCK = "0" .

That's it. Now try to send mails.


Wednesday, 5 February 2014

script for checking Server memory

If you would like to know the advanced memory details of your server, Just do the below steps ..

1)Download the Script by executing the command,

# wget http://www.pixelbeat.org/scripts/ps_mem.py

2) Change the permission by ,

# chmod +x ps_mem.py
3) Show your server memory details by executing the command ,
# ./ps_mem.py

Now you could see the memory usage of all applications. :-)

[FIXED](98)Address already in use: make_sock: could not bind to address 80


If you'd got  the the following error  while starting Httpd service ,do the steps

 " (98)Address already in use: make_sock: could not bind to address 80"



First check and  make sure that the port 80/443 is not being used by any other service or application using the netstat command, by
# netstat -tulpn| grep :80
 If port 80 is bind to httpd, kill all process by ,
# killall -9 httpd
 Now start the httpd service by,
# /etc/init.d/httpd start

That's it. :-)





[FIXED]Name or service not known: mod_unique_id: unable to find IPv4 address of ""


When you came to know about Apache service status is not running and while trying to restart, it failed and the Apache error logs showed following error

"[alert] (EAI 2)Name or service not known: mod_unique_id: unable to find IPv4 address of "server.example.com"
Configuration Failed
"

Just check the Apache configuration syntax file by using command,

 # httpd -t
Syntax OK
This is Okay,

Now the issue will be on your " /etc/hosts ' file ,

# vi /etc/hosts
check the file and add your hostname.

after that, restart apache.

That's it. :-)

[FIXED]MySQL ERROR: The server quit without updating PID file

Some cases you will  may face to get this error on MySQL service.

root@ [~]# /etc/init.d/mysql status
ERROR! MySQL is not running, but lock file (/var/lock/subsys/mysql) exists

If you've got  above error just remove the " MySQL lock file " and restart the server.
root@ [~]# rm /var/lock/subsys/mysql
rm: remove regular empty file `/var/lock/subsys/mysql’? y


 If you may get the following pid error while restarting the mysqld service,

 —————————
root@ [~]# /etc/init.d/mysql restart
ERROR! MySQL server PID file could not be found!
Starting MySQL… ERROR! The server quit without updating PID file (/var/lib/mysql/hostname.pid).

 —————————

In this case check the MySQL process and kill it.

———————
root@ [~]# ps aux | grep mysql
root 32616 0.0 0.0 107412 864 pts/3 S+ 11:14 0:00 grep mysql
——————–

Here, there is no more MySQL process, so I need to check the MySQL log.

Sample log:
—————
130728 11:23:45 [ERROR] /usr/sbin/mysqld: unknown variable ‘set-variable=max_user_connections=50′
130728 11:23:45 [ERROR] Aborting

130728 11:23:45 InnoDB: Starting shutdown…
130728 11:23:45 InnoDB: Shutdown completed; log sequence number 2153996
130728 11:23:45 [Note] /usr/sbin/mysqld: Shutdown complete

130728 11:23:45 mysqld_safe mysqld from pid file /var/lib/mysql/hostname.pid ended
—————
If the issue still persist please check the MySQL log may be there is any incorrect entry on my.cnf file.

Edit the my.cnf file and #hash the enrty then start the MySQL.

—————
root@ [~]# /etc/init.d/mysql start
Starting MySQL.. SUCCESS!
root@ [~]#

—————

That's it. :-)

[FIXED] cPanel/WHM EasyApache failed YUM error

Some cases if you try running " /scripts/easyapache " , Yum is showing error

!! " The server’s system package manager, ‘YUM’, failed.  " !!

In order to run easy apache run the commands below, 
# yum clean headers
# yum clean packages
# yum clean metadata
# yum clean dbcache
# yum clean all
If the above commands doesn't work well , Run yum update command, to resolve the error.
 # yum update
If yum update failed it may possible that the RPM database is corruption it can be resolved by running below commands,
# rm -f /var/lib/rpm/__db.*
# rpm -vv –rebuilddb
# yum update
Once yum update is successful try running" /scripts/easyapache " which should work without any error now.

Thats it. :-)