You are viewing a plain text version of this content. The canonical link for it is here.
Posted to users@cloudstack.apache.org by Ricardo Pertuz <ri...@kuasar.co.INVALID> on 2023/10/19 17:32:43 UTC

Error installing a brand new ACS 4.18.1

Hi team,

I’m trying to install a brand new ACS 4.18 in Ubuntu 20.04 LTS and when starting it’s getting this error

2023-10-19 12:24:15,354 ERROR [c.c.u.d.ScriptRunner] (main:null) (logid:) Error executing: alter table vm_template add size bigint unsigned
2023-10-19 12:24:15,355 ERROR [c.c.u.d.ScriptRunner] (main:null) (logid:) java.sql.SQLSyntaxErrorException: Duplicate column name 'size'
2023-10-19 12:24:15,357 ERROR [c.c.u.DatabaseUpgradeChecker] (main:null) (logid:) Unable to execute upgrade script

java.sql.SQLSyntaxErrorException: Duplicate column name 'size'

2023-10-19 12:24:15,389 ERROR [c.c.u.DatabaseUpgradeChecker] (main:null) (logid:) Unable to upgrade the database
com.cloud.utils.exception.CloudRuntimeException: Unable to execute upgrade script

Not so sure why is is upgrading it

The cloud database setup command is

cloudstack-setup-databases cloud:mysql_pass@database --deploy-as=user:pass -r 1 -i ip_mgnt_server


Atte,

Ricardo Pertuz



Re: Error installing a brand new ACS 4.18.1

Posted by Wei ZHOU <us...@gmail.com>.
Hi Ricardo,

This seems to be an issue with mariadb
refer to https://jira.mariadb.org/browse/MDEV-31987


-Wei

On Thu, 19 Oct 2023 at 21:36, Ricardo Pertuz
<ri...@kuasar.co.invalid> wrote:

> I tried these versions none of them work
>
> 10.10.6-MariaDB
> 10.5.22-MariaDB
> 10.11.5-MariaDB
>
> Looks weird as I have a functional ACS 4.18.0 running on 10.5.19-MariaDB
>
>
> Atte,
>
> Ricardo Pertuz
>
>
> On 19 Oct 2023 at 1:35 PM -0500, Wei ZHOU <us...@gmail.com>, wrote:
> > The issue might be related to database versions, need to confirm.
> > Can you try MySQL or upgrade mariadb?
> >
> > -Wei
> >
> > 在 2023年10月19日星期四,Ricardo Pertuz <ri...@kuasar.co.invalid> 写道:
> >
> > > This one Wei:
> > >
> > > Server version: 10.10.6-MariaDB-1:10.10.6+maria~ubu2004
> > >
> > >
> > > Atte,
> > >
> > > Ricardo Pertuz
> > >
> > >
> > > On 19 Oct 2023 at 12:56 PM -0500, Wei ZHOU <us...@gmail.com>,
> wrote:
> > > > HI Ricardo,
> > > >
> > > > Do you use MySQL, mariadb or other alternatives? What's the version?
> > > >
> > > > -Wei
> > > >
> > > > 在 2023年10月19日星期四,Ricardo Pertuz <ri...@kuasar.co.invalid>
> 写道:
> > > >
> > > > > Thans Wei,
> > > > >
> > > > > It it a new virtual machine with no previous installation, I just
> > > > >
> > > > > 1. Dropped both databases
> > > > > 2. Send de cloudstack-database-setup again with no errror
> > > > > 3. Start de ACS Management daemon
> > > > >
> > > > > Now getting another SQL error
> > > > >
> > > > > 2023-10-19 12:47:29,711 ERROR [c.c.u.d.ScriptRunner] (main:null)
> > > (logid:)
> > > > > Error executing: alter table storage_pool modify id bigint unsigned
> > > > > AUTO_INCREMENT UNIQUE NOT NULL
> > > > > 2023-10-19 12:47:29,719 ERROR [c.c.u.d.ScriptRunner] (main:null)
> > > (logid:)
> > > > > java.sql.SQLException: Cannot change column 'id': used in a
> foreign key
> > > > > constraint 'fk_storage_pool_details__pool_id' of table
> > > > > 'cloud.storage_pool_details'
> > > > > 2023-10-19 12:47:29,722 ERROR [c.c.u.DatabaseUpgradeChecker]
> > > (main:null)
> > > > > (logid:) Unable to execute upgrade script
> > > > > java.sql.SQLException: Cannot change column 'id': used in a
> foreign key
> > > > > constraint 'fk_storage_pool_details__pool_id' of table
> > > > > 'cloud.storage_pool_details'
> > > > > at com.cloud.utils.db.ScriptRunner.runScript(ScriptRunner.java:185)
> > > > >
> > > > >
> > > > > Atte,
> > > > >
> > > > > Ricardo Pertuz
> > > > >
> > > > >
> > > > > On 19 Oct 2023 at 12:39 PM -0500, Wei ZHOU <ustcweizhou@gmail.com
> >,
> > > wrote:
> > > > > > Hi Ricardo,
> > > > > >
> > > > > > Have you installed management service on the host before?
> > > > > > You can drop the cloud and cloud_usage database, then retry.
> > > > > >
> > > > > > If you install multiple management servers, install them one by
> one.
> > > > > >
> > > > > > -Wei
> > > > > >
> > > > > > 在 2023年10月19日星期四,Ricardo Pertuz <ricardo.pertuz@kuasar.co
> .invalid>
> > > 写道:
> > > > > >
> > > > > > > Hi team,
> > > > > > >
> > > > > > > I’m trying to install a brand new ACS 4.18 in Ubuntu 20.04 LTS
> and
> > > when
> > > > > > > starting it’s getting this error
> > > > > > >
> > > > > > > 2023-10-19 12:24:15,354 ERROR [c.c.u.d.ScriptRunner]
> (main:null)
> > > > > (logid:)
> > > > > > > Error executing: alter table vm_template add size bigint
> unsigned
> > > > > > > 2023-10-19 12:24:15,355 ERROR [c.c.u.d.ScriptRunner]
> (main:null)
> > > > > (logid:)
> > > > > > > java.sql.SQLSyntaxErrorException: Duplicate column name 'size'
> > > > > > > 2023-10-19 12:24:15,357 ERROR [c.c.u.DatabaseUpgradeChecker]
> > > > > (main:null)
> > > > > > > (logid:) Unable to execute upgrade script
> > > > > > >
> > > > > > > java.sql.SQLSyntaxErrorException: Duplicate column name 'size'
> > > > > > >
> > > > > > > 2023-10-19 12:24:15,389 ERROR [c.c.u.DatabaseUpgradeChecker]
> > > > > (main:null)
> > > > > > > (logid:) Unable to upgrade the database
> > > > > > > com.cloud.utils.exception.CloudRuntimeException: Unable to
> execute
> > > > > > > upgrade script
> > > > > > >
> > > > > > > Not so sure why is is upgrading it
> > > > > > >
> > > > > > > The cloud database setup command is
> > > > > > >
> > > > > > > cloudstack-setup-databases cloud:mysql_pass@database
> > > > > --deploy-as=user:pass -r
> > > > > > > 1 -i ip_mgnt_server
> > > > > > >
> > > > > > >
> > > > > > > Atte,
> > > > > > >
> > > > > > > Ricardo Pertuz
> > > > > > >
> > > > > > >
> > > > > > >
> > > > >
> > >
>

