Showing posts with label Plesk. Show all posts
Showing posts with label Plesk. Show all posts

Monday, September 25, 2017

How to delete Mysql user?

 
COMMAND TO DROP USER:
 
Login into SQl With User Root and Run:
 

DROP USER 'jeffrey'@'localhost';

DROP USER vishal;

 

Monday, July 20, 2015

Linux: Find out serial / model number and vendor information for SATA and IDE hard disk


One of the below command may be used to get the Harddisk information.

1:   smartctl --all /dev/sda 

2:   hdparm -I /dev/sda 

where sda is the drive which need to check.


Thursday, June 4, 2015

Can't connect to MySQL server on 'localhost' (10055)"


Cause of MySQL Error 10055?

This is more of an Operating System Error than a MySQL error.  Each time your website runs a query you open a connection to the Database, run the query, then close the connection.  Each time this happens your Server allocates a dynamic port for use by MySQL and your Website.  For Websites like mine which may run 2000+ Queries per second, this means that 2000+ dynamic ports must be set aside for these connections.  Sometimes your server gets under load and the operating system can't recycle these ports fast enough, leading you to run out of ports and then your server throws a 10055 Error.

By default Windows Server 2008 R2 has 16838 Ports designated for Dynamic use.  The default ranges are 49152 - 65535.  However this can be extended to a wider range of ports.

Fix MySQL Error 10055:

To fix the problem you need to increase the number of dynamic ports.
Running the following Commands will give give you 50000 ports for dynamic use.

On Windows Server 2008 R2
Open command Prompt

Type the following:
netsh int ipv4 set dynamicport tcp start=10000 num=50000
Press Enter

Type the following
netsh int ipv4 set dynamicport udp start=10000 num=50000
Press Enter

Monday, June 1, 2015

Protected directory cannot be enabled: "columns siteId, path are not unique"

Symptoms

When trying to add a new customer and protected directory in Parallels Plesk, the protected directory cannot be enabled:
Error message : ProtDir_IIS::update() failed: Add Protected Directory failed: columns siteId, path are not unique (Error code 1)

Cause

The protected directory was not synchronized properly.

Resolution

Synchronize the protected directories database using the following command:

"%plesk_cli%\repair.exe"  --synchronize-protected-directories-storage

Thursday, March 19, 2015

Windows Server 2003 Booting Process

BIOS: performs Power On Self Test (POST)
BIOS: loads MBR from the boot device specified/selected by the BIOS
MBR: contains a small amount of code that reads the partition table, the first partition marked as active is determined to be the system volume
MBR: loads the boot sector from the system volume
BOOT SECTOR: reads the root directory of the system volume at loads NTLDR
NTLDR: reads BOOT.INI from the system volume to determine the boot drive (presenting a menu if more than 1 entry is defined)
NTLDR: loads and executes NTDETECT.COM from the system volume to perform BIOS hardware detection
NTLDR: loads NTOSKRNL.EXE, HAL.DLL, BOOTVID.DLL (and KDCOM.DLL for XP upwards) from the boot (Windows) volume
NTLDR: loads \WINDOWS\SYSTEM32\CONFIG\SYSTEM which becomes the system hive HKEY_LOCAL_MACHINE\System
NTLDR: loads drivers flagged as “boot” defined in the system hive, then passes control to NTOSKRNL.EXE
NTOSKRNL.EXE: brings up the loading splash screen and initializes the kernel subsystem
NTOSKRNL.EXE: starts the boot-start drivers and then loads & starts the system-start drivers
NTOSKRNL.EXE: creates the Session Manager process (SMSS.EXE)
SMSS.EXE: runs any programs specified in BootExecute (e.g. AUTOCHK, the native API version of CHKDSK)
SMSS.EXE: processes any delayed move/rename operations from hotfixes/service packs replacing in-use system files
SMSS.EXE: initializes the paging file(s) and the remaining registry hives
** before this step completes, bugchecks will not result in a memory dump as we need a working page file on the boot (Windows) volume **
SMSS.EXE: starts the kernel-mode portion of the Win32 subsystem (WIN32K.SYS)
SMSS.EXE: starts the user-mode portion of the Win32 subsystem (CSRSS.EXE)
SMSS.EXE: starts WINLOGON.EXE
WINLOGON.EXE: starts the Local Security Authority (LSASS.EXE)
WINLOGON.EXE: loads the Graphical User Identification and Authentication DLL (MSGINA.DLL by default)
WINLOGON.EXE: displays the logon window
WINLOGON.EXE: starts the services controller (SERVICES.EXE)
** at this point users can logon **
SERVICES.EXE: starts all services markes as automatic
———
NOTES:
The SYSTEM volume is the partition from which the boot process starts, containing the MBR, boot sector, NTLDR, NTDETECT.COM & BOOT.INI

