Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Update to 7.0 - successful or failed? #9824

Closed
ghost opened this issue Jul 23, 2014 · 8 comments
Closed

Update to 7.0 - successful or failed? #9824

ghost opened this issue Jul 23, 2014 · 8 comments

Comments

@ghost
Copy link

ghost commented Jul 23, 2014

Upgraded to 7.0.0 today and the first time I went to log in to OC via the web interface was presented with the update screen. It went into update mode but never finished. Then disconnected all clients and went into config.php and manually changed 'maintenance' to 'false'. Re-accessed web interface and it ran again and completed. However the error log shows some worrisome entries:

Fatal   remote  Failed to upgrade "activity".   2014-07-23T21:57:45+00:00 
Fatal   remote  Failed to upgrade "activity".   2014-07-23T21:57:35+00:00 
Fatal   core  2014-07-23T21:57:35+00:00 
Failed to update database structure (exception 'PDOException' with message 'SQLSTATE[23505]: Unique violation: 7 ERROR: duplicate key value violates unique constraint "pg_type_typname_nsp_index" DETAIL: Key (typname, typnamespace)=(oc_activity_mq_mail_id_seq, 2200) already exists.' in /var/www/owncloud/3rdparty/doctrine/dbal/lib/Doctrine/DBAL/Connection.php:742 Stack trace:

 #0 [internal function]: PDO->query('CREATE TABLE "o...')
 #1 /var/www/owncloud/3rdparty/doctrine/dbal/lib/Doctrine/DBAL/Connection.php(742): call_user_func_array(Array, Array)
 #2 /var/www/owncloud/lib/private/db/migrator.php(179): Doctrine\DBAL\Connection->query('CREATE TABLE "o...')
 #3 /var/www/owncloud/lib/private/db/migrator.php(35): OC\DB\Migrator->applySchema(Object(Doctrine\DBAL\Schema\Schema))
 #4 /var/www/owncloud/lib/private/db/mdb2schemamanager.php(98): OC\DB\Migrator->migrate(Object(Doctrine\DBAL\Schema\Schema))
 #5 /var/www/owncloud/lib/private/db.php(320): OC\DB\MDB2SchemaManager->updateDbFromStructure('/var/www/ownclo...')
 #6 /var/www/owncloud/lib/private/app.php(1172): OC_DB::updateDbFromStructure('/var/www/ownclo...')
 #7 /var/www/owncloud/lib/private/app.php(980): OC_App::updateApp('activity')
 #8 /var/www/owncloud/lib/private/app.php(87): OC_App::checkUpgrade('activity')
 #9 /var/www/owncloud/lib/private/app.php(72): OC_App::loadApp('activity')
 #10 /var/www/owncloud/remote.php(39): OC_App::loadApps(Array)
 #11 {main}

 Next exception 'Doctrine\DBAL\DBALException' with message 'An exception occurred while executing 'CREATE TABLE "oc_activity_mq" ("mail_id" SERIAL NOT NULL, "amq_timestamp" INT DEFAULT 0 NOT NULL, "amq_latest_send" INT DEFAULT 0 NOT NULL, "amq_type" VARCHAR(255) NOT NULL, "amq_affecteduser" VARCHAR(64) NOT NULL, "amq_appid" VARCHAR(255) NOT NULL, "amq_subject" VARCHAR(255) NOT NULL, "amq_subjectparams" VARCHAR(255) NOT NULL, PRIMARY KEY("mail_id"))': SQLSTATE[23505]: Unique violation: 7 ERROR: duplicate key value violates unique constraint "pg_type_typname_nsp_index" DETAIL: Key (typname, typnamespace)=(oc_activity_mq_mail_id_seq, 2200) already exists.' in /var/www/owncloud/3rdparty/doctrine/dbal/lib/Doctrine/DBAL/DBALException.php:47 Stack trace:
 #0 /var/www/owncloud/3rdparty/doctrine/dbal/lib/Doctrine/DBAL/Connection.php(744): Doctrine\DBAL\DBALException::driverExceptionDuringQuery(Object(PDOException), 'CREATE TABLE "o...')
 #1 /var/www/owncloud/lib/private/db/migrator.php(179): Doctrine\DBAL\Connection->query('CREATE TABLE "o...')
 #2 /var/www/owncloud/lib/private/db/migrator.php(35): OC\DB\Migrator->applySchema(Object(Doctrine\DBAL\Schema\Schema))
 #3 /var/www/owncloud/lib/private/db/mdb2schemamanager.php(98): OC\DB\Migrator->migrate(Object(Doctrine\DBAL\Schema\Schema))
 #4 /var/www/owncloud/lib/private/db.php(320): OC\DB\MDB2SchemaManager->updateDbFromStructure('/var/www/ownclo...')
 #5 /var/www/owncloud/lib/private/app.php(1172): OC_DB::updateDbFromStructure('/var/www/ownclo...')
 #6 /var/www/owncloud/lib/private/app.php(980): OC_App::updateApp('activity')
 #7 /var/www/owncloud/lib/private/app.php(87): OC_App::checkUpgrade('activity')
 #8 /var/www/owncloud/lib/private/app.php(72): OC_App::loadApp('activity')
 #9 /var/www/owncloud/remote.php(39): OC_App::loadApps(Array)
 #10 {main}) 

However it does say "Version ownCloud 7.0.0 (stable)"

@ghost
Copy link
Author

ghost commented Jul 23, 2014

Here's the config.php (I've changed the passwords and host names in this post for security):