Re: Error installing a brand new ACS 4.18.1

Posted by Ricardo Pertuz <ri...@kuasar.co.INVALID>.
Thanks Wei,

I tried these commands

SET FOREIGN_KEY_CHECKS=0;
SET GLOBAL FOREIGN_KEY_CHECKS=0;

without success, I removed Mariadb and installed Mysql 8.x and it working now.


Atte,

Ricardo Pertuz


On 20 Oct 2023 at 4:46 AM -0500, users@cloudstack.apache.org, wrote:
>
> SET FOREIGN_KEY_CHECKS=0;
> SET GLOBAL FOREIGN_KEY_CHECKS=0;

Re: Error installing a brand new ACS 4.18.1

Posted by Wei ZHOU <us...@gmail.com>.
Hi Ricardo,

I have a ubuntu 20.04 env with mysql 8, it works

mgmt1:~# dpkg -l |grep mysql-server
ii  mysql-server                         8.0.34-0ubuntu0.20.04.1
all          MySQL database server (metapackage depending on the latest
version)
ii  mysql-server-8.0                     8.0.34-0ubuntu0.20.04.1
amd64        MySQL database server binaries and system database setup
ii  mysql-server-core-8.0                8.0.34-0ubuntu0.20.04.1
amd64        MySQL database server binaries

The MySQL statement is executed without any issue

mysql> alter table storage_pool modify id bigint unsigned AUTO_INCREMENT
UNIQUE NOT NULL;
Query OK, 0 rows affected (0.10 sec)
Records: 0  Duplicates: 0  Warnings: 0

You can probably try with the following MySQL statements

SET FOREIGN_KEY_CHECKS=0;
SET GLOBAL FOREIGN_KEY_CHECKS=0;


-Wei


On Thu, 19 Oct 2023 at 21:36, Ricardo Pertuz
<ri...@kuasar.co.invalid> wrote:

