Archive

Archive for the ‘Plesk’ Category

Internal error: session has already been started by session.auto-start or session_start()

May 14, 2012 Leave a comment

 

 

I have upgraded Plesk version 10.3.3 to 10.4.4 via Autoinstaller, after that Plesk was showing the following error,

Internal error: session has already been started by session.auto-start or session_start()

 

In the plesk error log file “/var/log/sw-cp-server/error_log” the following message is shown,

Message session has already been started by session.auto-start or session_start()
File /opt/psa/admin/plib/Zend/Session.php
Line 451
Type Zend_Session_Exception
Stack trace #0 /opt/psa/admin/plib/Zend/Session/Namespace.php(143): Zend_Session::start(true)
#1 /opt/psa/admin/plib/Zend/Auth/Storage/Session.php(87): Zend_Session_Namespace->__construct('Zend_Auth')
#2 /opt/psa/admin/plib/Zend/Auth.php(91): Zend_Auth_Storage_Session->__construct()
#3 /opt/psa/admin/plib/Zend/Auth.php(151): Zend_Auth->getStorage()
#4 /opt/psa/admin/smb/application/library/Smb/Auth.php(38): Zend_Auth->getIdentity()
#5 /opt/psa/admin/smb/application/library/Smb/Controller/Action/Admin.php(173): Smb_Auth::getUser()
#6 /opt/psa/admin/smb/application/library/Smb/Controller/Action/Admin.php(81): Smb_Controller_Action_Admin->_initCurrentUser()
#7 /opt/psa/admin/plib/Zend/Controller/Action.php(133): Smb_Controller_Action_Admin->init()
#8 /opt/psa/admin/plib/Zend/Controller/Dispatcher/Standard.php(268): Zend_Controller_Action->__construct(Object(Zend_Controller_Request_Http), Object(Zend_Controller_Response_Http), Array)
#9 /opt/psa/admin/plib/Zend/Controller/Front.php(954): Zend_Controller_Dispatcher_Standard->dispatch(Object(Zend_Controller_Request_Http), Object(Zend_Controller_Response_Http))
#10 /opt/psa/admin/smb/application/library/Smb/Application/Web.php(48): Zend_Controller_Front->dispatch(NULL)
#11 /opt/psa/admin/smb/application/public/index.php(15): Smb_Application_Web->run()
#12 {main}
Code fragment 
#446: 
#447: // See http://www.php.net/manual/en/ref.session.php for explanation
#448: if (!self::$_unitTestEnabled && defined('SID')) {
#449: /** @see Zend_Session_Exception */
#450: ;// require_once 'Zend/Session/Exception.php';
#451: throw new Zend_Session_Exception('session has already been started by session.auto-start or session_start()');
#452: }
#453: 
#454: /**
#455: * Hack to throw exceptions on start instead of php errors

 

 

Steps to fix the issue:

1) In the error message problem was found to be with line 451 of file “/opt/psa/admin/plib/Zend/Session.php”. Find out the plesk package related to this file using ‘dpkg’ command.

root@4444:/# dpkg -S /opt/psa/admin/plib/Zend/Session.php
plesk-core: /opt/psa/admin/plib/Zend/Session.php
root@4444:/#

 

2) Download the plesk-core package from “http://autoinstall.plesk.com” , remove the existing plesk-core package and then install the plesk-core package again. After that restart the plesk service.

wget http://autoinstall.plesk.com/PSA_10.4.4/dist-deb-Debian-5.0-x86_64/base/plesk-core_10.13.4-debian5.0.build1013111102.18_amd64.deb
dpkg -r --force-depends plesk-core
dpkg -i plesk-core_10.13.4-debian5.0.build1013111102.18_amd64.deb 
/etc/init.d/psa restart

 

Advertisements
Categories: Plesk

Plesk change admin password (Windows)

February 7, 2012 Leave a comment

In order to change the plesk password of a windows server to “1LOvePl3sk!”(without quotes) from command line, please follow the below steps:

cd %plesk_bin%
plesksrvclient.exe -set 1LOvePl3sk! true -nogui
Categories: Plesk, Windows

