Hello,

We have faced the same issue before, it worked with the below steps probably 
you missed step no. 6

* log in to UI, select Templates, My Templates, Add Template and enter the 
following:
Name:           systemvm-xenserver-4.2
Description:    systemvm-xenserver-4.2
URL:            
http://download.cloud.com/templates/4.2/systemvmtemplate-2013-07-12-master-xen.vhd.bz2
Zone:           Choose the zone where this hypervisor is used
Hypervisor:             XenServer
Format:                 VHD
OS Type:                Debian GNU/Linux 7.0 (32-bit) (or the highest Debian 
release number available in the dropdown)
Extractable:            no
Password Enabled:       no
Public:                 no
Featured:               no


1) service cloud-usage stop

2) service cloud-management stop

3) mysqldump -u root -pyourpassword cloud > cloud-backup.sql

4) mysqldump -u root -pyourpassword cloud_usage > cloud-usage-backup.sql

5) mysql -u root -pyourpassword

6) delete from cloud.resource_count;            exit

7) vi /etc/apt/sources.list 

8) paste the following          deb http://cloudstack.apt-get.eu/ubuntu precise 
4.2

9) Esc, :wq, Enter

10) wget -O - http://cloudstack.apt-get.eu/release.asc|apt-key add -

11) apt-get update

12) apt-get install cloudstack-management 


** cd /usr/share/cloudstack-common/scripts/vm/hypervisor/xenserver 
** wget http://download.cloud.com.s3.amazonaws.com/tools/vhd-util
** cd 
/usr/share/cloudstack-management/webapps/client/WEB-INF/classes/scripts/vm/hypervisor/xenserver/
** wget http://download.cloud.com.s3.amazonaws.com/tools/vhd-util

On each Hypervisor cd /opt/cloud/bin wget 
http://download.cloud.com.s3.amazonaws.com/tools/vhd-util chmod 777 vhd-util


13) apt-get install cloudstack-usage

14) cloudstack-setup-encryption -m yourkey -k yourkey

15) service cloudstack-management start

16) When the UI becomes accessible log in, Click Domains, then click the ROOT 
domain. Click the Update Resource Count button. This will refresh the resource 
count and generate the table deleted in step 6.

17) service cloudstack-usage start
---------------------------------------------
Make Sure all hosts are UP
---------------------------------------------