> I tried these versions none of them work
>
> 10.10.6-MariaDB
> 10.5.22-MariaDB
> 10.11.5-MariaDB
>
> Looks weird as I have a functional ACS 4.18.0 running on 10.5.19-MariaDB
>
>
> Atte,
>
> Ricardo Pertuz
>
>
> On 19 Oct 2023 at 1:35 PM -0500, Wei ZHOU <us...@gmail.com>, wrote:
> > The issue might be related to database versions, need to confirm.
> > Can you try MySQL or upgrade mariadb?
> >
> > -Wei
> >
> > 在 2023年10月19日星期四,Ricardo Pertuz <ri...@kuasar.co.invalid> 写道:
> >
> > > This one Wei:
> > >
> > > Server version: 10.10.6-MariaDB-1:10.10.6+maria~ubu2004
> > >
> > >
> > > Atte,
> > >
> > > Ricardo Pertuz
> > >
> > >
> > > On 19 Oct 2023 at 12:56 PM -0500, Wei ZHOU <us...@gmail.com>,
> wrote:
> > > > HI Ricardo,
> > > >
> > > > Do you use MySQL, mariadb or other alternatives? What's the version?
> > > >
> > > > -Wei
> > > >
> > > > 在 2023年10月19日星期四,Ricardo Pertuz <ri...@kuasar.co.invalid>
> 写道:
> > > >
> > > > > Thans Wei,
> > > > >
> > > > > It it a new virtual machine with no previous installation, I just
> > > > >
> > > > > 1. Dropped both databases
> > > > > 2. Send de cloudstack-database-setup again with no errror
> > > > > 3. Start de ACS Management daemon
> > > > >
> > > > > Now getting another SQL error
> > > > >
> > > > > 2023-10-19 12:47:29,711 ERROR [c.c.u.d.ScriptRunner] (main:null)
> > > (logid:)
> > > > > Error executing: alter table storage_pool modify id bigint unsigned
> > > > > AUTO_INCREMENT UNIQUE NOT NULL
> > > > > 2023-10-19 12:47:29,719 ERROR [c.c.u.d.ScriptRunner] (main:null)
> > > (logid:)
> > > > > java.sql.SQLException: Cannot change column 'id': used in a
> foreign key
> > > > > constraint 'fk_storage_pool_details__pool_id' of table
> > > > > 'cloud.storage_pool_details'
> > > > > 2023-10-19 12:47:29,722 ERROR [c.c.u.DatabaseUpgradeChecker]
> > > (main:null)
> > > > > (logid:) Unable to execute upgrade script
> > > > > java.sql.SQLException: Cannot change column 'id': used in a
> foreign key
> > > > > constraint 'fk_storage_pool_details__pool_id' of table
> > > > > 'cloud.storage_pool_details'
> > > > > at com.cloud.utils.db.ScriptRunner.runScript(ScriptRunner.java:185)
> > > > >
> > > > >
> > > > > Atte,
> > > > >
> > > > > Ricardo Pertuz
> > > > >
> > > > >
> > > > > On 19 Oct 2023 at 12:39 PM -0500, Wei ZHOU <ustcweizhou@gmail.com
> >,
> > > wrote:
> > > > > > Hi Ricardo,
> > > > > >
> > > > > > Have you installed management service on the host before?
> > > > > > You can drop the cloud and cloud_usage database, then retry.
> > > > > >
> > > > > > If you install multiple management servers, install them one by
> one.
> > > > > >
> > > > > > -Wei
> > > > > >
> > > > > > 在 2023年10月19日星期四,Ricardo Pertuz <ricardo.pertuz@kuasar.co
> .invalid>
> > > 写道:
> > > > > >
> > > > > > > Hi team,
> > > > > > >
> > > > > > > I’m trying to install a brand new ACS 4.18 in Ubuntu 20.04 LTS
> and
> > > when
> > > > > > > starting it’s getting this error
> > > > > > >
> > > > > > > 2023-10-19 12:24:15,354 ERROR [c.c.u.d.ScriptRunner]
> (main:null)
> > > > > (logid:)
> > > > > > > Error executing: alter table vm_template add size bigint
> unsigned
> > > > > > > 2023-10-19 12:24:15,355 ERROR [c.c.u.d.ScriptRunner]
> (main:null)
> > > > > (logid:)
> > > > > > > java.sql.SQLSyntaxErrorException: Duplicate column name 'size'
> > > > > > > 2023-10-19 12:24:15,357 ERROR [c.c.u.DatabaseUpgradeChecker]
> > > > > (main:null)
> > > > > > > (logid:) Unable to execute upgrade script
> > > > > > >
> > > > > > > java.sql.SQLSyntaxErrorException: Duplicate column name 'size'
> > > > > > >
> > > > > > > 2023-10-19 12:24:15,389 ERROR [c.c.u.DatabaseUpgradeChecker]
> > > > > (main:null)
> > > > > > > (logid:) Unable to upgrade the database
> > > > > > > com.cloud.utils.exception.CloudRuntimeException: Unable to
> execute
> > > > > > > upgrade script
> > > > > > >
> > > > > > > Not so sure why is is upgrading it
> > > > > > >
> > > > > > > The cloud database setup command is
> > > > > > >
> > > > > > > cloudstack-setup-databases cloud:mysql_pass@database
> > > > > --deploy-as=user:pass -r
> > > > > > > 1 -i ip_mgnt_server
> > > > > > >
> > > > > > >
> > > > > > > Atte,
> > > > > > >
> > > > > > > Ricardo Pertuz
> > > > > > >
> > > > > > >
> > > > > > >
> > > > >
> > >
>

