Showing posts from 2014

SSH Password Authorization Tweak in cPanel

Issue: Sometimes, you get the following error while accessing your server through root: Error:  ssh_exchange_identification: Connection closed by remote host Fix:  Go to "Security Center >> SSH Password Authorization Tweak" and then Disable Password Auth and Enable it again. SSH Password Authorization Tweak in WHM panel  allows you to enable or disable password authorization for SSH authentication. If you disable password authorization, the system will force users to use keys when they use SSH to access your server. More Info: If you are still unable to SSH to the server, I would suggest contacting your DC or your hosting provider immediately. This issue may have arisen due any one of the issues below. >> /etc/hosts.allow Check /etc/hosts.allow and make sure that your local machine IP address is whitelisted in it. If you are not sure about the IP address, please

InnoDB crashed

Sometimes, our databases got corrupted and innoDB crashed in the server. Due to this, MySQL service won't restart and following message: Starting MySQL..The server quit without updating PID file (/var/lib/mysql/[FAILED] or MySQL server PID file could not be found! In such situation, you will have to start MySQL with InnoDB in force recovery mode using the following steps: Step 1. Stop MySQL service Step 2. Backup /var/lib/mysql directory Step 3. Add the following line into /etc/my.cnf: innodb_force_recovery = 4 Step 4: Restart MySQL. Your database will now start, but with innodb_force_recovery, all INSERTs and UPDATEs will be ignored. Step 5: Dump all tables Step 6: Shutdown database and delete the data directory. Run mysql_install_db to create MySQL default tables Step 7: Remove the innodb_force_recovery line from your /etc/my.cnf file and restart the database. (It should start normally now) Step 8: Restore everything from your backup

Dovecot_plain authenticator failed in cPanel server

Issue: You get the following error while accessing your email account: 2014-09-08 14:03:43 dovecot_plain authenticator failed for ([]) [IP ADDRESS]:59278 I=[IP ADDRESS]:465: 535 Incorrect authentication data (set_id=email@domain_name) Fix: Users with root access can fix this problem through WHM using the following steps: 1. Login to WHM 2. Locate the Email section in the left-side panel 3. Select Repair Mailbox permissions 4. Click Proceed.  

ERROR! The server quit without updating PID file