The BOOT volume is the partition which contains the Windows folder – this can be a logical partition

Thursday, February 26, 2015

Commonly Used Ports -Part1

This is a list of commonly used ports                                               Next Part 2 >>

cPanel

      cPanel     2082
      cPanel - SSL     2083
      WHM     2086
      WHM - SSL     2087
      Webmail     2095
      Webmail - SSL     2096

Plesk Panel

      Plesk Control Panel     8880
      Plesk Control Panel - SSL     8443
      Plesk Linux Webmail     N/A*
      Plesk Windows Webmail (SmarterMail)     9998**
      Plesk Webmail   8383

Email

      POP3     110
      POP3 - SSL     995
      IMAP     143
      IMAP - SSL     993
      SMTP     25
      SMTP Alternate     26
      SMTP Alternate     587
      SMTP - SSL     465

Web

      HTTP     80
      SSL     443
      FTP     21
      FTPs     990
      SFTP     22
      SFTP Shared/Reseller Servers     2222
      Webdisk     2077
      Webdisk - SSL     2078
      MySQL     3306
      MSSQL     1433
      SSH     22
      SSH Shared/Reseller Servers     2222

Other

      Virtuozzo     4643
      DotNet Panel     9001
      DotNet Panel Login     80

      RDP (Remote Desktop Protocol)     3389                                               Next Part 2 >>

Monday, February 23, 2015

cPanel vs. Plesk - Side by Side Functionality Comparison

WHM / cPanel versus Plesk 10

WHM/cPanel and Plesk are both feature rich control panels with similar functionality.  They are, however, organized completely differently, have a different security model and use slightly different terminology.

We have several tables comparing each side by side:
  • Functionality & Common Tasks 
  • Account Setup & Security Model 
  • Terminology 

Functionality & Common Tasks


Plesk Panel for Windows service logs and configuration files

Control Panel

  • Logs:
    • Access log: %plesk_dir%\admin\logs\W3SVC<IIS site ID>\ex<date>.log
    • PHP errors: %plesk_dir%\admin\logs\php_error.log
    • Panel log: %plesk_dir%\admin\logs\panel.log
    • Debug logs: %plesk_dir%\admin\logs\plesklog_debugXXXXXXXX.log (create DWORD value Debug=1 in "HKLM\SOFTWARE\PLESK\PSA Config\Config")
  • Service control:
    • Stop: net stop plesksrv /Y
    • Start: net start plesksrv && net start poppassd
    • Restart: net stop plesksrv /Y && net start plesksrv && net start poppassd
  • Configuration:
    • %plesk_dir%\admin\php.ini
    • %plesk_dir%\admin\conf\panel.ini
    • IIS manager > Sites/Application Pools > PleskControlPanel

Web Presence Builder

  • Logs:
    • Error logs: %plesk_dir%\sb\logs\
    • Install/upgrade logs: %plesk_dir%\sb\tmp\
  • No service control (working on IIS)
  • Configuration:
    • %plesk_dir%\sb\config

phpMyAdmin

  • Logs:
    • %plesk_dir%\admin\logs\W3SVC<IIS site ID>\ex<date>.log
  • No service control (working via the plesksrv service).
  • Configuration:
    • %plesk_dir%\admin\htdocs\domains\databases\phpMyAdmin\config.inc.php

ASP.Net Enterprise Manager

  • Configuration:
    • IIS manager > Sites > sqladmin(default) > View Applications > /mssql

myLittleAdmin 2000/2005

  • Configuration:
    • IIS manager > Sites > sqladmin(default) > View Applications > /myLittleAdmin
    • %plesk_vhosts%\sqladmin\myLittleAdmin\2005\config.xml