18) nohup cloudstack-sysvmadm -d localhost -u cloud -pyourpassword -a > 
sysvm.log 2>&1 &        (or stop manually all sys vm's)

-------------------------------------------------------------------

tail -f sysvm.log



Kind Regards
Amin 

   



-----Original Message-----
From: Paul Angus [mailto:paul.an...@shapeblue.com] 
Sent: Wednesday, 26 March 2014 11:56 PM
To: dev@cloudstack.apache.org
Subject: RE: Upgrade problems 3.0.7 - 4.2.1

Can you look in the database - is there more than one entry for 3.0.7 in the 
version table?

A successful upgrade from 3.0.7 to 4.2.1. looks like this...

# id, version, updated, step
'1', '3.0.7.20140103104106', '2014-03-24 17:53:44', 'Complete'
'2', '4.1.0', '2014-03-26 12:03:33', 'Complete'
'3', '4.2.0', '2014-03-26 12:03:33', 'Complete'
'4', '4.2.1', '2014-03-26 12:03:33', 'Complete'


Regards,

Paul Angus
Cloud Architect
S: +44 20 3603 0540 | M: +447711418784 | T: @CloudyAngus 
paul.an...@shapeblue.com

-----Original Message-----
From: Alex Hitchins [mailto:alex.hitch...@shapeblue.com]
Sent: 26 March 2014 15:25
To: dev@cloudstack.apache.org
Subject: RE: Upgrade problems 3.0.7 - 4.2.1

Ignore my last comment - I now see the -- prefx!


Regards

Alex Hitchins

D: +44 1892 523 587 | S: +44 2036 030 540<tel:+442036030540> | M: 
+44<tel:+447968161581> 7788 423 969

alex.hitch...@shapeblue.com<mailto:alex.hitch...@shapeblue.com>

From: Geoff Higginbottom [mailto:geoff.higginbot...@shapeblue.com]
Sent: 26 March 2014 15:10
To: dev@cloudstack.apache.org
Subject: Upgrade problems 3.0.7 - 4.2.1

Hi,

I am trying to upgrade a CloudPlatfom 3.0.7 build to Apache CloudStack 4.2.1

The DB upgrade keeps failing with the logs highlighting a 'system integrity 
check failure'

Any help would be greatly appreciated


2014-03-26 14:53:31,883 DEBUG [utils.db.ScriptRunner] (Timer-2:null) --   
http://www.apache.org/licenses/LICENSE-2.0
2014-03-26 14:53:31,883 DEBUG [utils.db.ScriptRunner] (Timer-2:null) --
2014-03-26 14:53:31,883 DEBUG [utils.db.ScriptRunner] (Timer-2:null) -- Unless 
required by applicable law or agreed to in writing,
2014-03-26 14:53:31,884 DEBUG [utils.db.ScriptRunner] (Timer-2:null) -- 
software distributed under the License is distributed on an
2014-03-26 14:53:31,884 DEBUG [utils.db.ScriptRunner] (Timer-2:null) -- "AS IS" 
BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
2014-03-26 14:53:31,884 DEBUG [utils.db.ScriptRunner] (Timer-2:null) -- KIND, 
either express or implied.  See the License for the
2014-03-26 14:53:31,884 DEBUG [utils.db.ScriptRunner] (Timer-2:null) -- 
specific language governing permissions and limitations
2014-03-26 14:53:31,884 DEBUG [utils.db.ScriptRunner] (Timer-2:null) -- under 
the License.
2014-03-26 14:53:31,884 DEBUG [utils.db.ScriptRunner] (Timer-2:null) INSERT 
IGNORE INTO `cloud`.`configuration` VALUES ('Network', 'DEFAULT', 
'management-server', 'network.loadbalancer.haproxy.max.conn', '4096', 'Load 
Balancer(haproxy) maximum number of concurrent connections(global max)')
2014-03-26 14:53:31,885 DEBUG [utils.db.ScriptRunner] (Timer-2:null) ALTER 
TABLE `cloud`.`network_offerings` ADD COLUMN `concurrent_connections` int(10) 
unsigned COMMENT 'concurrent connections supported on this network'
2014-03-26 14:53:31,912 DEBUG [db.Transaction.Transaction] (Timer-2:null) 
Rolling back the transaction: Time = 36 Name =  
-CloudStartupServlet$1.run:52-TimerThread.mainLoop:534-TimerThread.run:484; 
called by 
-Transaction.rollback:897-Transaction.removeUpTo:840-Transaction.close:664-DatabaseUpgradeChecker.upgrade:298-DatabaseUpgradeChecker.check:394-ComponentContext.initComponentsLifeCycle:90-CloudStartupServlet$1.run:54-TimerThread.mainLoop:534-TimerThread.run:484
2014-03-26 14:53:31,916 ERROR [utils.component.ComponentContext] (Timer-2:null) 
System integrity check failed. Refuse to startup
javax.persistence.EntityExistsException: Entity already exists:
        at com.cloud.utils.db.GenericDaoBase.persist(GenericDaoBase.java:1346)
        at 
com.cloud.upgrade.DatabaseUpgradeChecker.upgrade(DatabaseUpgradeChecker.java:290)
        at 
com.cloud.upgrade.DatabaseUpgradeChecker.check(DatabaseUpgradeChecker.java:394)
        at 
com.cloud.utils.component.ComponentContext.initComponentsLifeCycle(ComponentContext.java:90)
       at 
com.cloud.servlet.CloudStartupServlet$1.run(CloudStartupServlet.java:54)
        at java.util.TimerThread.mainLoop(Timer.java:534)
        at java.util.TimerThread.run(Timer.java:484)
Caused by: 
com.mysql.jdbc.exceptions.jdbc4.MySQLIntegrityConstraintViolationException: 
Duplicate entry '3.0.7' for key 'version'
        at sun.reflect.NativeConstructorAccessorImpl.newInstance0(Native Method)
        at 
sun.reflect.NativeConstructorAccessorImpl.newInstance(NativeConstructorAccessorImpl.java:57)
        at 
sun.reflect.DelegatingConstructorAccessorImpl.newInstance(DelegatingConstructorAccessorImpl.java:45)
        at java.lang.reflect.Constructor.newInstance(Constructor.java:534)
        at com.mysql.jdbc.Util.handleNewInstance(Util.java:411)
        at com.mysql.jdbc.Util.getInstance(Util.java:386)
        at com.mysql.jdbc.SQLError.createSQLException(SQLError.java:1040)
        at com.mysql.jdbc.MysqlIO.checkErrorPacket(MysqlIO.java:4074)
        at com.mysql.jdbc.MysqlIO.checkErrorPacket(MysqlIO.java:4006)
        at com.mysql.jdbc.MysqlIO.sendCommand(MysqlIO.java:2468)
        at com.mysql.jdbc.MysqlIO.sqlQueryDirect(MysqlIO.java:2629)
        at com.mysql.jdbc.ConnectionImpl.execSQL(ConnectionImpl.java:2719)
        at 
com.mysql.jdbc.PreparedStatement.executeInternal(PreparedStatement.java:2155)
        at 
com.mysql.jdbc.PreparedStatement.executeUpdate(PreparedStatement.java:2450)
        at 
com.mysql.jdbc.PreparedStatement.executeUpdate(PreparedStatement.java:2371)
        at 
com.mysql.jdbc.PreparedStatement.executeUpdate(PreparedStatement.java:2355)
        at 
org.apache.commons.dbcp.DelegatingPreparedStatement.executeUpdate(DelegatingPreparedStatement.java:105)
        at 
org.apache.commons.dbcp.DelegatingPreparedStatement.executeUpdate(DelegatingPreparedStatement.java:105)
        at com.cloud.utils.db.GenericDaoBase.persist(GenericDaoBase.java:1311)
        ... 6 more




Regards

Geoff Higginbottom
CTO / Cloud Architect

[Description: Mail Logo Bottom Align]

D: +44 20 3603 0542<tel:+442036030542> | S: +44 20 3603 0540<tel:+442036030540> 
| M: +447968161581<tel:+447968161581>

geoff.higginbot...@shapeblue.com<mailto:geoff.higginbot...@shapeblue.com> | 
www.shapeblue.com<htp://www.shapeblue.com/> | 
Twitter:@cloudstackguru<https://twitter.com/#!/cloudstacguru>

ShapeBlue Ltd, 53 Chandos Place, Covent Garden, London, WC2N 4HS

Need Enterprise Grade Support for Apache CloudStack?
Our CloudStack Infrastructure 
Support<http://shapeblue.com/cloudstack-infrastructure-support/> offers the 
best 24/7 SLA for CloudStack Environments.

Apache CloudStack Bootcamp training courses

**NEW!** CloudStack 4.2.1 training<http://shapeblue.com/cloudstack-training/>
18th-19th February 2014, Brazil. 
Classroom<http://shapeblue.com/cloudstack-training/>
17th-23rd March 2014, Region A. Instructor led, 
On-line<http://shapeblue.com/cloudstack-training/>
24th-28th March 2014, Region B. Instructor led, 
On-line<http://shapeblue.com/cloudstack-training/>
16th-20th June 2014, Region A. Instructor led, 
On-line<http://shapeblue.com/cloudstack-training/>
23rd-27th June 2014, Region B. Instructor led, 
On-line<http://shapeblue.com/cloudstack-training/>

This email and any attachments to it may be confidential and are intended 
solely for the use of the individual to whom it is addressed. Any views or 
opinions expressed are solely those of the author and do not necessarily 
represent those of Shape Blue Ltd or related companies. If you are not the 
intended recipient of this email, you must neither take any action based upon 
its contents, nor copy or show it to anyone. Please contact the sender if you 
believe you have received this email in error. Shape Blue Ltd is a company 
incorporated in England & Wales. ShapeBlue Services India LLP is a company 
incorporated in India and is operated under license from Shape Blue Ltd. Shape 
Blue Brasil Consultoria Ltda is a company incorporated in Brasil and is 
operated under license from Shape Blue Ltd. ShapeBlue is a registered trademark.
This email and any attachments to it may be confidential and are intended 
solely for the use of the individual to whom it is addressed. Any views or 
opinions expressed are solely those of the author and do not necessarily 
represent those of Shape Blue Ltd or related companies. If you are not the 
intended recipient of this email, you must neither take any action based upon 
its contents, nor copy or show it to anyone. Please contact the sender if you 
believe you have received this email in error. Shape Blue Ltd is a company 
incorporated in England & Wales. ShapeBlue Services India LLP is a company 
incorporated in India and is operated under license from Shape Blue Ltd. Shape 
Blue Brasil Consultoria Ltda is a company incorporated in Brasil and is 
operated under license from Shape Blue Ltd. ShapeBlue is a registered trademark.
This email and any attachments to it may be confidential and are intended 
solely for the use of the individual to whom it is addressed. Any views or 
opinions expressed are solely those of the author and do not necessarily 
represent those of Shape Blue Ltd or related companies. If you are not the 
intended recipient of this email, you must neither take any action based upon 
its contents, nor copy or show it to anyone. Please contact the sender if you 
believe you have received this email in error. Shape Blue Ltd is a company 
incorporated in England & Wales. ShapeBlue Services India LLP is a company 
incorporated in India and is operated under license from Shape Blue Ltd. Shape 
Blue Brasil Consultoria Ltda is a company incorporated in Brasil and is 
operated under license from Shape Blue Ltd. ShapeBlue is a registered trademark.


Reply via email to