Home
Introduction to cPanel® Troubleshooting
Contents
1. party stunnel etc analog awstats webalizer CR Training Seminar 2006 usr local cpanel 3rd party bin etc php ini DO ixed ES joncube CR Training Seminar 2006 Houses proprietary configuration data for cPanel including Primary cPanel configuration User configurations Reseller configurations Accounting conversion and update logs Bandwidth data Customized service templates CR Training Seminar 2006 var cpanel cpanel config resellers accounting log features packages logs updatelogs bandwidth zone templates users mainips Training Seminar 2006 var cpanel cpanel config The primary cPanel configuration file Each variable within influences the way cPanel behaves Variables are line delimited with variables separated by an equal sign If file does not exist cpanel falls back to defaults Example dumplogs 1 Dump logs after processing keeplogs 0 Keep a copy of access logs at the end of each month skipwebalizer 1 skip parsing webalizer statistics extracpus 5 The load limit of which backup and log processing service
2. Running cPanel Updates cPanel updates can be called outside of the regularly scheduled cron time simply by executing scripts upcp If cPanel components are missing or corrupted that were not replaced with the regular cPanel update they can be replaced by executing scripts upcp force UB Training Seminar 2006 scripts cpanelsync scripts updatenow Iscripts sysup scripts rpmup CR Training Seminar 2006 cpanelsync seripts cpanelsync is called upon by scripts updatenow and scripts upcp Provides md sum based synchronization with update servers md sum table is stored in destination_directory cpanelsync Accepts three arguments host remote path local path scripts cpanelsync httpupdate cpanel net cpanelsync RELEASE scripts scripts UB Training Seminar 2006 Calls cpanelsync to update contents of scripts UPCP directory which then stores it s md sum table at scripts cpanelsync l Should only be run from upcp but can be ale executed from command line when fromupcp is passed CPANELSYNC Is the first update script called upon from scripts upcp CR Training Seminar 2006 UPCP Second update script called from upcp Updates most cPanel managed services with the exception of UPDATENOW apache along with a number of other fundamental service
3. UB Training Seminar 2006 Heavily mysql dependent data is stored in the eximstats database eximstats mysql user password is stored in var cpanel eximstatspass password is generated by usr local cpanel bin eximstatspass Database can be installed by running usr local cpanel bin updateeximstats CR Training Seminar 2006 Update configuration Update scripts Applying updates CR Training Seminar 2006 cPanel Maintenance By default cPanel applies nightly updates at 2 13AM in the root crontab scripts upcp dispatches these updates using the following key components scripts updatenow synchronize scripts directory Iscripts sysup updates cPanel managed rpms Iscripts rpmup all other system updates Updates are logged to timestamped files in var cpanel updatelogs Update configuration is stored in etc cpupdate conf UB Training Seminar 2006 letc cpupdate conf The following variables are available in cpupdate conf CPANEL manual stable release current edge This variable controls which update branch is used for cPanel updates and controls whether the updates are applied manually or automatically Default value release SYSUP never all other values are assumed true RPMUP never all other values are assumed true CPANEL current RPMUP daily SYSUP daily UB Training Seminar 2006
4. Additionally if RRDtool is not installed bandwidth parsing performance will drop signifigantly RRDtool can be installed by executing scripts rrdtoolinstall UB Training Seminar 2006 Log Processing Statistics are parsed for each child domain of the given account Will be influenced by variables in var cpanel cpanel config Skip statistics generator skip generator_ name Logs will be retained or deleted based on keeplogs keep logs at the end of the month dumplogs dump logs after parsing UB Training Seminar 2006 Common cpanellogd Issues Statistics are stalling or are taking unreasonable amounts of time Usually indiates that the server load average is consistently exceeding the defined load limit Limit is defined as extracpus in var cpanel cpanel config Restrictive BLACKHOUR definitions in WHM gt Statistics Software Configuration All other issues should be present in usr local cpanel logs stats log CR Training Seminar 2006 Services CPSRVD CHKSERVD CPANELLOGD CPBACKUP EXIMSTATS CR Training Seminar 2006 cPanel Backups GENERAL INFORMATION Backup configuration is performed in WHM gt Backup gt Configure Backup cPanel backups are performed by scripts cpbackup which is configured by default to execute at 1 00 AM in the root crontab Backup archives are created using the scripts pk
5. Presented by Stephen Bee Bi Training Seminar 2006 CPanel Essentials Core directory structure Configuration Files cPanel Services cPanel Maintenance cPanel Scripts CR Training Seminar 2006 CPanel integrates itself into many locations within the host system with the following three being the most notable usr local cpanel var cpanel Iscripts CR Training Seminar 2006 usr local cpanel cpsrvd cpsrvd ssl cpkeyclt CR Training Seminar 2006 Houses only scripts and binaries which provide installation and configuration of many cPanel managed services Notable Contents eximstats checkperlmodules CR Training Seminar 2006 access_lo g CPSRVD l error_log CPANELLOGD stats log G e CPKEYCLT Zn CR Training Seminar 2006 Breakdown of an access_log source address username date status url browser agent Example access_log entries 127 0 0 1 root 31 May 2006 23 11 31 0500 500 O https www cpane net 2087 scripts command PFILE main Mozilla 5 0 X11 U Linux 1686 en US rv 1 8 0 3 Gecko 20060512 Firefox 1 5 0 3 127 0 0 1 root 31 May 2006 23 11 31 0500 500 O https www cpanel net 2037 scripts command Mozilla 5 0 X11
6. U Linux 1686 en US rv 1 8 0 3 Geck0 20060512 Firefox 1 5 0 3 Bi Training Seminar 2006 Example Errors Can t locate Net AIM Connection pm in INC INC contains scripts usr lib perl5 5 8 7 1686 linux usr lip perl site_perl 5 8 7 i686 linux usr lib perl5 site_perl 5 8 7 usr lib perl5 site perl 5 8 5 usr lib usr lib perl5 site_perl 5 8 3 usr lib perl5 site_perl 5 8 2 usr lib perl site_perl 5 8 1 usr lib perl5 site usr lib perl5 site_perl at usr lib perl5 site perl 5 8 7 Net AIM pm line 37 BEGIN failed compilation aborted at usr lib perl5 site perl 5 8 7 Net AIM pm line 37 Compilation failed in require at scripts cPScript iContact pm line 14 BEGIN failed compilation aborted at scripts cPScript iContact pm line 14 Compilation failed in require at scripts wwwacct line 18 BEGIN failed compilation aborted at scripts wwwacct line 18 Bi Training Seminar 2006 Example of license_log entry License Update Request at Wed May 31 02 16 13 2006 License Server returned Key Accepted License Server returned Key Follows License Updated Successfully CR Training Seminar 2006 Example of stats_log entry Update for config home techdump tmp awstats awstats cpanel net conf With data in log file usr local apache domlogs techdump net Phase 1 First bypass old records searching new record Direct access to
7. and install any Perl modules required by cPanel Iscripts fullhordereset Updates horde and resets the horde mysql user password Iscripts fixquotas Will attempt to rebuild quota database per information stored in etc quota conf Training Seminar 2006
8. If service is not accessible via loopback chkservd will report the service as failed UB Training Seminar 2006 Command Based Monitoring Required Definitions service servicename restart command owner service mysq l x x x scripts restartsrv_mysql mysql mysq l COMMAND BASED OPTIONS Multiple users can be specified with a pipe delimited list user1 user2 Command name can be any valid regular expression note This expression will be matched against all processes owned by that user Be specific UB Training Seminar 2006 Services CPSRVD CHKSERVD CPANELLOGD CPBACKUP EXIMSTATS CR Training Seminar 2006 cpanellogd is responsible for parsing and updating bandwidth logs and dispatching statistics generators on each account per their individual configurations Configured through Statistics Software Configuration and Tweak Settings in WHM Statistics are compiled and stored for each account in home username tmp with each respective statistics application being assigned it s own individual subdirectory home username tmp webalizer analog awstats urchin Training Seminar 2006 cpanellogd Cont Optional server wide statistics configurations are stored in etc stats conf while user specific configurations may reside in home fusername tmp Notable Variables in e
9. andwidth history for each account Each named after their respective user History files are stored in human readable format while actual bandwidth data are stored in round robin databases Example of a bandwidth history file 1 2006 all 455 1 2006 http 455 11 2006 all 1852 11 2006 smtp 1852 12 2006 all 3935 12 2006 http 309 12 2006 smtp 3626 14 2006 all 27182 Bi Training Seminar 2006 vi ee File name is inherited from the feature list name Contains a line delimited list of feature variables and a zero or one value Variables control what cPanel resources are available to users Example of a feature list file diskusageviewer 1 indexmanager 1 sslmanager 1 emaildomainfwd 1 cpanelpro_support 1 cpanelpro_leechprote ct 0 Training Seminar 2006 var cpanel packages Contains a list of packages named after the packages they represent If package belongs to reseller file name is prefixed with reseller name Each of these values determines the values created in cPanel user file Example of a package file FEATURELIST defau f Feature list to be assigned to accout It Quota in megabytes to be assigned to account QUOTA 100 CGI should be enabled for this accoutn CGl y Frontpage extensions should be enabled for this account FRONTPAGE y The cPanel theme to use for this account CPMOD x Ma
10. anel Log Services Eximstats Chat Services Mailman Interchange CR Training Seminar 2006 Verify if ports are in use netstat Inp egrep 20 8 9 netstat Inp egrep 20 8 9 tcp O 00 0 0 0 2082 tcp 0 00 0 0 0 2083 tcp 0 00 0 0 0 2086 tp 0 00 0 0 0 2087 tcp 0 00 0 0 0 2095 tcp 0 00 0 0 0 2096 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 LISTEN LISTEN LISTEN LISTEN LISTEN LISTEN 10185 cpsrvd wait 325 stunnel 4 15loc 10185 cpsrvd wait 325 stunnel 4 15loc 10185 cpsrvd wait 325 stunnel 4 15loc dend Training Seminar 2006 Troubleshooting Startup Issues SSL If SSL services are not available execute usr local cpanel startstunnel check usr local cpanel 3rdparty bin stunnel log If cpsrvd is not available execute it directly usr local cpanel cpsrvd check usr local cpanel logs error log CR Training Seminar 2006 License requests are handled by usr local cpanel cpkeyclt Requests are transmitted to auth cpanel net over port 2089 License requests are logged to license log License key is stored at usr local cpanel cpanel lisc A valid license request root server usr local cpanel cpkeyclt Updating Internal cPanel Information Done root server CR Training Seminar 2006 Troubleshooting License Issues CHECKLIST Verify if licens
11. d to apply MySQL updates independent of upcp scripts cleanupmysaqlprivs Will clean up the default MySQL privilege tables by installing a more restrictive privilege schema Iscripts mysqlconnectioncheck Will verify that mysql is accessible with password stored in root my cnf and force a reset with a random 16 character string if inaccessible Iscripts restartsrv_mysaql UB Training Seminar 2006 Exim Update and Configuration Iscripts eximup Can be called to apply exim updates independent of upcp Iscripts buildeximconf Will rebuild exim conf and merge local distribution and cPanel configurations Iscripts restartsrv_exim UB Training Seminar 2006 Iscripts rebuildnamedconf Rebuild named conf based on existing zone files Iscripts restartsrv_bind CR Training Seminar 2006 Apache Update and Configuration Iscripts easyapache Download extract and execute apache build script Iscripts rebuildhttpdconf Rebuilds httpd conf based on DNS entries found in each cPanel user configuration Iscripts restartsrv httpd UB Training Seminar 2006 cPanel Scripts Useful Scripts cPanel and System Iscripts restartsrv_ servicename The majority of cPanel managed service can be scripts named appropriately scripts makecpphp Will rebuild the PHP interpreter used internally by cpsrvd lusr local cpanel bin checkperlmodules Will scan for
12. e is active for main server IP at http verify cpanel net Check if server can establish connection to auth cpanel net over port 2089 Ifthe previous steps fail check license log for notable errors If license is active but refused with no notable errors lodge support request root server telnet auth cpanel net 2089 Trying 198 66 78 9 Connected to auth cpanel net 198 66 78 9 Escape character is 7 200 cPanel License Service Version 12 0 root server CR Training Seminar 2006 cPanel Requests Logins are authenticated against the system passwd and shadow files Documents root is usr local cpanel base Theme is defined by RS variable in user s cPanel configuration file Resources are limited by the feature list of assigned to the given user CR Training Seminar 2006 WHM Requests WHM Requests Root password will authenticate any reseller user Document root is usr local cpanel whostmgr docroot Reseller resources are limited by Access Control List Defined in WHM gt Resellers gt Reseller Center gt Edit Privileges Nameservers Privileges are stored in var cpanel resellers UB Training Seminar 2006 Services CPSRVD CHKSERVD CPANELLOGD CPBACKUP EXIMSTATS CR Training Seminar 2006 Service Monitoring Located at usr local cpanel libexec chkservd Chkservd is a scalable connection and proc
13. ess based service monitoring tool Provides monitoring of CPU Memory and Disk usage chkservd scans services once every eight minutes Logs to var log chkservd log Alerts are dispatched to server contact defined in Basic cPanel WHM Setup UB Training Seminar 2006 chkservd Configuration Monitored services are determined by values stored in etc chkserv d chkservd conf Syntax servicename 0 for no monitoring servicename 1 for monitoring Actions expected responses and failure events are defined in service configuration files stored in etc chkserv d servicename Status files are stored in var run chkservd servicename Plus sign for active Minus sign for failed UB Training Seminar 2006 Anatomy of a chkservd Service File service servicename port send response restart command owner The restart field can be any number of shell commands separated by semi colons Tip use to determine state of service system prior to service restart UB Training Seminar 2006 Connection Based Monitoring Required Arguments service servicename port send response restart service pop 110 QUIT OK scripts restartsrv_cppop CONNECTION BASED OPTIONS If no command field is defined service scan is assumed as connection based Expected response can be any valid perl regular expression Will connect over loopback interface 127 0 0 1
14. gacct utility and may be restored using scripts restorepkg respectfully Uses CPU resource limits based upon extracpus definition in cpanel config UB Training Seminar 2006 Backup Configuration BACKUP INTERVALS Backup script can be configured to operate in daily weekly and monthly intervals Each interval is given it s own respective directory within the backup root Backup intervals are executed when the current time minus the last modification time of the interval directory is less than or equal to zero Scan daily weekly and Is older than YES Refresh archives for all monthly backup directories x active cPanel users NO SKIP Training Seminar 2006 Backup Configuration Cont BACKUP METHODS Three backup methods are available Standard This method entails archiving the accounts and storing them at the specified path mount point This is the default method used by the backup script Incremental This method uses rsync to incrementally backup user data This option will only operate locally storing the data at the specified path mount point Remote This method transmits account archives to a specified ftp server Remote backups are typically more time consuming and more error prone when transmitting large accounts UB Training Seminar 2006 Common Backup Issues Backup intervals are not e
15. houses a large number of scripts which serve as building blocks for many cPanel WHM features The scripts can be used to Update cPanel and many of the services of which it manages Customize account creation routines Perform backups of cPanel accounts Install and update cPanel managed services UB Training Seminar 2006 Services CPSRVD CHKSERVD CPANELLOGD CPBACKUP EXIMSTATS CR Training Seminar 2006 cpsrvd is the master process for cPanel Handles and dispatches all requests made through the cPanel WHM and Webmail interfaces Logs to access log and error log CR Training Seminar 2006 CPSRVD 2082 cPanel 2086 WHM CR Training Seminar 2006 2095 Webmail CPSRVD 2082 cPanel 2086 WHM 2083 2095 Webmail 2087 2096 STUNNEL Training Seminar 2006 Default certificate and key are stored in usr local cpanel etc cpanel pem User installed cert and cabundle are stored in lusr local cpanel etc mvcpanel pem usr local cpanel etc mycpanel cabundle CR Training Seminar 2006 The following services are controlled by the cPanel init script cpsrvd both plain and secure cPanel POP Services cP
16. last remembered record is out of file So searching it from beginning of log file Phase 2 Now process new records Flush history on disk after 20000 hosts Jumped lines in file O Parsed lines in file 14 Found 0 dropped records Found 0 corrupted records Found 0 old records Found 14 new qualified records Bi Training Seminar 2006 usr local cpanel bas e frontend webmail neomail horde Srdparty CR Training Seminar 2006 usr local cpanel bas e frontend webmail X2 neomail xmail horde monsoon CR Training Seminar 2006 Srdparty usr local cpanel bas e frontend webmail neomail monsoon horde Srdparty CR Training Seminar 2006 usr local cpanel bas e frontend webmail neomail horde squirrelmail phpPgAdmin Srdparty phpMyAdmin CR Training Seminar 2006 usr local cpanel etc init exim ftptemplates httptemplates zonetemplates CR Training Semi
17. nar 2006 usr local cpanel etc init exim start stop cpsrvd start stop ftptemplates start stop cppop httptemplates zonetemplates Training Seminar 2006 lusr local cpanel etc nit exim cf ftotemplates perl httptemplates zonetemplates CR Training Seminar 2006 usr local cpanel etc init exim ftptemplates proftpd httptemplates zonetemplates CR Training Seminar 2006 usr local cpanel etc init exim ftptemplates httptemplates apache m default ssldefault zonetemplates CR Training Seminar 2006 usr local cpanel etc init exim ftptemplates httptemplates simple zonetemplates standard Training Seminar 2006 standardvirtualftp usr local cpanel 3rd party bin etc UB Training Seminar 2006 lusr local cpanel 3rd
18. s openssh bind openssl Each service update can be disabled by touching etc servicename updisable TEU gt EXIMUP gt BANDMIN i SOURIERU RPMUP A CR Training Seminar 2006 Calls the underlying package manager to apply system package updates The package manager which is used is determined by the presence of Ivar cpanel useup2date Redhat Ivar cpanel useyum CentOS Fedora var cpanel useapt Debian var cpanel useswup Trustix var cpanel userug SuSE B dendi Training Seminar 2006 cPanel Updates After updatenow sysup and rpmup complete cpanelsync is used to complete the cPanel updates based on md5sum table stored at usr local cpanel cpanelsync Ifany special configurations are required on server after updates they can be applied in scripts postupcp which is executed if such a file exists and is executable Once updates complete all cPanel services are restarted for changes to take effect UB Training Seminar 2006 Account Management Package Management Service Update and Configuration _ MySQL Exim Named Apache cPanel and System CR Training Seminar 2006 Account Management Scripts scriptsiwwwacct account creation Accounts can be created via the command line using the following syntax scripts wwwacc
19. s can operate maildir 1 Server is using a maildir configuration maxmem 128 The maximum amount of memory a cPanel process may use before it s killed mysql version 5 0 The MySQL version to be installed on the sever phploader ioncube The decoder to be used by the internal PHP interpreter CR Training Seminar 2006 var cpanel resellers Lists each reseller with a comma delimited list of WHM resources that reseller has access to Example of a reseller entry resellername resources reseller has access to example_reseller add pkg ip add pkg shell all allow addoncreate allow parkedcreate allow unlimited disk pkgs allow unlimited pkgs create acct create dns edit account edit dns edit mx frontpage kill acct kill dns limit bandwidth list accts mod subdomains park dns passwd quota rearrange accts res cart show bandwidth ssl ssl gencrt stats status suspend acct upgrade account Training Seminar 2006 Contains a list of accounting functions performed through WHM including account removal and creation Example of an accounting log entry Sat Nov 19 15 10 22 2005 CREATE root root cpanel net 198 66 78 235 cpnet Sat Nov 19 15 17 04 2005 CREATE root root testdomain com 198 66 78 235 testdom 1133120763 REMOVE root cpanel net cpnet 1133381280 REMOVE root root testdomain com testdom Bi Training Seminar 2006 Files contain a list of the b
20. t exampledomain com username password 0 xn Iscripts killacct account termination Takes a single argument of the user to terminate Iscripts suspendacct account suspension Will suspend an account from accessing all cPanel managed services Iscripts unsuspendacct Will reinstate any account suspended via suspendacct CR Training Seminar 2006 Account Management Cont Useful Scripts Account Management Cont Iscripts addpop Create pop account Handles creation of virtual mail accounts Accepts either no arguments or two arguments consisting of the e mail address and password Iscripts updateuserdomains Updates the user owner and user domain tables stored in etc userdomains etc trueuserdomains Jetc trueuserowners These tables are used to enumerate and keep track of accounts and their owners Training Seminar 2006 Package Management Iscripts ensurerpm Takes argument list of roms which are then passed to the underlying package manager Iscripts ensurepkg The equivalent of ensurerpm for FreeBSD Updates specified packages from ports Iscripts realperlinstaller Takes argument list of perl modules to install via CPAN Each of the aforementioned scripts can accept an argument of force to force package installations UB Training Seminar 2006 MySQL Update and Configuration Iscripts mysqlup Can be calle
21. tc stats conf BLACKHOURS Comma separated list of numeric values which specify hours that logs may not be parsed MALIDUSERS Users which are allowed to supply their own combination of statistics generators By default users are restricted to the generators defined by the administrator UB Training Seminar 2006 Calling cpanellogd cpanellogd is started with the cPanel service but can be executed directly with No Argument Daemonize and wait for a suitable time to scan logs One Argument username Execute an immediate statistics run for the specified user and exit once completed Two scripts are available to provide these functions as well Iscripts runlogsnow Execute a full log run immediately scripts runweblogs username Execute a log run for a single user UB Training Seminar 2006 Bandwidth Statistics Bandwidth statistics are accumulated from a combination of the following cPanel managed services HTTP EXIM IMAP POP FTP Bandwidth data is logged to usr local apache domlogs bytes log Parsed bandwidth data is stored in var cpanel bandwidth UB Training Seminar 2006 Bandwidth Statistics Cont COMMON ISSUES Bandwidth parsing is taking an exceedingly long time to complete First check the size of the logs being parsed Excessively large log files can and typically will take a long time to complete
22. xecuted when expected Modification times are incorrect or not functional System time is incorrect Backups have not been defined to run on that day Backups stall or take an exceedingly long time to complete Verify that the transmission rate to remote server is suitable Verify that server load average has not exceeded defined resource limit UB Training Seminar 2006 Common Backup Issues Cont Can t call method login on an undefined value This indicates the host or passive setting is not properly defined for remote backups Unable to login to remote FTP server This indicates that either the username and password were not specified or are incorrect in the backup configuration Can t call method prepare on an undefined value The password stored for the root mysdl user in root my cnf is incorrect Reset or correct this password and re execute the backup script Bi Training Seminar 2006 Services CPSRVD CHKSERVD CPANELLOGD CPBACKUP EXIMSTATS CR Training Seminar 2006 eximstats The eximstats daemon is responsible for harvesting bandwidth information from exim transactions Continually monitors the exim mainlog and stores information in the eximstats database including host and sender information message size and transaction times Is started with the cPanel service but can be called directly at usr local cpanel bin eximstats
23. ximum subdomains the account can create MAXSUB unlimited Account bandwidth limit BWLIMIT unlimited Account has shell access HASSHELL y Bi Training Seminar 2006 Contains a list of cPanel user configuration files named after the user they pertain to Variables define account resources themes domains etc Example of a package file DNS exampledomain com f The primrary DNS entry for this site the account domain name FEATURELIST default The name of the feature list this account has been assigned IP 198 66 78 235 The IP address assigned to this site LANG english The language the assigned cPanel theme should use MAXADDON 1000 Allotted one thousand add on domains OWNER reseller example f Owned by the reseller_example user PLAN unlimited_resources f Account is assigned the unlimited_resources package RS x Account uses the cPanel x theme dend Training Seminar 2006 Other notable var cpanel directories LOGS This directory contains logs from account copies transfers UPDATELOGS Contains the output of each cPanel update executed on the server MAINIPS Named after the respective reseller users they represent each contains only the IP address which should be used as that resellersmain shared ip lt ZONETEMPLATES Contains customized DNS zone templates created in WHM Bi Training Seminar 2006 scripts This directory
Download Pdf Manuals
Related Search
Related Contents
Thermador CJ302 Oven User Manual Hiking Computer User`s Manual MーTSUBーSHー ኖዙኮዙ ኌዊዙኖ ኴዊንኄ ኌኔዄዐ ኔኖኣኽ SCP716 Jeux de mots avec l`Oulipo Using Adobe Reader X Fully Automatic WASHING MACHINE PREDATOR V2 CE RTF FPV KIT USER MANUAL Revision B 09/21 CSXi User Manual - Sigma Motion srl Copyright © All rights reserved.
Failed to retrieve file