Saturday, June 19, 2010

Common Cpanel issues

SkyHi @ Saturday, June 19, 2010

authentication issue


/etc/init.d/courier-imap restart

/etc/init.d/courier-authlib restart
======================

blockip issue

1) grep /etc/sysconfig/iptables

2) grep /etc/apf/iptables-deny

3) iptables -L | grep

========================
To unblock the ip 206.18.97.243

iptables -D INPUT -s 206.18.97.243 -p tcp -j DROiP
service iptables save
———————–

iptables -I INPUT -s 60.48.177.152 -j DROP

4) grep /etc/icf/deny.host
==================================

cpanel issue
=============

/usr/local/cpanel/

list of scripts r there

./cpkeyclt for updating the cpanel version
./cpup updating the cpanel

—————–

fatal error
a) we can resolve this issue by upgrading the cpanel to latest version

upgrade the cpanel
———

1) whm >> update config

cPanel/WHM Updates

select <>

2) save

3) /scripts/upcp –force
=====================================

cannot access the cpanel
————————

tail -f /usr/local/cpanel/logs/error_log

1) check the .htaccess file

2) /scricpts/upcp –force

3) vi /var/cpanel/users/

delete suspended entry if there is

4) /scripts/updateuserdomains

———————–

Cpanel/whm License expired
—————————-

cd /usr/localcpanel

./cpkeyclt
========================

check the given file for park domain

1) /var/cpanell/users/

2) /scripts/updateyuserdomains

3) /var/named/domain.db

4) /etc/named.conf

5) /usr/local/apache/conf/conf.httpd

6) /etc/localdomains

7) /etc/userdomains

8) /etc/trueuserdomains

9) /etc/trueuserowners

10) /etc/valiases/

11) /etc/vdomainaliases/

12) /etc/vfilters/

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

crontab issue

crontab -e -u

crontab -l -u

cron for updatetime error

solluction
———-

port open 123 in /etc/cpf/conf.apf

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

Weblog issue

/home/delight1/tmp/awstats

AllowToUpdateStatsFromBrowser = 0 to 1

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

ftpissue

1) vi /etc/pureftpd.conf
search passive
enable passive range 3000-5000
2) /etc/apf/conf.apf
enable ingress ftp enable
search ingress

3000-5000

————————————————–
synchronize ftp passowrd – whm
———————————————-
switch to pure-ftp
———————————————-

insmod ip_conntrack_ftp
lsmod
modprobe ip_conntrack_ftp

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

I am sorry, Ftp client is not provided by us. You have to get it from the internet. If you want you can us this ftp client
http://software.visicommedia.com/en/products/aceftpfreeware/
====================================

mailmonissue

mailmon/maillist

/script/fixmailmon

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

dnsissue for cluster servers

/scripts/dnscluster synczone
======================================

changing logindetails

1) vi /etc/ssh/sshd_config

PermitRootLogin no

2) useradd admin
passwd admin

3) whm >> Security >> Manage Wheel Group Users

Add a user to the wheel group

4) make port oen

vi /etc/apf/apf.conf
search ingress
add the port there

restart apf
save iptables
restart iptables

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

Bandwidth issue

http://forums.vpslink.com/showthread.php?t=2461

^MWe cannot support this type of issue through our ticketing system, however, please consider the following advice (you are welcome to follow it at your discretion):

#1 – Disable Image Hotlinking See these instructions to disable hotlinking via mod_rewrite as a basis for implementing an HTTP referrer check and blocking visitors who may be viewing your content from someone else’s site.

#2 – Block dubious bots – Set up a robots.txt directive to Disallow: /pot-o-honey/ under your web root, then add a script under /pot-o-honey/ which adds IP addresses which access the script to a log. Create a link to the script from your index page and hide the link from real visitors:

Code:

Link

Block every IP which shows up in the log file.

#3 – Check your logs – It sounds as though the traffic is primarily web traffic (so this may not be a major component to the issue) but you should run a security audit and review your logfiles if you continue to see excessive bandwidth usage on your VPS.
===================================

shell access
Main >> Account Functions >> Manage Shell Access
Main >> Security >> Security Center >> Compilers Tweak >>enable compilers
for /usr/bin/gcc*
/usr/bin/g++*
====================================

