CobbyJ commented on issue #3843: HTTP ERROR 503 - Service Unavailable
URL: https://github.com/apache/cloudstack/issues/3843#issuecomment-579164866
 
 
   `[root@cloudstack ~]# grep -i -E 'error|exception' 
/var/log/cloudstack/management/management-server.log
   2020-01-27 16:11:13,532 DEBUG [c.c.u.d.ScriptRunner] (main:null) (logid:) 
CREATE TABLE `cloud`.`s3` (   `id` bigint unsigned NOT NULL AUTO_INCREMENT 
COMMENT 'id',   `uuid` varchar(40),   `access_key` varchar(20) NOT NULL COMMENT 
' The S3 access key',   `secret_key` varchar(40) NOT NULL COMMENT ' The S3 
secret key',   `end_point` varchar(1024) COMMENT ' The S3 host',   `bucket` 
varchar(63) NOT NULL COMMENT ' The S3 host',   `https` tinyint unsigned DEFAULT 
NULL COMMENT ' Flag indicating whether or not to connect over HTTPS',   
`connection_timeout` integer COMMENT ' The amount of time to wait (in 
milliseconds) when initially establishing a connection before giving up and 
timing out.',   `max_error_retry` integer  COMMENT ' The maximum number of 
retry attempts for failed retryable requests (ex: 5xx error responses from 
services).',   `socket_timeout` integer COMMENT ' The amount of time to wait 
(in milliseconds) for data to be transfered over an established, open 
connection before the connection times out and is closed.',   `created` 
datetime COMMENT 'date the s3 first signed on',   PRIMARY KEY (`id`),   
CONSTRAINT `uc_s3__uuid` UNIQUE (`uuid`) ) ENGINE=InnoDB DEFAULT CHARSET=utf8
   2020-01-27 16:11:26,368 DEBUG [c.c.u.d.ScriptRunner] (main:null) (logid:) 
CREATE VIEW `cloud`.`volume_view` AS     select          volumes.id,         
volumes.uuid,         volumes.name,         volumes.device_id,         
volumes.volume_type,         volumes.size,         volumes.created,         
volumes.state,         volumes.attached,         volumes.removed,         
volumes.pod_id,         account.id account_id,         account.uuid 
account_uuid,         account.account_name account_name,         account.type 
account_type,         domain.id domain_id,         domain.uuid domain_uuid,     
    domain.name domain_name,         domain.path domain_path,         
projects.id project_id,         projects.uuid project_uuid,         
projects.name project_name,         data_center.id data_center_id,         
data_center.uuid data_center_uuid,         data_center.name data_center_name,   
      vm_instance.id vm_id,         vm_instance.uuid vm_uuid,         
vm_instance.name vm_name,         vm_instance.state vm_state,         
vm_instance.vm_type,         user_vm.display_name vm_display_name,         
volume_host_ref.size volume_host_size,         volume_host_ref.created 
volume_host_created,         volume_host_ref.format,         
volume_host_ref.download_pct,         volume_host_ref.download_state,         
volume_host_ref.error_str,         disk_offering.id disk_offering_id,         
disk_offering.uuid disk_offering_uuid,         disk_offering.name 
disk_offering_name,         disk_offering.display_text 
disk_offering_display_text,         disk_offering.use_local_storage,         
disk_offering.system_use,         storage_pool.id pool_id,         
storage_pool.uuid pool_uuid,         storage_pool.name pool_name,         
cluster.hypervisor_type,         vm_template.id template_id,         
vm_template.uuid template_uuid,         vm_template.extractable,         
vm_template.type template_type,         resource_tags.id tag_id,         
resource_tags.uuid tag_uuid,         resource_tags.key tag_key,         
resource_tags.value tag_value,         resource_tags.domain_id tag_domain_id,   
      resource_tags.account_id tag_account_id,         
resource_tags.resource_id tag_resource_id,         resource_tags.resource_uuid 
tag_resource_uuid,         resource_tags.resource_type tag_resource_type,       
  resource_tags.customer tag_customer,         async_job.id job_id,         
async_job.uuid job_uuid,         async_job.job_status job_status,         
async_job.account_id job_account_id     from         `cloud`.`volumes`          
   inner join         `cloud`.`account` ON volumes.account_id = account.id      
       inner join         `cloud`.`domain` ON volumes.domain_id = domain.id     
        left join         `cloud`.`projects` ON projects.project_account_id = 
account.id             left join         `cloud`.`data_center` ON 
volumes.data_center_id = data_center.id             left join         
`cloud`.`vm_instance` ON volumes.instance_id = vm_instance.id             left 
join         `cloud`.`user_vm` ON user_vm.id = vm_instance.id             left 
join         `cloud`.`volume_host_ref` ON volumes.id = 
volume_host_ref.volume_id             and volumes.data_center_id = 
volume_host_ref.zone_id             left join         `cloud`.`disk_offering` 
ON volumes.disk_offering_id = disk_offering.id             left join         
`cloud`.`storage_pool` ON volumes.pool_id = storage_pool.id             left 
join         `cloud`.`cluster` ON storage_pool.cluster_id = cluster.id          
   left join         `cloud`.`vm_template` ON volumes.template_id = 
vm_template.id             left join         `cloud`.`resource_tags` ON 
resource_tags.resource_id = volumes.id             and 
resource_tags.resource_type = 'Volume'             left join         
`cloud`.`async_job` ON async_job.instance_id = volumes.id             and 
async_job.instance_type = 'Volume'             and async_job.job_status = 0
   2020-01-27 16:11:27,487 ERROR [c.c.u.DatabaseUpgradeChecker] (main:null) 
(logid:) Unable to upgrade the database
   com.cloud.utils.exception.CloudRuntimeException: Problem with getting the ec 
attribute
   Caused by: java.lang.IllegalArgumentException: Can not set long field 
com.cloud.upgrade.dao.VersionVO.id to java.math.BigInteger
           at 
sun.reflect.UnsafeFieldAccessorImpl.throwSetIllegalArgumentException(UnsafeFieldAccessorImpl.java:167)
           at 
sun.reflect.UnsafeFieldAccessorImpl.throwSetIllegalArgumentException(UnsafeFieldAccessorImpl.java:171)
   2020-01-27 16:11:27,491 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
   org.springframework.context.ApplicationContextException: Failed to start 
bean 'cloudStackLifeCycle'; nested exception is 
com.cloud.utils.exception.CloudRuntimeException: Unable to upgrade the database
   Caused by: com.cloud.utils.exception.CloudRuntimeException: Unable to 
upgrade the database
   Caused by: com.cloud.utils.exception.CloudRuntimeException: Problem with 
getting the ec attribute
   Caused by: java.lang.IllegalArgumentException: Can not set long field 
com.cloud.upgrade.dao.VersionVO.id to java.math.BigInteger
           at 
sun.reflect.UnsafeFieldAccessorImpl.throwSetIllegalArgumentException(UnsafeFieldAccessorImpl.java:167)
           at 
sun.reflect.UnsafeFieldAccessorImpl.throwSetIllegalArgumentException(UnsafeFieldAccessorImpl.java:171)
   2020-01-27 16:15:22,058 ERROR [c.c.u.d.ScriptRunner] (main:null) (logid:) 
Error executing: alter table vm_template add size bigint unsigned
   2020-01-27 16:15:22,058 ERROR [c.c.u.d.ScriptRunner] (main:null) (logid:) 
java.sql.SQLSyntaxErrorException: Duplicate column name 'size'
   2020-01-27 16:15:22,060 ERROR [c.c.u.DatabaseUpgradeChecker] (main:null) 
(logid:) Unable to execute upgrade script
   java.sql.SQLSyntaxErrorException: Duplicate column name 'size'
   2020-01-27 16:15:22,062 ERROR [c.c.u.DatabaseUpgradeChecker] (main:null) 
(logid:) Unable to upgrade the database
   com.cloud.utils.exception.CloudRuntimeException: Unable to execute upgrade 
script
   Caused by: java.sql.SQLSyntaxErrorException: Duplicate column name 'size'
   2020-01-27 16:15:22,084 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
   org.springframework.context.ApplicationContextException: Failed to start 
bean 'cloudStackLifeCycle'; nested exception is 
com.cloud.utils.exception.CloudRuntimeException: Unable to upgrade the database
   Caused by: com.cloud.utils.exception.CloudRuntimeException: Unable to 
upgrade the database
   Caused by: com.cloud.utils.exception.CloudRuntimeException: Unable to 
execute upgrade script
   Caused by: java.sql.SQLSyntaxErrorException: Duplicate column name 'size'
   2020-01-27 16:20:14,032 ERROR [c.c.u.d.ScriptRunner] (main:null) (logid:) 
Error executing: alter table vm_template add size bigint unsigned
   2020-01-27 16:20:14,033 ERROR [c.c.u.d.ScriptRunner] (main:null) (logid:) 
java.sql.SQLSyntaxErrorException: Duplicate column name 'size'
   2020-01-27 16:20:14,035 ERROR [c.c.u.DatabaseUpgradeChecker] (main:null) 
(logid:) Unable to execute upgrade script
   java.sql.SQLSyntaxErrorException: Duplicate column name 'size'
   2020-01-27 16:20:14,037 ERROR [c.c.u.DatabaseUpgradeChecker] (main:null) 
(logid:) Unable to upgrade the database
   com.cloud.utils.exception.CloudRuntimeException: Unable to execute upgrade 
script
   Caused by: java.sql.SQLSyntaxErrorException: Duplicate column name 'size'
   2020-01-27 16:20:14,079 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
   org.springframework.context.ApplicationContextException: Failed to start 
bean 'cloudStackLifeCycle'; nested exception is 
com.cloud.utils.exception.CloudRuntimeException: Unable to upgrade the database
   Caused by: com.cloud.utils.exception.CloudRuntimeException: Unable to 
upgrade the database
   Caused by: com.cloud.utils.exception.CloudRuntimeException: Unable to 
execute upgrade script
   Caused by: java.sql.SQLSyntaxErrorException: Duplicate column name 'size'
   2020-01-27 16:27:33,712 ERROR [c.c.u.d.ConnectionConcierge] 
(ConnectionConcierge-1:ctx-a3ba11aa) (logid:9c67c0d1) Unable to keep the db 
connection for LockMaster1
   com.mysql.cj.jdbc.exceptions.CommunicationsException: Communications link 
failure
           at 
com.mysql.cj.jdbc.exceptions.SQLError.createCommunicationsException(SQLError.java:174)
           at 
com.mysql.cj.jdbc.exceptions.SQLExceptionsMapping.translateException(SQLExceptionsMapping.java:64)
   Caused by: com.mysql.cj.exceptions.CJCommunicationsException: Communications 
link failure
   Caused by: java.io.EOFException: Can not read response from server. Expected 
to read 4 bytes, read 0 bytes before connection was unexpectedly lost.
   2020-01-27 16:27:57,715 ERROR [c.c.u.d.ConnectionConcierge] 
(ConnectionConcierge-1:ctx-fc81bc58) (logid:9712d26f) Unable to keep the db 
connection for LockMaster1
   java.sql.SQLNonTransientConnectionException: Could not create connection to 
database server. Attempted reconnect 3 times. Giving up.
           at 
com.mysql.cj.jdbc.exceptions.SQLError.createSQLException(SQLError.java:110)
           at 
com.mysql.cj.jdbc.exceptions.SQLError.createSQLException(SQLError.java:97)
           at 
com.mysql.cj.jdbc.exceptions.SQLError.createSQLException(SQLError.java:89)
           at 
com.mysql.cj.jdbc.exceptions.SQLError.createSQLException(SQLError.java:63)
           at 
com.mysql.cj.jdbc.exceptions.SQLError.createSQLException(SQLError.java:73)
   Caused by: com.mysql.cj.exceptions.CJCommunicationsException: Communications 
link failure
   Caused by: java.net.ConnectException: Connection refused (Connection refused)
   2020-01-27 16:41:30,444 DEBUG [c.c.u.d.ScriptRunner] (main:null) (logid:) 
CREATE TABLE `cloud`.`s3` (   `id` bigint unsigned NOT NULL AUTO_INCREMENT 
COMMENT 'id',   `uuid` varchar(40),   `access_key` varchar(20) NOT NULL COMMENT 
' The S3 access key',   `secret_key` varchar(40) NOT NULL COMMENT ' The S3 
secret key',   `end_point` varchar(1024) COMMENT ' The S3 host',   `bucket` 
varchar(63) NOT NULL COMMENT ' The S3 host',   `https` tinyint unsigned DEFAULT 
NULL COMMENT ' Flag indicating whether or not to connect over HTTPS',   
`connection_timeout` integer COMMENT ' The amount of time to wait (in 
milliseconds) when initially establishing a connection before giving up and 
timing out.',   `max_error_retry` integer  COMMENT ' The maximum number of 
retry attempts for failed retryable requests (ex: 5xx error responses from 
services).',   `socket_timeout` integer COMMENT ' The amount of time to wait 
(in milliseconds) for data to be transfered over an established, open 
connection before the connection times out and is closed.',   `created` 
datetime COMMENT 'date the s3 first signed on',   PRIMARY KEY (`id`),   
CONSTRAINT `uc_s3__uuid` UNIQUE (`uuid`) ) ENGINE=InnoDB DEFAULT CHARSET=utf8
   2020-01-27 16:41:42,151 DEBUG [c.c.u.d.ScriptRunner] (main:null) (logid:) 
CREATE VIEW `cloud`.`volume_view` AS     select          volumes.id,         
volumes.uuid,         volumes.name,         volumes.device_id,         
volumes.volume_type,         volumes.size,         volumes.created,         
volumes.state,         volumes.attached,         volumes.removed,         
volumes.pod_id,         account.id account_id,         account.uuid 
account_uuid,         account.account_name account_name,         account.type 
account_type,         domain.id domain_id,         domain.uuid domain_uuid,     
    domain.name domain_name,         domain.path domain_path,         
projects.id project_id,         projects.uuid project_uuid,         
projects.name project_name,         data_center.id data_center_id,         
data_center.uuid data_center_uuid,         data_center.name data_center_name,   
      vm_instance.id vm_id,         vm_instance.uuid vm_uuid,         
vm_instance.name vm_name,         vm_instance.state vm_state,         
vm_instance.vm_type,         user_vm.display_name vm_display_name,         
volume_host_ref.size volume_host_size,         volume_host_ref.created 
volume_host_created,         volume_host_ref.format,         
volume_host_ref.download_pct,         volume_host_ref.download_state,         
volume_host_ref.error_str,         disk_offering.id disk_offering_id,         
disk_offering.uuid disk_offering_uuid,         disk_offering.name 
disk_offering_name,         disk_offering.display_text 
disk_offering_display_text,         disk_offering.use_local_storage,         
disk_offering.system_use,         storage_pool.id pool_id,         
storage_pool.uuid pool_uuid,         storage_pool.name pool_name,         
cluster.hypervisor_type,         vm_template.id template_id,         
vm_template.uuid template_uuid,         vm_template.extractable,         
vm_template.type template_type,         resource_tags.id tag_id,         
resource_tags.uuid tag_uuid,         resource_tags.key tag_key,         
resource_tags.value tag_value,         resource_tags.domain_id tag_domain_id,   
      resource_tags.account_id tag_account_id,         
resource_tags.resource_id tag_resource_id,         resource_tags.resource_uuid 
tag_resource_uuid,         resource_tags.resource_type tag_resource_type,       
  resource_tags.customer tag_customer,         async_job.id job_id,         
async_job.uuid job_uuid,         async_job.job_status job_status,         
async_job.account_id job_account_id     from         `cloud`.`volumes`          
   inner join         `cloud`.`account` ON volumes.account_id = account.id      
       inner join         `cloud`.`domain` ON volumes.domain_id = domain.id     
        left join         `cloud`.`projects` ON projects.project_account_id = 
account.id             left join         `cloud`.`data_center` ON 
volumes.data_center_id = data_center.id             left join         
`cloud`.`vm_instance` ON volumes.instance_id = vm_instance.id             left 
join         `cloud`.`user_vm` ON user_vm.id = vm_instance.id             left 
join         `cloud`.`volume_host_ref` ON volumes.id = 
volume_host_ref.volume_id             and volumes.data_center_id = 
volume_host_ref.zone_id             left join         `cloud`.`disk_offering` 
ON volumes.disk_offering_id = disk_offering.id             left join         
`cloud`.`storage_pool` ON volumes.pool_id = storage_pool.id             left 
join         `cloud`.`cluster` ON storage_pool.cluster_id = cluster.id          
   left join         `cloud`.`vm_template` ON volumes.template_id = 
vm_template.id             left join         `cloud`.`resource_tags` ON 
resource_tags.resource_id = volumes.id             and 
resource_tags.resource_type = 'Volume'             left join         
`cloud`.`async_job` ON async_job.instance_id = volumes.id             and 
async_job.instance_type = 'Volume'             and async_job.job_status = 0
   2020-01-27 16:41:44,045 ERROR [c.c.u.DatabaseUpgradeChecker] (main:null) 
(logid:) Unable to upgrade the database
   com.cloud.utils.exception.CloudRuntimeException: Problem with getting the ec 
attribute
   Caused by: java.lang.IllegalArgumentException: Can not set long field 
com.cloud.upgrade.dao.VersionVO.id to java.math.BigInteger
           at 
sun.reflect.UnsafeFieldAccessorImpl.throwSetIllegalArgumentException(UnsafeFieldAccessorImpl.java:167)
           at 
sun.reflect.UnsafeFieldAccessorImpl.throwSetIllegalArgumentException(UnsafeFieldAccessorImpl.java:171)
   2020-01-27 16:41:44,049 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
   org.springframework.context.ApplicationContextException: Failed to start 
bean 'cloudStackLifeCycle'; nested exception is 
com.cloud.utils.exception.CloudRuntimeException: Unable to upgrade the database
   Caused by: com.cloud.utils.exception.CloudRuntimeException: Unable to 
upgrade the database
   Caused by: com.cloud.utils.exception.CloudRuntimeException: Problem with 
getting the ec attribute
   Caused by: java.lang.IllegalArgumentException: Can not set long field 
com.cloud.upgrade.dao.VersionVO.id to java.math.BigInteger
           at 
sun.reflect.UnsafeFieldAccessorImpl.throwSetIllegalArgumentException(UnsafeFieldAccessorImpl.java:167)
           at 
sun.reflect.UnsafeFieldAccessorImpl.throwSetIllegalArgumentException(UnsafeFieldAccessorImpl.java:171)
   2020-01-27 16:52:07,592 ERROR [c.c.u.d.ScriptRunner] (main:null) (logid:) 
Error executing: alter table vm_template add size bigint unsigned
   2020-01-27 16:52:07,593 ERROR [c.c.u.d.ScriptRunner] (main:null) (logid:) 
java.sql.SQLSyntaxErrorException: Duplicate column name 'size'
   2020-01-27 16:52:07,596 ERROR [c.c.u.DatabaseUpgradeChecker] (main:null) 
(logid:) Unable to execute upgrade script
   java.sql.SQLSyntaxErrorException: Duplicate column name 'size'
   2020-01-27 16:52:07,598 ERROR [c.c.u.DatabaseUpgradeChecker] (main:null) 
(logid:) Unable to upgrade the database
   com.cloud.utils.exception.CloudRuntimeException: Unable to execute upgrade 
script
   Caused by: java.sql.SQLSyntaxErrorException: Duplicate column name 'size'
   2020-01-27 16:52:07,602 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
   org.springframework.context.ApplicationContextException: Failed to start 
bean 'cloudStackLifeCycle'; nested exception is 
com.cloud.utils.exception.CloudRuntimeException: Unable to upgrade the database
   Caused by: com.cloud.utils.exception.CloudRuntimeException: Unable to 
upgrade the database
   Caused by: com.cloud.utils.exception.CloudRuntimeException: Unable to 
execute upgrade script
   Caused by: java.sql.SQLSyntaxErrorException: Duplicate column name 'size'`

----------------------------------------------------------------
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
 
For queries about this service, please contact Infrastructure at:
[email protected]


With regards,
Apache Git Services

Reply via email to