MailEnable

  • Logs:
    • %plesk_dir%\Mail Servers\Mail Enable\Logging
  • Service control:
    • Stop: net stop meimaps && net stop melcs && net stop memtas && net stop mepops && net stop mepocs && net stop mesptpcs
    • Start: net start meimaps && net start melcs && net start memtas && net start mepops && net start mepocs && net start mesptpcs
    • Restart: net stop meimaps && net stop melcs && net stop memtas && net stop mepops && net stop mepocs && net stop mesptpcs && net start meimaps && net start melcs && net start memtas && net start mepops && net start mepocs && net start mesptpcs
  • Configuration:
    • %plesk_dir%\Mail Servers\Mail Enable\Bin\MailEnable.msc

Named / BIND

  • Logs:
    • Windows Event Viewer
  • Service control:
    • Stop: net stop named
    • Start: net start named
    • Restart: net stop named && net start named
  • Configuration:
    • %plesk_dir%\dns

Thursday, February 19, 2015

Plesk for Linux services logs and configuration files

Services

Control Panel

  • Logs
    • Error log: /var/log/sw-cp-server/error_log and /var/log/sw-cp-server/sw-engine.log
    • Access log: /usr/local/psa/admin/logs/httpsd_access_log
    • Panel log: /usr/local/psa/admin/logs/panel.log
  • Services
    • Stop: /etc/init.d/psa stop
    • Start: /etc/init.d/psa start
    • Restart: /etc/init.d/psa restart
  • Configuration
    • PHP config: /usr/local/psa/admin/conf/php.ini
    • Panel config: /usr/local/psa/admin/conf/panel.ini
    • Web server config: /etc/sw-cp-server/conf.d/plesk.conf

Web Presence Builder

  • Logs
    • Error log: /usr/local/psa/admin/logs/sitebuilder.log
    • Install/upgrade logs: /usr/local/sb/tmp/
  • No service control (working via sw-cp-server service)
  • Configuration
    • /usr/local/sb/config
    • /etc/sw-cp-server/conf.d/plesk.conf
    • /usr/local/psa/admin/conf/php.ini

SSO

  • Logs
    • Error log: /var/log/sw-cp-server/error_log
    • SSO log: /var/log/sso/sso.log
  • Services
    • No service control (works via sw-cp-server service)
    • Manage settings: /usr/local/psa/bin/sso
  • Configuration
    • /etc/sso/sso_config.ini
    • /etc/sw-cp-server/conf.d/sso.inc

Backup Manager

  • Logs
    • Backup logs: /usr/local/psa/PMM/logs/backup-<datetime>
    • Restore log: /usr/local/psa/PMM/logs/restore-<datetime>
  • Functionality is controlled by the Plesk control panel service
  • Configuration
    • /etc/psa/psa.conf

Migration Manager

  • Logs
    • /usr/local/psa/PMM/logs/migration-<datetime>
  • Functionality is controlled by the Plesk control panel service.

Health Monitor manager

  • Logs
    • /usr/local/psa/admin/logs/health-alarm.log
  • Services
    • Stop: /etc/init.d/sw-collectd stop
    • Start: /etc/init.d/sw-collectd start
    • Restart: /etc/init.d/sw-collectd restart
  • Configuration
    • /usr/local/psa/admin/conf/health-config.xml
    • /usr/local/psa/var/custom-health-config.xml
    • /etc/sw-collectd/collectd.conf

Health Monitor Notification Daemon

  • Logs
    • /usr/local/psa/admin/logs/health-alarm.log
  • Services
    • Stop: /etc/init.d/psa-health-monitor-notificationd stop
    • Start: /etc/init.d/psa-health-monitor-notificationd start
    • Restart: /etc/init.d/psa-health-monitor-notificationd restart
  • Configuration
    • /usr/local/psa/admin/conf/health-config.xml
    • /usr/local/psa/var/custom-health-config.xml

MySQL

  • Logs
    • /var/log/mysqld.log
  • Services
    • Stop: /etc/init.d/mysqld stop
    • Start: /etc/init.d/mysqld start
    • Restart: /etc/init.d/mysqld restart
  • Configuration
    • /etc/my.cnf
    • /etc/mysql/my.cnf (Debian/Ubuntu)