rvskin issue

As posted in the RVskins forum, the fix should be:

rm -f /usr/local/cpanel/Cpanel/rvversion
perl /root/rvadmin/auto_rvskin.pl

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

perl issue (YaBB.pl)

1)add entry in apache conf

AddHandler cgi-script .cgi .pl

2) cp -p YaBB.pl /home//cgi-bin/YaBB.pl

3)add entry in virtual entry of apache conf

Options FollowSymLinks +ExecCGI
===================================

protect listings of map content

http://www.roscripts.com/forum/hosting/69-need-hide-website-folder.html

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

GETTING BLANK PAGE

-It might be as simple as turning on “short_open_tag” (currently set to Off) for PHP5.

killall -9 httpd

then restart apache

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

OUTLOOK ERROR CODES

http://support.microsoft.com/kb/813514

http://www.nthelp.com/50/Outlook_error_codes.htm

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

Frontpage issue

To publish using Frontpage Extensions, your domain *MUST* point to our servers and be fully propagated before you can publish your web!

To publish using Frontpage2000 do the following:
1. Open Frontpage
2. Open your web
3. Go to File —- Publish Web
4. Enter http://www.yourdomain.com, hit OK
5. It will prompt for your user name and password, these can be found in your confirmation email
6. Once published, you can view your domain at domain.com
===========================================

Solution for the RVSiteBuilder issue in cPanel

1. Make sure ioncube is selected under WHM->Server Configuration >> Tweak Settings >> PHP section
2. perl /var/cpanel/rvglobalsoft/rvsitebuilder/panelmenus/cpanel/scripts/autofixphpini.pl
3. Restart cPanel service: /usr/local/cpanel/startup
4. Open /usr/local/cpanel/3rdparty/etc/php.ini and add and search for zend_extension
5. Add following line at the end of the zend section, just before the line where it says Windows extension
zend_extension=”/usr/local/cpanel/3rdparty/fantastico/loaders/ioncube_loader_lin_5.2.so”
6. Save and quit the file.
7. Restart cPanel service: /usr/local/cpanel/startup

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

Error from datacenter:

22/06/2008 15:06 3:34 Connected ok, but error occured receiving from socket
22/06/2008 15:06 0:00 An existing connection was forcibly closed by the remote host 87.117.197.52:25

type this command at the shell prompt:

ulimit -a

root@nameless1 [~]# ulimit -a
core file size (blocks, -c) 1000000
data seg size (kbytes, -d) unlimited
file size (blocks, -f) unlimited
max locked memory (kbytes, -l) unlimited
max memory size (kbytes, -m) unlimited
open files (-n) 4096
pipe size (512 bytes, -p) 8
stack size (kbytes, -s) 8192
cpu time (seconds, -t) unlimited
max user processes (-u) 14335
virtual memory (kbytes, -v) unlimited

check whether the max user processes is aroung a value of 14000, if it is a high value, change it to value like this. then add thising
ulimit -u 14335

then add it in the .bashrc file
=============================

get error while connecting to remote database using mysql_connect function: we receive the following error when calling that mysql_connect function:

___________________
MySQL Connection Error #2003

Can’t connect to MySQL server on
‘mysql.leglobal.dreamhosters.com’ (4)

fix: try using stopping the firewall of our server, check if the remote ip is blocked, then allow their ip in the apf or csf firewall. restart the firewall. then check :
telnet remote server 3306
if this is connecting without any problem, the issue is fixed.

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

phpmyadmin error:

Cannot start session without errors, please check errors given in your PHP
and/or webserver log file and configure your PHP installation properly.

Fix:uscripts/makecpphp
Fix: run /scripts/makecpphp
then /scripts/upcp

Also check whether /home/phpmyadmin/ exists, if not mkdir phpmyadmin and then
chown cpanelphpmyadmin.cpanelphpmyadmin phpmyadmin
and check if /var/cpanel/userhomes contains cpanel-phpmyadmin:

root@hostname /var/cpanel/userhomes#ll
drwxr-xr-x 3 cpanel-phpmyadmin cpanel-phpmyadmin 4096 May 7 03:09 cpanel-phpmyadmin
====================================

