Anzeige:
Ergebnis 1 bis 6 von 6

Thema: ownCloud lasst sich nicht mehr updaten

  1. #1
    Registrierter Benutzer
    Registriert seit
    Feb 2005
    Beiträge
    402

    ownCloud lasst sich nicht mehr updaten

    Hallo,

    seit einigen Monaten kann ich meine ownCloud Instanz (manuelle Installation auf Webspace) nicht mehr updaten. Wäre schön, wenn mir da einer weiterhelfen könnte:

    Über die Adminseite bricht mir das Upgrade schon beim Backup ab. Ich habe etwas recherchiert und offensichtlich kommt es häufiger zu dem Problem aufgrund eines Timeouts. Da ich die Timeouts nicht ändern kann (Webspace eines Hosters), habe ich es über SSH probiert:

    SSH Upgrade führt aber ebenfalls zu einer Fehlermeldung mit der ich überhaupt nichts anfangen kann. Die Database ist lokal über sqlite eingebunden und müsste eigentlich erreicht werden, sonst könnte ich mich ja auch nicht in die Instanz einloggen und alle Funktionen benutzen.
    Code:
    $ /usr/local/php56/bin/php occ upgrade
    An unhandled exception has been thrown:
    exception 'Doctrine\DBAL\DBALException' with message 'Failed to connect to the database: An exception occured in driver: SQLSTATE[HY000] [14] unable to open database file' in /httpdocs/cloud.xyz.de/lib/private/db/connection.php:52
    Stack trace:
    #0 /httpdocs/cloud.xyz.de/3rdparty/doctrine/dbal/lib/Doctrine/DBAL/Connection.php(973): OC\DB\Connection->connect()
    #1 /httpdocs/cloud.xyz.de/lib/private/db/connection.php(203): Doctrine\DBAL\Connection->executeUpdate('PRAGMA read_unc...', Array, Array)
    #2 /httpdocs/cloud.xyz.de/3rdparty/doctrine/dbal/lib/Doctrine/DBAL/Connection.php(621): OC\DB\Connection->executeUpdate('PRAGMA read_unc...')
    #3 /httpdocs/cloud.xyz.de/lib/private/db/connection.php(135): Doctrine\DBAL\Connection->setTransactionIsolation(2)
    #4 /httpdocs/cloud.xyz.de/3rdparty/doctrine/dbal/lib/Doctrine/DBAL/DriverManager.php(172): OC\DB\Connection->__construct(Array, Object(Doctrine\DBAL\Driver\PDOSqlite\Driver), Object(Doctrine\DBAL\Configuration), Object(Doctrine\Common\EventManager))
    #5 /httpdocs/cloud.xyz.de/lib/private/db/connectionfactory.php(118): Doctrine\DBAL\DriverManager::getConnection(Array, Object(Doctrine\DBAL\Configuration), Object(Doctrine\Common\EventManager))
    #6 /httpdocs/cloud.xyz.de/lib/private/server.php(330): OC\DB\ConnectionFactory->getConnection('sqlite3', Array)
    #7 /httpdocs/cloud.xyz.de/3rdparty/pimple/pimple/src/Pimple/Container.php(112): OC\Server->OC\{closure}(Object(OC\Server))
    #8 /httpdocs/cloud.xyz.de/lib/private/appframework/utility/simplecontainer.php(104): Pimple\Container->offsetGet('DatabaseConnect...')
    #9 /httpdocs/cloud.xyz.de/lib/private/server.php(765): OC\AppFramework\Utility\SimpleContainer->query('DatabaseConnect...')
    #10 /httpdocs/cloud.xyz.de/lib/private/db.php(42): OC\Server->getDatabaseConnection()
    #11 /httpdocs/cloud.xyz.de/lib/private/server.php(237): OC_DB::getConnection()
    #12 /httpdocs/cloud.xyz.de/3rdparty/pimple/pimple/src/Pimple/Container.php(112): OC\Server->OC\{closure}(Object(OC\Server))
    #13 /httpdocs/cloud.xyz.de/lib/private/appframework/utility/simplecontainer.php(104): Pimple\Container->offsetGet('AppConfig')
    #14 /httpdocs/cloud.xyz.de/lib/private/server.php(704): OC\AppFramework\Utility\SimpleContainer->query('AppConfig')
    #15 /httpdocs/cloud.xyz.de/lib/private/server.php(375): OC\Server->getAppConfig()
    #16 /httpdocs/cloud.xyz.de/3rdparty/pimple/pimple/src/Pimple/Container.php(112): OC\Server->OC\{closure}(Object(OC\Server))
    #17 /httpdocs/cloud.xyz.de/lib/private/appframework/utility/simplecontainer.php(104): Pimple\Container->offsetGet('AppManager')
    #18 /httpdocs/cloud.xyz.de/lib/private/server.php(931): OC\AppFramework\Utility\SimpleContainer->query('AppManager')
    #19 /httpdocs/cloud.xyz.de/lib/private/app.php(259): OC\Server->getAppManager()
    #20 /httpdocs/cloud.xyz.de/lib/private/app.php(104): OC_App::getEnabledApps()
    #21 /httpdocs/cloud.xyz.de/lib/base.php(564): OC_App::loadApps(Array)
    #22 /httpdocs/cloud.xyz.de/lib/base.php(1083): OC::init()
    #23 /httpdocs/cloud.xyz.de/console.php(42): require_once('/httpdocs/cloud...')
    #24 /httpdocs/cloud.xyz.de/occ(11): require_once('/httpdocs/cloud...')
    #25 {main}{"reqId":"NCCIX1EFFVCZQsVZfGAO","remoteAddr":"","app":"PHP","message":"touch(): Unable to create file \/var\/www\/vhosts\/hosting4590.af92e.netcup.net\/data\/owncloud.log because No such file or directory at \/httpdocs\/cloud.xyz.de\/lib\/private\/log\/owncloud.php#53","level":3,"time":"2017-04-25T18:33:44+00:00"}
    Die entsprechende Datei habe ich hier angefügt und die Zeile 52, die den Fehler auslöst, farbig markiert. Mir sagt es nichts, was das Problem sein soll:
    Code:
    <?php
    /**
     * @author Bart Visscher <bartv@thisnet.nl>
     * @author Joas Schilling <nickvergessen@owncloud.com>
     * @author Morris Jobke <hey@morrisjobke.de>
     * @author Robin Appelman <icewind@owncloud.com>
     * @author Thomas Müller <thomas.mueller@tmit.eu>
     *
     * @copyright Copyright (c) 2015, ownCloud, Inc.
     * @license AGPL-3.0
     *
     * This code is free software: you can redistribute it and/or modify
     * it under the terms of the GNU Affero General Public License, version 3,
     * as published by the Free Software Foundation.
     *
     * This program is distributed in the hope that it will be useful,
     * but WITHOUT ANY WARRANTY; without even the implied warranty of
     * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
     * GNU Affero General Public License for more details.
     *
     * You should have received a copy of the GNU Affero General Public License, version 3,
     * along with this program.  If not, see <http://www.gnu.org/licenses/>
     *
     */
    
    namespace OC\DB;
    use Doctrine\DBAL\DBALException;
    use Doctrine\DBAL\Driver;
    use Doctrine\DBAL\Configuration;
    use Doctrine\DBAL\Cache\QueryCacheProfile;
    use Doctrine\Common\EventManager;
    use OC\DB\QueryBuilder\ExpressionBuilder;
    use OC\DB\QueryBuilder\QueryBuilder;
    use OCP\IDBConnection;
    
    class Connection extends \Doctrine\DBAL\Connection implements IDBConnection {
            /**
             * @var string $tablePrefix
             */
            protected $tablePrefix;
    
            /**
             * @var \OC\DB\Adapter $adapter
             */
            protected $adapter;
    
            public function connect() {
                    try {
                            return parent::connect();
                    } catch (DBALException $e) {
                            // throw a new exception to prevent leaking info from the stacktrace
                            throw new DBALException('Failed to connect to the database: ' . $e->getMessage(), $e->getCode());
                    }
            }
    
            /**
             * Returns a QueryBuilder for the connection.
             *
             * @return \OCP\DB\QueryBuilder\IQueryBuilder
             */
            public function getQueryBuilder() {
                    return new QueryBuilder($this);
            }
    
            /**
             * Gets the QueryBuilder for the connection.
             *
             * @return \Doctrine\DBAL\Query\QueryBuilder
             * @deprecated please use $this->getQueryBuilder() instead
             */
            public function createQueryBuilder() {
                    $backtrace = $this->getCallerBacktrace();
                    \OC::$server->getLogger()->debug('Doctrine QueryBuilder retrieved in {backtrace}', ['app' => 'core', 'backtrace' => $backtrace]);
                    return parent::createQueryBuilder();
            }
    
            /**
             * Gets the ExpressionBuilder for the connection.
             *
             * @return \Doctrine\DBAL\Query\Expression\ExpressionBuilder
             * @deprecated please use $this->getQueryBuilder()->expr() instead
             */
            public function getExpressionBuilder() {
                    $backtrace = $this->getCallerBacktrace();
                    \OC::$server->getLogger()->debug('Doctrine ExpressionBuilder retrieved in {backtrace}', ['app' => 'core', 'backtrace' => $backtrace]);
                    return parent::getExpressionBuilder();
            }
    
            /**
             * Get the file and line that called the method where `getCallerBacktrace()` was used
             *
             * @return string
             */
            protected function getCallerBacktrace() {
                    $traces = debug_backtrace(DEBUG_BACKTRACE_IGNORE_ARGS, 2);
    
                    // 0 is the method where we use `getCallerBacktrace`
                    // 1 is the target method which uses the method we want to log
                    if (isset($traces[1])) {
                            return $traces[1]['file'] . ':' . $traces[1]['line'];
                    }
    
                    return '';
            }
    
            /**
             * @return string
             */
            public function getPrefix() {
                    return $this->tablePrefix;
            }
    
            /**
             * Initializes a new instance of the Connection class.
             *
             * @param array $params  The connection parameters.
             * @param \Doctrine\DBAL\Driver $driver
             * @param \Doctrine\DBAL\Configuration $config
             * @param \Doctrine\Common\EventManager $eventManager
             * @throws \Exception
             */
            public function __construct(array $params, Driver $driver, Configuration $config = null,
                    EventManager $eventManager = null)
            {
                    if (!isset($params['adapter'])) {
                            throw new \Exception('adapter not set');
                    }
                    if (!isset($params['tablePrefix'])) {
                            throw new \Exception('tablePrefix not set');
                    }
                    parent::__construct($params, $driver, $config, $eventManager);
                    $this->adapter = new $params['adapter']($this);
                    $this->tablePrefix = $params['tablePrefix'];
    
                    parent::setTransactionIsolation(parent::TRANSACTION_READ_COMMITTED);
            }
    
            /**
             * Prepares an SQL statement.
             *
             * @param string $statement The SQL statement to prepare.
             * @param int $limit
             * @param int $offset
             * @return \Doctrine\DBAL\Driver\Statement The prepared statement.
             */
            public function prepare( $statement, $limit=null, $offset=null ) {
                    if ($limit === -1) {
                            $limit = null;
                    }
                    if (!is_null($limit)) {
                            $platform = $this->getDatabasePlatform();
                            $statement = $platform->modifyLimitQuery($statement, $limit, $offset);
                    }
                    $statement = $this->replaceTablePrefix($statement);
                    $statement = $this->adapter->fixupStatement($statement);
    
                    if(\OC_Config::getValue( 'log_query', false)) {
                            \OCP\Util::writeLog('core', 'DB prepare : '.$statement, \OCP\Util::DEBUG);
                    }
                    return parent::prepare($statement);
            }
    
            /**
             * Executes an, optionally parametrized, SQL query.
             *
             * If the query is parametrized, a prepared statement is used.
             * If an SQLLogger is configured, the execution is logged.
             *
             * @param string                                      $query  The SQL query to execute.
             * @param array                                       $params The parameters to bind to the query, if any.
             * @param array                                       $types  The types the previous parameters are in.
             * @param \Doctrine\DBAL\Cache\QueryCacheProfile|null $qcp    The query cache profile, optional.
             *
             * @return \Doctrine\DBAL\Driver\Statement The executed statement.
             *
             * @throws \Doctrine\DBAL\DBALException
             */
            public function executeQuery($query, array $params = array(), $types = array(), QueryCacheProfile $qcp = null)
            {
                    $query = $this->replaceTablePrefix($query);
                    $query = $this->adapter->fixupStatement($query);
                    return parent::executeQuery($query, $params, $types, $qcp);
            }
    
            /**
             * Executes an SQL INSERT/UPDATE/DELETE query with the given parameters
             * and returns the number of affected rows.
             *
             * This method supports PDO binding types as well as DBAL mapping types.
             *
             * @param string $query  The SQL query.
             * @param array  $params The query parameters.
             * @param array  $types  The parameter types.
             *
             * @return integer The number of affected rows.
             *
             * @throws \Doctrine\DBAL\DBALException
             */
            public function executeUpdate($query, array $params = array(), array $types = array())
            {
                    $query = $this->replaceTablePrefix($query);
                    $query = $this->adapter->fixupStatement($query);
                    return parent::executeUpdate($query, $params, $types);
            }
    
            /**
             * Returns the ID of the last inserted row, or the last value from a sequence object,
             * depending on the underlying driver.
             *
             * Note: This method may not return a meaningful or consistent result across different drivers,
             * because the underlying database may not even support the notion of AUTO_INCREMENT/IDENTITY
             * columns or sequences.
             *
             * @param string $seqName Name of the sequence object from which the ID should be returned.
             * @return string A string representation of the last inserted ID.
             */
            public function lastInsertId($seqName = null)
            {
                    if ($seqName) {
                            $seqName = $this->replaceTablePrefix($seqName);
                    }
                    return $this->adapter->lastInsertId($seqName);
            }
    
            // internal use
            public function realLastInsertId($seqName = null) {
                    return parent::lastInsertId($seqName);
            }
    
            /**
             * Insert a row if the matching row does not exists.
             *
             * @param string $table The table name (will replace *PREFIX* with the actual prefix)
             * @param array $input data that should be inserted into the table  (column name => value)
             * @param array|null $compare List of values that should be checked for "if not exists"
             *                              If this is null or an empty array, all keys of $input will be compared
             *                              Please note: text fields (clob) must not be used in the compare array
             * @return int number of inserted rows
             * @throws \Doctrine\DBAL\DBALException
             */
            public function insertIfNotExist($table, $input, array $compare = null) {
                    return $this->adapter->insertIfNotExist($table, $input, $compare);
            }
    
            /**
             * returns the error code and message as a string for logging
             * works with DoctrineException
             * @return string
             */
            public function getError() {
                    $msg = $this->errorCode() . ': ';
                    $errorInfo = $this->errorInfo();
                    if (is_array($errorInfo)) {
                            $msg .= 'SQLSTATE = '.$errorInfo[0] . ', ';
                            $msg .= 'Driver Code = '.$errorInfo[1] . ', ';
                            $msg .= 'Driver Message = '.$errorInfo[2];
                    }
                    return $msg;
            }
    
            /**
             * Drop a table from the database if it exists
             *
             * @param string $table table name without the prefix
             */
            public function dropTable($table) {
                    $table = $this->tablePrefix . trim($table);
                    $schema = $this->getSchemaManager();
                    if($schema->tablesExist(array($table))) {
                            $schema->dropTable($table);
                    }
            }
    
            /**
             * Check if a table exists
             *
             * @param string $table table name without the prefix
             * @return bool
             */
            public function tableExists($table){
                    $table = $this->tablePrefix . trim($table);
                    $schema = $this->getSchemaManager();
                    return $schema->tablesExist(array($table));
            }
    
            // internal use
            /**
             * @param string $statement
             * @return string
             */
            protected function replaceTablePrefix($statement) {
                    return str_replace( '*PREFIX*', $this->tablePrefix, $statement );
            }
    
            /**
             * Check if a transaction is active
             *
             * @return bool
             * @since 8.2.0
             */
            public function inTransaction() {
                    return $this->getTransactionNestingLevel() > 0;
            }
    }
    Wenn gar nichts mehr hilft muss ich wohl oder übel eine Neuinstallation machen, aber das würde ich gerne vermeiden.

    Gruß
    hafgan
    Geändert von hafgan (25.04.17 um 20:56 Uhr)

  2. #2
    Registrierter Benutzer
    Registriert seit
    Sep 2003
    Beiträge
    2.990
    Zitat Zitat von hafgan Beitrag anzeigen
    \/var\/www\/vhosts\/hosting4590.af92e.netcup.net\/data\/owncloud.log
    gibt es die datei bzw. ordner?
    schreiberechte?

    wenn nicht, dann bitte erstellen und schauen was in den logs stehts
    ....

  3. #3
    Newbie and practicing Avatar von Newbie314
    Registriert seit
    Mar 2007
    Beiträge
    7.639
    Bei mir läuft die Owncloud auf dem Desktop und obwohl sie nur meine paar Privatdaten verwaltet lief sie unter SQLite unzuverlässig, es gab immer wieder timeouts oder seltsame Fehler, Seitdem ich auf MariaDB umgestellt habe läuft es stabil obwohl man MariaDB für ein paar Termine und Adressen für komplett übertrieben halten würde. Spekulation: der Tim out liegt an SQLite,
    Bei Konsolenausgaben / Fehlermeldungen bitte immer Code Tags verwenden: [code] -Text- [/code]
    "Überzeugungen sind gefährlichere Feinde der Wahrheit als Lügen" (H. Lesch)

  4. #4
    Registrierter Benutzer
    Registriert seit
    Feb 2005
    Beiträge
    402
    Sorry, dass ich mich erst jetzt melde!

    Zitat Zitat von muell200 Beitrag anzeigen
    Code:
    \/var\/www\/vhosts\/hosting4590.af92e.netcup.net\/data\/owncloud.log
    gibt es die datei bzw. ordner?
    schreiberechte?

    wenn nicht, dann bitte erstellen und schauen was in den logs stehts
    Die Datei existiert und ich habe auch Schreibrechte drauf:
    Code:
    -rw-r----- 1 sub4528_23 psacln 1,4M 26. Apr 21:33 /data/owncloud.log
    Wenn ich den Upgrade Befehl eingebe, dann wird aber in diese Log nichts eingetragen. Da steht nur was von gestern Abend drin...


    Zum Thema mysql/sqlite: Ich wollte das auch schon umstellen, dazu muss ich aber ebenfalls die Konsolenbefehle abgeben und führt dann auch zu den Fehlermeldungen. Daher will ich im ersten Schritt erstmal die Updates durchführen und dann auf mysql wechseln.

    Wenn alle Stricke reisen, muss ich halt eine Neuinstallation machen.

    Gruß
    hafgan
    Geändert von hafgan (29.04.17 um 08:51 Uhr)

  5. #5
    Elefantenversteher Avatar von florian0285
    Registriert seit
    Jun 2016
    Beiträge
    1.054
    Das soll helfen:
    http://www.dragonbe.com/2014/01/pdo-...-open.html?m=1

    Das Problem liegt wohl nicht bei owncloud sondern bei sqlite und php.
    Matthäus 7:3 Was siehst du aber den Splitter in deines Bruders Auge, und wirst nicht gewahr des Balkens in deinem Auge?

  6. #6
    Registrierter Benutzer
    Registriert seit
    Feb 2005
    Beiträge
    402
    Hi Florian,

    kann ich mir eigentlich nicht vorstellen, denn die Datenbank funktioniert ja. Sonst könnte ich mich ja nicht einloggen und Daten synchronisieren, Kalender, Notizen, Einstellungen usw. Ich denke die Datenbank wird schon geöffnet und beschrieben.

    Trotzdem habe ich mal der Datenbank-Datei zusätzliche Schreibrechte für die Gruppe gegeben (und auch dem data - Ordner):
    Code:
    -rw-rw-r-- 1 sub4528_23 psacln 6,5M 29. Apr 11:11 /data/owncloud.db
    Hat aber nix gebracht.

    Sonst noch Ideen?

    hafgan

Ähnliche Themen

  1. Drucker lasst sich Installieren, druck aber nicht.
    Von Robert Closheim im Forum stationäre Hardware
    Antworten: 9
    Letzter Beitrag: 24.04.08, 14:04
  2. Firefox lässt sich nicht updaten
    Von [SB]Benjamin im Forum Anwendungen Allgemein, Software
    Antworten: 4
    Letzter Beitrag: 19.04.08, 10:57
  3. Suse lässt sich nicht updaten
    Von mxxp im Forum System installieren und konfigurieren
    Antworten: 3
    Letzter Beitrag: 12.01.08, 14:56
  4. Nvidia-Treiber lasst sich nicht installieren
    Von Str@nger im Forum Spielen Allgemein
    Antworten: 6
    Letzter Beitrag: 22.02.04, 01:10
  5. KDE lässt sich nicht updaten?
    Von zio im Forum Windowmanager
    Antworten: 7
    Letzter Beitrag: 01.07.01, 00:09

Lesezeichen

Berechtigungen

  • Neue Themen erstellen: Nein
  • Themen beantworten: Nein
  • Anhänge hochladen: Nein
  • Beiträge bearbeiten: Nein
  •