resource of type aps.database with id not found by brokers

November 14, 2011 4 comments

Recently I encountered the following error while trying to delete a domain from Parallels plesk panel(v10.3) .

[root@vps-1072749-5826 backup]# /usr/local/psa/bin/subscription -r domain.com
resource of type aps.database with id b67b9fe5-a016-4d5f-ba6e-b26ef378b068 not found by brokers
[root@vps-1072749-5826 backup]#

I found the below error in sw-cpsever error logs:

~]# tail -f /var/log/sw-cp-server/error_log
all children busy, launch additional (total 3, limit 30)
2011-11-12T11:18:06-05:00 CRIT (2): Exception: resource of type aps.database with id b67b9fe5-a016-4d5f-ba6e-b26ef378b068 not found by brokers
file: /usr/share/aps_php/aps_php.php
line: 10129
code: 0
all children busy, launch additional (total 3, limit 30)
2011-11-12T11:26:52-05:00 CRIT (2): Exception: resource of type aps.database with id b67b9fe5-a016-4d5f-ba6e-b26ef378b068 not found by brokers
file: /usr/share/aps_php/aps_php.php
line: 10129
code: 0

SOLUTION

Take a backup of psa and apsc databases.

#mysqldump -u admin -p`cat /etc/psa/.psa.shadow` psa > ~/psa.`date +%F_%H:%M`.sql
#mysqldump -u admin -p`cat /etc/psa/.psa.shadow` apsc > ~/apsc.`date +%F_%H:%M`.sql

From the apsc database I found the corresponding entries for uid “b67b9fe5-a016-4d5f-ba6e-b26ef378b068” :

mysql> select * from aps_resource_requirement where uid=’b67b9fe5-a016-4d5f-ba6e-b26ef378b068′;
+————————————–+————–+————-+—————-+—-+——–+
| uid | type | resource_id | requirement_id | id | branch |
+————————————–+————–+————-+—————-+—-+——–+
| b67b9fe5-a016-4d5f-ba6e-b26ef378b068 | aps.database | 10 | main | 43 | NULL |
+————————————–+————–+————-+—————-+—-+——–+
1 row in set (0.00 sec)

By using ‘resource_id’ I found the corresponding entries from “aps_resource” table:

mysql> select * from aps_resource where id=10;
+—-+——————–+——————–+————+———————————————-+
| id | registry_object_id | parent_resource_id | service_id | resource_type |
+—-+——————–+——————–+————+———————————————-+
| 10 | 297 | NULL | wordpress | aps::aps12::http://wordpress.org/::wordpress |
+—-+——————–+——————–+————+———————————————-+
1 row in set (0.00 sec)

From the “registry_object_id” I found the corresponding entries from “aps_registry_object” table:

mysql> select * from aps_registry_object where id=297;
+—–+————————————–+————–+———————+———+
| id | uid | type | creation_time | enabled |
+—–+————————————–+————–+———————+———+
| 297 | 5ccb8435-0489-4267-8760-ff2325a5719a | aps.resource | 2011-11-10 03:23:47 | y |
+—–+————————————–+————–+———————+———+
1 row in set (0.00 sec)

There I could see the difference value for ‘uid’. This was the cause for the issue.

Then I updated the ‘uid’ to proper value by following query:

mysql> update aps_registry_object set uid=’b67b9fe5-a016-4d5f-ba6e-b26ef378b068′ where id=297;
Query OK, 1 row affected (0.08 sec)
Rows matched: 1 Changed: 1 Warnings: 0

Verified the updated entry:

mysql> select * from aps_registry_object where id=297;
+—–+————————————–+————–+———————+———+
| id | uid | type | creation_time | enabled |
+—–+————————————–+————–+———————+———+
| 297 | b67b9fe5-a016-4d5f-ba6e-b26ef378b068 | aps.resource | 2011-11-10 03:23:47 | y |
+—–+————————————–+————–+———————+———+
1 row in set (0.00 sec)

After that I was able to successfully delete the domain. Hope this helps someone:)

REFERENCES:
Same issue reported in the parallels forum url’s are provided below,

Categories: Plesk