<?php                                                                                     
$CONFIG = array (                                                                         
  'instanceid' => 'xxxxxxxxxx',                                                         
  'passwordsalt' => 'xxxxxxxxxxxxxxxxxxx',                                     
  'trusted_domains' =>                                                                    
  array (                                                                                 
    0 => 'myhost.mydomain.com',                                                              
  ),                                                                                      
  'datadirectory' => '/var/www/owncloud/data',                                            
  'dbtype' => 'pgsql',                                                                    
  'version' => '7.0.0.8',                                                                 
  'dbname' => 'owncloud',                                                                 
  'dbhost' => 'localhost',                                                                
  'dbtableprefix' => 'oc_',                                                               
  'dbuser' => 'xxxxxxxxxxxx',                                                                 
  'dbpassword' => 'xxxxxxxxxx',                                                          
  'installed' => true,                                                                    
  'theme' => '',                                                                          
  'maintenance' => false,                                                                 
);

@PVince81
Copy link
Contributor

Sounds like you're having something similar to #9810
This seems to appear if clients were connecting during the upgrade even though they should be blocked by the maintenance mode.

You could try to restore your backup and redo the update after applying these patches:

@ghost
Copy link
Author

ghost commented Jul 24, 2014

Hi thanks for responding. What I might like to do now is just save my data and do a fresh install. Is there documentation somewhere on how to do this?

@PVince81
Copy link
Contributor

@Kssea ideally would be to revert to a backup of the previous version you were using.
Else if it's just files (with no shares), you could just keep these in the "data" folder and replace the OC code with the code from the newer version.

I'm closing this as the mentionned patches are already in 7.0.5 and 8.0.2.
If you're still having issues with these versions, feel free to reopen.
Thanks.

@ghost
Copy link
Author

ghost commented Mar 24, 2015

I ran apt-get update && dselect install && sudo -u www-data php /var/www/owncloud/occ upgrade and the upgrade did complete successfully.

@PVince81
Copy link
Contributor

Glad to hear that it worked 😄

@ghost
Copy link
Author

ghost commented Mar 24, 2015

I ran apt-get update && dselect install && sudo -u www-data php /var/www/owncloud/occ upgrade and the upgrade did complete successfully.

By the way, when apt-get update is run, all a person sees is a list of packages like:
owncloud owncloud-3rdparty owncloud-app-activity owncloud-app-external owncloud-app-files owncloud-app-files-encryption owncloud-app-files-external owncloud-app-files-locking owncloud-app-files-pdfviewer owncloud-app-files-sharing owncloud-app-files-texteditor owncloud-app-files-trashbin owncloud-app-files-versions owncloud-app-files-videoviewer owncloud-app-firstrunwizard owncloud-app-gallery owncloud-app-provisioning-api owncloud-app-templateeditor owncloud-app-updater owncloud-app-user-external owncloud-app-user-ldap owncloud-app-user-webdavauth owncloud-config-apache owncloud-server

There is no version information, so if the main repo for OC is an unstable one, the person updating doesn't see if there's a major version change occurring or not.

@PVince81
Copy link
Contributor

It depends which OBS channel you have picked. If you picked a stable channel, you'd only get stable versions. If you used the "testing" one you'd get unstable ones too.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

3 participants