Re: Error installing a brand new ACS 4.18.1

Posted by Ricardo Pertuz <ri...@kuasar.co.INVALID>.
I tried these versions none of them work

10.10.6-MariaDB
10.5.22-MariaDB
10.11.5-MariaDB

Looks weird as I have a functional ACS 4.18.0 running on 10.5.19-MariaDB


Atte,

Ricardo Pertuz


On 19 Oct 2023 at 1:35 PM -0500, Wei ZHOU <us...@gmail.com>, wrote:
> The issue might be related to database versions, need to confirm.
> Can you try MySQL or upgrade mariadb?
>
> -Wei
>
> 在 2023年10月19日星期四,Ricardo Pertuz <ri...@kuasar.co.invalid> 写道:
>
> > This one Wei:
> >
> > Server version: 10.10.6-MariaDB-1:10.10.6+maria~ubu2004
> >
> >
> > Atte,
> >
> > Ricardo Pertuz
> >
> >
> > On 19 Oct 2023 at 12:56 PM -0500, Wei ZHOU <us...@gmail.com>, wrote:
> > > HI Ricardo,
> > >
> > > Do you use MySQL, mariadb or other alternatives? What's the version?
> > >
> > > -Wei
> > >
> > > 在 2023年10月19日星期四,Ricardo Pertuz <ri...@kuasar.co.invalid> 写道:
> > >
> > > > Thans Wei,
> > > >
> > > > It it a new virtual machine with no previous installation, I just
> > > >
> > > > 1. Dropped both databases
> > > > 2. Send de cloudstack-database-setup again with no errror
> > > > 3. Start de ACS Management daemon
> > > >
> > > > Now getting another SQL error
> > > >
> > > > 2023-10-19 12:47:29,711 ERROR [c.c.u.d.ScriptRunner] (main:null)
> > (logid:)
> > > > Error executing: alter table storage_pool modify id bigint unsigned
> > > > AUTO_INCREMENT UNIQUE NOT NULL
> > > > 2023-10-19 12:47:29,719 ERROR [c.c.u.d.ScriptRunner] (main:null)
> > (logid:)
> > > > java.sql.SQLException: Cannot change column 'id': used in a foreign key
> > > > constraint 'fk_storage_pool_details__pool_id' of table
> > > > 'cloud.storage_pool_details'
> > > > 2023-10-19 12:47:29,722 ERROR [c.c.u.DatabaseUpgradeChecker]
> > (main:null)
> > > > (logid:) Unable to execute upgrade script
> > > > java.sql.SQLException: Cannot change column 'id': used in a foreign key
> > > > constraint 'fk_storage_pool_details__pool_id' of table
> > > > 'cloud.storage_pool_details'
> > > > at com.cloud.utils.db.ScriptRunner.runScript(ScriptRunner.java:185)
> > > >
> > > >
> > > > Atte,
> > > >
> > > > Ricardo Pertuz
> > > >
> > > >
> > > > On 19 Oct 2023 at 12:39 PM -0500, Wei ZHOU <us...@gmail.com>,
> > wrote:
> > > > > Hi Ricardo,
> > > > >
> > > > > Have you installed management service on the host before?
> > > > > You can drop the cloud and cloud_usage database, then retry.
> > > > >
> > > > > If you install multiple management servers, install them one by one.
> > > > >
> > > > > -Wei
> > > > >
> > > > > 在 2023年10月19日星期四,Ricardo Pertuz <ri...@kuasar.co.invalid>
> > 写道:
> > > > >
> > > > > > Hi team,
> > > > > >
> > > > > > I’m trying to install a brand new ACS 4.18 in Ubuntu 20.04 LTS and
> > when
> > > > > > starting it’s getting this error
> > > > > >
> > > > > > 2023-10-19 12:24:15,354 ERROR [c.c.u.d.ScriptRunner] (main:null)
> > > > (logid:)
> > > > > > Error executing: alter table vm_template add size bigint unsigned
> > > > > > 2023-10-19 12:24:15,355 ERROR [c.c.u.d.ScriptRunner] (main:null)
> > > > (logid:)
> > > > > > java.sql.SQLSyntaxErrorException: Duplicate column name 'size'
> > > > > > 2023-10-19 12:24:15,357 ERROR [c.c.u.DatabaseUpgradeChecker]
> > > > (main:null)
> > > > > > (logid:) Unable to execute upgrade script
> > > > > >
> > > > > > java.sql.SQLSyntaxErrorException: Duplicate column name 'size'
> > > > > >
> > > > > > 2023-10-19 12:24:15,389 ERROR [c.c.u.DatabaseUpgradeChecker]
> > > > (main:null)
> > > > > > (logid:) Unable to upgrade the database
> > > > > > com.cloud.utils.exception.CloudRuntimeException: Unable to execute
> > > > > > upgrade script
> > > > > >
> > > > > > Not so sure why is is upgrading it
> > > > > >
> > > > > > The cloud database setup command is
> > > > > >
> > > > > > cloudstack-setup-databases cloud:mysql_pass@database
> > > > --deploy-as=user:pass -r
> > > > > > 1 -i ip_mgnt_server
> > > > > >
> > > > > >
> > > > > > Atte,
> > > > > >
> > > > > > Ricardo Pertuz
> > > > > >
> > > > > >
> > > > > >
> > > >
> >

