Skip to content

[Bug]: RuntimeException: Unable to check Ipv6. Check that PHP was not compiled with option "disable-ipv6". #33567

@tessus

Description

@tessus

⚠️ 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.
  • Nextcloud Server is running on 64bit capable CPU, PHP and OS.
  • I agree to follow Nextcloud's Code of Conduct.

Bug description

The update server could not be reached since 3 days to check for new updates.
Please check the Nextcloud and server log files for errors.

{
  "reqId": "NCNhjvyso8guXr9TQyzs",
  "level": 2,
  "time": "2022-08-16T18:32:01+02:00",
  "remoteAddr": "XX.XX.XX.XX",
  "user": "xxxx",
  "app": "appstoreFetcher",
  "method": "GET",
  "url": "/apps/serverinfo/update",
  "message": "Unable to check Ipv6. Check that PHP was not compiled with option \"disable-ipv6\".",
  "userAgent": "Mozilla/5.0 (Macintosh; Intel Mac OS X 10.14; rv:103.0) Gecko/20100101 Firefox/103.0",
  "version": "23.0.8.1",
  "exception": {
    "Exception": "RuntimeException",
    "Message": "Unable to check Ipv6. Check that PHP was not compiled with option \"disable-ipv6\".",
    "Code": 0,
    "Trace": [
      {
        "file": "/data/projects/nextcloud/lib/private/Http/IpUtils.php",
        "line": 45,
        "function": "checkIp6",
        "class": "OC\\Http\\IpUtils",
        "type": "::",
        "args": [
          "2a01:4f8:130:32f1::53",
          "100.64.0.0/10"
        ]
      },
      {
        "file": "/data/projects/nextcloud/lib/private/Http/Client/LocalAddressChecker.php",
        "line": 49,
        "function": "checkIp",
        "class": "OC\\Http\\IpUtils",
        "type": "::",
        "args": [
          "2a01:4f8:130:32f1::53",
          [
            "100.64.0.0/10",
            "192.0.0.0/24"
          ]
        ]
      },
      {
        "file": "/data/projects/nextcloud/lib/private/Http/Client/DnsPinMiddleware.php",
        "line": 136,
        "function": "ThrowIfLocalIp",
        "class": "OC\\Http\\Client\\LocalAddressChecker",
        "type": "->",
        "args": [
          "2a01:4f8:130:32f1::53"
        ]
      },
      {
        "file": "/data/projects/nextcloud/3rdparty/guzzlehttp/guzzle/src/PrepareBodyMiddleware.php",
        "line": 35,
        "function": "OC\\Http\\Client\\{closure}",
        "class": "OC\\Http\\Client\\DnsPinMiddleware",
        "type": "->",
        "args": [
          "*** sensitive parameters replaced ***"
        ]
      },
      {
        "file": "/data/projects/nextcloud/3rdparty/guzzlehttp/guzzle/src/Middleware.php",
        "line": 31,
        "function": "__invoke",
        "class": "GuzzleHttp\\PrepareBodyMiddleware",
        "type": "->",
        "args": [
          "*** sensitive parameters replaced ***",
          "*** sensitive parameters replaced ***"
        ]
      },
      {
        "file": "/data/projects/nextcloud/3rdparty/guzzlehttp/guzzle/src/RedirectMiddleware.php",
        "line": 71,
        "function": "GuzzleHttp\\{closure}",
        "class": "GuzzleHttp\\Middleware",
        "type": "::",
        "args": [
          "*** sensitive parameters replaced ***"
        ]
      },
      {
        "file": "/data/projects/nextcloud/3rdparty/guzzlehttp/guzzle/src/Middleware.php",
        "line": 63,
        "function": "__invoke",
        "class": "GuzzleHttp\\RedirectMiddleware",
        "type": "->",
        "args": [
          "*** sensitive parameters replaced ***",
          "*** sensitive parameters replaced ***"
        ]
      },
      {
        "file": "/data/projects/nextcloud/3rdparty/guzzlehttp/guzzle/src/HandlerStack.php",
        "line": 75,
        "function": "GuzzleHttp\\{closure}",
        "class": "GuzzleHttp\\Middleware",
        "type": "::",
        "args": [
          "*** sensitive parameters replaced ***"
        ]
      },
      {
        "file": "/data/projects/nextcloud/3rdparty/guzzlehttp/guzzle/src/Client.php",
        "line": 331,
        "function": "__invoke",
        "class": "GuzzleHttp\\HandlerStack",
        "type": "->",
        "args": [
          "*** sensitive parameters replaced ***",
          "*** sensitive parameters replaced ***"
        ]
      },
      {
        "file": "/data/projects/nextcloud/3rdparty/guzzlehttp/guzzle/src/Client.php",
        "line": 168,
        "function": "transfer",
        "class": "GuzzleHttp\\Client",
        "type": "->",
        "args": [
          "*** sensitive parameters replaced ***",
          "*** sensitive parameters replaced ***"
        ]
      },
      {
        "file": "/data/projects/nextcloud/3rdparty/guzzlehttp/guzzle/src/Client.php",
        "line": 187,
        "function": "requestAsync",
        "class": "GuzzleHttp\\Client",
        "type": "->",
        "args": [
          "get",
          {
            "__class__": "GuzzleHttp\\Psr7\\Uri"
          },
          [
            "/data/projects/nextcloud/resources/config/ca-bundle.crt",
            60,
            [
              {
                "__class__": "Closure"
              }
            ],
            [
              false
            ],
            true,
            {
              "__class__": "GuzzleHttp\\HandlerStack"
            },
            true,
            true,
            false,
            false,
            [
              "GuzzleHttp/7"
            ]
          ]
        ]
      },
      {
        "file": "/data/projects/nextcloud/lib/private/Http/Client/Client.php",
        "line": 223,
        "function": "request",
        "class": "GuzzleHttp\\Client",
        "type": "->",
        "args": [
          "get",
          "https://apps.nextcloud.com/api/v1/apps.json",
          [
            "/data/projects/nextcloud/resources/config/ca-bundle.crt",
            60,
            [
              {
                "__class__": "Closure"
              }
            ],
            [
              false
            ],
            [
              "Nextcloud Server Crawler",
              "gzip"
            ],
            true
          ]
        ]
      },
      {
        "file": "/data/projects/nextcloud/lib/private/App/AppStore/Fetcher/Fetcher.php",
        "line": 120,
        "function": "get",
        "class": "OC\\Http\\Client\\Client",
        "type": "->",
        "args": [
          "https://apps.nextcloud.com/api/v1/apps.json",
          [
            60
          ]
        ]
      },
      {
        "file": "/data/projects/nextcloud/lib/private/App/AppStore/Fetcher/AppFetcher.php",
        "line": 87,
        "function": "fetch",
        "class": "OC\\App\\AppStore\\Fetcher\\Fetcher",
        "type": "->",
        "args": [
          "",
          ""
        ]
      },
      {
        "file": "/data/projects/nextcloud/lib/private/App/AppStore/Fetcher/Fetcher.php",
        "line": 192,
        "function": "fetch",
        "class": "OC\\App\\AppStore\\Fetcher\\AppFetcher",
        "type": "->",
        "args": [
          "",
          "",
          false
        ]
      },
      {
        "file": "/data/projects/nextcloud/lib/private/App/AppStore/Fetcher/AppFetcher.php",
        "line": 186,
        "function": "get",
        "class": "OC\\App\\AppStore\\Fetcher\\Fetcher",
        "type": "->",
        "args": [
          false
        ]
      },
      {
        "file": "/data/projects/nextcloud/lib/private/Installer.php",
        "line": 433,
        "function": "get",
        "class": "OC\\App\\AppStore\\Fetcher\\AppFetcher",
        "type": "->",
        "args": [
          false
        ]
      },
      {
        "file": "/data/projects/nextcloud/apps/serverinfo/lib/SystemStatistics.php",
        "line": 181,
        "function": "isUpdateAvailable",
        "class": "OC\\Installer",
        "type": "->",
        "args": [
          "accessibility"
        ]
      },
      {
        "file": "/data/projects/nextcloud/apps/serverinfo/lib/SystemStatistics.php",
        "line": 90,
        "function": "getAppsInfo",
        "class": "OCA\\ServerInfo\\SystemStatistics",
        "type": "->",
        "args": []
      },
      {
        "file": "/data/projects/nextcloud/apps/serverinfo/lib/Controller/PageController.php",
        "line": 60,
        "function": "getSystemStatistics",
        "class": "OCA\\ServerInfo\\SystemStatistics",
        "type": "->",
        "args": []
      },
      {
        "file": "/data/projects/nextcloud/lib/private/AppFramework/Http/Dispatcher.php",
        "line": 217,
        "function": "update",
        "class": "OCA\\ServerInfo\\Controller\\PageController",
        "type": "->",
        "args": [
          "*** sensitive parameters replaced ***"
        ]
      },
      {
        "file": "/data/projects/nextcloud/lib/private/AppFramework/Http/Dispatcher.php",
        "line": 126,
        "function": "executeController",
        "class": "OC\\AppFramework\\Http\\Dispatcher",
        "type": "->",
        "args": [
          {
            "__class__": "OCA\\ServerInfo\\Controller\\PageController"
          },
          "update"
        ]
      },
      {
        "file": "/data/projects/nextcloud/lib/private/AppFramework/App.php",
        "line": 157,
        "function": "dispatch",
        "class": "OC\\AppFramework\\Http\\Dispatcher",
        "type": "->",
        "args": [
          {
            "__class__": "OCA\\ServerInfo\\Controller\\PageController"
          },
          "update"
        ]
      },
      {
        "file": "/data/projects/nextcloud/lib/private/Route/Router.php",
        "line": 302,
        "function": "main",
        "class": "OC\\AppFramework\\App",
        "type": "::",
        "args": [
          "OCA\\ServerInfo\\Controller\\PageController",
          "update",
          {
            "__class__": "OC\\AppFramework\\DependencyInjection\\DIContainer"
          },
          [
            "serverinfo.page.update"
          ]
        ]
      },
      {
        "file": "/data/projects/nextcloud/lib/base.php",
        "line": 1008,
        "function": "match",
        "class": "OC\\Route\\Router",
        "type": "->",
        "args": [
          "/apps/serverinfo/update"
        ]
      },
      {
        "file": "/data/projects/nextcloud/index.php",
        "line": 36,
        "function": "handleRequest",
        "class": "OC",
        "type": "::",
        "args": []
      }
    ],
    "File": "/data/projects/nextcloud/lib/private/Http/IpUtils.php",
    "Line": 116,
    "CustomMessage": "Unable to check Ipv6. Check that PHP was not compiled with option \"disable-ipv6\"."
  },
  "id": "62fbc681e3834"
}

