You are viewing a plain text version of this content. The canonical link for it is here.
Posted to users@cloudstack.apache.org by Abdul Qayyum Halid <ha...@gmail.com> on 2016/11/11 02:26:49 UTC

Unable to start management

Hi, I am having problem to start CS management. The error show unable to
upgrade databases. MySQL version 5.7, CS 4.9. Any solution? Below are the
error.Thank you

ERROR [c.c.u.d.ScriptRunner] (main:null) (logid:) Error executing: alter
table vm_template add size bigint unsigned
2016-11-11 10:18:53,229 ERROR [c.c.u.d.ScriptRunner] (main:null) (logid:)
com.mysql.jdbc.exceptions.jdbc4.MySQLSyntaxErrorException: Duplicate column
name 'size'
2016-11-11 10:18:53,229 ERROR [c.c.u.DatabaseUpgradeChecker] (main:null)
(logid:) Unable to execute upgrade script:
/usr/share/cloudstack-management/setup/db/schema-40to410.sql
com.mysql.jdbc.exceptions.jdbc4.MySQLSyntaxErrorException: Duplicate column
name 'size'....
2016-11-11 10:18:53,233 WARN  [o.a.c.s.m.c.ResourceApplicationContext]
(main:null) (logid:) Exception encountered during context initialization -
cancelling refresh attempt:
org.springframework.context.ApplicationContextException: Failed to start
bean 'cloudStackLifeCycle'; nested exception is
com.cloud.utils.exception.CloudRuntimeException: Unable to upgrade the
database

Re: Unable to start management

Posted by Abdul Qayyum Halid <ha...@gmail.com>.
Thanks all, i just start to deploy with fresh installation and its work

On Fri, Nov 11, 2016 at 5:13 PM, Dag Sonstebo <Da...@shapeblue.com>
wrote:

> +1 for Sergey’s comment - schema-40to410.sql should not run in your
> scenario.
>
> A couple of other things in addition to Sergey’s request:
>
> - Can you send the output of “select * from cloud.version” from your DB.
> - Did you *restart the upgrade after it failed once*? In general if your
> upgrade fails on one of the SQL scripts you have to 1) restore the original
> database, 2) fix the DB issue / upgrade script issue and 3) restart the
> upgrade. In other words you can’t just restart the upgrade again. I have
> seen the “duplicate column” and similar duplication problems before – and
> they can be a result of the same SQL script running and trying the same
> upgrade steps again.
>
> Regards,
> Dag Sonstebo
>
> On 11/11/2016, 04:57, "Abdul Qayyum Halid" <ha...@gmail.com> wrote:
>
>     i am upgrading from 4.6 to 4.9
>
>     On Fri, Nov 11, 2016 at 10:41 AM, Sergey Levitskiy <
>     Sergey.Levitskiy@autodesk.com> wrote:
>
>     > What version are you upgrading from ?
>     >
>     >
>     > On 11/10/16, 6:26 PM, "Abdul Qayyum Halid" <ha...@gmail.com>
> wrote:
>     >
>     >     Hi, I am having problem to start CS management. The error show
> unable
>     > to
>     >     upgrade databases. MySQL version 5.7, CS 4.9. Any solution?
> Below are
>     > the
>     >     error.Thank you
>     >
>     >     ERROR [c.c.u.d.ScriptRunner] (main:null) (logid:) Error
> executing:
>     > alter
>     >     table vm_template add size bigint unsigned
>     >     2016-11-11 10:18:53,229 ERROR [c.c.u.d.ScriptRunner] (main:null)
>     > (logid:)
>     >     com.mysql.jdbc.exceptions.jdbc4.MySQLSyntaxErrorException:
> Duplicate
>     > column
>     >     name 'size'
>     >     2016-11-11 10:18:53,229 ERROR [c.c.u.DatabaseUpgradeChecker]
>     > (main:null)
>     >     (logid:) Unable to execute upgrade script:
>     >     /usr/share/cloudstack-management/setup/db/schema-40to410.sql
>     >     com.mysql.jdbc.exceptions.jdbc4.MySQLSyntaxErrorException:
> Duplicate
>     > column
>     >     name 'size'....
>     >     2016-11-11 10:18:53,233 WARN  [o.a.c.s.m.c.
> ResourceApplicationContext]
>     >     (main:null) (logid:) Exception encountered during context
>     > initialization -
>     >     cancelling refresh attempt:
>     >     org.springframework.context.ApplicationContextException: Failed
> to
>     > start
>     >     bean 'cloudStackLifeCycle'; nested exception is
>     >     com.cloud.utils.exception.CloudRuntimeException: Unable to
> upgrade the
>     >     database
>     >
>     >
>     >
>
>
>
> Dag.Sonstebo@shapeblue.com
> www.shapeblue.com
> 53 Chandos Place, Covent Garden, London  WC2N 4HSUK
> @shapeblue
>
>
>
>

