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


Well what a week. Thank you readers for dropping by at my tech blog once in a while. I know i don't frequently update it due to lack of time but here I am, ready to post new ideas again.

Yesterday, we ran into a "not so difficult" problem, at all. Here's the story.

We need to install the Sitebuilder package since one of the clients need the application. We installed the Sitebuilder support using the Plesk updater. Installation successful as per Plesk but upon checking, still no sitebuilder support. Next step, we did an upgrade from Plesk 8.4 to Plesk 8.6. We got a prompt again saying that the upgrade was successful. Ok got it. But, after a few minutes, Plesk started acting really weird. We checked the status of the PSA service and here comes the real fiasco. We got an error of course:

psa dead but subsys locked


Oh not again. I happen to encounter this kind of problem on the http, vsftp etc daemons. But I can easily fix them by just restarting the machine or deleting the corresponding /var/lock/subsys file and then start the service again. I did this for a couple of times for the PSA service but to no avail, Plesk isn't just working! I looked at the logs and I just can't find any clues there.

Well, what we did is to email the Parallels Support team. We didn't got any answer overnight so we are feeling a bit hopeless about the case. The next morning, ideas are fresh and we started looking at the key answer to the problem.

/tmp/autoinstaller3.log

So yup. I looked into the updater logs and found this:

Trying to establish test connection... ERROR 1044 (42000): Access denied for user 'root'@'%' to database 'mysql'
Trying to establish test connection... ERROR 1044 (42000): Access denied for user 'root'@'%' to database 'mysql'
Trying to establish test connection... ERROR 1045 (28000): Access denied for user 'admin'@'localhost' (using password: N
O)
Trying to establish test connection... ERROR 1045 (28000): Access denied for user 'admin'@'localhost' (using password: Y
ES)
Trying to establish test connection... ERROR 1045 (28000): Access denied for user 'admin'@'localhost' (using password: N
O)
Trying to establish test connection... ERROR 1044 (42000): Access denied for user 'root'@'%' to database 'mysql'
Trying to establish test connection... Could not open required defaults file: /root/.my.cnf
Fatal error in defaults handling. Program aborted

ERROR while trying to establish test connection

Check the error reason(see log file:
/tmp/psa_8.6.0_cos4.build86080722.02_upgrade.090207.07.37.log), fix and try
again

Aborting...

error: %post(psa-8.6.0-cos4.build86080722.02.i586) scriptlet failed, exit
status 1

Attention! Your software might be inoperable.
Please, contact product technical support.



Unable to connect to Mysql? Duh?. FYI, the script looks into the .psa.shadow for the mysql password. But here's the dish. We can login into the mysql server using the password defined in the .shadow file. So how come we cannot run the upgrade without the creepy errors?

Per Parallels support, we we're running a "mixed" version of Plesk. Probably because of the failed upgrade.

Just in case you noticed this error, I stumbled into a knowledgebase entry regarding the /root/.my.cnf file.

SYMPTOMS:

Plesk upgrade or installation fails with the error in upgrade log:

Access denied for user 'admin'@'localhost' (using password: YES)\n")


RESOLUTION:

Make sure that there is no /root/.my.cnf file with MySQL password. Plesk uses environment variable to pass the password to MySQL server, but the .my.cnf file has greater priority and MySQL uses the password from the file. If it does not match, restoration fails.

Also, check that you are able to connect to MySQL from the command line with:


# mysql -uadmin -p`cat /etc/psa/.psa.shadow` psa


You should not have any .my.cnf file on the /root directory. Although I tried creating a symlink to /etc/my.cnf. But it didn't made any difference. The error for the missing .my.cnf was gone but we we're still not able to finish the upgrade.

SOLUTION

We replaced the admin password to a more simplier password.

Login into the mysql server. and then run this command:

UPDATE mysql.user SET Password=PASSWORD('password') WHERE User='admin';

and then

flush privileges;


Do not FORGET to update the /etc/psa/.psa.shadow file for the new password.

Then re-run the upgrade.

# cd /root/86/dist-rpm-CentOS-4.2-i386
# rpm -Uvh --force base/*.rpm opt/migration/*.rpm opt/backup/*.rpm


Finally, Plesk is now behaving perfectly fine! There you go. A complex problem with a really simple solution.

Hope this sheds a light to anyone out there having the same problem.

Current Mood: Fulfilled but exhausted.


Well well. We got a new release from the Parallel's team. Haven't upgraded to this version because of having this Plesk upgrade fears. I don't know but for some reason, we haven't got any update instances that successfully ran without errors. So fingers crossed. But I daresay Plesk is not that bad at all. Plesk 8.4 compared to the lower versions is loading fast. Hopefully this release wipes away all the tears. lol.


