Unable to generate URLs after update from 23.0.0.10 to 23.0.2.1

Nextcloud version (eg, 20.0.5): 23.0.2
Operating system and version (eg, Ubuntu 20.04): CentOS 7
Apache or nginx version (eg, Apache 2.4.25): lighttpd 1.4.54
PHP version (eg, 7.4): 7.4.28

The issue you are facing:

After updating from 23.0.0 to 23.0.2, I am unable to access the server using the web interface or app. The web interface sits at the Maintenance Mode screen, but the server is not in maintenance mode.

Is this the first time you’ve seen this error? (Y/N): Y

Steps to replicate it:

  1. Upgrade server using the regular process I’ve used since version 16
  2. Click the ‘continue to Nextcloud’ button when the upgrade is complete
  3. That’s all I did!

The output of your Nextcloud log in Admin > Logging:

… I have all 437 lines of nextcloud.log that were generated during the upgrade, but there is not a single error until I try to access the server when the upgrade is complete. Since there are a lot of duplicated messages, I’ve pruned this a bit but here is the end of the upgrade, and the last line is the error that seems important:

{"reqId":"YLgplqwYxOIbVQ0wl2kC","level":1,"time":"2022-02-27T05:12:00+00:00","remoteAddr":"my.ip.address","user":"--","app":"updater","method":"GET","url":"/core/ajax/update.php?requesttoken=7n69%2BpNe7EbZNN6q4DOHVp7F%2FjfAct9KU6YigxuRlRk%3D%3AnDr3o9tmgDCyVaT5jXHdJ9mOpGGUNpgNIvFqwlm6rHw%3D","message":"\\OC\\Repair::step: Repair step: Add background job to set the lookup server share state for users","userAgent":"Mozilla/5.0 (Windows NT 10.0; Win64; x64; rv:97.0) Gecko/20100101 Firefox/97.0","version":"23.0.0.10"}
{"reqId":"YLgplqwYxOIbVQ0wl2kC","level":1,"time":"2022-02-27T05:12:00+00:00","remoteAddr":"my.ip.address","user":"--","app":"updater","method":"GET","url":"/core/ajax/update.php?requesttoken=7n69%2BpNe7EbZNN6q4DOHVp7F%2FjfAct9KU6YigxuRlRk%3D%3AnDr3o9tmgDCyVaT5jXHdJ9mOpGGUNpgNIvFqwlm6rHw%3D","message":"\\OC\\Updater::startCheckCodeIntegrity: Starting code integrity check...","userAgent":"Mozilla/5.0 (Windows NT 10.0; Win64; x64; rv:97.0) Gecko/20100101 Firefox/97.0","version":"23.0.0.10"}
{"reqId":"YLgplqwYxOIbVQ0wl2kC","level":1,"time":"2022-02-27T05:12:11+00:00","remoteAddr":"my.ip.address","user":"--","app":"updater","method":"GET","url":"/core/ajax/update.php?requesttoken=7n69%2BpNe7EbZNN6q4DOHVp7F%2FjfAct9KU6YigxuRlRk%3D%3AnDr3o9tmgDCyVaT5jXHdJ9mOpGGUNpgNIvFqwlm6rHw%3D","message":"\\OC\\Updater::finishedCheckCodeIntegrity: Finished code integrity check","userAgent":"Mozilla/5.0 (Windows NT 10.0; Win64; x64; rv:97.0) Gecko/20100101 Firefox/97.0","version":"23.0.0.10"}
{"reqId":"YLgplqwYxOIbVQ0wl2kC","level":1,"time":"2022-02-27T05:12:11+00:00","remoteAddr":"my.ip.address","user":"--","app":"updater","method":"GET","url":"/core/ajax/update.php?requesttoken=7n69%2BpNe7EbZNN6q4DOHVp7F%2FjfAct9KU6YigxuRlRk%3D%3AnDr3o9tmgDCyVaT5jXHdJ9mOpGGUNpgNIvFqwlm6rHw%3D","message":"\\OC\\Updater::updateEnd: Update successful","userAgent":"Mozilla/5.0 (Windows NT 10.0; Win64; x64; rv:97.0) Gecko/20100101 Firefox/97.0","version":"23.0.2.1"}
{"reqId":"YLgplqwYxOIbVQ0wl2kC","level":1,"time":"2022-02-27T05:12:11+00:00","remoteAddr":"my.ip.address","user":"--","app":"updater","method":"GET","url":"/core/ajax/update.php?requesttoken=7n69%2BpNe7EbZNN6q4DOHVp7F%2FjfAct9KU6YigxuRlRk%3D%3AnDr3o9tmgDCyVaT5jXHdJ9mOpGGUNpgNIvFqwlm6rHw%3D","message":"\\OC\\Updater::maintenanceDisabled: Turned off maintenance mode","userAgent":"Mozilla/5.0 (Windows NT 10.0; Win64; x64; rv:97.0) Gecko/20100101 Firefox/97.0","version":"23.0.2.1"}
{"reqId":"YLgplqwYxOIbVQ0wl2kC","level":1,"time":"2022-02-27T05:12:11+00:00","remoteAddr":"my.ip.address","user":"--","app":"updater","method":"GET","url":"/core/ajax/update.php?requesttoken=7n69%2BpNe7EbZNN6q4DOHVp7F%2FjfAct9KU6YigxuRlRk%3D%3AnDr3o9tmgDCyVaT5jXHdJ9mOpGGUNpgNIvFqwlm6rHw%3D","message":"\\OC\\Updater::resetLogLevel: Reset log level to Warning(2)","userAgent":"Mozilla/5.0 (Windows NT 10.0; Win64; x64; rv:97.0) Gecko/20100101 Firefox/97.0","version":"23.0.2.1"}
{"reqId":"wC361yLVJLplcBEcZgby","level":1,"time":"2022-02-27T05:12:17+00:00","remoteAddr":"my.ip.address","user":"--","app":"no app in context","method":"GET","url":"/index.php/apps/files/","message":"Unable to generate a URL for the named route \"ocs.files.DirectEditing.info\" as such route does not exist.","userAgent":"Mozilla/5.0 (Windows NT 10.0; Win64; x64; rv:97.0) Gecko/20100101 Firefox/97.0","version":"23.0.0.10","exception":{"Exception":"Symfony\\Component\\Routing\\Exception\\RouteNotFoundException","Message":"Unable to generate a URL for the named route \"ocs.files.DirectEditing.info\" as such route does not exist.","Code":0,"Trace":[{"file":"/full/valid/pathname/of/server/files/lib/private/Route/Router.php","line":365,"function":"generate","class":"Symfony\\Component\\Routing\\Generator\\UrlGenerator","type":"->","args":["ocs.files.DirectEditing.info",[],1]},{"file":"/full/valid/pathname/of/server/files/lib/private/Route/CachingRouter.php","line":59,"function":"generate","class":"OC\\Route\\Router","type":"->","args":["ocs.files.DirectEditing.info",[],false]},{"file":"/full/valid/pathname/of/server/files/lib/private/URLGenerator.php","line":107,"function":"generate","class":"OC\\Route\\CachingRouter","type":"->","args":["ocs.files.DirectEditing.info",[],false]},{"file":"/full/valid/pathname/of/server/files/apps/files/lib/Capabilities.php","line":71,"function":"linkToOCSRouteAbsolute","class":"OC\\URLGenerator","type":"->","args":["files.DirectEditing.info"]},{"file":"/full/valid/pathname/of/server/files/lib/private/CapabilitiesManager.php","line":69,"function":"getCapabilities","class":"OCA\\Files\\Capabilities","type":"->","args":[]},{"file":"/full/valid/pathname/of/server/files/lib/private/Template/JSConfigHelper.php","line":190,"function":"getCapabilities","class":"OC\\CapabilitiesManager","type":"->","args":[]},{"file":"/full/valid/pathname/of/server/files/lib/private/TemplateLayout.php","line":234,"function":"getConfig","class":"OC\\Template\\JSConfigHelper","type":"->","args":[]},{"file":"/full/valid/pathname/of/server/files/lib/private/legacy/OC_Template.php","line":182,"function":"__construct","class":"OC\\TemplateLayout","type":"->","args":["guest",""]},{"file":"/full/valid/pathname/of/server/files/lib/private/Template/Base.php","line":132,"function":"fetchPage","class":"OC_Template","type":"->","args":[]},{"file":"/full/valid/pathname/of/server/files/lib/base.php","line":297,"function":"printPage","class":"OC\\Template\\Base","type":"->","args":[]},{"file":"/full/valid/pathname/of/server/files/lib/base.php","line":949,"function":"checkMaintenanceMode","class":"OC","type":"::","args":[{"__class__":"OC\\SystemConfig"}]},{"file":"/full/valid/pathname/of/server/files/index.php","line":36,"function":"handleRequest","class":"OC","type":"::","args":[]}],"File":"/full/valid/pathname/of/server/files/3rdparty/symfony/routing/Generator/UrlGenerator.php","Line":143,"CustomMessage":"--"}}

… note that the URL generation error is repeated several times for other URLs that it’s trying to generate, but it’s the same chain every time.

The output of your config.php file in /path/to/nextcloud (make sure you remove any identifiable information!):

<?php
$CONFIG = array (
  'datadirectory' => '/correct/path',
  'passwordsalt' => 'gibberish',
  'secret' => 'more gibberish',
  'trusted_domains' =>
  array (
    0 => 'my.domain.com',
  ),
  'overwrite.cli.url' => 'http://my.domain.com',
  'dbtype' => 'mysql',
  'version' => '23.0.2.1',
  'installed' => true,
  'instanceid' => 'gibberish',
  'maintenance' => false,
  'forcessl' => true,
  'overwriteprotocol' => 'https',
  'dbname' => 'correct_dbname',
  'dbhost' => 'correct_dbhost',
  'dbuser' => 'correct_dbuser',
  'dbpassword' => 'ExtremelyGoodPassword',
  'memcache.local' => '\\OC\\Memcache\\APCu',
  'memcache.distributed' => '\\OC\\Memcache\\Redis',
  'redis' => [
    'host' => '/path/to/redis-server.sock',
    'port' => 0,
  ],
  'memcache.locking' => '\\OC\\Memcache\\Redis',
  'mysql.utf8mb4' => true,
  'ldapIgnoreNamingRules' => false,
  'ldapProviderFactory' => '\\OCA\\User_LDAP\\LDAPProviderFactory',
  'mail_from_address' => 'postmaster',
  'mail_smtpmode' => 'smtp',
  'mail_domain' => 'my.domain.com',
  'updater.release.channel' => 'stable',
  'theme' => '',
  'loglevel' => 2,
  'mail_smtphost' => 'localhost',
  'mail_sendmailmode' => 'smtp',
  'mail_smtpport' => '25',
  'default_phone_region' => 'US',
  'has_rebuilt_cache' => true,
  'app_install_overwrite' =>
  array (
    0 => 'breezedark',
    1 => 'bookmarks',
    2 => 'carnet',
  ),
);

The output of your Apache/nginx/system log in /var/log/____:

… The server is running on CentOS 7 using Lighttpd, not in Docker, not using nginx. The setup has worked since NC16. There are no errors in the MariaDB or lighttpd logs. None of those configurations changed, that I’m aware of. Caveat: just before doing this upgrade, I upgraded the MariaDB packages and restarted the server. Other things which access the server don’t seem to have any problems, but I didn’t check Nextcloud between performing that update and the Nextcloud one. Mariadb is currently version 10.2.43.

Things I’ve tried:

sudo -u [user] php occ maintenance:repair

(completes with no complaints)

sudo -u [user] php occ maintenance:mode --off

(tells me that maintenance mode is already off)

sudo -u [user] /usr/local/bin/php occ files:scan --all

(just for fun; no change)

I’ve also tried restoring the nextcloud directory from the backup taken immediately before the upgrade, which was working, and it gives me the same behavior, so I feel like this is somehow involving the database.

Any hints on where to look next would be appreciated!

Thanks

1 Like

LOL OK never mind, I rebooted the server and it is magically working. I have no idea why but I won’t complain.

2 Likes

I too encountered a similar problem. However, I also rebooted the server and it worked!!!