GitHub user apraba05 closed a discussion: Issues with Cloudstack Upgrade from 
4.19.2 to 4.20.1

### problem

2025-06-16 13:03:13,993 ERROR [c.c.u.d.ScriptRunner] (main:[]) (logid:) Error 
executing: CREATE TABLE `cloud`.`nsx_providers` (                               
           `id` bigint unsigned NOT NULL auto_increment COMMENT 'id',           
                               `uuid` varchar(40),                              
            `zone_id` bigint unsigned NOT NULL COMMENT 'Zone ID',               
                           `host_id` bigint unsigned NOT NULL COMMENT 'Host 
ID',                                          `provider_name` varchar(40),      
                                    `hostname` varchar(255) NOT NULL,           
                               `port` varchar(255),                             
             `username` varchar(255) NOT NULL,                                  
        `password` varchar(255) NOT NULL,                                       
   `tier0_gateway` varchar(255),                                          
`edge_cluster` varchar(255),                      
                     `transport_zone` varchar(255),                             
             `created` datetime NOT NULL COMMENT 'date created',                
                          `removed` datetime COMMENT 'date removed if not 
null',                                          PRIMARY KEY (`id`),             
                             CONSTRAINT `fk_nsx_providers__zone_id` FOREIGN KEY 
`fk_nsx_providers__zone_id` (`zone_id`) REFERENCES `data_center`(`id`) ON 
DELETE CASCADE,                                          INDEX 
`i_nsx_providers__zone_id`(`zone_id`) ) ENGINE=InnoDB DEFAULT CHARSET=utf8
2025-06-16 13:03:13,999 ERROR [c.c.u.d.ScriptRunner] (main:[]) (logid:) 
java.sql.SQLSyntaxErrorException: Table 'nsx_providers' already exists
2025-06-16 13:03:14,005 ERROR [c.c.u.DatabaseUpgradeChecker] (main:[]) (logid:) 
Unable to execute upgrade script java.sql.SQLSyntaxErrorException: Table 
'nsx_providers' already exists
        at com.cloud.utils.db.ScriptRunner.runScript(ScriptRunner.java:186)
        at com.cloud.utils.db.ScriptRunner.runScript(ScriptRunner.java:88)
        at 
com.cloud.upgrade.DatabaseUpgradeChecker.runScript(DatabaseUpgradeChecker.java:242)
        at 
com.cloud.upgrade.DatabaseUpgradeChecker.executeUpgrade(DatabaseUpgradeChecker.java:363)
        at 
com.cloud.upgrade.DatabaseUpgradeChecker.executeUpgrades(DatabaseUpgradeChecker.java:339)
        at 
com.cloud.upgrade.DatabaseUpgradeChecker.upgrade(DatabaseUpgradeChecker.java:305)
        at 
com.cloud.upgrade.DatabaseUpgradeChecker.check(DatabaseUpgradeChecker.java:478)
        at 
org.apache.cloudstack.spring.lifecycle.CloudStackExtendedLifeCycle.checkIntegrity(CloudStackExtendedLifeCycle.java:62)
        at 
org.apache.cloudstack.spring.lifecycle.CloudStackExtendedLifeCycle.start(CloudStackExtendedLifeCycle.java:52)
        at 
org.springframework.context.support.DefaultLifecycleProcessor.doStart(DefaultLifecycleProcessor.java:178)
        at 
org.springframework.context.support.DefaultLifecycleProcessor.access$200(DefaultLifecycleProcessor.java:54)
        at 
org.springframework.context.support.DefaultLifecycleProcessor$LifecycleGroup.start(DefaultLifecycleProcessor.java:356)
        at java.base/java.lang.Iterable.forEach(Iterable.java:75)
        at 
org.springframework.context.support.DefaultLifecycleProcessor.startBeans(DefaultLifecycleProcessor.java:155)


I am getting this error when upgrading the management to 4.20.1.  I have 
upgraded all the host servers and then when I look to use the UI it isn't 
working due to this error. When I tried removing the table there are just more 
errors that continue to pop up. 

### versions

4.20.1

### The steps to reproduce the bug

1.
2.
3.
...


### What to do about it?

_No response_

GitHub link: https://github.com/apache/cloudstack/discussions/11046

----
This is an automatically sent email for users@cloudstack.apache.org.
To unsubscribe, please send an email to: users-unsubscr...@cloudstack.apache.org

Reply via email to