[SOLVED ]Upgrade to buster problems

Steps to reproduce

1.Normal debian 9 Server with working owncloud behind apache reverse proxy
2. upgrade to debian 10 , buster

Expected behaviour

The webserver and owncloud should have been fine and everything shoudl have worked without problems

Actual behaviour

Normaly I access owncloud over the url https://my-url.de/owncloud and so did all windows clients.
Now, that doesn’t work anymore and I have to access it over https://my-url.de/owncloud/ which is not a big proplem but my clients show this message.

Server configuration

Operating system:
debian buster
Web server:
apache2
Database:
Mysql
PHP version:
7.3
ownCloud version: (see ownCloud admin page)
10.3.2.2

Updated from an older ownCloud or fresh install:

Where did you install ownCloud from:
I download the zip file from theowncloud webpage

{
    "system": {
        "instanceid": "ocd4besfiu0a",
        "datadirectory": "\/owncloud\/files",
        "dbtype": "mysql",
        "dbname": "owncloud",
        "dbhost": "localhost",
        "dbpassword": "***REMOVED SENSITIVE VALUE***",
        "dbuser": "***REMOVED SENSITIVE VALUE***",
        "trusted_proxies": [
            "ipadress"
        ],
        "overwritephost": "https:\/\/hostname",
        "overwriteprotocol": "https",
        "overwriteconaddr": "^IP-address",
        "passwordsalt": "***REMOVED SENSITIVE VALUE***",
        "secret": "***REMOVED SENSITIVE VALUE***",
        "trusted_domains": [
            "hostname.de",
      ],
        "overwritewebroot": "\/owncloud",
        "overwrite.cli.url": "https:\/\/hostname.de\/owncloud",
        "version": "10.3.2.2",
        "default_language": "de",
        "dbtableprefix": "oc_",
        "logtimezone": "UTC",
        "installed": true,
        "ldapIgnoreNamingRules": false,
        "theme": "",
        "excluded_directories": [
            "theme-custom",
            "Impressum"
        ],
        "integrity.excluded.files": [
            "Impressum\/index.php",
            "Impressum\/style.css"
        ],
        "integrity.ignore.missing.app.signature": "[theme-medfak]",
        "loglevel": 2,
        "maintenance": false,
        "trashbin_retention_obligation": "auto",
        "mail_from_address": "***REMOVED SENSITIVE VALUE***",
        "mail_smtpmode": "sendmail",
        "mail_domain": "***REMOVED SENSITIVE VALUE***",
        "filelocking.enabled": true,
        "forwarded_for_headers": [
            "HTTP_X_FORWARDED",
            "HTTP_FORWARDED_FOR"
        ],
        "redis": {
            "host": "192.168.13.95",
            "port": 6379,
            "timeout": 0,
            "password": "***REMOVED SENSITIVE VALUE***",
            "dbindex": 0
        },
        "singleuser": false
    }
}

List of activated apps:


Enabled:
  - activity: 2.5.0
  - announcementcenter: 1.2.1
  - comments: 0.3.0
  - configreport: 0.2.0
  - dav: 0.5.0
  - federatedfilesharing: 0.5.0
  - federation: 0.1.0
  - files: 1.5.2
  - files_external: 0.7.1
  - files_mediaviewer: 1.0.1
  - files_pdfviewer: 0.11.0
  - files_sharing: 0.12.0
  - files_texteditor: 2.3.0
  - files_trashbin: 0.9.1
  - files_versions: 1.3.0
  - firstrunwizard: 1.2.0
  - gallery: 16.1.1
  - impersonate: 0.5.0
  - market: 0.5.0
  - notifications: 0.5.0
  - onlyoffice: 3.0.3
  - provisioning_api: 0.5.0
  - systemtags: 0.3.0
  - templateeditor: 0.4.0
  - theme-custom: 1.0.0
  - updatenotification: 0.2.1
  - user_ldap: 0.13.0
Disabled:
  - encryption
  - external
  - user_external

Are you using an external user-backend, if yes which one: LDAP/ActiveDirectory/Webdav/…
Ldap User backend

Client configuration

Browser:
Firefox 72.01
Operating system:
Windows 10

Logs

Web server error log

[Thu Jan 16 08:43:37.024828 2020] [mpm_prefork:notice] [pid 10827] AH00163: Apache/2.4.38 (Debian) OpenSSL/1.1.1d configured -- resuming normal operations
[Thu Jan 16 08:43:37.024924 2020] [core:notice] [pid 10827] AH00094: Command line: '/usr/sbin/apache2'
[Thu Jan 16 08:44:32.350051 2020] [mpm_prefork:notice] [pid 10827] AH00169: caught SIGTERM, shutting down
[Thu Jan 16 08:44:32.607325 2020] [mpm_prefork:notice] [pid 10900] AH00163: Apache/2.4.38 (Debian) OpenSSL/1.1.1d configured -- resuming normal operations
[Thu Jan 16 08:44:32.607425 2020] [core:notice] [pid 10900] AH00094: Command line: '/usr/sbin/apache2'