Re: Unable to start management

Posted by Dag Sonstebo <Da...@shapeblue.com>.
+1 for Sergey’s comment - schema-40to410.sql should not run in your scenario.

A couple of other things in addition to Sergey’s request:

- Can you send the output of “select * from cloud.version” from your DB.
- Did you *restart the upgrade after it failed once*? In general if your upgrade fails on one of the SQL scripts you have to 1) restore the original database, 2) fix the DB issue / upgrade script issue and 3) restart the upgrade. In other words you can’t just restart the upgrade again. I have seen the “duplicate column” and similar duplication problems before – and they can be a result of the same SQL script running and trying the same upgrade steps again.

Regards,
Dag Sonstebo

On 11/11/2016, 04:57, "Abdul Qayyum Halid" <ha...@gmail.com> wrote:

    i am upgrading from 4.6 to 4.9
    
    On Fri, Nov 11, 2016 at 10:41 AM, Sergey Levitskiy <
    Sergey.Levitskiy@autodesk.com> wrote:
    
    > What version are you upgrading from ?
    >
    >
    > On 11/10/16, 6:26 PM, "Abdul Qayyum Halid" <ha...@gmail.com> wrote:
    >
    >     Hi, I am having problem to start CS management. The error show unable
    > to
    >     upgrade databases. MySQL version 5.7, CS 4.9. Any solution? Below are
    > the
    >     error.Thank you
    >
    >     ERROR [c.c.u.d.ScriptRunner] (main:null) (logid:) Error executing:
    > alter
    >     table vm_template add size bigint unsigned
    >     2016-11-11 10:18:53,229 ERROR [c.c.u.d.ScriptRunner] (main:null)
    > (logid:)
    >     com.mysql.jdbc.exceptions.jdbc4.MySQLSyntaxErrorException: Duplicate
    > column
    >     name 'size'
    >     2016-11-11 10:18:53,229 ERROR [c.c.u.DatabaseUpgradeChecker]
    > (main:null)
    >     (logid:) Unable to execute upgrade script:
    >     /usr/share/cloudstack-management/setup/db/schema-40to410.sql
    >     com.mysql.jdbc.exceptions.jdbc4.MySQLSyntaxErrorException: Duplicate
    > column
    >     name 'size'....
    >     2016-11-11 10:18:53,233 WARN  [o.a.c.s.m.c.ResourceApplicationContext]
    >     (main:null) (logid:) Exception encountered during context
    > initialization -
    >     cancelling refresh attempt:
    >     org.springframework.context.ApplicationContextException: Failed to
    > start
    >     bean 'cloudStackLifeCycle'; nested exception is
    >     com.cloud.utils.exception.CloudRuntimeException: Unable to upgrade the
    >     database
    >
    >
    >
    


Dag.Sonstebo@shapeblue.com 
www.shapeblue.com
53 Chandos Place, Covent Garden, London  WC2N 4HSUK
@shapeblue
  
 