My server has IPv6 completely disabled and thus PHP was also compiled with disable-ipv6. This issue only became apparent after the lat update from 23.0.7 to 23.0.8.

It makes no sense to force people to setup IPv6 or compile IPv6 into PHP when IPv6 is not used at all.

Steps to reproduce

  1. Go to Settings -> Overview
  2. or wait a few days
  3. check log file

Expected behavior

Nestcloud should ignore IPv6 if it is not used and just use IPv4 instead and not throw an error that IPv6 support is not installed.

Installation method

Other

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?

Updated from a minor version (ex. 22.2.3 to 22.2.4)

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": {
        "instanceid": "***REMOVED SENSITIVE VALUE***",
        "passwordsalt": "***REMOVED SENSITIVE VALUE***",
        "datadirectory": "***REMOVED SENSITIVE VALUE***",
        "dbtype": "mysql",
        "version": "23.0.8.1",
        "installed": true,
        "forcessl": true,
        "loglevel": 0,
        "maintenance": false,
        "trusted_domains": [
            "xx.xx.xx"
        ],
        "share_folder": "\/Shared",
        "dbname": "***REMOVED SENSITIVE VALUE***",
        "dbhost": "***REMOVED SENSITIVE VALUE***",
        "dbuser": "***REMOVED SENSITIVE VALUE***",
        "dbpassword": "***REMOVED SENSITIVE VALUE***",
        "logdateformat": "Y-m-d H:i:s O",
        "logtimezone": "Europe\/Vienna",
        "secret": "***REMOVED SENSITIVE VALUE***",
        "mail_smtpmode": "sendmail",
        "mail_from_address": "***REMOVED SENSITIVE VALUE***",
        "mail_domain": "***REMOVED SENSITIVE VALUE***",
        "mail_smtpsecure": "ssl",
        "memcache.local": "\\OC\\Memcache\\APCu",
        "memcache.locking": "\\OC\\Memcache\\Redis",
        "filelocking.enabled": true,
        "redis": {
            "host": "***REMOVED SENSITIVE VALUE***",
            "port": 0,
            "timeout": 0
        },
        "appstore.experimental.enabled": true,
        "trashbin_retention_obligation": "auto",
        "updater.release.channel": "stable",
        "htaccess.RewriteBase": "\/",
        "overwrite.cli.url": "https:\/\/xxx.xxx.xxx",
        "auth.bruteforce.protection.enabled": false,
        "simpleSignUpLink.shown": false,
        "upgrade.disable-web": true,
        "theme": "evermeet",
        "mail_smtpauthtype": "PLAIN",
        "mail_smtpauth": 1,
        "mail_sendmailmode": "smtp",
        "filesystem_check_changes": 0,
        "mysql.utf8mb4": true,
        "connectivity_check_domains": [
            "xx.xx"
        ],
        "default_phone_region": "CA",
        "trusted_proxies": "***REMOVED SENSITIVE VALUE***"
    }
}