For updating the nameservers in the new server after account transfer:

check in the Main >> IP Functions >> Show IP Address Usage for the new server : here it is 208.43.163.240 (only one ip)

and check the same in old server( it may be difft ips)

Now , take a backup of /var/named of old server
then for each of the IPs in the used server, run perl -pi -e “s//208.43.163.240/g,” /var/named/* in the old server itself. So that the old servers db file so ll be updated as to resolve all the accouts to new IP. This will reduce any downtime that may have occurred till the new namservers are all set.
=========================================

Named errors:

/etc/init.d/ipaliases restart
/scripts/fixnamedviews

==========================================
issue: phpmyadmin not working:

fix: the mysql.sock was absent in /tmp , create a symb link and issue is fixed

also for fantastico

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

IMPORTANT:

IF a custom php.ini do not work (ex: register global to be turned on or off), with a domain , when the server has both php 4
and 5: then the php must be compiled as suphp: you can change it at “configure php and suexec” option at the whm. It wont wor
k with cgi
====================================

Spamd not running
error on restarting exim

fix: type cpan
this will provide you a cpanel prompt. here you have to type
cpan > force install Mail::SpamAssassin
this will reinstall spamassassin

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

wget error while upgrading fantanstico:

in whm>fantastico>settings, here set the wget timout to be 30 s or more

===========

In fantastico of a domain , what ever application is chosen, we get an error “This application is currently not available. Please contact your host.”

Fix: Login to your whm -> click on ‘Fantastico De Luxe WHM Admin’ -> then click on ‘Detect/Fix common problems’, this will resolve your issue. I hope this clarifies.
Fantastico error

Solln:

enable ioncube in tweak setting and run /scripts/makecpphp

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

to call the php extensions as php5 files, add the following in the .htaccess file in the public_html folder.

Options All -Indexes
AddHandler application/x-httpd-php5 .php

The first line is to disable the indexing (directory index which would call the index.php file as per the order), next is to use addhandler.

refer http://nsdesign.net/cgi-bin/newdesk/new/cgi-bin/staff.cgi?do=ticket&cid=12883
==================================

to compress a folder using tar

tar -cvf example.tar.gz example

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

Premature end of script headers : in apache logs
Fix: check the permissions, folder permission to be 755 and file permission to be 644
===================================

formmail issues:

http://www.interads.co.uk/formmail/

