Archive

Archive for the ‘Plesk’ Category

How To Change A Server’s Main IP Address (including DNS records) In Plesk

July 26th, 2009

This applies to a Windows Plesk server, running any kind of 8.x Plesk. First of, change your IP address through RDP in the Network Settings of Windows, then it’s time to update Plesk – like this.

Update Host’s IP address in Plesk
update psa.ip_addresses set ip_address = ‘<new-ip-address>’ where ip_address=’<old-ip-address>’

Changing DNS records for all hosts:
update psa.dns_recs set host = ‘<new-ip-address>’ where host = ‘<old-ip-address>’;
update psa.dns_recs set displayHost = ‘<new-ip-address>’ where displayHost = ‘<old-ip-address>’;
update psa.dns_recs set val = ‘<new-ip-address>’ where val = ‘<old-ip-address>’;
update psa.dns_recs set displayVal = ‘<new-ip-address>’ where displayVal = ‘<old-ip-address>’;

Then run the following command:
websrvmng.exe --reconfigure-all

This will rebuild all Plesk-generated configs (in this case, for Apache) according to what’s known within Plesk. This way, you can fairly quickly change the main IP address of a server, without a lot of hassle. However, this does not update the DNS config files.

The following should, in theory, also be possible:
websrvmng.exe --change-ip-address --new-ip-address=<new-ip-address> --old-ip-address=<old-ip-address>

Next, you have to start the command that rebuilds the DNS config, based on what’s known within Plesk (as the websrvmng.exe does not update DNS records). The downside: the command needs to be entered for each domain in Plesk, so here’s a script to make this slightly easier:

<?php
	$conn = mysql_connect("localhost:8306", "admin", "<plesk-pass>") or die (mysql_error());
	$dbconn = mysql_select_db("psa", $conn) or die (mysql_error());
 
	$sql = "SELECT * FROM domains AS d";
	$result = mysql_query($sql) or die (mysql_error());
 
	$output = "";
	$newline = "\n";
	while ($row = mysql_fetch_object($result)) {
		$output .= "DNSMng.exe update ". $row->name . $newline;
	}
 
	echo $output;
?>

This will generate all the commands, so you can copy paste them to a “execute.bat” file, and save that in the Plesk/Admin/Bin folder, so it can now execute the DNSMng.exe executable for each and every domain.

Matti Plesk , , , ,

Plesk Update 9.0 to 9.0.1: Time To Open TCP 11444

February 11th, 2009

If you’ve recently upgraded your Plesk installation to Plesk 9.0.1, you might find yourself locked out from Plesk all of a sudden.

When browsing to your Plesk Controlpanel on port 8443, the top bar will load, but the login form won’t be visible. That’s because in the background, it attempts to load that form through a TCP communication started on port 11444.

For everyone behind a firewall, this means changing it so port 11444 TCP incoming is opened up as well.

This change was needed for the Single Sign-On feature in Plesk, which operates on port 11444. If you want quick access to your Plesk again, without changing firewall configs, you can disable Single Sign-On through the following command:

/usr/local/psa/bin/sso --disable

If you don’t want to disable it, you need to open the port.

Matti Plesk , , ,

Using Plesk’s SMTP Server: DNS Blacklist Prevents Sending

January 14th, 2009

If you’re trying to use your Plesk’s SMTP service to allow sending e-mail, you might run into the following error: rblsmtpd: <IP ADDRESS>: 451 http://www.spamhaus.org/query/bl?ip=<IP ADDRESS>.

The cause of this error, is the enabled option to check for DNS blacklists. It’ll find that the user’s (often dynamic) IP address isn’t allowed to send e-mail to the Plesk’s SMTP service. A common cause for this, is the use of the “zen.spamhaus.org“, which is a combination of SBL, XBL and PBL blacklists.

And the PBL blacklist, has the following warning-message in the FAQ.

Caution: Because the PBL lists normal customer IP space, do not use PBL on smarthosts or SMTP AUTH outbound servers for your own customers (or you risk blocking your own customers if their dynamic IPs are in the PBL). Do not use PBL in filters that do any ‘deep parsing’ of Received headers, or for other than checking IP addresses that hand off to your mailservers.

Disabling the zen.spamhaus.org will cure this issue. You can enable the xbl.spamhaus.org;sbl.spamhaus.org DNS blackhole list to get a combination of XBL and SBL blacklists, without PBL.

This does, however, have another drawback. Enabling the remaining DNS blackhole lists, will prevent (authenticated) e-mail communication over port 25. Meaning you still can’t send e-mail.

Bummer. But fixeable.

Enable the Message Submission option, on the Plesk page Server > Mail.

This will make the SMTP service also available on port 587, configured to allow Authenticated SMTP connections with disregard of the DNS Blackhole list. The only drawback is it can’t be used in combination with the zen.spamhaus.org (which is why we changed it in the first place).

Outlook should then be configured to send e-mail over port 587, instead of the default port 25.

Go to Tools > Account Options and doubleclick the account you’re using. Go to More Settings and proceed to the tab “Advanced“. There, you can change the Outgoing mailserver (SMTP) port to 587.

Seems like a lot of work, but it appears to be the only way to use the SMTP service in Plesk, in combination with a DNS Blackhole list and dynamic IP ranges.

Matti Plesk , , , ,

Plesk & MailEnable – missing measp.dll component: Error ‘ASP 0177 : 800401f3′

November 19th, 2008

Plesk on Windows comes pre-installed with MailEnable, and using ASP you can use MailEnable to send out e-mails by creating a “MEMail.Message” object. In a normal Plesk install however, this won’t work, because of a missing measp.dll file. This file is included in the Professional & Enterprise edition of MailEnable, but not in the version that Plesk installs.