Anyway, got this shoutout from Sergius of the Parallels forum:


Changing DNS zone SOA serial number format - The DNS zone SOA serial number format used by default in the Plesk Control Panel is Unix timestamp. You can change the format of the DNS zone SOA serial number to YYYYMMDDNN, which is recommended by IETF and RIPE and mandatory for many domains registered in some high-level DNS zones, mostly European ones.
Improved DNS zone update - Users can make multiple changes to a DNS zone without having to save every single change each time – all changes made to the DNS zone are now highlighted and visible to the user before saving them. The DNS zone is updated when the user saves the changes.
Permission for clients to select a target DB server - You can allow your customers to select a database server of each type for creating his or her databases, not only use the default database server.
Ubuntu 8.04 LTS support - Plesk now can be deployed on Ubuntu 8.04 LTS
PHP 5.2.6 update - Plesk now ships with PHP 5.2.6
PostgreSQL 8.3 support - Plesk now works with PostgreSQL 8.3.
Safari 3.1 support - Safari 3.1 browser can now be used to work with Plesk.
Fixed issue with empty mail user name - Fixed issue with empty mail user name displayed in logs of Plesk installed on SuSE.
Fixed issue with AWstats monthly history - Fixed issue with incorrect calculations and display of AWstats monthly history.
Fixed issue with forwarding e-mail messages signed by DomainKeys - Fixed issue with e-mail forwarding not working if e-mail messages were signed by DomainKeys.
Security fixes and other bug
fixes.


You can download Parallels Plesk Control Panel 8.6 here:

http://www.parallels.com/en/plesk

Fingers crossed. :p

I am running Plesk for Linux and I've noticed that emails are sent very very slow. As a result, emails are delayed..

I was able to research a fix to at least speed up the sending of emails in Plesk.

Login thru SSH and go to /etc/xinetd.d and edit the smtp_psa file.

The file should look like this:
------------------------------------------------------------------------------------------------------

