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]: LogController fails to poll after some update #1330

Closed
5 of 8 tasks
shaaati opened this issue Aug 4, 2024 · 3 comments
Closed
5 of 8 tasks

[Bug]: LogController fails to poll after some update #1330

shaaati opened this issue Aug 4, 2024 · 3 comments

Comments

@shaaati
Copy link

shaaati commented Aug 4, 2024

⚠️ This issue respects the following points: ⚠️

Bug description

When browing the log via /admin/logging, log entries seem to load correctly.
However, after a few seconds a popup message is shown stating "Neue Einträge konnten nicht abgerufen werden." (could not fetch new entries).
The log file shows multiple messages that look like this:

{"reqId":"gcFB6Yzf34GnQbf03qYj","level":3,"time":"2024-05-22T23:57:10+02:00","remoteAddr":"REDACTED","user":"nc-admin","app":"index","method":"GET","url":"/apps/logreader/api/poll?lastReqId=MIrK0trXG79ncKvZuYKc","message":"OCA\\LogReader\\Controller\\LogController::poll(): Argument nextcloud/server#1 ($lastReqId) must be of type string, null given, called in /var/www/nextcloud/lib/private/AppFramework/Http/Dispatcher.php on line 232 in file '/var/www/nextcloud/apps/logreader/lib/Controller/LogController.php' line 102","userAgent":"Mozilla/5.0 (Windows NT 10.0; Win64; x64; rv:126.0) Gecko/20100101 Firefox/126.0","version":"29.0.0.19","exception":{"Exception":"Exception","Message":"OCA\\LogReader\\Controller\\LogController::poll(): Argument nextcloud/server#1 ($lastReqId) must be of type string, null given, called in /var/www/nextcloud/lib/private/AppFramework/Http/Dispatcher.php on line 232 in file '/var/www/nextcloud/apps/logreader/lib/Controller/LogController.php' line 102","Code":0,"Trace":[{"file":"/var/www/nextcloud/lib/private/AppFramework/App.php","line":184,"function":"dispatch","class":"OC\\AppFramework\\Http\\Dispatcher","type":"->"},{"file":"/var/www/nextcloud/lib/private/Route/Router.php","line":338,"function":"main","class":"OC\\AppFramework\\App","type":"::"},{"file":"/var/www/nextcloud/lib/base.php","line":1050,"function":"match","class":"OC\\Route\\Router","type":"->"},{"file":"/var/www/nextcloud/index.php","line":49,"function":"handleRequest","class":"OC","type":"::"}],"File":"/var/www/nextcloud/lib/private/AppFramework/Http/Dispatcher.php","Line":170,"Previous":{"Exception":"TypeError","Message":"OCA\\LogReader\\Controller\\LogController::poll(): Argument nextcloud/server#1 ($lastReqId) must be of type string, null given, called in /var/www/nextcloud/lib/private/AppFramework/Http/Dispatcher.php on line 232","Code":0,"Trace":[{"file":"/var/www/nextcloud/lib/private/AppFramework/Http/Dispatcher.php","line":232,"function":"poll","class":"OCA\\LogReader\\Controller\\LogController","type":"->"},{"file":"/var/www/nextcloud/lib/private/AppFramework/Http/Dispatcher.php","line":138,"function":"executeController","class":"OC\\AppFramework\\Http\\Dispatcher","type":"->"},{"file":"/var/www/nextcloud/lib/private/AppFramework/App.php","line":184,"function":"dispatch","class":"OC\\AppFramework\\Http\\Dispatcher","type":"->"},{"file":"/var/www/nextcloud/lib/private/Route/Router.php","line":338,"function":"main","class":"OC\\AppFramework\\App","type":"::"},{"file":"/var/www/nextcloud/lib/base.php","line":1050,"function":"match","class":"OC\\Route\\Router","type":"->"},{"file":"/var/www/nextcloud/index.php","line":49,"function":"handleRequest","class":"OC","type":"::"}],"File":"/var/www/nextcloud/apps/logreader/lib/Controller/LogController.php","Line":102},"message":"OCA\\LogReader\\Controller\\LogController::poll(): Argument nextcloud/server#1 ($lastReqId) must be of type string, null given, called in /var/www/nextcloud/lib/private/AppFramework/Http/Dispatcher.php on line 232 in file '/var/www/nextcloud/apps/logreader/lib/Controller/LogController.php' line 102","exception":{},"CustomMessage":"OCA\\LogReader\\Controller\\LogController::poll(): Argument nextcloud/server#1 ($lastReqId) must be of type string, null given, called in /var/www/nextcloud/lib/private/AppFramework/Http/Dispatcher.php on line 232 in file '/var/www/nextcloud/apps/logreader/lib/Controller/LogController.php' line 102"}}

These entries keep popping up as long as I keep the logging webview open.

By analyzing the log file with grep I found that the issue first started on 2023-08-28 (almost a year ago), when I conducted some major updates. Analyzing the "version" tag in the log entries, it seems that I upgraded from 25.0.2.3 to 27.0.2.1 on that day using multiple incremental steps).

They still appear today, after I upgraded to 29.0.4 (so it's not related to some old and unsupported version).

Steps to reproduce

  1. It likely shouldn't be the case on a correctly-working instance, but for me it is just "open /admin/logging" in any webbrowser.

Expected behavior

Load new log entries without any error.

Installation method

None

Nextcloud Server version

29

Operating system

None

PHP engine version

PHP 8.1

Web server

Nginx

Database engine version

PostgreSQL

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

Upgraded to a MAJOR version (ex. 28 to 29)

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

I suppose this is irrelevant, but I can offer further info if requested.

List of activated Apps

I suppose this is irrelevant, but I can offer further info if requested.

Nextcloud Signing status

No errors have been found.

Nextcloud Logs

See above

Additional info

No response

@joshtrichards
Copy link
Member

joshtrichards commented Aug 4, 2024

This is likely a configuration problem. Probably related to opcache.save_comments or some other similar local adjustment you've made to your PHP configuration which isn't compatible with Nextcloud. I suggest reviewing the Admin Manual (e.g. https://docs.nextcloud.com/server/latest/admin_manual/installation/server_tuning.html#comments) and following up at the help forum for assistance - https://help.nextcloud.com

@joshtrichards joshtrichards transferred this issue from nextcloud/server Aug 4, 2024
@shaaati
Copy link
Author

shaaati commented Aug 5, 2024

I checked my php.ini and nginx.conf multiple times and couldn't find any obvious mistake, but as advised I opened a thread on help.nextcloud.com: https://help.nextcloud.com/t/logcontroller-fails-to-poll-after-some-update/200167

Will use the forum for further troubleshooting unless I find something that indicates an actual bug.

@shaaati
Copy link
Author

shaaati commented Aug 8, 2024

Turns out I had a mistake in my nginx config (/index.php?request_uri instead of /index.php$request_uri).

Closing this as "not a bug, but a user error".

@shaaati shaaati closed this as completed Aug 8, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

2 participants