You can safely upgrade your MailEnable installation to the version you need, as described on the Knowledge Base of Plesk.

You could also copy the measp.dll file from another installation, and register it using the following command.

Regsvr32 “C:\Program Files\Mail Enable\Bin\MEASP.DLL”

The following registry key should also be added.

Root: HKEY_LOCAL_MACHINE\SOFTWARE\Mail Enable\Mail Enable\Connectors\SMTP
Name: Bad Mail Notification Sender Address
Type: String (REGSZ)
Typical Value: admin@mydomain.com

More information can be found on the MailEnable Knowledge Base: Error ‘ASP 0177 : 800401f3′ when accessing the MEMail COM component.

Matti Plesk , , , ,

Plesk: Unable to create system user: Empty error message from utility.

November 17th, 2008

The following message can occur when you try to add a Physical Hosting to a domain in Plesk: “Error: Unable to update hosting preferences: system user update is failed: Unable to create system user: Empty error message from utility.“.

Unable to create system user: Empty error message from utility.

Unable to create system user: Empty error message from utility.

Here’s the fix.

In the log file “/usr/local/psa/admin/logs/httpsd_error_log” you’ll see the following entry: /usr/share/cracklib/pw_dict: error reading header.

This can be fixed by doing:

rpm -e cracklib-dicts –nodeps
yum install cracklib-dicts

Matti Plesk , , , ,

Named/Bind: Could not listen on UDP socket : permission denied

November 15th, 2008

When running Plesk on a Windows Server, you might encounter the following error: “Could not listen on UDP socket : permission denied” after a Windows Update. The short version is this: there’s another service listening on port 53 (DNS), which causes the Plesk DNS service to stop working. In this case, it’s the DNS Server built in Windows Server that is automatically started after a Windows Update.

Short solution: stop the DNS service, and then restart the Plesk DNS.

You can test this, by doing the following. Log in via a Remote Desktop connection to your server, and shut down the Plesk DNS service (using the system-tray icon, in the bottom right).

Stop the Plesk DNS Service

Stop the Plesk DNS Service

 Select the DNS service, and stop it using the button on the right. Now run the following command through a command prompt (start > run > cmd) to see if another service is still listening on the DNS (53) port.

netstat -an | find “53″

Netstat DNS Port Listening

Netstat DNS Port Listening

The term “LISTENING” means there’s a service active, that is accepting requests on port 53. Since you shut down the Plesk DNS service, something else is using this port. Go the service management in Windows Server (start > run > services.msc), and find the Microsoft DNS Service.

Microsoft DNS Service Enabled/Started

Microsoft DNS Service Enabled/Started

In the list, the DNS Server will probably be started. Right-click it, and choose “Stop”. If this service is not started, another piece of DNS software is running on your server that’s using up the DNS port. You can check the processlist/task manager to find out which one (popular ones are Bind or Named).

Now run the same command as above, to see if another service is still listening on port 53.

Netstat - No Open DNS Port

Netstat - No Open DNS Port

Port 53 no longer shows a “LISTENING” status, which means any service running on port 53 is now closed.

Re-open the Plesk Service Monitor, as shown in screen #1, and start the Plesk DNS Service again. Now everything should be fine again.

Matti Plesk , , ,

Plesk Site Preview Not Working

November 7th, 2008

You can use Plesk’s “Site Preview” button to test websites, before DNS has propagated thoroughly, to see if the hosting is set up without problems. There are odd occasions where this Site Preview button fails to work. If you try it, and are greeted with a “You see this page because there is no Web site at this address.”-message, it could be one of several things.

You see this page because there is no Web site at this address.

1) Did you rename/overwrite the index.html file in the public directory (httpdocs)? This is the page Plesk shows by default.

2) If you did, and are sure the website is uploaded properly, you can try to disable the domain, and re-enable it. After this, site-preview might work again.

3) If you see a 404 error – page not found, you can try to edit the config-file, as described here.

There are problably a bunch of other possibilities, and reasons, why the Site Preview doesn’t work. If you have experienced something similar, please share.

Matti Plesk , ,

How Do I Reset My Admin Password Of Plesk (Linux CLI)

November 3rd, 2008

You can reset an “admin”-account password in Plesk, but only if you have root-access to the specific server. Once you do, you can easily change the admin password to anything you desire – all though the password should be 5 to 16 characters long, and may not exceed that length.

If the reason of the reset is because you’ve lost your password, there’s an easier trick too – the admin-account password is stored in plain text on the server (don’t ask why …), and can easily be retrieved. Read more…

Matti Plesk , , , , ,

Domains In Plesk Showing No Disk Usage Or Bandwidth

October 25th, 2008

There’s a known issue with some of the older versions of Plesk, where the domains show 0.00MB in disk usage and bandwidth, despite having several (hundreds) of megabytes worth of storage. The problem usually exists in the statistics program not being run by Plesk as it should be. Read more…

Matti Plesk , , , ,

Plesk Issues After Upgrade (Horde Webmail Showing Default Plesk Page)

October 11th, 2008

After a Plesk upgrade, it’s possible that some services don’t do what they’re supposed to be doing (and have done right, before the update). It could be a Horde Webmail that is displaying a default Plesk page, instead of the webmail-client, or it could be something entirely different.

One of the easiest things to try, and one that solves a lot of Plesk issues, is running the command that will re-configure all services on the server, according to the Plesk internal database. That database contains all settings for mailboxes, DNS-records, web-users, additional settings, … Read more…

Matti Plesk , , , ,