### List of activated Apps

```shell
Enabled:
  - accessibility: 1.9.0
  - activity: 2.15.0
  - admin_audit: 1.13.0
  - announcementcenter: 6.3.1
  - apporder: 0.15.0
  - bookmarks: 11.0.1
  - bruteforcesettings: 2.4.0
  - calendar: 3.4.2
  - circles: 23.1.2
  - cloud_federation_api: 1.6.0
  - comments: 1.13.0
  - contacts: 4.2.0
  - contactsinteraction: 1.4.0
  - dav: 1.21.0
  - federatedfilesharing: 1.13.0
  - federation: 1.13.0
  - files: 1.18.0
  - files_external: 1.15.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
  - impersonate: 1.10.0
  - logreader: 2.8.0
  - lookup_server_connector: 1.11.0
  - nextcloud_announcements: 1.12.0
  - notes: 4.4.0
  - notifications: 2.11.1
  - notify_push: 0.4.0
  - oauth2: 1.11.0
  - password_policy: 1.13.0
  - phonetrack: 0.7.0
  - photos: 1.5.0
  - polls: 3.7.0
  - privacy: 1.7.0
  - provisioning_api: 1.13.0
  - serverinfo: 1.13.0
  - settings: 1.5.0
  - sharebymail: 1.13.0
  - systemtags: 1.13.0
  - tasks: 0.14.4
  - text: 3.4.1
  - theming: 1.14.0
  - twofactor_backupcodes: 1.12.0
  - twofactor_totp: 6.4.0
  - updatenotification: 1.13.0
  - viewer: 1.7.0
  - weather_status: 1.3.0
  - workflowengine: 2.5.0
Disabled:
  - activitylog: 0.0.2
  - dashboard: 7.0.0
  - encryption
  - files_markdown: 2.3.6
  - recommendations: 0.5.0
  - support: 1.4.0
  - survey_client: 0.1.5
  - twofactor_u2f: 6.3.1
  - user_ldap
  - user_status: 1.0.1


### Nextcloud Signing status

```shell
No errors have been found.