Re: Error installing a brand new ACS 4.18.1

Posted by Wei ZHOU <us...@gmail.com>.
The issue might be related to database versions,  need to confirm.
Can you try MySQL or upgrade mariadb?

-Wei

在 2023年10月19日星期四,Ricardo Pertuz <ri...@kuasar.co.invalid> 写道:

> This one Wei:
>
> Server version: 10.10.6-MariaDB-1:10.10.6+maria~ubu2004
>
>
> Atte,
>
> Ricardo Pertuz
>
>
> On 19 Oct 2023 at 12:56 PM -0500, Wei ZHOU <us...@gmail.com>, wrote:
> > HI Ricardo,
> >
> > Do you use MySQL, mariadb or other alternatives? What's the version?
> >
> > -Wei
> >
> > 在 2023年10月19日星期四,Ricardo Pertuz <ri...@kuasar.co.invalid> 写道:
> >
> > > Thans Wei,
> > >
> > > It it a new virtual machine with no previous installation, I just
> > >
> > > 1. Dropped both databases
> > > 2. Send de cloudstack-database-setup again with no errror
> > > 3. Start de ACS Management daemon
> > >
> > > Now getting another SQL error
> > >
> > > 2023-10-19 12:47:29,711 ERROR [c.c.u.d.ScriptRunner] (main:null)
> (logid:)
> > > Error executing: alter table storage_pool modify id bigint unsigned
> > > AUTO_INCREMENT UNIQUE NOT NULL
> > > 2023-10-19 12:47:29,719 ERROR [c.c.u.d.ScriptRunner] (main:null)
> (logid:)
> > > java.sql.SQLException: Cannot change column 'id': used in a foreign key
> > > constraint 'fk_storage_pool_details__pool_id' of table
> > > 'cloud.storage_pool_details'
> > > 2023-10-19 12:47:29,722 ERROR [c.c.u.DatabaseUpgradeChecker]
> (main:null)
> > > (logid:) Unable to execute upgrade script
> > > java.sql.SQLException: Cannot change column 'id': used in a foreign key
> > > constraint 'fk_storage_pool_details__pool_id' of table
> > > 'cloud.storage_pool_details'
> > > at com.cloud.utils.db.ScriptRunner.runScript(ScriptRunner.java:185)
> > >
> > >
> > > Atte,
> > >
> > > Ricardo Pertuz
> > >
> > >
> > > On 19 Oct 2023 at 12:39 PM -0500, Wei ZHOU <us...@gmail.com>,
> wrote:
> > > > Hi Ricardo,
> > > >
> > > > Have you installed management service on the host before?
> > > > You can drop the cloud and cloud_usage database, then retry.
> > > >
> > > > If you install multiple management servers, install them one by one.
> > > >
> > > > -Wei
> > > >
> > > > 在 2023年10月19日星期四,Ricardo Pertuz <ri...@kuasar.co.invalid>
> 写道:
> > > >
> > > > > Hi team,
> > > > >
> > > > > I’m trying to install a brand new ACS 4.18 in Ubuntu 20.04 LTS and
> when
> > > > > starting it’s getting this error
> > > > >
> > > > > 2023-10-19 12:24:15,354 ERROR [c.c.u.d.ScriptRunner] (main:null)
> > > (logid:)
> > > > > Error executing: alter table vm_template add size bigint unsigned
> > > > > 2023-10-19 12:24:15,355 ERROR [c.c.u.d.ScriptRunner] (main:null)
> > > (logid:)
> > > > > java.sql.SQLSyntaxErrorException: Duplicate column name 'size'
> > > > > 2023-10-19 12:24:15,357 ERROR [c.c.u.DatabaseUpgradeChecker]
> > > (main:null)
> > > > > (logid:) Unable to execute upgrade script
> > > > >
> > > > > java.sql.SQLSyntaxErrorException: Duplicate column name 'size'
> > > > >
> > > > > 2023-10-19 12:24:15,389 ERROR [c.c.u.DatabaseUpgradeChecker]
> > > (main:null)
> > > > > (logid:) Unable to upgrade the database
> > > > > com.cloud.utils.exception.CloudRuntimeException: Unable to execute
> > > > > upgrade script
> > > > >
> > > > > Not so sure why is is upgrading it
> > > > >
> > > > > The cloud database setup command is
> > > > >
> > > > > cloudstack-setup-databases cloud:mysql_pass@database
> > > --deploy-as=user:pass -r
> > > > > 1 -i ip_mgnt_server
> > > > >
> > > > >
> > > > > Atte,
> > > > >
> > > > > Ricardo Pertuz
> > > > >
> > > > >
> > > > >
> > >
>

Re: Error installing a brand new ACS 4.18.1

Posted by Ricardo Pertuz <ri...@kuasar.co.INVALID>.
This one Wei:

Server version: 10.10.6-MariaDB-1:10.10.6+maria~ubu2004


Atte,

Ricardo Pertuz


On 19 Oct 2023 at 12:56 PM -0500, Wei ZHOU <us...@gmail.com>, wrote:
> HI Ricardo,
>
> Do you use MySQL, mariadb or other alternatives? What's the version?
>
> -Wei
>
> 在 2023年10月19日星期四,Ricardo Pertuz <ri...@kuasar.co.invalid> 写道:
>
> > Thans Wei,
> >
> > It it a new virtual machine with no previous installation, I just
> >
> > 1. Dropped both databases
> > 2. Send de cloudstack-database-setup again with no errror
> > 3. Start de ACS Management daemon
> >
> > Now getting another SQL error
> >
> > 2023-10-19 12:47:29,711 ERROR [c.c.u.d.ScriptRunner] (main:null) (logid:)
> > Error executing: alter table storage_pool modify id bigint unsigned
> > AUTO_INCREMENT UNIQUE NOT NULL
> > 2023-10-19 12:47:29,719 ERROR [c.c.u.d.ScriptRunner] (main:null) (logid:)
> > java.sql.SQLException: Cannot change column 'id': used in a foreign key
> > constraint 'fk_storage_pool_details__pool_id' of table
> > 'cloud.storage_pool_details'
> > 2023-10-19 12:47:29,722 ERROR [c.c.u.DatabaseUpgradeChecker] (main:null)
> > (logid:) Unable to execute upgrade script
> > java.sql.SQLException: Cannot change column 'id': used in a foreign key
> > constraint 'fk_storage_pool_details__pool_id' of table
> > 'cloud.storage_pool_details'
> > at com.cloud.utils.db.ScriptRunner.runScript(ScriptRunner.java:185)
> >
> >
> > Atte,
> >
> > Ricardo Pertuz
> >
> >
> > On 19 Oct 2023 at 12:39 PM -0500, Wei ZHOU <us...@gmail.com>, wrote:
> > > Hi Ricardo,
> > >
> > > Have you installed management service on the host before?
> > > You can drop the cloud and cloud_usage database, then retry.
> > >
> > > If you install multiple management servers, install them one by one.
> > >
> > > -Wei
> > >
> > > 在 2023年10月19日星期四,Ricardo Pertuz <ri...@kuasar.co.invalid> 写道:
> > >
> > > > Hi team,
> > > >
> > > > I’m trying to install a brand new ACS 4.18 in Ubuntu 20.04 LTS and when
> > > > starting it’s getting this error
> > > >
> > > > 2023-10-19 12:24:15,354 ERROR [c.c.u.d.ScriptRunner] (main:null)
> > (logid:)
> > > > Error executing: alter table vm_template add size bigint unsigned
> > > > 2023-10-19 12:24:15,355 ERROR [c.c.u.d.ScriptRunner] (main:null)
> > (logid:)
> > > > java.sql.SQLSyntaxErrorException: Duplicate column name 'size'
> > > > 2023-10-19 12:24:15,357 ERROR [c.c.u.DatabaseUpgradeChecker]
> > (main:null)
> > > > (logid:) Unable to execute upgrade script
> > > >
> > > > java.sql.SQLSyntaxErrorException: Duplicate column name 'size'
> > > >
> > > > 2023-10-19 12:24:15,389 ERROR [c.c.u.DatabaseUpgradeChecker]
> > (main:null)
> > > > (logid:) Unable to upgrade the database
> > > > com.cloud.utils.exception.CloudRuntimeException: Unable to execute
> > > > upgrade script
> > > >
> > > > Not so sure why is is upgrading it
> > > >
> > > > The cloud database setup command is
> > > >
> > > > cloudstack-setup-databases cloud:mysql_pass@database
> > --deploy-as=user:pass -r
> > > > 1 -i ip_mgnt_server
> > > >
> > > >
> > > > Atte,
> > > >
> > > > Ricardo Pertuz
> > > >
> > > >
> > > >
> >

Re: Error installing a brand new ACS 4.18.1

Posted by Wei ZHOU <us...@gmail.com>.
HI Ricardo,

Do you use MySQL,  mariadb or other alternatives?  What's the version?

-Wei

在 2023年10月19日星期四,Ricardo Pertuz <ri...@kuasar.co.invalid> 写道:

> Thans Wei,
>
> It it a new virtual machine with no previous installation, I just
>
> 1. Dropped both databases
> 2. Send de cloudstack-database-setup again with no errror
> 3. Start de ACS Management daemon
>
> Now getting another SQL error
>
> 2023-10-19 12:47:29,711 ERROR [c.c.u.d.ScriptRunner] (main:null) (logid:)
> Error executing: alter table storage_pool modify id bigint unsigned
> AUTO_INCREMENT UNIQUE NOT NULL
> 2023-10-19 12:47:29,719 ERROR [c.c.u.d.ScriptRunner] (main:null) (logid:)
> java.sql.SQLException: Cannot change column 'id': used in a foreign key
> constraint 'fk_storage_pool_details__pool_id' of table
> 'cloud.storage_pool_details'
> 2023-10-19 12:47:29,722 ERROR [c.c.u.DatabaseUpgradeChecker] (main:null)
> (logid:) Unable to execute upgrade script
> java.sql.SQLException: Cannot change column 'id': used in a foreign key
> constraint 'fk_storage_pool_details__pool_id' of table
> 'cloud.storage_pool_details'
>  at com.cloud.utils.db.ScriptRunner.runScript(ScriptRunner.java:185)
>
>
> Atte,
>
> Ricardo Pertuz
>
>
> On 19 Oct 2023 at 12:39 PM -0500, Wei ZHOU <us...@gmail.com>, wrote:
> > Hi Ricardo,
> >
> > Have you installed management service on the host before?
> > You can drop the cloud and cloud_usage database, then retry.
> >
> > If you install multiple management servers, install them one by one.
> >
> > -Wei
> >
> > 在 2023年10月19日星期四,Ricardo Pertuz <ri...@kuasar.co.invalid> 写道:
> >
> > > Hi team,
> > >
> > > I’m trying to install a brand new ACS 4.18 in Ubuntu 20.04 LTS and when
> > > starting it’s getting this error
> > >
> > > 2023-10-19 12:24:15,354 ERROR [c.c.u.d.ScriptRunner] (main:null)
> (logid:)
> > > Error executing: alter table vm_template add size bigint unsigned
> > > 2023-10-19 12:24:15,355 ERROR [c.c.u.d.ScriptRunner] (main:null)
> (logid:)
> > > java.sql.SQLSyntaxErrorException: Duplicate column name 'size'
> > > 2023-10-19 12:24:15,357 ERROR [c.c.u.DatabaseUpgradeChecker]
> (main:null)
> > > (logid:) Unable to execute upgrade script
> > >
> > > java.sql.SQLSyntaxErrorException: Duplicate column name 'size'
> > >
> > > 2023-10-19 12:24:15,389 ERROR [c.c.u.DatabaseUpgradeChecker]
> (main:null)
> > > (logid:) Unable to upgrade the database
> > > com.cloud.utils.exception.CloudRuntimeException: Unable to execute
> > > upgrade script
> > >
> > > Not so sure why is is upgrading it
> > >
> > > The cloud database setup command is
> > >
> > > cloudstack-setup-databases cloud:mysql_pass@database
> --deploy-as=user:pass -r
> > > 1 -i ip_mgnt_server
> > >
> > >
> > > Atte,
> > >
> > > Ricardo Pertuz
> > >
> > >
> > >
>

Re: Error installing a brand new ACS 4.18.1

Posted by Ricardo Pertuz <ri...@kuasar.co.INVALID>.
Thans Wei,

It it a new virtual machine with no previous installation, I just

1. Dropped both databases
2. Send de cloudstack-database-setup again with no errror
3. Start de ACS Management daemon

Now getting another SQL error

2023-10-19 12:47:29,711 ERROR [c.c.u.d.ScriptRunner] (main:null) (logid:) Error executing: alter table storage_pool modify id bigint unsigned AUTO_INCREMENT UNIQUE NOT NULL
2023-10-19 12:47:29,719 ERROR [c.c.u.d.ScriptRunner] (main:null) (logid:) java.sql.SQLException: Cannot change column 'id': used in a foreign key constraint 'fk_storage_pool_details__pool_id' of table 'cloud.storage_pool_details'
2023-10-19 12:47:29,722 ERROR [c.c.u.DatabaseUpgradeChecker] (main:null) (logid:) Unable to execute upgrade script
java.sql.SQLException: Cannot change column 'id': used in a foreign key constraint 'fk_storage_pool_details__pool_id' of table 'cloud.storage_pool_details'
 at com.cloud.utils.db.ScriptRunner.runScript(ScriptRunner.java:185)


Atte,

Ricardo Pertuz


On 19 Oct 2023 at 12:39 PM -0500, Wei ZHOU <us...@gmail.com>, wrote:
> Hi Ricardo,
>
> Have you installed management service on the host before?
> You can drop the cloud and cloud_usage database, then retry.
>
> If you install multiple management servers, install them one by one.
>
> -Wei
>
> 在 2023年10月19日星期四,Ricardo Pertuz <ri...@kuasar.co.invalid> 写道:
>
> > Hi team,
> >
> > I’m trying to install a brand new ACS 4.18 in Ubuntu 20.04 LTS and when
> > starting it’s getting this error
> >
> > 2023-10-19 12:24:15,354 ERROR [c.c.u.d.ScriptRunner] (main:null) (logid:)
> > Error executing: alter table vm_template add size bigint unsigned
> > 2023-10-19 12:24:15,355 ERROR [c.c.u.d.ScriptRunner] (main:null) (logid:)
> > java.sql.SQLSyntaxErrorException: Duplicate column name 'size'
> > 2023-10-19 12:24:15,357 ERROR [c.c.u.DatabaseUpgradeChecker] (main:null)
> > (logid:) Unable to execute upgrade script
> >
> > java.sql.SQLSyntaxErrorException: Duplicate column name 'size'
> >
> > 2023-10-19 12:24:15,389 ERROR [c.c.u.DatabaseUpgradeChecker] (main:null)
> > (logid:) Unable to upgrade the database
> > com.cloud.utils.exception.CloudRuntimeException: Unable to execute
> > upgrade script
> >
> > Not so sure why is is upgrading it
> >
> > The cloud database setup command is
> >
> > cloudstack-setup-databases cloud:mysql_pass@database --deploy-as=user:pass -r
> > 1 -i ip_mgnt_server
> >
> >
> > Atte,
> >
> > Ricardo Pertuz
> >
> >
> >

Re: Error installing a brand new ACS 4.18.1

Posted by Wei ZHOU <us...@gmail.com>.
Hi Ricardo,

Have you installed management service on the host before?
You can drop the cloud and cloud_usage database,  then retry.

If you install multiple management servers,  install them one by one.

-Wei

在 2023年10月19日星期四,Ricardo Pertuz <ri...@kuasar.co.invalid> 写道:

> Hi team,
>
> I’m trying to install a brand new ACS 4.18 in Ubuntu 20.04 LTS and when
> starting it’s getting this error
>
> 2023-10-19 12:24:15,354 ERROR [c.c.u.d.ScriptRunner] (main:null) (logid:)
> Error executing: alter table vm_template add size bigint unsigned
> 2023-10-19 12:24:15,355 ERROR [c.c.u.d.ScriptRunner] (main:null) (logid:)
> java.sql.SQLSyntaxErrorException: Duplicate column name 'size'
> 2023-10-19 12:24:15,357 ERROR [c.c.u.DatabaseUpgradeChecker] (main:null)
> (logid:) Unable to execute upgrade script
>
> java.sql.SQLSyntaxErrorException: Duplicate column name 'size'
>
> 2023-10-19 12:24:15,389 ERROR [c.c.u.DatabaseUpgradeChecker] (main:null)
> (logid:) Unable to upgrade the database
> com.cloud.utils.exception.CloudRuntimeException: Unable to execute
> upgrade script
>
> Not so sure why is is upgrading it
>
> The cloud database setup command is
>
> cloudstack-setup-databases cloud:mysql_pass@database --deploy-as=user:pass -r
> 1 -i ip_mgnt_server
>
>
> Atte,
>
> Ricardo Pertuz
>
>
>