ownCloud log (data/owncloud.log)

{"reqId":"0761ef6b-b4ab-4b77-a77e-5d799d2f2030","level":3,"time":"2020-01-16T08:02:58+00:00","remoteAddr":"ip address","user":"--","app":"PHP","method":"PROPFIND","url":"\/owncloud\/remote.php\/webdav\/","message":"Non-static method OCA\\User_LDAP\\Helper::loginName2UserName() should not be called statically at \/var\/www\/owncloud-10.3.2\/lib\/private\/legacy\/hook.php#103"}
{"reqId":"0761ef6b-b4ab-4b77-a77e-5d799d2f2030","level":4,"time":"2020-01-16T08:02:58+00:00","remoteAddr":"192.168.13.47","user":"--","app":"webdav","method":"PROPFIND","url":"\/owncloud\/remote.php\/webdav\/","message":"Exception: Using $this when not in object context: {\"Exception\":\"Error\",\"Message\":\"Using $this when not in object context\",\"Code\":0,\"Trace\":\"#0 \\\/var\\\/www\\\/owncloud-10.3.2\\\/lib\\\/private\\\/legacy\\\/hook.php(103): OCA\\\\User_LDAP\\\\Helper::loginName2UserName(Array)\\n#1 \\\/var\\\/www\\\/owncloud-10.3.2\\\/lib\\\/public\\\/Util.php(494): OC_Hook::emit('\\\\\\\\OCA\\\\\\\\Files_Shar...', 'preLoginNameUse...', Array)\\n#2 \\\/var\\\/www\\\/owncloud-10.3.2\\\/lib\\\/private\\\/User\\\/Session.php(396): OCP\\\\Util::emitHook('\\\\\\\\OCA\\\\\\\\Files_Shar...', 'preLoginNameUse...', Array)\\n#3 \\\/var\\\/www\\\/owncloud-10.3.2\\\/lib\\\/private\\\/User\\\/Session.php(356): OC\\\\User\\\\Session->isTwoFactorEnforced('uw141')\\n#4 \\\/var\\\/www\\\/owncloud-10.3.2\\\/apps\\\/dav\\\/lib\\\/Connector\\\/Sabre\\\/Auth.php(131): OC\\\\User\\\\Session->logClientIn(*** sensitive parameters replaced ***)\\n#5 \\\/var\\\/www\\\/owncloud-10.3.2\\\/lib\\\/composer\\\/sabre\\\/dav\\\/lib\\\/DAV\\\/Auth\\\/Backend\\\/AbstractBasic.php(106): OCA\\\\DAV\\\\Connector\\\\Sabre\\\\Auth->validateUserPass(*** sensitive parameters replaced ***)\\n#6 \\\/var\\\/www\\\/owncloud-10.3.2\\\/apps\\\/dav\\\/lib\\\/Connector\\\/Sabre\\\/Auth.php(239): Sabre\\\\DAV\\\\Auth\\\\Backend\\\\AbstractBasic->check(Object(Sabre\\\\HTTP\\\\Request), Object(Sabre\\\\HTTP\\\\Response))\\n#7 \\\/var\\\/www\\\/owncloud-10.3.2\\\/apps\\\/dav\\\/lib\\\/Connector\\\/Sabre\\\/Auth.php(156): OCA\\\\DAV\\\\Connector\\\\Sabre\\\\Auth->auth(Object(Sabre\\\\HTTP\\\\Request), Object(Sabre\\\\HTTP\\\\Response))\\n#8 \\\/var\\\/www\\\/owncloud-10.3.2\\\/lib\\\/composer\\\/sabre\\\/dav\\\/lib\\\/DAV\\\/Auth\\\/Plugin.php(192): OCA\\\\DAV\\\\Connector\\\\Sabre\\\\Auth->check(Object(Sabre\\\\HTTP\\\\Request), Object(Sabre\\\\HTTP\\\\Response))\\n#9 \\\/var\\\/www\\\/owncloud-10.3.2\\\/lib\\\/composer\\\/sabre\\\/dav\\\/lib\\\/DAV\\\/Auth\\\/Plugin.php(144): Sabre\\\\DAV\\\\Auth\\\\Plugin->check(Object(Sabre\\\\HTTP\\\\Request), Object(Sabre\\\\HTTP\\\\Response))\\n#10 \\\/var\\\/www\\\/owncloud-10.3.2\\\/lib\\\/composer\\\/sabre\\\/event\\\/lib\\\/WildcardEmitterTrait.php(96): Sabre\\\\DAV\\\\Auth\\\\Plugin->beforeMethod(Object(Sabre\\\\HTTP\\\\Request), Object(Sabre\\\\HTTP\\\\Response))\\n#11 \\\/var\\\/www\\\/owncloud-10.3.2\\\/lib\\\/composer\\\/sabre\\\/dav\\\/lib\\\/DAV\\\/Server.php(448): Sabre\\\\DAV\\\\Server->emit('beforeMethod:PR...', Array)\\n#12 \\\/var\\\/www\\\/owncloud-10.3.2\\\/lib\\\/composer\\\/sabre\\\/dav\\\/lib\\\/DAV\\\/Server.php(241): Sabre\\\\DAV\\\\Server->invokeMethod(Object(Sabre\\\\HTTP\\\\Request), Object(Sabre\\\\HTTP\\\\Response))\\n#13 \\\/var\\\/www\\\/owncloud-10.3.2\\\/lib\\\/composer\\\/sabre\\\/dav\\\/lib\\\/DAV\\\/Server.php(309): Sabre\\\\DAV\\\\Server->start()\\n#14 \\\/var\\\/www\\\/owncloud-10.3.2\\\/apps\\\/dav\\\/appinfo\\\/v1\\\/webdav.php(65): Sabre\\\\DAV\\\\Server->exec()\\n#15 \\\/var\\\/www\\\/owncloud-10.3.2\\\/remote.php(165): require_once('\\\/var\\\/www\\\/ownclo...')\\n#16 {main}\",\"File\":\"\\\/var\\\/www\\\/owncloud-10.3.2\\\/apps\\\/user_ldap\\\/lib\\\/Helper.php\",\"Line\":199}"}

