openssl_pkey_export(): cannot get key from parameter · Issue #11227 · nextcloud/server
2019-04-09 01:35:45 Author: github.com(查看原文) 阅读量:382 收藏

Steps to reproduce

  1. I downloaded the new 14.0.0 Zip File and unpacked it
  2. copied the old config.php and startet the DB-Upgrade in the Browser
  3. Im now unable to login, getting an "Internal Server Error"

Expected behaviour

Login should be possible without errors in log or on webgui.

Actual behaviour

Getting an
"Internal Server Error
The server was unable to complete your request.

If this happens again, please send the technical details below to the server administrator.

More details can be found in the server log."

On the WebGui, also the Desktop Clients dont work anymore.

Server configuration

Operating system:
Ubuntu 16.04.5

Web server:
Apache/2.4.18 (Ubuntu)

Database:
mysqld Ver 5.7.23-0ubuntu0.16.04.1 for Linux on x86_64 ((Ubuntu))

PHP version:
PHP 7.0.30-0ubuntu0.16.04.1 (cli) ( NTS )

Nextcloud version: (see Nextcloud admin page)
14.0.0.19

Updated from an older Nextcloud/ownCloud or fresh install:
yes, updated from 13.0.6.1

Where did you install Nextcloud from:
Zip Package, downloaded from the offical site.

Signing status:

Signing status
Cant login to server.

List of activated apps:

App list
Enabled:
  - accessibility: 1.0.1
  - activity: 2.7.0
  - admin_audit: 1.4.0
  - cloud_federation_api: 0.0.1
  - comments: 1.4.0
  - dav: 1.6.0
  - federatedfilesharing: 1.4.0
  - federation: 1.4.0
  - files: 1.9.0
  - files_external: 1.5.0
  - files_pdfviewer: 1.3.2
  - files_sharing: 1.6.2
  - files_texteditor: 2.6.0
  - files_trashbin: 1.4.1
  - files_versions: 1.7.1
  - files_videoplayer: 1.3.0
  - firstrunwizard: 2.3.0
  - gallery: 18.1.0
  - logreader: 2.0.0
  - lookup_server_connector: 1.2.0
  - nextcloud_announcements: 1.3.0
  - notifications: 2.2.1
  - oauth2: 1.2.1
  - password_policy: 1.4.0
  - provisioning_api: 1.4.0
  - serverinfo: 1.4.0
  - sharebymail: 1.4.0
  - support: 1.0.0
  - survey_client: 1.2.0
  - systemtags: 1.4.0
  - theming: 1.5.0
  - twofactor_backupcodes: 1.3.1
  - updatenotification: 1.4.1
  - workflowengine: 1.4.0
Disabled:
  - encryption
  - user_external
  - user_ldap

Nextcloud configuration:

Config report
{
    "system": {
        "passwordsalt": "***REMOVED SENSITIVE VALUE***",
        "secret": "***REMOVED SENSITIVE VALUE***",
        "forcessl": true,
        "asset-pipeline.enabled": true,
        "maxZipInputSize": 0,
        "allowZipDownload": true,
        "trusted_domains": [
            "xxx",
            "xxx",
            "xxx",
            "xxx"
        ],
        "datadirectory": "***REMOVED SENSITIVE VALUE***",
        "overwrite.cli.url": "https:\/\/xxx.de",
        "dbtype": "mysql",
        "version": "14.0.0.19",
        "dbname": "***REMOVED SENSITIVE VALUE***",
        "dbhost": "***REMOVED SENSITIVE VALUE***",
        "dbtableprefix": "oc_",
        "dbuser": "***REMOVED SENSITIVE VALUE***",
        "dbpassword": "***REMOVED SENSITIVE VALUE***",
        "logtimezone": "Europe\/Berlin",
        "installed": true,
        "mail_from_address": "***REMOVED SENSITIVE VALUE***",
        "mail_smtpmode": "php",
        "mail_domain": "***REMOVED SENSITIVE VALUE***",
        "logdateformat": "F d, Y H:i:s",
        "log_rotate_size": 104857600,
        "logfile": "\/var\/log\/nextcloud\/nextcloud.log",
        "loglevel": 1,
        "theme": "",
        "maintenance": false,
        "memcache.local": "\\OC\\Memcache\\APCu",
        "appstore.experimental.enabled": true,
        "instanceid": "***REMOVED SENSITIVE VALUE***",
        "ldapIgnoreNamingRules": false,
        "ldapProviderFactory": "\\OCA\\User_LDAP\\LDAPProviderFactory",
        "mail_smtpauthtype": "LOGIN",
        "mail_smtpsecure": "tls",
        "mail_smtpauth": 1,
        "mail_smtpname": "***REMOVED SENSITIVE VALUE***",
        "mail_smtppassword": "***REMOVED SENSITIVE VALUE***",
        "mail_smtphost": "***REMOVED SENSITIVE VALUE***",
        "mail_smtpport": "587",
        "data-fingerprint": "xxx",
        "openssl": {
            "config": "\/etc\/ssl\/openssl.cnf"
        }
    }
}

Are you using external storage, if yes which one: no

Are you using encryption: no

Are you using an external user-backend, if yes which one: no, normal database-users

Client configuration

Browser:
dont matter

Operating system:
dont matter

Logs

Web server error log

Web server error log
nothing relevant in apache2 error log.

Nextcloud log (data/nextcloud.log)