( http://www.scriptarchive.com/formmail.html

http://www.tectite.com/formmailpage.php)

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

SOCKET ERROR::
try telnet using correct port
if it’s not working open that port using
iptables -I INPUT -p tcp -s 63.247.77.234 –dport 443 -j accept
============================================

Perl issue

n my case, there was a problem with access right to yaml file (it was owned by root). I changed the owner and works fine:

Code:
chown ename:ename /home/ename/.cpaddons/cPanel\:\:Support\:\:cPSupport.0.yaml

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

Error from park wrapper: Using nameservers with the following IP

Go to whm and check tweak settings

Allow Creation of Parked/Addon Domains that resolve to other servers (ie domain transfers) [This can be a major security problem. If you must have it enabled, be sure to not allow users to park common internet domains.]
and make sure it is checked

or
Add IP to
/etc/ips.remotedns

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

ssl issue

Error code: sec_error_untrusted_issuer

Sol:

when the error page shown.

on the page Click on ” or Add an Exception”

Box Pops Up — in the box click on ” Get a certificate “

Certificate will be added and click ” verify the certificate “

This will fix the issue..

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

If you are speaking of Domain Keys, this can be enabled from any of your cPanels.
From your WHM, ensure your cPanels are using the x3 theme. From cPanel, you will see a Mail Authentication section. You will be able to enable Domain Keys from there.

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

scenario

After changing the primary ip of the Cpanel server following mail comes to the Admin from cpanel@server.xxxx.com

IMPORTANT: Do not ignore this email.
The hostname (server.xxxxx.com) resolves to . It should resolve to
xxx.xxx.xx.x. Please be sure to correct /etc/hosts as well as the ‘A’
entry in zone file for the domain.

You may be able to
automaticly correct this problem by using the ‘ Add an A
entry for your
hostname ‘ under ‘ Dns Functions ‘ in your Web Host Manager

But the host name resolves to the server properly.

ANSWER
The problem was not with the /etc/hosts …etc
Check the /etc/ipaddrpool is the new ip listed. I got a old ip listed there.
check /etc/ips .

The problem was some one saved the old eth configuration in
/etc/sysconfig/network-scripts/fcfg-eth0.back - when the network is restarted
the old ip gets loaded and created an conflict.

After removing the old ip’s config and restarting the network the old Ip is
gone but the secondary ips are also missing ….!!

Go to WHM and remove the secondary ips once and added the secondary
ip’s again issue fixed…..!

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

exim issue (-53)

/scripts/exim_tidydb

EXIM mail server & CPanel

“19d 1K30Yy-0000nQ-Oh var/spool/input/output error”

Struggled for three days for solution.

Scenario

I saw the exim mail queue is more than 50000 and tried to remove frozen mails.
got an error while running the command

exiqgrep -z -i | xargs exim -Mrm

19d 1K30Yy-0000nQ-Oh error
I tried
exim -Mrm
1K30Yy-0000nQ-Oh
got the message as
“19d 1K30Yy-0000nQ-Oh input/output error”

But I was able to run other commands like
exim -bpru|grep frozen|awk {‘print $3′}|xargs exim -Mrm
to remove frozen mails…

/scripts/eximup –force made a mess the server hung up
/scripts/exim4 –force success but same error.
Answer

It was simple but it didn’t strike for 3 days …
1.locate 1K30Yy-0000nQ-Oh
2.cd /var/spool/exim/input/y
3.rm -rf 1K30Yy-0000nQ-Oh

Then tried the same command
exiqgrep -z -i | xargs exim -Mrm
as well as
exiqgrep -o 432000 -i | xargs exim -Mrm
Wow it is working again…

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

unable to check htaccess file, ensure it is readable

Then first please check the permissions of your folder and .htaccess file because folder permission are most likely 755 and .htaccess permission 644 . To change permissions use : chmod 644 the_name_of_your_path after that still you are getting same problem,then might be Frontpage Extension problem.

* Login into your CPanel account
* Click on Frontpage Extensions icon
* Click on Reinstall extensions button beside your problem domain.
* Done.

The .htaccess pcfg_openfile: unable to check htaccess file problem will be fixed.

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

EXIM mail server & CPanel

“Server replied: 421 Unexpected failure, please try later”

Gone crazy seeing that error

Scenario

The server stopped sending and receiving emails.. squirrel mail throws error
“Server replied: 421 Unexpected failure, please try later”

checked via sending mail from root to user wow works ..but no donuts

The mails which I sent got bounced back with error
Technical details of permanent failure:
“PERM_FAILURE: Google tried to deliver your message, but it was rejected by the recipient domain. We recommend contacting the other email provider for further information about the cause of this error. The error that the other server returned was: 530 530 5.7.1 Client was not authenticated (state 13).”
Checked the logs it said it is unable to locate user permission error

Google & Cpanel forum helped me again …..

Answer

The problem was /etc/localdomains file permission problem it must be “644 “
changed and restarted exim …
The mails started working again.

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

Steps for resetting word press login details

http://codex.wordpress.org/Resetting_Your_Password#Through_phpMyAdmin

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

reverse DNS (PTR request

If you want your mail delivered properly the Official Host Name of the sending server should match the PTR (reverse DNS) of the sending IP Address, and there should be an “A” record that matches the official host name as well.

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

WWW::Curl::Easy module needs to be installed on the server

step 1 :login whm >> module installers >> click manage button in per module >> search “WWW::Curl::Easy” there and install

step 2: login cpanel >> perl modules >> search ” WWW::Curl::Easy” and install

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

taking php.ini from local settings

for this edit two files

.htaccess and create php5.cgi in public_html folder

vi php5.cgi

#!/bin/sh
/usr/local/cpanel/cgi-sys/php5 -c /home/dtn/public_html/php.ini

vi .htaccess

Options All -Indexes
AddHandler application/x-httpd-php5 .php
Act

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

time reset for server

ntpdate clock.redhat.com



REFERENCES

http://abinz.wordpress.com/common-cpanel-issues/