Issue: MySQL is not reatsrting in the server. You get the following error: Starting MySQL...... ERROR! The server quit without updating PID file (/var/lib/mysql/ ERROR! MySQL is not running, but lock file (/var/lock/subsys/mysql) exists Fix: This likely indicates that native AIO support is not enabled on the server. Add the following line to /etc/my.cnf and MySQL should then restart successfully: Code: innodb_use_native_aio = 0

Perl scripts are showing 404 error in cpanel

Issue: Sometimes, you get 404 error in the browser while executing perl script hosted under cPanel server. Fix: The 404 errors may occur for perl script because of the domain doesn't have CGI enabled for the account. You can check the same using the following command: [root@server]# grep HASCGI /var/cpanel/users/username* HASCGI=0 ^ In order to fix this issue for that user, you should be able to modify the HASCGI value in the file "/var/cpanel/users/username*" to 1 and then run /scripts/updateuserdomains and then /scripts/rebuildhttpdconf P.S: Replace username with your actual user of the domain.

Mail directory size is not updated in cPanel

Issue: Sometimes, when you delete a huge number of emails from your email account, the mail directory size is not getting updated in cPanel and showing the old space usage. Fix: There is a cPanel script to forcibly update the mail directory size in the server. You need to logged into the server through root and run the following command: root@server []# /scripts/generate_maildirsize --verbose --allaccounts --force --confirm Once the script is successfully executed, check the email account size in your cPanel. It should shows the correct disk usage.

Disk warning: The file system is full

Issue: Your server file system's disk space is full and you get such email from cPanel: The file system /dev/sda3, which is mounted at /usr, has reached warn status because it is 93% full. Server: Primary IP: XXX.XX.XX.XX Notification Type: diskwarn Filesystem: /dev/sda3 Mount Point: /usr Percentage Full: 93% Fix: One solution of this issue is straightforward but tedious procedure that you can increase the disk space value at the mount point /usr. But, before that one simple fix you can try. You can check whether logs are consuming more space as sometimes logs are not rotating in the server. If so, you can delete/remove the old logs and enable the log rotation to resolve the issue. In my case, I could see that system logs present under the directory "/usr/share/locale/" were consuming the 12 GB space in the server. I have moved the system log file to different file system having much space available. You can also delete the logs if its n

nameserver failed on VPS

Issue: Sometimes you get frequent emails from your VPS server regarding nameservers fail : nameserver failed @ Sat May 24 01:34:46 2011. A restart was attempted automagically. Service Check Method: [check command] Cmd Service Check Raw Output: Fixed ownership on /etc/named.conf Fixed ownership on /etc/rndc.key Fixed ownership on /etc/rndc.conf named is not running If you start named service, it still show the same message Fix: Recent versions of Bind distributed by RedHat and CentOS enable strict zone checking at startup time. This setting can potentially cause problems for Bind service, I have fixed this by adding in /usr/lib64 >> the following symlinks : ln -s ln -s On the previous version of Bind, these little mistakes in the zone files were ignored, latest version - not so much. Zone files updated/fixed and everything works fine.

Connection dropped by imap-server

ERROR: Connection dropped by imap-server It's an issue with extremely large attachments in the mail spool. I think, the issue is the following: with large mail spools or with large attachments within the mailspools, imapd requires a lot more time to parse through the spool. SquirrelMail times out while waiting for imapd to respond. (the default time-out in SquirrelMail 1.x is 15 seconds). Fix:  1. Remove large attachments from the mail spool. 2. Convert the mail spool to a binary format such as mbx that can be parsed and handled more quickly than a straight text file. Use a larger timeout while waiting for the IMAP read request to complete. Thick clients such as Outlook have a configurable timeout from 1 minute to 10 minutes... I believe SquirrelMail 2.x has better support for a longer timeout. If you want to increase the timeout in SquirrelMail 1.x go to line 444 of functions/imap_general.php and change the last parameter of the fsockopen() call from 15 [seconds] to so

Database connection error in Email piping

Issue: Sometimes when you connect MySQL through Jailshell to setup email piping, you get the following error in mail header: Error: Could not connect to the database Fix: There may be more than one reason to occur this issue. You need to check following things to troubleshoot: 1. From the email header we can see the error "Could not connect to the database" and you need to check if "/var/tmp/mysql.sock" symlink is missing in the server. # ll /var/tmp/mysql.sock lrwxrwxrwx 1 mysql mysql 25 Apr 29 20:30 /var/tmp/mysql.sock -> /var/lib/mysql/mysql.sock= The above result is showing that symlink is present. If not, create one using the following command: # ln -s  /var/tmp/mysql.sock /var/lib/mysql/mysql.sock= 2. Cpanel jailshell access to mysql requires the use of "" specifically instead of "localhost", and since the WHMCS autoresponder pipe script access mysql, the configuration.php file needed to be updated to change &qu

safe_userchgid error or IP MISSING in WHM on VPS containers

Issue: While creating an account in WHM, sometime following error occurs: safe_userchgid: chown Permission denied at /usr/local/cpanel/Cpanel/ Although, the account has created but IP will be MISSING in the List Accounts section in WHM FIX: You should try to add an user in your VPS to confirm the error: # useradd cptesting001 Setting mailbox file permissions: Disk quota exceeded You can also get the details of error using the following command: # grep vzfs /usr/local/cpanel/logs/error_log edquota: Cannot set quota for user 828 from kernel on /dev/vzfs: No such process edquota: Can't write quota for 828 on /dev/vzfs: No such process In this case, the problem is that quotaugidlimit has been reset to its default for some reason and it's causing the container not to be able to manage users and groups correctly anymore. An easy fix is to simply increase the quotaugidlimit to something above the total of the number of users and groups currently configured. Have a look

How to enable the html display for horde webmail?

To enable the html display for horde webmail you need to modify /usr/local/cpanel/base/horde/imp/config/mime_drivers.php file. Open the /usr/local/cpanel/base/horde/imp/config/mime_drivers.php file in your favorite editor and change the following line from false to true  /* HTML driver settings */     'html' => array(         /* NOTE: Inline HTML display is turned OFF by default. */         'inline' => false,   <==== true         'handles' => array(             'text/html'         ), Save the changes and restart the cPanel # service cpanel restart or # /etc/init.d/cpanel restart As well as restart the Imap server, # /scripts/restartsrv courier Now, check your emails in Horde. :)

Mail server does not work in Plesk

Issue:   Sometimes, you are not able to login to all the email accounts associated with the domain. The following error you get on the Webmail or other mail client. Login failed because your username or password was entered incorrectly. Fix: You can fix the issue by repairing mail server configuration in Plesk. Use mchk utility to repair/rebuild mail server configuration and restore settings for all mailboxes created in Parallels Plesk Panel. You need to run the following command in order to fix the issue in the server: # /usr/local/psa/admin/sbin/mchk  ==> Checking for: mailsrv_conf_init... ok ==> Checking for: mail_handlers_init... ok ==> Checking for: mailsrv_entities_dump... ok ==> Checking for: mail_admin_aliases... ok ==> Checking for: mail_auth_dump... ok ==> Checking for: mailman_lists_dump... ok ==> Checking for: mail_kav8_restore... ok ==> Checking for: mail_responder_restore... ok ==> Checking for: mail_postfix_tra

The server's system package manager, 'YUM', failed

Issue: Sometimes, you encountered through the following error while running Easyapache in a cPanel server : !! The server's system package manager, 'YUM', failed. !! Fix: You can fix the issue by removing openssl library in your server using the following command: # rpm -e openssl --nodeps --justdb --allmatches Now run Easyapache. It should run successfully.

File not Found error in Plesk while exporting database through PHPMyAdmin

Issue: Sometimes, exporting database from WebAdmin in Plesk, you might end up with following error: File not Found can’t find the file at https://xx.xx.xx.xx:8443/domains/databases/phpMyAdmin/export.php  Fix: The issue occurs when you try to export large size database with low "memory_limit" in your server. You need to increase the "memory_limit" module in the 'php.ini' file, in order to fix the issue. You can follow the steps mentioned below to increase the "memory_limit" value in your server: 1) Login to the server as root user. 2) Go to /usr/local/psa/admin/conf/ # cd /usr/local/psa/admin/conf/ 3) Open php.ini file in any of your editor # vi php.ini 4) Increase the memory_limit say 512MB and save the file 5) restart plesk service # /etc/init.d/psa restart Try exporting the database now. The issue should have fixed. :)

404 Error or Too many redirects error on WP password protected directory

Issue: When you password protect your WordPress admin (wp-admin) directory, Wordpress Admin URL will shows 404 Error or Too many redirects error in browser. Fix: To fix this issue, open your main WordPress .htaccess file and add the following code there before the WordPress rules start. ErrorDocument 401 default Now check your Wordpress Admin URL. It will load with double authentication for your WordPress admin area. :)

Fatal error: Incompatible file format in livesite application

Error: Fatal error: Incompatible file format: The encoded file has format major ID 65540, whereas the Optimizer expects 2 in /home/user/public_html/livesite/get_page.php on line 0 Fix:  The issue occurred due to misconfiguration in PHP version and Zend optimizer. In order to fix the issue, you need to upgrade your PHP version from 5.2 to 5.3 or 5.4 and remove the old Zend Loader version code from the php.ini file add the correct Zend Loader version code. If Zend Guard/Optimizer is not installed in the server, you can install it through the following steps: 1. Login to your server via SSH 2. Run:  /scripts/installzendopt The issue should have fixed now. :)