Nextcloud log
{"reqId":"W5wPsAUJdq4AAGE@@nkAAAAG","level":3,"time":"September 14, 2018 21:44:48","remoteAddr":"xxx","user":"Marcwa19197","app":"PHP","method":"POST","url":"\/index.php\/login","message":"openssl_pkey_export(): cannot get key from parameter 1 at \/data\/www\/xxx.de\/public_data\/lib\/private\/Authentication\/Token\/PublicKeyTokenProvider.php#297","userAgent":"Mozilla\/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit\/537.36 (KHTML, like Gecko) Chrome\/69.0.3497.92 Safari\/537.36","version":"14.0.0.19"}
{"reqId":"W5wPsAUJdq4AAGE@@nkAAAAG","level":3,"time":"September 14, 2018 21:44:48","remoteAddr":"87.149.175.121","user":"Marcwa19197","app":"index","method":"POST","url":"\/index.php\/login","message":{"Exception":"TypeError","Message":"openssl_pkey_get_details() expects parameter 1 to be resource, boolean given","Code":0,"Trace":[{"file":"\/data\/www\/xxx.de\/public_data\/lib\/private\/Authentication\/Token\/PublicKeyTokenProvider.php","line":300,"function":"openssl_pkey_get_details","args":[false]},{"file":"\/data\/www\/xxx.de\/public_data\/lib\/private\/Authentication\/Token\/PublicKeyTokenProvider.php","line":69,"function":"newToken","class":"OC\\Authentication\\Token\\PublicKeyTokenProvider","type":"->","args":["*** sensitive parameter replaced ***","*** sensitive parameter replaced ***","*** sensitive parameter replaced ***","*** sensitive parameter replaced ***","*** sensitive parameter replaced ***","*** sensitive parameter replaced ***","*** sensitive parameter replaced ***"]},{"file":"\/data\/www\/xxx.de\/public_data\/lib\/private\/Authentication\/Token\/Manager.php","line":68,"function":"generateToken","class":"OC\\Authentication\\Token\\PublicKeyTokenProvider","type":"->","args":["*** sensitive parameters replaced ***"]},{"file":"\/data\/www\/xxx.de\/public_data\/lib\/private\/User\/Session.php","line":631,"function":"generateToken","class":"OC\\Authentication\\Token\\Manager","type":"->","args":["*** sensitive parameters replaced ***"]},{"file":"\/data\/www\/xxx.de\/public_data\/core\/Controller\/LoginController.php","line":322,"function":"createSessionToken","class":"OC\\User\\Session","type":"->","args":["*** sensitive parameters replaced ***"]},{"file":"\/data\/www\/xxx.de\/public_data\/lib\/private\/AppFramework\/Http\/Dispatcher.php","line":166,"function":"tryLogin","class":"OC\\Core\\Controller\\LoginController","type":"->","args":["*** sensitive parameters replaced ***"]},{"file":"\/data\/www\/xxx.de\/public_data\/lib\/private\/AppFramework\/Http\/Dispatcher.php","line":99,"function":"executeController","class":"OC\\AppFramework\\Http\\Dispatcher","type":"->","args":[{"__class__":"OC\\Core\\Controller\\LoginController"},"tryLogin"]},{"file":"\/data\/www\/xxx.de\/public_data\/lib\/private\/AppFramework\/App.php","line":118,"function":"dispatch","class":"OC\\AppFramework\\Http\\Dispatcher","type":"->","args":[{"__class__":"OC\\Core\\Controller\\LoginController"},"tryLogin"]},{"file":"\/data\/www\/xxx.de\/public_data\/lib\/private\/AppFramework\/Routing\/RouteActionHandler.php","line":47,"function":"main","class":"OC\\AppFramework\\App","type":"::","args":["OC\\Core\\Controller\\LoginController","tryLogin",{"__class__":"OC\\AppFramework\\DependencyInjection\\DIContainer"},{"_route":"core.login.tryLogin"}]},{"function":"__invoke","class":"OC\\AppFramework\\Routing\\RouteActionHandler","type":"->","args":[{"_route":"core.login.tryLogin"}]},{"file":"\/data\/www\/xxx.de\/public_data\/lib\/private\/Route\/Router.php","line":297,"function":"call_user_func","args":[{"__class__":"OC\\AppFramework\\Routing\\RouteActionHandler"},{"_route":"core.login.tryLogin"}]},{"file":"\/data\/www\/xxx.de\/public_data\/lib\/base.php","line":989,"function":"match","class":"OC\\Route\\Router","type":"->","args":["\/login"]},{"file":"\/data\/www\/xxx.de\/public_data\/index.php","line":42,"function":"handleRequest","class":"OC","type":"::","args":[]}],"File":"\/data\/www\/xxx.de\/public_data\/lib\/private\/Authentication\/Token\/PublicKeyTokenProvider.php","Line":300,"CustomMessage":"--"},"userAgent":"Mozilla\/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit\/537.36 (KHTML, like Gecko) Chrome\/69.0.3497.92 Safari\/537.36","version":"14.0.0.19"}

Browser log

Browser log
not relevant.

Same issue is reported here: https://help.nextcloud.com/t/nextcloud-runs-into-internal-errors-after-upgrade-from-v13-to-v14/36569
i cant find similar issue here as bug, so i added it.


文章来源: https://github.com/nextcloud/server/issues/11227
如有侵权请联系:admin#unsafe.sh