Nextcloud Logs

{"reqId":"NCNhjvyso8guXr9TQyzs","level":2,"time":"2022-08-16T18:32:01+02:00","remoteAddr":"XX.XX.XX.XX","user":"xxxx","app":"appstoreFetcher","method":"GET","url":"/apps/serverinfo/update","message":"Unable to check Ipv6. Check that PHP was not compiled with option \"disable-ipv6\".","userAgent":"Mozilla/5.0 (Macintosh; Intel Mac OS X 10.14; rv:103.0) Gecko/20100101 Firefox/103.0","version":"23.0.8.1","exception":{"Exception":"RuntimeException","Message":"Unable to check Ipv6. Check that PHP was not compiled with option \"disable-ipv6\".","Code":0,"Trace":[{"file":"/data/projects/nextcloud/lib/private/Http/IpUtils.php","line":45,"function":"checkIp6","class":"OC\\Http\\IpUtils","type":"::","args":["2a01:4f8:130:32f1::53","100.64.0.0/10"]},{"file":"/data/projects/nextcloud/lib/private/Http/Client/LocalAddressChecker.php","line":49,"function":"checkIp","class":"OC\\Http\\IpUtils","type":"::","args":["2a01:4f8:130:32f1::53",["100.64.0.0/10","192.0.0.0/24"]]},{"file":"/data/projects/nextcloud/lib/private/Http/Client/DnsPinMiddleware.php","line":136,"function":"ThrowIfLocalIp","class":"OC\\Http\\Client\\LocalAddressChecker","type":"->","args":["2a01:4f8:130:32f1::53"]},{"file":"/data/projects/nextcloud/3rdparty/guzzlehttp/guzzle/src/PrepareBodyMiddleware.php","line":35,"function":"OC\\Http\\Client\\{closure}","class":"OC\\Http\\Client\\DnsPinMiddleware","type":"->","args":["*** sensitive parameters replaced ***"]},{"file":"/data/projects/nextcloud/3rdparty/guzzlehttp/guzzle/src/Middleware.php","line":31,"function":"__invoke","class":"GuzzleHttp\\PrepareBodyMiddleware","type":"->","args":["*** sensitive parameters replaced ***","*** sensitive parameters replaced ***"]},{"file":"/data/projects/nextcloud/3rdparty/guzzlehttp/guzzle/src/RedirectMiddleware.php","line":71,"function":"GuzzleHttp\\{closure}","class":"GuzzleHttp\\Middleware","type":"::","args":["*** sensitive parameters replaced ***"]},{"file":"/data/projects/nextcloud/3rdparty/guzzlehttp/guzzle/src/Middleware.php","line":63,"function":"__invoke","class":"GuzzleHttp\\RedirectMiddleware","type":"->","args":["*** sensitive parameters replaced ***","*** sensitive parameters replaced ***"]},{"file":"/data/projects/nextcloud/3rdparty/guzzlehttp/guzzle/src/HandlerStack.php","line":75,"function":"GuzzleHttp\\{closure}","class":"GuzzleHttp\\Middleware","type":"::","args":["*** sensitive parameters replaced ***"]},{"file":"/data/projects/nextcloud/3rdparty/guzzlehttp/guzzle/src/Client.php","line":331,"function":"__invoke","class":"GuzzleHttp\\HandlerStack","type":"->","args":["*** sensitive parameters replaced ***","*** sensitive parameters replaced ***"]},{"file":"/data/projects/nextcloud/3rdparty/guzzlehttp/guzzle/src/Client.php","line":168,"function":"transfer","class":"GuzzleHttp\\Client","type":"->","args":["*** sensitive parameters replaced ***","*** sensitive parameters replaced ***"]},{"file":"/data/projects/nextcloud/3rdparty/guzzlehttp/guzzle/src/Client.php","line":187,"function":"requestAsync","class":"GuzzleHttp\\Client","type":"->","args":["get",{"__class__":"GuzzleHttp\\Psr7\\Uri"},["/data/projects/nextcloud/resources/config/ca-bundle.crt",60,[{"__class__":"Closure"}],[false],true,{"__class__":"GuzzleHttp\\HandlerStack"},true,true,false,false,["GuzzleHttp/7"]]]},{"file":"/data/projects/nextcloud/lib/private/Http/Client/Client.php","line":223,"function":"request","class":"GuzzleHttp\\Client","type":"->","args":["get","https://apps.nextcloud.com/api/v1/apps.json",["/data/projects/nextcloud/resources/config/ca-bundle.crt",60,[{"__class__":"Closure"}],[false],["Nextcloud Server Crawler","gzip"],true]]},{"file":"/data/projects/nextcloud/lib/private/App/AppStore/Fetcher/Fetcher.php","line":120,"function":"get","class":"OC\\Http\\Client\\Client","type":"->","args":["https://apps.nextcloud.com/api/v1/apps.json",[60]]},{"file":"/data/projects/nextcloud/lib/private/App/AppStore/Fetcher/AppFetcher.php","line":87,"function":"fetch","class":"OC\\App\\AppStore\\Fetcher\\Fetcher","type":"->","args":["",""]},{"file":"/data/projects/nextcloud/lib/private/App/AppStore/Fetcher/Fetcher.php","line":192,"function":"fetch","class":"OC\\App\\AppStore\\Fetcher\\AppFetcher","type":"->","args":["","",false]},{"file":"/data/projects/nextcloud/lib/private/App/AppStore/Fetcher/AppFetcher.php","line":186,"function":"get","class":"OC\\App\\AppStore\\Fetcher\\Fetcher","type":"->","args":[false]},{"file":"/data/projects/nextcloud/lib/private/Installer.php","line":433,"function":"get","class":"OC\\App\\AppStore\\Fetcher\\AppFetcher","type":"->","args":[false]},{"file":"/data/projects/nextcloud/apps/serverinfo/lib/SystemStatistics.php","line":181,"function":"isUpdateAvailable","class":"OC\\Installer","type":"->","args":["accessibility"]},{"file":"/data/projects/nextcloud/apps/serverinfo/lib/SystemStatistics.php","line":90,"function":"getAppsInfo","class":"OCA\\ServerInfo\\SystemStatistics","type":"->","args":[]},{"file":"/data/projects/nextcloud/apps/serverinfo/lib/Controller/PageController.php","line":60,"function":"getSystemStatistics","class":"OCA\\ServerInfo\\SystemStatistics","type":"->","args":[]},{"file":"/data/projects/nextcloud/lib/private/AppFramework/Http/Dispatcher.php","line":217,"function":"update","class":"OCA\\ServerInfo\\Controller\\PageController","type":"->","args":["*** sensitive parameters replaced ***"]},{"file":"/data/projects/nextcloud/lib/private/AppFramework/Http/Dispatcher.php","line":126,"function":"executeController","class":"OC\\AppFramework\\Http\\Dispatcher","type":"->","args":[{"__class__":"OCA\\ServerInfo\\Controller\\PageController"},"update"]},{"file":"/data/projects/nextcloud/lib/private/AppFramework/App.php","line":157,"function":"dispatch","class":"OC\\AppFramework\\Http\\Dispatcher","type":"->","args":[{"__class__":"OCA\\ServerInfo\\Controller\\PageController"},"update"]},{"file":"/data/projects/nextcloud/lib/private/Route/Router.php","line":302,"function":"main","class":"OC\\AppFramework\\App","type":"::","args":["OCA\\ServerInfo\\Controller\\PageController","update",{"__class__":"OC\\AppFramework\\DependencyInjection\\DIContainer"},["serverinfo.page.update"]]},{"file":"/data/projects/nextcloud/lib/base.php","line":1008,"function":"match","class":"OC\\Route\\Router","type":"->","args":["/apps/serverinfo/update"]},{"file":"/data/projects/nextcloud/index.php","line":36,"function":"handleRequest","class":"OC","type":"::","args":[]}],"File":"/data/projects/nextcloud/lib/private/Http/IpUtils.php","Line":116,"CustomMessage":"Unable to check Ipv6. Check that PHP was not compiled with option \"disable-ipv6\"."},"id":"62fbc681e3834"}

Additional info

I always update via the updater.phar on the cli. No optio for that in this template...

Metadata

Metadata

Assignees

No one assigned

    Labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions