Fehler beim Öffnen der Dateisysteme
-
- OMV 3.x
- gelöst
- mimotion26
-
-
Vielleicht war "gelöst" etwas voreilig.
Der Fehler war weg nachdem ich meinen Remotezugriff auf einen anderen Server in Remote Mount gelöscht habe.
Ich brauche diesen Zugriff auf den anderen Server aber für eine Sicherung.
Wenn ich jetzt einen neuen Eintrag in Remote Mount anlege kommt der "gleiche" Fehler bzw. ein ähnlicher Fehler wieder.Ich hoffe mir kann jemand helfen.
Vielen Dank schonmal.
-
Ich glaube mehr als einen Hinweis zu geben WO man nachschauen soll weshalb der Fehler aufgetreten ist kann man nicht. Also bitte nochmal die Fehlermeldung durchlesen und dann die Information hier posten wenn Du es nicht selber lösen kannst. Weil ohne diese Info können wir auch nicht weiterhelfen.
-
Sorry.
PHP
Alles anzeigen<?php /** * This file is part of OpenMediaVault. * * @license http://www.gnu.org/licenses/gpl.html GPL Version 3 * @author Volker Theile <volker.theile@openmediavault.org> * @copyright Copyright (c) 2009-2017 Volker Theile * * OpenMediaVault is free software: you can redistribute it and/or modify * it under the terms of the GNU General Public License as published by * the Free Software Foundation, either version 3 of the License, or * any later version. * * OpenMediaVault 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 General Public License for more details. * * You should have received a copy of the GNU General Public License * along with OpenMediaVault. If not, see <http://www.gnu.org/licenses/>. */ namespace OMV\Rpc; require_once("openmediavault/functions.inc"); /** * This class provides methods regarding remote procedure calls. * @ingroup api */ class Rpc { use \OMV\Debugable; const MODE_LOCAL = 0x1; const MODE_REMOTE = 0x2; /** * Create a context. * @return The context using the specified parameters. */ public static function createContext($username, $role) { return [ "username" => $username, "role" => $role ]; } /** * Execute the given RPC. * @param service The name of the service. * @param method The name of the method. * @param params The parameters hash object to be passed to the method * of the given service. * @param context The context hash object of the caller containing the * fields \em username and \em role. * @param mode The mode how to execute this RPC. The following modes * are available:<ul> * \li MODE_LOCAL * \li MODE_REMOTE * </ul> * Defaults to MODE_LOCAL. * @param restoreSrvEnv Restore various web server and execution * environment information. This might be helpful in some cases if * these information are required in the engine backend. Note, this * only takes action when mode is MODE_REMOTE. Defauts to FALSE. * @return The RPC response. */ public static function call($service, $method, $params, $context, $mode = Rpc::MODE_LOCAL, $restoreSrvEnv = FALSE) { // self::debug(var_export(func_get_args(), TRUE)); /////////////////////////////////////////////////////////////////////// // Try to execute local RPC first. /////////////////////////////////////////////////////////////////////// if ($mode & Rpc::MODE_LOCAL) { $rpcServiceMngr = &\OMV\Rpc\ServiceManager::getInstance(); if (FALSE !== ($rpcService = $rpcServiceMngr->getService( $service))) { if (TRUE === $rpcService->hasMethod($method)) { // Restore server and execution environment information // if exists. if (array_key_exists("_SERVER", $context)) { foreach ($context['_SERVER'] as $key => $value) $_SERVER[$key] = $value; unset($context['_SERVER']); } // Execute the RPC service method. return $rpcService->callMethod($method, $params, $context); } else { // Throw an exception if the RPC service method has not // been found and redirection to omv-engined is disabled. if (~$mode & Rpc::MODE_REMOTE) { throw new Exception("The method '%s' does not exist ". "for the RPC service '%s'.", $method, $service); } } } else { // Throw an exception if the RPC service has not been found // and redirection to omv-engined is disabled. if (~$mode & Rpc::MODE_REMOTE) { throw new Exception("RPC service '%s' not found.", $service); } } }
Hier der erste Teil der Datei. Nächster teil folgt im nächsten Post.
Vielen Dank -
Und der Rest.
Code
Alles anzeigen/////////////////////////////////////////////////////////////////////// // Redirect RPC to omv-engined daemon to execute it remote. /////////////////////////////////////////////////////////////////////// if ($mode & Rpc::MODE_REMOTE) { // Store the web server and execution environment information? // The information is stored in the given context. if (TRUE === $restoreSrvEnv) { $variables = [ "SERVER_PROTOCOL", "GATEWAY_INTERFACE", "SERVER_SOFTWARE", "REMOTE_ADDR", "REMOTE_PORT", "SERVER_ADDR", "SERVER_PORT", "SERVER_NAME", "HTTPS", "REDIRECT_STATUS", "HTTP_HOST", "HTTP_ORIGIN", "HTTP_USER_AGENT", "HTTP_CONTENT_TYPE", "HTTP_REFERER" ]; $context['_SERVER'] = []; foreach ($variables as $key => $value) { if (!array_key_exists($value, $_SERVER)) continue; $context['_SERVER'][$value] = $_SERVER[$value]; } } // Create and connect to the socket. if (FALSE === ($socket = @socket_create(AF_UNIX, SOCK_STREAM, 0))) { throw new Exception("Failed to create socket: %s", socket_strerror(socket_last_error())); } // Try to connect to the socket. If the connection fails, then try // to establish the connection the given number of attempts. $attempt = 0; $success = FALSE; while ((\OMV\Environment::getInteger( "OMV_ENGINED_SO_CONNECT_MAX_ATTEMPT") > $attempt++) && (FALSE === ($success = @socket_connect($socket, \OMV\Environment::get("OMV_ENGINED_SO_ADDRESS"))))) { sleep($attempt); } if (FALSE === $success) { throw new Exception("Failed to connect to socket: %s", socket_strerror(socket_last_error())); } // Set send and receive timeouts. socket_set_option($socket, SOL_SOCKET, SO_SNDTIMEO, [ "sec" => \OMV\Environment::get("OMV_ENGINED_SO_SNDTIMEO"), "usec" => 0 ]); socket_set_option($socket, SOL_SOCKET, SO_RCVTIMEO, [ "sec" => \OMV\Environment::get("OMV_ENGINED_SO_RCVTIMEO"), "usec" => 0 ]); // Create the request. $request = json_encode_safe([ "service" => $service, "method" => $method, "params" => $params, "context" => $context ]); $request .= "\0"; // Append the EOF byte. // Write the RPC request. if (FALSE === @socket_write($socket, $request, strlen($request))) { throw new Exception("Failed to write to socket: %s", socket_strerror(socket_last_error())); } // Read the RPC response. $response = ""; while (TRUE) { $data = @socket_read($socket, 4096, PHP_BINARY_READ); // Check for errors. if (FALSE === $data) { throw new Exception("Failed to read from socket: %s", socket_strerror(socket_last_error())); } $response .= $data; // Abort if response is complete. if (empty($data) || "\0" == substr($response, -1)) break; } $response = substr($response, 0, -1); // Remove the EOF byte. // Close the socket. @socket_close($socket); // Check if the RPC response is valid. if (!is_json($response)) { y // If we are here, then in most cases the omv-engined // process has been stopped because of a PHP fatal error. throw new Exception("Invalid RPC response. Please check the ". "syslog for more information."); } // Decode JSON string to PHP array. if (NULL === ($response = json_decode($response, TRUE))) { throw new Exception("Failed to decode JSON string: %s", json_last_error_msg()); } // Trigger an exception if the RPC has been failed. Inject the // stack trace coming with the remote RPC response. if (array_key_exists("error", $response) && !is_null( $response['error'])) { $error = $response['error']; throw new TraceException($error['message'], $error['code'], $error['trace']); } return $response['response']; } } }
Vielen Dank -
-
Okay, hab den Fehler jetzt nochmal erzeugt und bekomme dann folgende Meldung:
CodeApr 26 10:15:01 Siemens666 CRON[19196]: (root) CMD (/usr/sbin/omv-mkgraph >/dev/null 2>&1) Apr 26 10:15:01 Siemens666 rrdcached[1049]: Received FLUSHALL Apr 26 10:17:01 Siemens666 CRON[19904]: (root) CMD ( cd / && run-parts --report /etc/cron.hourly) Apr 26 10:17:01 Siemens666 postfix/postsuper[19907]: Deleted: 1 message Apr 26 10:22:19 Siemens666 omv-engined[21046]: PHP Fatal error: Call to undefined method OMV\System\Filesystem\Filesystem::buildMountPath() in /usr/share/openmediavault/engined/rpc/remotemount.inc on line 196
Nach dem Aufruf von /usr/share/openmediavault/engined/rpc/remotemount.inc kommt:
Code
Alles anzeigen?php /** * Copyright (C) 2013-2016 OpenMediaVault Plugin Developers. * * This program is free software: you can redistribute it and/or modify * it under the terms of the GNU General Public License as published by * the Free Software Foundation, either version 3 of the License, or * (at your option) any later version. * * 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 General Public License for more details. * * You should have received a copy of the GNU General Public License * along with this program. If not, see <http://www.gnu.org/licenses/>. */ namespace OMV\Engined\Rpc; use Exception; use OMV\Config\ConfigObject; use OMV\Config\Database; use OMV\Engine\Module\Manager as ModuleManager; use OMV\Rpc\Rpc; use OMV\Rpc\ServiceAbstract; use OMV\System\Filesystem\Filesystem; use OMV\Uuid; class RemoteMount extends ServiceAbstract { /** @var Database */ private $database; /** @var string */ private $dataModelPath = 'conf.service.remotemount.mount'; /** @var string */ private $mountPointDataModelPath = 'conf.system.filesystem.mountpoint'; public function __construct(Database $database = null) { $this->database = $database ?: Database::getInstance(); } /** * Get the name of the RPC service. * * @return string */ public function getName() { return 'RemoteMount'; } /** * Initialize the RPC service. * * @return void */ public function initialize() { $this->registerMethod('getList'); { $this->registerMethod('getList'); $this->registerMethod('get'); $this->registerMethod('set'); $this->registerMethod('delete'); } /** * Get a list of the existing remote mounts. * * @param $params The method parameters. * @param $context The context of the caller. * * @return array */ public function getList($params, $context) { $this->validateMethodContext($context, ['role' => OMV_ROLE_ADMINISTRATOR]); $this->validateMethodParams($params, 'rpc.common.getlist'); $objects = $this->database->get($this->dataModelPath); $mounts = []; foreach ($objects as $object) { $mounts[] = $object->getAssoc(); } return $this->applyFilter( $mounts, $params['start'], $params['limit'], $params['sortfield'], $params['sortdir'] ); } /** * Get the configuration for a single existing remote mount. * * @param $params The method parameters. * @param $context The context of the caller. * * @return array */ public function get($params, $context) { $this->validateMethodContext($context, ['role' => OMV_ROLE_ADMINISTRATOR]); $this->validateMethodParams($params, 'rpc.common.objectuuid'); $object = $this->database->get($this->dataModelPath, $params['uuid']); return $object->getAssoc(); } /** * Set the configuration for a single new or existing remote mount. * * @param $params The method parameters. * @param $context The context of the caller. * * @return array */ public function set($params, $context) { $this->validateMethodContext($context, ['role' => OMV_ROLE_ADMINISTRATOR]); $this->validateMethodParams($params, 'rpc.remotemount.set'); $object = new ConfigObject($this->dataModelPath); $object->setAssoc($params); $isNewObject = $object->isNew(); if ($isNewObject) { $this->database->assertIsUnique($object, 'name'); } // Save the object before generating a fstab entry to generate a valid // UUID. $this->database->set($object); // Create or update the mntent entry. $mntent = $this->setMntentEntry($object); // The fstab module does not mark itself as dirty when a mntent // configuration is modified, only when created or deleted. if (!$isNewObject) { $moduleManager = ModuleManager::getInstance(); $moduleManager->setModuleDirty('fstab'); } if ($isNewObject) { try { $object->set('mntentref', $mntent['uuid']); $this->database->set($object); } catch (Exception $e) { $this->database->delete($object); Rpc::call('FsTab', 'delete', ['uuid' => $mntent['uuid']], $context); throw $e; } } return $object->getAssoc(); } /** * Delete the configuration of a single existing union filesystem. * * @param $params The method parameters. * @param $context The context of the caller. * * @return void */ public function delete($params, $context) { $this->validateMethodContext($context, ['role' => OMV_ROLE_ADMINISTRATOR]); $this->validateMethodParams($params, 'rpc.common.objectuuid'); // FIXME: Check that the filesystem is not used before deleting it. $object = $this->database->get($this->dataModelPath, $params['uuid']); $this->database->delete($object); Rpc::call('FsTab', 'delete', ['uuid' => $object->get('mntentref')], $context); } /** * Create or update a mntent configuration object from a configuration object. * * @param ConfigObject $object The object to create a mntent entry for. * * @return string Returns the mntentref for the mntent entry. */ private function setMntentEntry(ConfigObject $object) { $mountPoint = Filesystem::buildMountPath($object->get('uuid')); $mntentEntry = [ 'uuid' => $object->get('mntentref'), 'fsname' => $object->get('uuid'), 'dir' => $mountPoint, 'type' => $object->get('mounttype'), 'opts' => '', 'freq' => 0, 'passno' => 0, ]; $mntent = Rpc::call('FsTab', 'set', $mntentEntry, $this->getAdminContext()); return $mntent; } }
-
Das Problem liegt am Remote Mount Plugin. Entweder schauen dass die Neuste Version installiert ist oder eben leider deinstallieren bis es einen Fix gibt.
-
Es scheint als ob Du nicht die neueste Version installiert hast, das Problem ist schon länger gefixt.
-
Okay, Vielen Danke!
Die neueste Version (3.0.1) habe ich installiert.Habe den Server neu aufgesetzt und jetzt eine neuere OMV Version installiert (jetzt 3.0.72 anstatt vorher 3.0.67).
Mit 3.0.67 hat es funktioniert. Kann es vielleicht daran liegen?Sorry für die vielen Fragen. Beschäftige mich noch nicht lange mit Linux und OMV.
-
Schon vor längerem hat sich die API geändert, das Plugin wurde eben leider nicht richtig daran angepasst.
-
Okay, Vielen Dank dann vorerst.
Dann muss ich wohl auf ein Update waren.Danke
-
Fehler tritt bei mir nun auch auf - hoffe auf baldigen fix
-
Habe einen ähnlichen Fehler, auch wenn ich auf das Freigaben Menü gehe. → Invalid RPC response
CodeMay 4 14:33:28 vault omv-engined[3383]: PHP Fatal error: Class OMV\System\Filesystem\FilesystemZfs contains 3 abstract methods and must therefore be declared abstract or implement the remaining methods (OMV\System\Filesystem\IFilesystem::hasDeviceFileById, OMV\System\Filesystem\IFilesystem::hasDeviceFileByUuid, OMV\System\Filesystem\IFilesystem::hasDeviceFileByLabel) in /usr/share/php/openmediavault/system/filesystem/filesystemzfs.inc on line 359 May 4 14:33:32 vault omv-engined[3529]: PHP Fatal error: Class OMV\System\Filesystem\FilesystemZfs contains 3 abstract methods and must therefore be declared abstract or implement the remaining methods (OMV\System\Filesystem\IFilesystem::hasDeviceFileById, OMV\System\Filesystem\IFilesystem::hasDeviceFileByUuid, OMV\System\Filesystem\IFilesystem::hasDeviceFileByLabel) in /usr/share/php/openmediavault/system/filesystem/filesystemzfs.inc on line 359 May 4 14:33:39 vault omv-engined[3685]: PHP Fatal error: Class OMV\System\Filesystem\FilesystemZfs contains 3 abstract methods and must therefore be declared abstract or implement the remaining methods (OMV\System\Filesystem\IFilesystem::hasDeviceFileById, OMV\System\Filesystem\IFilesystem::hasDeviceFileByUuid, OMV\System\Filesystem\IFilesystem::hasDeviceFileByLabel) in /usr/share/php/openmediavault/system/filesystem/filesystemzfs.inc on line 359
-
-
Fix bringt den gewünschten Erfolg. Vielen Dank
-
works indeed – openmediavault-zfs 3.0.15 fixed it, thanks !
-
Guten Morgen.
WIe kann ich das plugin installieren?
einfach omv-update??
VIelen Dank
-
Jo.
-
Guten Morgen,
habe heute morgen das Update gemacht aber leider ohne Erfolg.
forum.openmediavault.org/wsc/index.php?attachment/6430/
Der Syslog sagt:
Code
Alles anzeigenMay 16 06:40:58 Siemens666 systemd[1]: Reloading LSB: start Samba SMB/CIFS daemon (smbd). May 16 06:40:58 Siemens666 smbd[2623]: Reloading /etc/samba/smb.conf: smbd. May 16 06:40:58 Siemens666 systemd[1]: Reloaded LSB: start Samba SMB/CIFS daemon (smbd). May 16 06:42:20 Siemens666 ntpd_intres[1218]: host name not found: 0.debian.pool.ntp.org May 16 06:42:20 Siemens666 rsyslogd0: action 'action 20' resumed (module 'builtin:ompipe') [try http://www.rsyslog.com/e/0 ] May 16 06:42:20 Siemens666 rsyslogd-2359: action 'action 20' resumed (module 'builtin:ompipe') [try http://www.rsyslog.com/e/2359 ] May 16 06:42:20 Siemens666 ntpd_intres[1218]: host name not found: 1.debian.pool.ntp.org May 16 06:42:20 Siemens666 ntpd_intres[1218]: host name not found: 2.debian.pool.ntp.org May 16 06:42:20 Siemens666 ntpd_intres[1218]: host name not found: 3.debian.pool.ntp.org May 16 06:45:01 Siemens666 CRON[2743]: (root) CMD (/usr/sbin/omv-mkgraph >/dev/null 2>&1) May 16 06:45:01 Siemens666 rrdcached[1254]: Received FLUSHALL May 16 06:45:18 Siemens666 omv-engined[2829]: PHP Fatal error: Call to undefined method OMV\System\Filesystem\Filesystem::buildMountPath() in /usr/share/openmediavault/engined/rpc/remotemount.inc on line 196 May 16 06:49:28 Siemens666 systemd[1]: Starting Cleanup of Temporary Directories... May 16 06:49:28 Siemens666 systemd[1]: Started Cleanup of Temporary Directories. May 16 06:50:22 Siemens666 ntpd_intres[1218]: host name not found: 0.debian.pool.ntp.org May 16 06:50:22 Siemens666 ntpd_intres[1218]: host name not found: 1.debian.pool.ntp.org May 16 06:50:22 Siemens666 ntpd_intres[1218]: host name not found: 2.debian.pool.ntp.org May 16 06:50:22 Siemens666 ntpd_intres[1218]: host name not found: 3.debian.pool.ntp.org
Also quasi keine Änderung. Leider! Irgendwelche Ideen.Vielen Dank schonmal!
Jetzt mitmachen!
Sie haben noch kein Benutzerkonto auf unserer Seite? Registrieren Sie sich kostenlos und nehmen Sie an unserer Community teil!