Archive for March, 2009



How to repair MySQL table from SSH

Saturday, March 28th, 2009

If you are getting an MySQL related error on your site for any database, you can repair the database through SSH from MySQL prompt.

For example:

Invalid SQL: SELECT * FROM `something` WHERE `id` = '151' ORDER BY `someid` ASC LIMIT 0,20; (Can't open file: 'sometable.MYI' (errno: 145))

Login to your server as root.

Firstly check the status of MySQL on your dedicated server. Normally, it should be ok – as you’re getting this error.

The database table can be repaired only if the Mysql server is in running status. You can check the status by the command.

root# /etc/init.d/myssql status

Now, login to the MySQL database for a required user.

mysql> mysql –u databaseusername –p database password databasename

You need to select that particular database having problem.

mysql> use databasename;

Now, you will have to check whether the table is corrupted. On giving the below command you will get a NULL value as your output if it is   corrupted otherwise it’s alright.

mysql> check table tablename;

If the table is corrupted for that particular database, then you need
to repair the table by giving the following command.

mysql> repair table tablename;

This will repair the table for you.
This article is released by SupportFacility.Com — the leaders in providing outsourced technical support, live chat support & help desk support for web hosts. Interested ? Opt for a trial now.


CPanel EXIM error – remote_smtp defer (111): Connection refused

Tuesday, March 24th, 2009

On a cPanel dedicated server, exim was unable to deliver emails and all the emails were stuck in mail queue. Here what we found in the exim_mainlog

2009-03-22 03:46:04 H=localhost (Server-IP) [127.0.0.1] Warning:
Sender rate 0.0 / 1h
2009-03-22 03:46:04 1LlJJk-0003cX-HY <= test@somedomain.com H=localhost (Server-IP) [127.0.0.1] P=esmtpa A=fixed_login:test@somedomain.com S=798 id=1853.17.23.12.34.1237711564.squirrel@Server-IP
2009-03-22 03:46:07 1LlJJk-0003cX-HY alt3.gmail-smtp-in.l.google.com [209.85.218.31] Connection refused
2009-03-22 03:46:10 1LlJJk-0003cX-HY alt4.gmail-smtp-in.l.google.com [209.85.221.10] Connection refused
2009-03-22 03:46:10 1LlJJk-0003cX-HY == ourtestmail@gmail.com R=lookuphost T=remote_smtp defer (111): Connection refused

While troubleshooting the issue, we found the following:

root@server [~]# iptables -nL

Chain OUTPUT (policy ACCEPT)
target     prot opt source               destination
ACCEPT     tcp  --  0.0.0.0/0            127.0.0.1           tcp dpt:25
REJECT     tcp  --  0.0.0.0/0            0.0.0.0/0           tcp dpt:25
reject-with icmp-port-unreachable

You have to remove this two iptables rules.

root@server [~]# iptables -D OUTPUT 2
root@server [~]# iptables -D OUTPUT 1

You then have to save iptables and restart.

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

Now, check your mails and you will see all the mails getting delivered.

This article is released by SupportFacility.Com — the leaders in providing outsourced technical support, live chat support & help desk support for web hosts. Interested ? Opt for a trial now.


Sendmail starts very slow on linux dedicated server

Saturday, March 14th, 2009

While working on a linux dedicated server without any control panel on it, the sendmail service starts very slow – it takes almost 7-10 minutes. While investigating the server, we checked the hostname and it was as below:

root# hostname
MarkSmith

we found that the hostname did not resolve, to get this fixed we used a valid domain which resolved to this server – so we changed the hostname of the server.

And, the sendmail responded very quickly and worked fine.

This article is released by SupportFacility.Com — the leaders in providing outsourced technical support, live chat support & help desk support for web hosts. Interested ? Opt for a trial now.


Plesk windows: Domain is not working with www

Monday, March 9th, 2009

On a plesk windows dedicated server, a domain worked without www but for some reason it did not work with www.

Login with administrator to the windows server.

Goto Start> Run > and type “inetmgr” (this opens IIS)

Right click on the domain and check properties

At the Website tab click on advanced and add the following there:

IP Port www.YourDomain.Com

For ex. xx.xx.xx.xx 80 www.YourDomain.com

Restart IIS and now check in your favourite browser and it should be working now.

That’s it!

This article is released by SupportFacility.Com — the leaders in providing outsourced technical support, live chat support & help desk support for web hosts. Interested ? Opt for a trial now.