service smtp
{
socket_type = stream
protocol = tcp
wait = no
disable = no
user = root
instances = UNLIMITED
server = /var/qmail/bin/tcp-env
server_args = /usr/sbin/rblsmtpd -r bl.spamcop.net -r cbl.abuseat.org -r sbl-xt.spamhaus.org /var/qmail/bin/relaylock /var/qmail/bin/qmail-smtpd /var/qmail/bin/smtp_auth /var/qmail/bin/true /var/qmail/bin/cmd5checkpw /var/qmail/bin/true
------------------------------------------------------------------------------------------------------

you are going to do is, add "-Rt0" (minus the quotes" ") to "server_args" so it will look like:

server_args = -Rt0 /usr/sbin/rblsmtpd -r bl.spamcop.net -r cbl.abuseat.org -r sbl-xt.spamhaus.org /var/qmail/bin/relaylock /var/qmail/bin/qmail-smtpd /var/qmail/bin/smtp_auth /var/qmail/bin/true /var/qmail/bin/cmd5checkpw /var/qmail/bin/true


Save the file, and restart xinetd:

/etc/init.d/xinetd restart

This should help speed up the sending of emails in Plesk.

How to recover Plesk password

Yes. Its possible to recover your lost/forgotten Plesk password. Plesk uses a utility called plesksrvclient.exe. It is located in the "adminbin" folder of your Plesk installation directory.


The first step is to connect via RDP (Remote Desktop Protocol). Click on Start, choose Run then type there:

"C:\Program Files\SWsoft\Plesk\admin\bin\plesksrvclient.exe" -get


How to change Plesk interface logo

I'll show teach you how to change the Plesk interface logo. The logo is visible to the admin and clients.


It's easy. Here's how:

1. Log in to Plesk as administrator.
2. On the Server Administration page, click Logo Setup.
3. Click Browse. A local file browser window displays.
4. Select the logo image file from your local computer, and click Open.
5. In the Enter new URL for logo text box, type in the URL of the Web site you want the image to link to.
6. Click OK.

Hope that helps.


Earlier, we we're unable to access the Plesk Control Panel for the admin and clients. It doesn't show the login page or the usual error Page cannot be displayed.
Cause:
Offline management was disabled.

From Parallels KB,

Virtuozzo Power Panel has the following login mechanisms:
If
OFFLINE_MANAGEMENT parameter is set to "yes", VZPP accepts the VE "root" login
with the corresponding password when connecting to VE IP address.
If
OFFLINE_MANAGEMENT is enabled and Plesk Control Panel is installed in the VE -
loging in the VE using Plesk credentials (user admin with the corresponding
password) is supported on the VE IP address. In this case, however, the
management capabilities available via web interface are limited.

The Service VE administrative credentials (user vzagent0 with the
corresponding password) are supported as well. Upon administrative login all the
VEes on the Node are manageable.When offline management is on for a VE and the
VE has Plesk installed, Plesk panel interface works via Service VE (in other
words, port 8443 is forwarded to Service VE). In this case some additional
Virtuozzo-related functionality is added to Plesk interface.

Solution:

Enable offline management.

1. Go to the hardware node using your favorite ssh client. E.g. putty.exe

2. Type:
vzctl set (node id) --offline_management yes --save
Example. If the node ID is 101 then type:
vzctl set 101 --offline_management yes --save

That's it. You should now be able to access the Plesk control panel.

The open_basedir function defines the locations or paths from which PHP is allowed to access files using functions like fopen() and gzopen(). If a file is outside of the paths defined by open_basdir, PHP will refuse to open it. You cannot use a symbolic link as a workaround, because the path that the symbolic link resolves to falls under the restrictions of the open_basedir function.

Here's a quick bit of apache config that can be placed in the conf/vhost.conf file of a Plesk site to turn off the open_basedir restrictions:


php_admin_flag engine on
php_admin_value open_basedir none

Logging in to Plesk Automatically

If you don't want to type your username and password everytime you log in into the plesk control panel, here's a quick way to help you solve the problem:

Of course you need to supply in the correct details:

https://domain.com:8443/login_up.php3?login_name=admin&passwd=yourpassword

And one last thing.

Do not forget to bookmark the link!

How to add spam filtering in Plesk

Here's a quick command in enabling spamassasin for all Plesk users.

# mysql -u admin -p`cat /etc/psa/.psa.shadow` psamysql> update mail set spamfilter = 'true' where postbox = 'true';

# /usr/local/psa/admin/bin/mchk --with-spam

This applies to Plesk 8.

Creating wildcard subdomains in Plesk

First step in creating wildcard subdomains in Plesk is you should have a CNAME or A record for *.domain.com which points to domain.com (for a CNAME), or the domain’s IP (for an A record.

Then you will need to configure Apache with the following line in the domain's vhost.conf:

ServerAlias *.domain.com

If the vhost.conf didn’t exist before, you will need to run:

# /usr/local/psa/admin/bin/websrvmng -av

You will need to reload the httpd service so that the changes you did will take effect.

Use this command:

# /etc/init.d/httpd reload

One client's contact form that is using the PHP mail function suddenly stopped working. I thought it was a misconfiguration on sendmail:

[mail function]
; For Win32 only.
SMTP = localhost

; For Win32 only.
sendmail_from = me@localhost.com

; For Unix only. You may supply arguments as well (default: "sendmail -t -i").
sendmail_path = /usr/sbin/sendmail -t -i

You are using qmail!

Bummer! Looking back into my notes,I found out that qmail supports sendmail binaries so it doesn't matter whether PHP specifies the old path to sendmail.

And prior to that day, we reinstalled Qmail.(Server got hit by a spammer) So maybe we messed up a bit with the symlinks.

Solution:

Link the sendmail binary with qmail-sendmail using this command:

ln -s /var/qmail/bin/qmail-sendmail /usr/sbin/sendmail

That solved the problem. Hope this post helps you too.

If you get this error when restarting httpd on plesk linux servers:

"Address already in use: make sock: could not bind to address 0.0.0.0:443 no listening sockets available."

Actually the error says it all.

First, try to look for the processes that is listening to port 80 or 443. You can do this:

1. netstat -lnp grep '0.0.0.0:80'
2. lsof grep *:www
3. lsof -i:443
4. fuser -v 443/tcp
5. netstat -tulpen grep :443

After pointing out which uses the port, send a kill signal:

#kill -9 PID

Replace "PID" with the actual PID.

Hope that helps.

Plesk provides a feature to select/deselect PHP support for each domain. Sometimes, the check box to enable/disable PHP support is grayed out, so the user won’t be able to use that feature. This happens if PHP is not installed or the installed PHP is not recognized by Plesk components. In most cases this happens if you have installed PHP manually (not using the rpm comes with Plesk).

You can see the installed PHP components in the following way:

Using Plesk control panel, click on Plesk–>server–>component info, you can see if the installed PHP is detected by the Plesk. The same details of installed (detected) components can be seen using mysql.

#mysql -u admin -p’cat /etc/psa/.psa.shadow’
mysql> use psa;mysql> select * from Components;

If you see the value of php as not_installed, you probably have to edit the database to detect the currently installed PHP version. Follow the steps below to do this.

Find out the current PHP version:

#php -v

Then, edit the psa components table

#mysql -u admin -p’cat /etc/psa/.psa.shadow’
mysql> use psa;mysql> update Components set version=”4.4.6″ where name=”php” limit 1; mysql>\q

Restart plesk:
#/etc/init.d/psa stopall
#/etc/init.d/psa start

Linux:

root ]# cat /etc/psa/.psa-shadow

Windows:
From the command line type:


“C:\Program Files\SWsoft\Plesk\admin\bin\plesksrvclient.exe” -get
Note: The path “C:\Program Files\SWsoft\” may change according to its installation directory.

One of the most important things in system administration is password management. But what if you forgot the Plesk admin password? Here's a quick how to:

Linux:

root ]# cat /etc/psa/.psa-shadow