apache conf

<VirtualHost *:80>
        # The ServerName directive sets the request scheme, hostname and port that
        # the server uses to identify itself. This is used when creating
        # redirection URLs. In the context of virtual hosts, the ServerName
        # specifies what hostname must appear in the request's Host: header to
        # match this virtual host. For the default virtual host (this file) this
        # value is not decisive as it is used as a last resort host regardless.
        # However, you must set it for any further virtual host explicitly.
        #ServerName www.example.com

        ServerAdmin webmaster@localhost
        DocumentRoot /var/www/owncloud/

        Alias /owncloud "/var/www/owncloud"
        <Location /var/www/owncloud>
        Options +FollowSymlinks
        AllowOverride ALL

        </Location>


        # Available loglevels: trace8, ..., trace1, debug, info, notice, warn,
        # error, crit, alert, emerg.
        # It is also possible to configure the loglevel for particular
        # modules, e.g.
        #LogLevel info ssl:warn

        ErrorLog ${APACHE_LOG_DIR}/error.log
        CustomLog ${APACHE_LOG_DIR}/access.log combined

        # For most configuration files from conf-available/, which are
        # enabled or disabled at a global level, it is possible to
        # include a line for only one particular virtual host. For example the
        # following line enables the CGI configuration for this host only
        # after it has been globally disabled with "a2disconf".
        #Include conf-available/serve-cgi-bin.conf

# vim: syntax=apache ts=4 sw=4 sts=4 sr noet

#Header always set X-FRAME-OPTIONS SAMEORIGIN


</VirtualHost>
 proxy conf 

Define VPATH /owncloud
Define DS_ADDRESS 192.168.13.55
 
  Alias owncloud ${VPATH}
          ProxyPass ${VPATH} "http://${DS_ADDRESS}/owncloud"
          ProxyPassReverse ${VPATH} "http://${DS_ADDRESS}/owncloud"
 
  <Location ${VPATH}>
  ProxyPreserveHost On
          Require all granted
          SetEnvIf Host "^(.*)$" THE_HOST=$1
          RequestHeader setifempty X-Forwarded-Proto https
          RequestHeader setifempty X-Forwarded-Host %{THE_HOST}e
          #caused header error after login on e.g. Chrome, mobile Browsers, etc.
          #RequestHeader edit X-Forwarded-Host (.*) $1${VPATH}
          ProxyAddHeaders ON
  </Location>

There should be an error in the apache error logs, when there is a Server 500 Error.
Can you have a look there and see if there is more information?

Question is also whether the error comes from the reverse proxy or the ownCloud apache?

URL:443 SOME.IP - - [16/Jan/2020:09:58:19 +0100] “PROPFIND /owncloud/remote.php/webdav/ HTTP/1.1” 500 886 “-” “Mozilla/5.0 (Windows) mirall/2.6.0 (build 12644)”
URL:443 SOME.IP - - [16/Jan/2020:09:58:20 +0100] “PROPFIND /owncloud/remote.php/webdav/ HTTP/1.1” 500 886 “-” “Mozilla/5.0 (Windows) mirall/2.6.0 (build 12644)”
that’s the error I get on my proxy

I searched the exception in your ownCloud log and found the following forums post:

Vielen Dank // Thank you
That helped

1 Like