upgrade error - root_full_path: The value '' is not a string.

    • Resolved
    • OMV 4.x
    • upgrade error - root_full_path: The value '' is not a string.

      Just upgraded to 4.1.32-1
      Got the following error right after page reload: root_full_path: The value '' is not a string.

      Source Code

      1. root_full_path: The value '' is not a string.
      2. Error #0:
      3. OMV\Json\SchemaValidationException: root_full_path: The value '' is not a string. in /usr/share/php/openmediavault/json/schema.inc:366
      4. Stack trace:
      5. #0 /usr/share/php/openmediavault/json/schema.inc(297): OMV\Json\Schema->validateString(false, Array, 'root_full_path')
      6. #1 /usr/share/php/openmediavault/json/schema.inc(257): OMV\Json\Schema->validateType(false, Array, 'root_full_path')
      7. #2 /usr/share/php/openmediavault/config/datamodel.inc(155): OMV\Json\Schema->validate(false, 'root_full_path')
      8. #3 /usr/share/php/openmediavault/config/configobject.inc(189): OMV\Config\DataModel->validateProperty('root_full_path', false)
      9. #4 /usr/share/openmediavault/engined/rpc/nginx-server.inc(146): OMV\Config\ConfigObject->set('root_full_path', false)
      10. #5 [internal function]: OMV\Engined\Rpc\NginxServer->getList(Array, Array)
      11. #6 /usr/share/php/openmediavault/rpc/serviceabstract.inc(123): call_user_func_array(Array, Array)
      12. #7 /usr/share/php/openmediavault/rpc/rpc.inc(86): OMV\Rpc\ServiceAbstract->callMethod('getList', Array, Array)
      13. #8 /usr/sbin/omv-engined(537): OMV\Rpc\Rpc::call('Nginx', 'getList', Array, Array, 1)
      14. #9 {main}
      Display All
    • It must be caused by the nginx plugin. What is the output of: dpkg -l | grep openm
      omv 5.3.4 usul | 64 bit | 5.3 proxmox kernel | omvextrasorg 5.2.5
      omv-extras.org plugins source code and issue tracker - github

      Please read this before posting a question and this and this for docker questions.
      Please don't PM for support... Too many PMs!
    • Source Code

      1. $ dpkg -l | grep openm
      2. ii openmediavault 4.1.32-1 all openmediavault - The open network attached storage solution
      3. ii openmediavault-backup 4.0.6 all backup plugin for OpenMediaVault.
      4. ii openmediavault-diskstats 4.0.2-1 all OpenMediaVault disk monitoring plugin
      5. ii openmediavault-keyring 1.0 all GnuPG archive keys of the OpenMediaVault archive
      6. ii openmediavault-nginx 4.0.3 all Nginx plugin for OpenMediaVault.
      7. ii openmediavault-omvextrasorg 4.1.16 all OMV-Extras.org Package Repositories for OpenMediaVault
      8. ii openmediavault-remotemount 4.0.7 all Remote mount plugin for OpenMediaVault.
      9. ii openmediavault-resetperms 3.3 all Reset Permissions
      10. ii openmediavault-snapraid 3.7.7 all snapraid plugin for OpenMediaVault.
      11. ii openmediavault-symlinks 3.1.5 all OpenMediaVault symlinks plugin
      12. ii openmediavault-unionfilesystems 4.0.2 all Union filesystems plugin for OpenMediaVault.
      13. ii openmediavault-urbackup-server 3.1 all OpenMediaVault urbackup-server plugin
      14. ii openmediavault-usbbackup 4.0.8-1 all OpenMediaVault USB/eSATA backup plugin
      15. ii openmediavault-wol 3.4.2 all OpenMediaVault WOL plugin
      Display All
    • Are you using the nginx plugin?

      If not, apt-get purge openmediavault-nginx

      If yes, try:

      omv-mkconf nginx

      If that doesn't help, post the output of: omv-showkey nginx
      omv 5.3.4 usul | 64 bit | 5.3 proxmox kernel | omvextrasorg 5.2.5
      omv-extras.org plugins source code and issue tracker - github

      Please read this before posting a question and this and this for docker questions.
      Please don't PM for support... Too many PMs!
    • OK, found that the error is related to a specific [virtual] web server configuration.
      Once 'Use public directory' is enabled and 'Public directory'' populated with the valid folder name the above mentioned error pops up.
      Exactly the same configuration was used successfully before the upgrade.
      Here is a sample server entry from the backup I made:

      Source Code

      1. <server>
      2. <uuid>c1782bf4-5be6-4fc0-8064-f068f76b7aa4</uuid>
      3. <enable>1</enable>
      4. <sharedfolderref>d3602161-677a-457f-ac9b-47afc7ac8e74</sharedfolderref>
      5. <use_root>1</use_root>
      6. <use_public_directory>1</use_public_directory>
      7. <public_directory>public</public_directory>
      8. <host_type>name</host_type>
      9. <server_name>myname.mydomain.tld</server_name>
      10. <port>8888</port>
      11. <port_default_server>1</port_default_server>
      12. <ssl_enable>0</ssl_enable>
      13. <ssl_port>443</ssl_port>
      14. <ssl_port_default_server>0</ssl_port_default_server>
      15. <sslcertificateref></sslcertificateref>
      16. <ssl_force>0</ssl_force>
      17. <php_enable>0</php_enable>
      18. <php_pool_ref></php_pool_ref>
      19. <php_use_default_config>1</php_use_default_config>
      20. <use_index>1</use_index>
      21. <use_index_html>1</use_index_html>
      22. <use_index_php>0</use_index_php>
      23. <autoindex>0</autoindex>
      24. <deny_htaccess>0</deny_htaccess>
      25. <log_enable>1</log_enable>
      26. <large_client_header_buffers>8</large_client_header_buffers>
      27. <extra_options></extra_options>
      28. </server>
      Display All
    • Not sure why that is breaking. The plugin hasn't changed and I don't see any OMV changes that should interact with this. Do you have a VM you could try a similar setup in?
      omv 5.3.4 usul | 64 bit | 5.3 proxmox kernel | omvextrasorg 5.2.5
      omv-extras.org plugins source code and issue tracker - github

      Please read this before posting a question and this and this for docker questions.
      Please don't PM for support... Too many PMs!
    • Hi,
      I am happy to see I am not the only one to have this problem!
      I build OMV, because I use it on a mispel machine and no mipsel packages are available for download.
      For me, the problem appeared between commits f381284 and 5964a35 (the last 2 commits I built)

      I am not very good at debugging, but for what I found, the issue is from usr/share/openmediavault/engined/rpc/nginx-server.inc, in the function getList($params, $context) (line 125~181).

      Apparently, this piece of code

      PHP Source Code: https://github.com/OpenMediaVault-Plugin-Developers/openmediavault-nginx/blob/master/usr/share/openmediavault/engined/rpc/nginx-server.inc

      1. $rootFullPath = '';
      2. if (!empty($object->get('sharedfolderref'))) {
      3. $rootFullPath = $this->getSharedFolderPathByUuid($object->get('sharedfolderref'));
      4. if ($object->get('use_root') && $object->get('use_public_directory')) {
      5. $rootFullPath = build_path([$rootFullPath, $object->get('public_directory')]);
      6. }
      7. }
      Display All
      fails to assign a value to root_full_path (well, except the default empty string of course), either because sharedfolderref is null, or getSharedFolderPathByUuid fails

      EDIT: can it be because build_path's syntax is supposed to be build_path($separator, $parts)? but then, why did it stop working now ? also, build_path has been updated recently.
      I will revert to the old function and tell you later.

      The post was edited 2 times, last by nouanda ().

    • I confirm the problem is with the build_path function.
      There are two workarounds:

      $rootFullPath = build_path([$rootFullPath, $object->get('public_directory')]);
      with
      $rootFullPath = build_path(DIRECTORY_SEPARATOR, [$rootFullPath, $object->get('public_directory')]);

      And so,

      ryecoaaron wrote:

      I don't see any OMV changes that should interact with this.
      No need to see it, I did it for you ;)

      Everybody who uses Nginx will be impacted sooner or later.
    • nouanda wrote:

      No need to see it, I did it for you

      Everybody who uses Nginx will be impacted sooner or later.
      Great. My motivation wasn't real high. I really didn't want to maintain OMV 4.x plugins or this plugin at all anymore. But it won't affect everyone because not everyone uses the public checkbox (I never have and I've used this plugin since the beginning).

      AndrewZ wrote:

      However after that fix 'Root' column in 'Servers' list is empty.
      I will fix it when I get a chance.
      omv 5.3.4 usul | 64 bit | 5.3 proxmox kernel | omvextrasorg 5.2.5
      omv-extras.org plugins source code and issue tracker - github

      Please read this before posting a question and this and this for docker questions.
      Please don't PM for support... Too many PMs!