Windows:

From the command line type:

“C:\Program Files\SWsoft\Plesk\admin\bin\plesksrvclient.exe” -get

Note: The path “C:\Program Files\SWsoft\” may change according to its installation directory.

Login for webstats on Plesk

Login for webstats on Plesk

Open domain’s httpd.include (HTTPD_VHOSTS_D/domain/conf/httpd.include) file and search for something like:

"AuthType BasicAuthName “Domain statistics”AuthUserFile /var/www/vhosts/domain/pd/d..httpdocs@plesk-statrequire valid-user"

The above entry tells that access to web-stats page (/var/www/vhosts/domain/statistics) is restricted to valid-users specified within ‘AuthUserFile’.
So, create an encrypted password using htpasswd and append its output to ‘AuthUserFile’.
$ htpasswd -nb username userpass
>> /var/www/vhosts/domainName/pd/d..httpdocs@plesk-stat

Note: Don’t forget to use ‘>>’. Using one symbol (>) will erase existing entries.

Now, you should be able to login using username & userpass.

Source: mohammednv

Problem:

When trying to login to Plesk as an admin user, a popup says “Access Denied”.

Solution:

Enter the following commands:

mysql -u admin -p`cat /etc/psa/.psa.shadow`use psa;

delete from lockout where login = ‘admin’;

NOTE: Plesk has an built-in security feature with account logins (basically only 3 login attempts are allowed). That is, if you get your password or username wrong 3 times, the server will lock you out.

If you are getting an error that says “File cannot be found” or if you are receiving a 404 error when you try to go to webmail.mydomain.com, this is due to the fact that default mapping application extensions do not include php support.

To solve this, do the following:

1. Go to “Start” - > “Administrative Tools” -> “Internet Information Services (IIS) Manager”.

2. Expand the server (local computer).

3. Expand “Web Sites”.

4. Right-click on “webmail(default)” and click “Properties”.

5. Go to the “Home Directory” tab.

6. Click on the “Configuration” button towards the bottom.

7. In the list box that appears, if the extensions php, php3, and phtml do not exist, you have found your problem.

8. Click “Add”.

9. Type the location of the file php.exe in the “Executable” field. For example: C:\Program Files\SWsoft\Plesk\Php\php.exe.

10. Type: .php in the “extension” field.

11. Leave everything else as default checked. Click “OK”.

12. Repeat this setup using the same executable and adding the extensions: .php3 and .phtml

Webmail should be up and running now.

Source: mohammednv

To enable MAPS SPAM protection in Plesk, begin by selecting the server you wish to manage, then “Mail”, then “MAPS Zone”. The 5 major SPAM protection lists are listed below with a general description.

Users can define which lists they would like to use:

1. Spamhaus block list (SBL) sbl.spamhaus.org: A free real-time DNS-based database of IP addresses of verified SPAMmers, SPAM gangs and SPAM services.

2. Arbitrary black hole list (ABL) spammers.v6net.org: Aggressive black list that may stop mail from popular mail servers (xxx.yahoo.com, xxx.hotmail.com)

3. Domain Name System Real-time Black List (DNSRBL) dun.dnsrbl.net: List of IP addresses of machines that are either direct SPAM sources or Dial-up (dynamic address) pools which would never be a source of non-SPAM messages.

4. VOX DNSBL vox.schpider.com: List of servers that send out SPAM, compiled by phydiux.com and it’s partners.

5. RFC Ignorant (Whois) whois.rfc-ignorant.org: List of IP’s that do not comply with RFC’s.

In the newer versions of Plesk, such as Plesk 8.1, they have renamed the “MAPS Zone” option to “Enable support for Trend Micro RBL+ Service.” If you want to enter multiple lists, separate the lists by semicolon. For example: “maps1.domain.com” or “maps1.domain.com;maps2.domain.com”.

Thanks to mohammednv.

If you see empty page in Plesk control panel instead of a page with content, it means that an error occurred. By default Plesk does not show PHP errors for security reasons. To enable PHP error reporting, you can edit $PRODUCT_ROOT_D/admin/conf/php.ini and set display_errors = On, then restart Plesk. This should resolve the issue and help you locate the error.

Source:mohammednv