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

[Bug]: serverinfo errors on FreeBSD jail #358

Closed
5 of 8 tasks
pacija opened this issue Feb 16, 2022 · 2 comments
Closed
5 of 8 tasks

[Bug]: serverinfo errors on FreeBSD jail #358

pacija opened this issue Feb 16, 2022 · 2 comments

Comments

@pacija
Copy link

pacija commented Feb 16, 2022

⚠️ This issue respects the following points: ⚠️

  • This is a bug, not a question or a configuration/webserver/proxy issue.
  • This issue is not already reported on Github (I've searched it).
  • Nextcloud Server is up to date. See Maintenance and Release Schedule for supported versions.
  • I agree to follow Nextcloud's Code of Conduct.

Bug description

Hi,

I am getting errors on new nextcloud-php80-23.0.1 installation in 13.0-RELEASE FreeBSD jail. I think those are related to the fact that jails by default have less information about the system than physical hosts they run on, namely in this case about default route and interface speed.

Steps to reproduce

  1. Visit Administration -> System
  2. Observe "Network" Section (Missing Gateway and Speed for some interfaces)
  3. Check logging, observe "Undefined array key 0 at /usr/local/www/nextcloud/apps-pkg/serverinfo/lib/OperatingSystems/FreeBSD.php#183" and "Undefined array key 0 at /usr/local/www/nextcloud/apps-pkg/serverinfo/lib/OperatingSystems/FreeBSD.php#140" errors

Expected behavior

Not being able to provide information about some aspects of networking shouldn't result in an error, as this is expected for a FreeBSD jail. Preferably, script would check if environment is FreeBSD jail and provide info about it in appropriate sections, similar to "Gateway: unknown (FreeBSD Jail)".

Here's how my Network section looks like:

nc-network

Installation method

Manual installation

Operating system

Other

PHP engine version

PHP 8.0

Web server

Apache (supported)

Database engine version

MySQL

Is this bug present after an update or on a fresh install?

Fresh Nextcloud Server install

Are you using the Nextcloud Server Encryption module?

Encryption is Disabled

What user-backends are you using?

  • Default user-backend (database)
  • LDAP/ Active Directory
  • SSO - SAML
  • Other

Configuration report

{
    "system": {
        "apps_paths": [
            {
                "path": "\/usr\/local\/www\/nextcloud\/apps",
                "url": "\/apps",
                "writable": true
            },
            {
                "path": "\/usr\/local\/www\/nextcloud\/apps-pkg",
                "url": "\/apps-pkg",
                "writable": false
            }
        ],
        "logfile": "\/var\/log\/nextcloud\/nextcloud.log",
        "passwordsalt": "***REMOVED SENSITIVE VALUE***",
        "secret": "***REMOVED SENSITIVE VALUE***",
        "trusted_domains": [
            "nextcloud.example.org"
        ],
        "datadirectory": "***REMOVED SENSITIVE VALUE***",
        "dbtype": "mysql",
        "version": "23.0.1.2",
        "overwrite.cli.url": "https:\/\/nextcloud.example.org",
        "dbname": "***REMOVED SENSITIVE VALUE***",
        "dbhost": "***REMOVED SENSITIVE VALUE***",
        "dbport": "",
        "dbtableprefix": "oc_",
        "mysql.utf8mb4": true,
        "dbuser": "***REMOVED SENSITIVE VALUE***",
        "dbpassword": "***REMOVED SENSITIVE VALUE***",
        "installed": true,
        "instanceid": "***REMOVED SENSITIVE VALUE***",
        "default_phone_region": "RS",
        "mail_smtpmode": "smtp",
        "mail_smtpsecure": "tls",
        "mail_sendmailmode": "smtp",
        "mail_from_address": "***REMOVED SENSITIVE VALUE***",
        "mail_domain": "***REMOVED SENSITIVE VALUE***",
        "mail_smtpauthtype": "PLAIN",
        "mail_smtpauth": 1,
        "mail_smtphost": "***REMOVED SENSITIVE VALUE***",
        "mail_smtpport": "587",
        "mail_smtpname": "***REMOVED SENSITIVE VALUE***",
        "mail_smtppassword": "***REMOVED SENSITIVE VALUE***",
        "memcache.local": "\\OC\\Memcache\\Redis",
        "memcache.distributed": "\\OC\\Memcache\\Redis",
        "memcache.locking": "\\OC\\Memcache\\Redis",
        "redis": {
            "host": "***REMOVED SENSITIVE VALUE***",
            "port": 6379,
            "timeout": 0,
            "read_timeout": 0,
            "dbindex": 0
        }
    }
}

List of activated Apps

Enabled:
  - accessibility: 1.9.0
  - activity: 2.15.0
  - circles: 23.0.1
  - cloud_federation_api: 1.6.0
  - comments: 1.13.0
  - contactsinteraction: 1.4.0
  - dashboard: 7.3.0
  - dav: 1.21.0
  - federatedfilesharing: 1.13.0
  - federation: 1.13.0
  - files: 1.18.0
  - files_pdfviewer: 2.4.0
  - files_rightclick: 1.2.0
  - files_sharing: 1.15.0
  - files_trashbin: 1.13.0
  - files_versions: 1.16.0
  - files_videoplayer: 1.12.0
  - firstrunwizard: 2.12.0
  - logreader: 2.8.0
  - lookup_server_connector: 1.11.0
  - nextcloud_announcements: 1.12.0
  - notifications: 2.11.1
  - oauth2: 1.11.0
  - password_policy: 1.13.0
  - photos: 1.5.0
  - privacy: 1.7.0
  - provisioning_api: 1.13.0
  - recommendations: 1.2.0
  - serverinfo: 1.13.0
  - settings: 1.5.0
  - sharebymail: 1.13.0
  - support: 1.6.0
  - survey_client: 1.11.0
  - systemtags: 1.13.0
  - text: 3.4.0
  - theming: 1.14.0
  - twofactor_backupcodes: 1.12.0
  - updatenotification: 1.13.0
  - user_status: 1.3.1
  - viewer: 1.7.0
  - weather_status: 1.3.0
  - workflowengine: 2.5.0
Disabled:
  - admin_audit
  - encryption
  - files_external
  - user_ldap

Nextcloud Signing status

No errors have been found.

Nextcloud Logs

{"reqId":"MuMaRhD3yfGxv6askzB6","level":3,"time":"2022-02-16T11:22:32+00:00","remoteAddr":"178.148.97.146","user":"gazda","app":"PHP","method":"GET","url":"/index.php/settings/admin/serverinfo","message":"Undefined array key 0 at /usr/local/www/nextcloud/apps-pkg/serverinfo/lib/OperatingSystems/FreeBSD.php#183","userAgent":"Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/98.0.4758.82 Safari/537.36","version":"23.0.1.2","exception":{"Exception":"Error","Message":"Undefined array key 0 at /usr/local/www/nextcloud/apps-pkg/serverinfo/lib/OperatingSystems/FreeBSD.php#183","Code":0,"Trace":[{"file":"/usr/local/www/nextcloud/apps-pkg/serverinfo/lib/OperatingSystems/FreeBSD.php","line":183,"function":"onError","class":"OC\\Log\\ErrorHandler","type":"::"},{"file":"/usr/local/www/nextcloud/apps-pkg/serverinfo/lib/Os.php","line":141,"function":"getNetworkInterfaces","class":"OCA\\ServerInfo\\OperatingSystems\\FreeBSD","type":"->"},{"file":"/usr/local/www/nextcloud/apps-pkg/serverinfo/lib/Settings/AdminSettings.php","line":114,"function":"getNetworkInterfaces","class":"OCA\\ServerInfo\\Os","type":"->"},{"file":"/usr/local/www/nextcloud/apps-pkg/settings/lib/Controller/CommonSettingsTrait.php","line":129,"function":"getForm","class":"OCA\\ServerInfo\\Settings\\AdminSettings","type":"->"},{"file":"/usr/local/www/nextcloud/apps-pkg/settings/lib/Controller/AdminSettingsController.php","line":83,"function":"formatSettings","class":"OCA\\Settings\\Controller\\AdminSettingsController","type":"->"},{"file":"/usr/local/www/nextcloud/apps-pkg/settings/lib/Controller/CommonSettingsTrait.php","line":140,"function":"getSettings","class":"OCA\\Settings\\Controller\\AdminSettingsController","type":"->"},{"file":"/usr/local/www/nextcloud/apps-pkg/settings/lib/Controller/AdminSettingsController.php","line":68,"function":"getIndexResponse","class":"OCA\\Settings\\Controller\\AdminSettingsController","type":"->"},{"file":"/usr/local/www/nextcloud/lib/private/AppFramework/Http/Dispatcher.php","line":217,"function":"index","class":"OCA\\Settings\\Controller\\AdminSettingsController","type":"->"},{"file":"/usr/local/www/nextcloud/lib/private/AppFramework/Http/Dispatcher.php","line":126,"function":"executeController","class":"OC\\AppFramework\\Http\\Dispatcher","type":"->"},{"file":"/usr/local/www/nextcloud/lib/private/AppFramework/App.php","line":157,"function":"dispatch","class":"OC\\AppFramework\\Http\\Dispatcher","type":"->"},{"file":"/usr/local/www/nextcloud/lib/private/Route/Router.php","line":302,"function":"main","class":"OC\\AppFramework\\App","type":"::"},{"file":"/usr/local/www/nextcloud/lib/base.php","line":1006,"function":"match","class":"OC\\Route\\Router","type":"->"},{"file":"/usr/local/www/nextcloud/index.php","line":36,"function":"handleRequest","class":"OC","type":"::"}],"File":"/usr/local/www/nextcloud/lib/private/Log/ErrorHandler.php","Line":92,"CustomMessage":"--"},"id":"620cdf6d784d9"}

{"reqId":"MuMaRhD3yfGxv6askzB6","level":3,"time":"2022-02-16T11:22:32+00:00","remoteAddr":"178.148.97.146","user":"gazda","app":"PHP","method":"GET","url":"/index.php/settings/admin/serverinfo","message":"Undefined array key 0 at /usr/local/www/nextcloud/apps-pkg/serverinfo/lib/OperatingSystems/FreeBSD.php#140","userAgent":"Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/98.0.4758.82 Safari/537.36","version":"23.0.1.2","exception":{"Exception":"Error","Message":"Undefined array key 0 at /usr/local/www/nextcloud/apps-pkg/serverinfo/lib/OperatingSystems/FreeBSD.php#140","Code":0,"Trace":[{"file":"/usr/local/www/nextcloud/apps-pkg/serverinfo/lib/OperatingSystems/FreeBSD.php","line":140,"function":"onError","class":"OC\\Log\\ErrorHandler","type":"::"},{"file":"/usr/local/www/nextcloud/apps-pkg/serverinfo/lib/Os.php","line":133,"function":"getNetworkInfo","class":"OCA\\ServerInfo\\OperatingSystems\\FreeBSD","type":"->"},{"file":"/usr/local/www/nextcloud/apps-pkg/serverinfo/lib/Settings/AdminSettings.php","line":113,"function":"getNetworkInfo","class":"OCA\\ServerInfo\\Os","type":"->"},{"file":"/usr/local/www/nextcloud/apps-pkg/settings/lib/Controller/CommonSettingsTrait.php","line":129,"function":"getForm","class":"OCA\\ServerInfo\\Settings\\AdminSettings","type":"->"},{"file":"/usr/local/www/nextcloud/apps-pkg/settings/lib/Controller/AdminSettingsController.php","line":83,"function":"formatSettings","class":"OCA\\Settings\\Controller\\AdminSettingsController","type":"->"},{"file":"/usr/local/www/nextcloud/apps-pkg/settings/lib/Controller/CommonSettingsTrait.php","line":140,"function":"getSettings","class":"OCA\\Settings\\Controller\\AdminSettingsController","type":"->"},{"file":"/usr/local/www/nextcloud/apps-pkg/settings/lib/Controller/AdminSettingsController.php","line":68,"function":"getIndexResponse","class":"OCA\\Settings\\Controller\\AdminSettingsController","type":"->"},{"file":"/usr/local/www/nextcloud/lib/private/AppFramework/Http/Dispatcher.php","line":217,"function":"index","class":"OCA\\Settings\\Controller\\AdminSettingsController","type":"->"},{"file":"/usr/local/www/nextcloud/lib/private/AppFramework/Http/Dispatcher.php","line":126,"function":"executeController","class":"OC\\AppFramework\\Http\\Dispatcher","type":"->"},{"file":"/usr/local/www/nextcloud/lib/private/AppFramework/App.php","line":157,"function":"dispatch","class":"OC\\AppFramework\\Http\\Dispatcher","type":"->"},{"file":"/usr/local/www/nextcloud/lib/private/Route/Router.php","line":302,"function":"main","class":"OC\\AppFramework\\App","type":"::"},{"file":"/usr/local/www/nextcloud/lib/base.php","line":1006,"function":"match","class":"OC\\Route\\Router","type":"->"},{"file":"/usr/local/www/nextcloud/index.php","line":36,"function":"handleRequest","class":"OC","type":"::"}],"File":"/usr/local/www/nextcloud/lib/private/Log/ErrorHandler.php","Line":92,"CustomMessage":"--"},"id":"620cdf6d78787"}

Additional info

No response

@szaimen szaimen transferred this issue from nextcloud/server Feb 16, 2022
@oblomow
Copy link

oblomow commented Feb 23, 2022

looks similar to https://github.com/nextcloud/serverinfo/issues/270
that has been open for some time now.

Anyhow, hopefully someone can fix it.

@joshtrichards
Copy link
Member

Fixed / handled elsewhere (ses #270).

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