Re: Unable to start management

Posted by Sergey Levitskiy <Se...@autodesk.com>.
Can you zip and post full management server log?
Can you run cloudstack-sccs and post the value reported?
Looks like upgrade procedure doesn’t correctly determine your version because schema-40to410.sql shouldn’t get executed during upgrade from 4.6 to 4.9


 


Re: Unable to start management

Posted by Abdul Qayyum Halid <ha...@gmail.com>.
i am upgrading from 4.6 to 4.9

On Fri, Nov 11, 2016 at 10:41 AM, Sergey Levitskiy <
Sergey.Levitskiy@autodesk.com> wrote:

> What version are you upgrading from ?
>
>
> On 11/10/16, 6:26 PM, "Abdul Qayyum Halid" <ha...@gmail.com> wrote:
>
>     Hi, I am having problem to start CS management. The error show unable
> to
>     upgrade databases. MySQL version 5.7, CS 4.9. Any solution? Below are
> the
>     error.Thank you
>
>     ERROR [c.c.u.d.ScriptRunner] (main:null) (logid:) Error executing:
> alter
>     table vm_template add size bigint unsigned
>     2016-11-11 10:18:53,229 ERROR [c.c.u.d.ScriptRunner] (main:null)
> (logid:)
>     com.mysql.jdbc.exceptions.jdbc4.MySQLSyntaxErrorException: Duplicate
> column
>     name 'size'
>     2016-11-11 10:18:53,229 ERROR [c.c.u.DatabaseUpgradeChecker]
> (main:null)
>     (logid:) Unable to execute upgrade script:
>     /usr/share/cloudstack-management/setup/db/schema-40to410.sql
>     com.mysql.jdbc.exceptions.jdbc4.MySQLSyntaxErrorException: Duplicate
> column
>     name 'size'....
>     2016-11-11 10:18:53,233 WARN  [o.a.c.s.m.c.ResourceApplicationContext]
>     (main:null) (logid:) Exception encountered during context
> initialization -
>     cancelling refresh attempt:
>     org.springframework.context.ApplicationContextException: Failed to
> start
>     bean 'cloudStackLifeCycle'; nested exception is
>     com.cloud.utils.exception.CloudRuntimeException: Unable to upgrade the
>     database
>
>
>

Re: Unable to start management

Posted by Sergey Levitskiy <Se...@autodesk.com>.
What version are you upgrading from ?


On 11/10/16, 6:26 PM, "Abdul Qayyum Halid" <ha...@gmail.com> wrote:

    Hi, I am having problem to start CS management. The error show unable to
    upgrade databases. MySQL version 5.7, CS 4.9. Any solution? Below are the
    error.Thank you
    
    ERROR [c.c.u.d.ScriptRunner] (main:null) (logid:) Error executing: alter
    table vm_template add size bigint unsigned
    2016-11-11 10:18:53,229 ERROR [c.c.u.d.ScriptRunner] (main:null) (logid:)
    com.mysql.jdbc.exceptions.jdbc4.MySQLSyntaxErrorException: Duplicate column
    name 'size'
    2016-11-11 10:18:53,229 ERROR [c.c.u.DatabaseUpgradeChecker] (main:null)
    (logid:) Unable to execute upgrade script:
    /usr/share/cloudstack-management/setup/db/schema-40to410.sql
    com.mysql.jdbc.exceptions.jdbc4.MySQLSyntaxErrorException: Duplicate column
    name 'size'....
    2016-11-11 10:18:53,233 WARN  [o.a.c.s.m.c.ResourceApplicationContext]
    (main:null) (logid:) Exception encountered during context initialization -
    cancelling refresh attempt:
    org.springframework.context.ApplicationContextException: Failed to start
    bean 'cloudStackLifeCycle'; nested exception is
    com.cloud.utils.exception.CloudRuntimeException: Unable to upgrade the
    database