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]: Error 500 on serverinfo page due to getNetInterfaces() #629

Closed
5 of 8 tasks
jcharaoui opened this issue Jun 24, 2024 · 2 comments · Fixed by #630
Closed
5 of 8 tasks

[Bug]: Error 500 on serverinfo page due to getNetInterfaces() #629

jcharaoui opened this issue Jun 24, 2024 · 2 comments · Fixed by #630

Comments

@jcharaoui
Copy link

⚠️ This issue respects the following points: ⚠️

Bug description

When visiting the /admin/serverinfo page, Nextcloud crashes with an HTTP 500 error and logs Unable to get network interfaces.

Steps to reproduce

  1. Navigate to the /admin/serverinfo page

Expected behavior

It should not show an HTTP 500 error.

Installation method

Community Manual installation with Archive

Nextcloud Server version

29

Operating system

Debian/Ubuntu

PHP engine version

PHP 8.2

Web server

Apache (supported)

Database engine version

MySQL

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

Updated from a MINOR version (ex. 22.1 to 22.2)

Are you using the Nextcloud Server Encryption module?

None

What user-backends are you using?

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

Configuration report

No response

List of activated Apps

No response

Nextcloud Signing status

No response

Nextcloud Logs

{"reqId":"55kLp9BONpSYDwbUO2j8","level":3,"time":"2024-06-24T09:56:17-04:00","remoteAddr":"[REDACTED]","user":"jerome","app":"PHP","method":"GET","url":"/nextcloud/index.php/settings/admin/serverinfo","message":"getifaddrs() failed 97: Address family not supported by protocol at /home/nextcloud/www/apps/serverinfo/lib/OperatingSystems/Linux.php#299","userAgent":"Mozilla/5.0 (X11; Linux x86_64; rv:109.0) Gecko/20100101 Firefox/115.0","version":"29.0.2.2","data":{"app":"PHP"}}
{"reqId":"55kLp9BONpSYDwbUO2j8","level":3,"time":"2024-06-24T09:56:17-04:00","remoteAddr":"[REDACTED]","user":"jerome","app":"index","method":"GET","url":"/nextcloud/index.php/settings/admin/serverinfo","message":"Unable to get network interfaces","userAgent":"Mozilla/5.0 (X11; Linux x86_64; rv:109.0) Gecko/20100101 Firefox/115.0","version":"29.0.2.2","exception":{"Exception":"RuntimeException","Message":"Unable to get network interfaces","Code":0,"Trace":[{"file":"/home/nextcloud/www/apps/serverinfo/lib/OperatingSystems/Linux.php","line":163,"function":"getNetInterfaces","class":"OCA\\ServerInfo\\OperatingSystems\\Linux","type":"->"},{"file":"/home/nextcloud/www/apps/serverinfo/lib/Os.php","line":103,"function":"getNetworkInterfaces","class":"OCA\\ServerInfo\\OperatingSystems\\Linux","type":"->"},{"file":"/home/nextcloud/www/apps/serverinfo/lib/Settings/AdminSettings.php","line":83,"function":"getNetworkInterfaces","class":"OCA\\ServerInfo\\Os","type":"->"},{"file":"/home/nextcloud/www/apps/settings/lib/Controller/CommonSettingsTrait.php","line":140,"function":"getForm","class":"OCA\\ServerInfo\\Settings\\AdminSettings","type":"->"},{"file":"/home/nextcloud/www/apps/settings/lib/Controller/AdminSettingsController.php","line":93,"function":"formatSettings","class":"OCA\\Settings\\Controller\\AdminSettingsController","type":"->"},{"file":"/home/nextcloud/www/apps/settings/lib/Controller/CommonSettingsTrait.php","line":165,"function":"getSettings","class":"OCA\\Settings\\Controller\\AdminSettingsController","type":"->"},{"file":"/home/nextcloud/www/apps/settings/lib/Controller/AdminSettingsController.php","line":77,"function":"getIndexResponse","class":"OCA\\Settings\\Controller\\AdminSettingsController","type":"->"},{"file":"/home/nextcloud/www/lib/private/AppFramework/Http/Dispatcher.php","line":232,"function":"index","class":"OCA\\Settings\\Controller\\AdminSettingsController","type":"->"},{"file":"/home/nextcloud/www/lib/private/AppFramework/Http/Dispatcher.php","line":138,"function":"executeController","class":"OC\\AppFramework\\Http\\Dispatcher","type":"->"},{"file":"/home/nextcloud/www/lib/private/AppFramework/App.php","line":184,"function":"dispatch","class":"OC\\AppFramework\\Http\\Dispatcher","type":"->"},{"file":"/home/nextcloud/www/lib/private/Route/Router.php","line":338,"function":"main","class":"OC\\AppFramework\\App","type":"::"},{"file":"/home/nextcloud/www/lib/base.php","line":1050,"function":"match","class":"OC\\Route\\Router","type":"->"},{"file":"/home/nextcloud/www/index.php","line":49,"function":"handleRequest","class":"OC","type":"::"}],"File":"/home/nextcloud/www/apps/serverinfo/lib/OperatingSystems/Linux.php","Line":301,"message":"Unable to get network interfaces","exception":{},"CustomMessage":"Unable to get network interfaces"}}

Additional info

Unclear if it matters, but on the system PHP is running using php-fpm with the chroot parameter enabled.

@kesselb kesselb transferred this issue from nextcloud/server Jun 24, 2024
@kesselb
Copy link
Collaborator

kesselb commented Jun 24, 2024

Thanks 👍

Indeed, the try-catch is missing. This should make the page usuable again and drop the second error message. However, the first one is emitted by php and something you have to live with1.

Footnotes

  1. https://github.com/php/php-src/blob/ab9a0295c566f9c34e395ffead8d030e60524cce/ext/standard/net.c#L269-L272

@jcharaoui
Copy link
Author

Wow, thanks for the quick fix! I'm fine with the error message popping up in the logs when that page is opened.

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

Successfully merging a pull request may close this issue.

2 participants