PostgreSQL

  • Logs
    • /var/lib/pgsql/pgstartup.log
  • Services
    • Stop: /etc/init.d/postgresql stop
    • Start: /etc/init.d/postgresql start
    • Restart: /etc/init.d/postgresql restart
  • Configuration
    • /var/lib/pgsql/data/postgresql.conf

Apache

  • Logs
    • Global Access and Error logs: /var/log/httpd/
    • Domain logs: /var/www/vhosts/<domain>/logs
  • Services
    • Stop: /etc/init.d/httpd stop
    • Start: /etc/init.d/httpd start
    • Restart: /etc/init.d/httpd restart
  • Configuration
    • /etc/httpd/conf/httpd.conf
    • /etc/httpd/conf.d/zz010_psa_httpd.conf (includes generated configuration files with the rest of the vhosts and server configuration)
  • NOTE: On SuSE, Debian, and Ubuntu, the service is called "apache2". The path to its logs is /var/log/apache2 and the path to configs is /etc/apache2.

NGINX

  • Logs
    • Error log: /var/log/nginx/error.log
    • Access log: /var/log/nginx/access.log
    • Domain logs: /var/www/vhosts/<domain>/logs/proxy_access*_log
  • Services
    • Stop: /etc/init.d/nginx stop
    • Start: /etc/init.d/nginx start
    • Restart: /etc/init.d/nginx restart
    • NOTE: To disable nginx, go to "Tools & Settings > Services Management" and stop nginx from there.
  • Configuration
    • /etc/nginx/nginx.conf
    • /etc/nginx/conf.d/zz010_psa_nginx.conf (includes generated configuration files with the rest of the vhosts' and server configuration)

Tomcat

  • Logs
    • /var/log/tomcat5/*
  • Services
    • Stop: /etc/init.d/tomcat5 stop
    • Start: /etc/init.d/tomcat5 start
    • Restart: /etc/init.d/tomcat5 restart
  • Configuration
    • /etc/tomcat5/server.xml

FTP

  • Logs
    • /usr/local/psa/var/log/xferlog
    • /var/log/secure
  • No service control (works via xinetd service)
  • Configuration
    • /etc/xinetd.d/ftp_psa
    • /etc/proftpd.conf
    • /etc/proftpd.include

Xinetd

  • Logs
    • /var/log/messages
  • Services
    • Stop: /etc/init.d/xinetd stop
    • Start: /etc/init.d/xinetd start
    • Restart: /etc/init.d/xinetd restart
  • Configuration
    • /etc/xinetd.conf
    • /etc/xinetd.d/* (files with "." in the name are ignored)

BIND

  • Logs
    • /var/log/messages
  • Services
    • Stop: /etc/init.d/named stop
    • Start: /etc/init.d/named start
    • Restart: /etc/init.d/named restart
  • Configuration
    • /etc/named.conf
  • NOTE: In Debian/Ubuntu, the service is called "bind9."

Sunday, January 11, 2015

Backup and Restore MYSQL Database

Back up and Restore MySQL database from the command line

Backing up via the command line:


Type the following at the prompt with the appropriate USERNAME and DATABASE name:
mysqldump -u USERNAME -p DATABASE > dump.sql

You will be prompted for your database password and then the DATABASE will be dumped to a plain-text file called dump.sql.

Restoring via the command line:

First drop and recreate the database as needed:

Drop the database
mysqladmin -u USERNAME -p drop DATABASE

Recreate the database
mysqladmin -u USERNAME -p create DATABASE

Import the backup data
mysql -u USERNAME -p DATABASE < dump.sql

Monday, December 29, 2014

"xmlrpc error: Expected to have 1 children, found 0"

APPLIES TO:
  • Parallels Plesk 11.0 for Linux
  • Parallels Plesk 11.5 for Linux
  • Parallels Plesk 11.0 for Windows
  • Parallels Plesk 11.5 for Windows
  • Parallels Plesk 10.4 for Windows
  • Parallels Plesk 10.3 for Windows

Symptoms

Parallels Plesk shows the following error:
xmlrpc error: Expected <param> to have 1 children, found 0
---------------------- Debug Info -------------------------------
0: common_func.php3:4675
        of_get_all_keys()
1: common_func.php3:4675
        pkey_fetch_key_list()
2: KeyInfoForm.php:171
        KeyInfoForm->get_bye_online_url(string 'new', string '')
3: KeyInfoForm.php:77
        KeyInfoForm->assign()
4: key_info.php:43
        require(string 'C:\Program Files\Parallels\Plesk\admin\htdocs\server\key_info.php')
5: plesk.php:66

Cause

The file %plesk_dir%\admin\repository\registry.xml is empty.

Resolution

  1. Remove the file %plesk_dir%\admin\repository\registry.xml.
  2. Click the OK button on the error screen or log into the Plesk Control Panel again.
  3. Click the Retrieve Keys button on the License Management screen to re-apply the license.

Sunday, December 28, 2014

Unable to remove an IP address "Error: The IP address is already used for hosting"

APPLIES TO:
Parallels Plesk 11.5 for Linux
Parallels Plesk 11.5 for Windows

Symptoms
An attempt to delete an IP address from Parallels Plesk Panel failwith the following error:
Error: The IP address `<ip_address>` is already used for hosting. 
However, in Tools & Settings > IP Addresses, no sites are shown to use this IP address.

Cause
This is caused by a Plesk database inconsistency. The psa.IpAddressesCollections table
was not correctly updated when IP addresses were changed for domains.
Resolution
Create a psa database backup.

Windows:
"%plesk_dir%\MySQL\bin\mysqldump.exe" -uadmin -P8306 -p<PleskPasswordHere> psa > c:\psadump.sql
Linux: 
   mysqldump -uadmin -pcat /etc/psa/.psa.shadow psa > /tmp/psa.date +%F_%H.%M.sql

Find out which id is assigned to the IP address in question, and find any (sub)domains that have this IP address assiged:

mysql> select @ip_id := id from IP_Addresses where ip_address='10.10.10.10';
mysql> SELECT d.name, d.webspace_id, ipac.ipCollectionId,ip.ip_address FROM DomainServices ds INNER JOIN IpAddressesCollections ipac ON ds.ipCollectionId = ipac.ipCollectionId INNER JOIN domains d ON d.id = ds.dom_id  JOIN IP_Addresses ip on ipac.ipaddressid=ip.id WHERE (ds.type = 'web' OR ds.type = 'mail') and ipac.ipAddressId = @ip_id;

Make sure the 10.10.10.10 IP address is replaced with the one to be deleted. 

Find records in the IpAddressesCollections table that correspond to the IP address in question:

mysql> select * from IpAddressesCollections where ipaddressid=@ip_id;

Find out which id is assigned to the IP address that
 should be used for the (sub)domains from the previous output, then 
update the corresponding records of the IpAddressesCollections table:

For example, the 10.10.10.11 IP address should be assigned to example.com:

mysql> set @domain_name := 'example.com';
mysql> select @ip_id_new := id from IP_Addresses where ip_address='10.10.10.11';
mysql> update IpAddressesCollections ipac  INNER JOIN DomainServices ds ON ds.ipCollectionId = ipac.ipCollectionId INNER JOIN domains d ON d.id = ds.dom_id  JOIN IP_Addresses ip on ipac.ipaddressid=ip.id set ipac.ipAddressId=@ip_id_new WHERE (ds.type = 'web' OR ds.type = 'mail') and ipac.ipAddressId = @ip_id and d.name=@domain_name;

Ref:http://kb.sp.parallels.com/en/122207


Thursday, December 25, 2014

Domain Name Lifecycle

This is a life-cycle of a typical domain name, from registration to deletion.









Friday, December 19, 2014

Errors when trying to open Parallels Plesk

APPLIES TO:
  • Parallels Plesk 11.0 for Linux
  • Parallels Plesk 11.5 for Linux
  • Parallels Plesk 11.0 for Windows
  • Parallels Plesk 11.5 for Windows
  • Parallels Plesk 10.4 for Windows

Symptoms

It is not possible to access Parallels Plesk. The browser displays one of the following errors:
ERROR: SWKeyExFatalError
xmlrpc error: XML parsing failed
Along with the following stack trace:
0: common_func.php3:4523
of_get_key_by_product(string 'plesk-win')
1: common_func.php3:4523
getPleskKey()
2: common_func.php3:4602
getKeyProp(string 'demo')
3: auth.php3:54
Alternatively, you may see an error like this:
    xmlrpc error: Expected <param> to have 1 children, found 0
    ---------------------- Debug Info -------------------------------
    0: common_func.php3:4684
         of_get_all_keys()
    1: common_func.php3:4684
         pkey_fetch_key_list()
    2: KeyInfoForm.php:171
         KeyInfoForm->get_bye_online_url(string 'new', string '')
    3: KeyInfoForm.php:77
         KeyInfoForm->assign()
    4: key_info.php:4 

Cause

The above error indicates that either the %plesk_dir%\admin\repository\registry.xml file and/or one of the license key files from %plesk_dir%\admin\repository\keys\ is corrupt.

Resolution

Delete or rename the '%plesk_dir%\admin\repository\registry.xml' file and try to access Plesk again. A new file should have been generated automatically. Alternatively, rename the corrupted file and execute the command below:
    C:\Parallels\Plesk\admin\bin>keymng.exe --get-key-number
If this does not resolve the issue, one or several license key files from '%plesk_dir%\admin\repository\keys\' could be corrupt. You can use the following algorithm to resolve the issue:
  1. Check the contents of the '%plesk_dir%\admin\repository\keys\' folder. If it contains only one license key file, this is probably the main Plesk license. If it is corrupt (improper XML syntax or the file is just empty), please obtain the valid license file from your provider and install using the following command:
    "%plesk_bin%\keymng.exe" --install --source-file=<path_to_file>
    
    Now Plesk should be working.
  2. If there are several license files, you need to find out which of them is the main Plesk license file. It will contain patterns similar to the below:
    <core:description>
    <core:keytype>Parallels Plesk Panel 10.x/11.x and Later for Windows </core:keytype>
    <core:product core:type="string">plesk-win</core:product>
    
    Only leave the main Plesk license file in '%plesk_dir%\admin\repository\keys\' and make sure you can log into Plesk. If not, proceed with item one.
  3. Log into Plesk and click 'receive keys' in the "Tools % Settings > License" section. This will automatically fetch all additional keys from KA unless there are connection problems with the KA server.

Thursday, November 20, 2014

Installing and configuring MailEnable

Guide to installing and configuring MailEnable. Includes pre and post installation requirements.

Configuring the environment
Before installing MailEnable, ensure that the environment has been configured correctly. This includes configuring network connectivity and the Public DNS Server. MailEnable should be configured in an environment with a static IP address but (although not recommended) can be configured to work in environments with dynamic IP addresses using products like dyndns or dns2go, etc.

1. Before installing MailEnable, ensure that the machine can access the Internet (i.e.: ping www.mailenable.com ).
Ensure that other computers can ping the server's IP Address from the Internet (note: technically computers do not need to be able to ping the server, but they will definitely need to be able to connect to TCP/IP Ports 110 and 25 of the server). In most cases, this requires some firewall configuration. For those unfamiliar with configuring firewalls, the best approach is to open all ports and then secure the server by blocking access to specific ports or services as appropriate. If experiencing difficulties with configuring the firewall, consult the respective manuals/resources associated with the operating system and communications infrastructure.

2. Ensure that the correct entries are registered in the DNS. The first step to doing this is to determine who has control of your public DNS records. Contact your ISP or DNS provider to determine who holds the records for the domain. This will allow you to determine who can create new DNS records for the domain. When hosting mail for a domain, each domain being hosted requires a number of DNS records to be created.

It is important to understand the role of DNS and how it relates to running mail servers.

Installing the MailEnable software
Now that the environment is configured, MailEnable can be installed. The product manuals explain how to install MailEnable.  These are installed with the product or available from our website here: http://www.mailenable.com/references.asp

Once MailEnable has been installed, check the MailEnable Diagnostic Report to ensure that all services are configured correctly.

Configuring the MailEnable software
MailEnable provides a 'quick start' guide with basic instructions on configuring and running the MailEnable software.
Quick Start Guide: http://www.mailenable.com/support/MailEnable_Quick_Start_Guide.pdf

Exploring and configuring MailEnable features
Each version of MailEnable has specific features. Review the manual of each respective edition to review and configure some of the more advanced features. See http://www.mailenable.com/references.asp