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

Upgrade from 27.1.3 to 28.0.0 nextcloud:apache produces file not found for /dev/stdout and no logs within nextcloud #2119

Closed
DanClarke-io opened this issue Dec 13, 2023 · 4 comments

Comments

@DanClarke-io
Copy link

DanClarke-io commented Dec 13, 2023

Following a update for nextcloud:apache from 27.1.3 to 28.0.0 by pulling latest docker image:

When checking the admin/overview I get an error of Error occurred whilst checking server setup

This is what shows in my app docker:
{"reqId":"wOQ19LBGxOkyZwkkeOMt","level":3,"time":"2023-12-13T10:05:34+00:00","remoteAddr":"XXX","user":"dan","app":"index","method":"GET","url":"/index.php/settings/ajax/checksetup","message":"Error while opening /dev/stdout","userAgent":"Mozilla/5.0 (Macintosh; Intel Mac OS X 10.15; rv:120.0) Gecko/20100101 Firefox/120.0","version":"28.0.0.11","exception":{"Exception":"Exception","Message":"Error while opening /dev/stdout","Code":0,"Trace":[{"file":"/var/www/html/apps/logreader/lib/SetupChecks/LogErrors.php","line":57,"function":"getLogIterator","class":"OCA\\\\LogReader\\\\Log\\\\LogIteratorFactory","type":"->","args":[[2,3,4]]},{"file":"/var/www/html/lib/private/SetupCheck/SetupCheckManager.php","line":49,"function":"run","class":"OCA\\\\LogReader\\\\SetupChecks\\\\LogErrors","type":"->","args":[]},{"file":"/var/www/html/apps/settings/lib/Controller/CheckSetupController.php","line":643,"function":"runAll","class":"OC\\\\SetupCheck\\\\SetupCheckManager","type":"->","args":[]},{"file":"/var/www/html/lib/private/AppFramework/Http/Dispatcher.php","line":230,"function":"check","class":"OCA\\\\Settings\\\\Controller\\\\CheckSetupController","type":"->","args":[]},{"file":"/var/www/html/lib/private/AppFramework/Http/Dispatcher.php","line":137,"function":"executeController","class":"OC\\\\AppFramework\\\\Http\\\\Dispatcher","type":"->","args":[["OCA\\\\Settings\\\\Controller\\\\CheckSetupController"],"check"]},{"file":"/var/www/html/lib/private/AppFramework/App.php","line":184,"function":"dispatch","class":"OC\\\\AppFramework\\\\Http\\\\Dispatcher","type":"->","args":[["OCA\\\\Settings\\\\Controller\\\\CheckSetupController"],"check"]},{"file":"/var/www/html/lib/private/Route/Router.php","line":315,"function":"main","class":"OC\\\\AppFramework\\\\App","type":"::","args":["OCA\\\\Settings\\\\Controller\\\\CheckSetupController","check",["OC\\\\AppFramework\\\\DependencyInjection\\\\DIContainer"],["settings.CheckSetup.check"]]},{"file":"/var/www/html/lib/base.php","line":1069,"function":"match","class":"OC\\\\Route\\\\Router","type":"->","args":["/settings/ajax/checksetup"]},{"file":"/var/www/html/index.php","line":39,"function":"handleRequest","class":"OC","type":"::","args":[]}],"File":"/var/www/html/apps/logreader/lib/Log/LogIteratorFactory.php","Line":56,"message":"Error while opening /dev/stdout","exception":{},"CustomMessage":"Error while opening /dev/stdout"}}

File is present under app docker:

$ docker exec --user 33 nextcloud-app-1 ls -la /dev/std*
lrwxrwxrwx 1 root root 15 Dec 13 10:02 /dev/stderr -> /proc/self/fd/2
lrwxrwxrwx 1 root root 15 Dec 13 10:02 /dev/stdin -> /proc/self/fd/0
lrwxrwxrwx 1 root root 15 Dec 13 10:02 /dev/stdout -> /proc/self/fd/1

I can also not load logging within nextcloud:
Screenshot 2023-12-13 at 10 15 04

Docker compose config:

version: '3'

services:
  db:
    image: mariadb:10.5
    command: --transaction-isolation=READ-COMMITTED --binlog-format=ROW
    restart: always
    volumes:
      - db:/var/lib/mysql
    environment:
      - MYSQL_ROOT_PASSWORD=XXX
      - MYSQL_PASSWORD=XXX
      - MYSQL_DATABASE=nextcloud
      - MYSQL_USER=nextcloud
      
  redis:
    image: redis:alpine
    restart: always

  app:
    image: nextcloud:apache
    # user: www-data
    dns:
      8.8.8.8
    restart: always
    volumes:
      - "/sharedfolders/SharedData/nextcloud:/var/www/html"
    environment:
      - VIRTUAL_HOST=XXX
      - LETSENCRYPT_HOST=XXX
      - LETSENCRYPT_EMAIL=XXX
      - MYSQL_HOST=db
      - REDIS_HOST=redis
      - MYSQL_ROOT_PASSWORD=XXX
      - MYSQL_PASSWORD=XXX
      - MYSQL_DATABASE=nextcloud
      - MYSQL_USER=nextcloud
    depends_on:
      - db
      - redis
    networks:
      - proxy-tier
      - default

  cron:
    image: nextcloud:apache
    dns:
      8.8.8.8
    restart: always
    volumes:
      - "/sharedfolders/SharedData/nextcloud:/var/www/html"
    entrypoint: /cron.sh
    depends_on:
      - db
      - redis

  proxy:
    image: nginxproxy/nginx-proxy:alpine
    dns:
      8.8.8.8
    restart: always
    ports:
      - 80:80
      - 443:443
    labels:
      com.github.jrcs.letsencrypt_nginx_proxy_companion.nginx_proxy: "true"
    volumes:
      - certs:/etc/nginx/certs:ro
      - vhost.d:/etc/nginx/vhost.d
      - html:/usr/share/nginx/html
      - /var/run/docker.sock:/tmp/docker.sock:ro
      - /opt/nextcloud-apache/uploadsize.conf:/etc/nginx/conf.d/uploadsize.conf
    networks:
      - proxy-tier


  letsencrypt-companion:
    image: nginxproxy/acme-companion
    restart: always
    volumes:
      - certs:/etc/nginx/certs
      - acme:/etc/acme.sh
      - vhost.d:/etc/nginx/vhost.d
      - html:/usr/share/nginx/html
      - /var/run/docker.sock:/var/run/docker.sock:ro
    networks:
      - proxy-tier
    depends_on:
      - proxy


volumes:
  db:
  nextcloud:
  certs:
  acme:
  vhost.d:
  html:

networks:
  proxy-tier:
@urbenlegend
Copy link

urbenlegend commented Dec 13, 2023

I am not getting the admin/overview issue, but I am seeing the issue with the logs. It appears to not load initially and displays the "Could not load log entries" message, but after waiting for a long time, like about half a minute, the logs reappear. This seems really slow.

@isdnfan
Copy link

isdnfan commented Dec 13, 2023

empty logs is upstream issue from the server nextcloud/logreader#1073

@joshtrichards
Copy link
Member

@DanClarke-io What is your Nextcloud config.php logfile set to? Is it /dev/stdout by chance?

@DanClarke-io
Copy link
Author

DanClarke-io commented Dec 14, 2023

@DanClarke-io What is your Nextcloud config.php logfile set to? Is it /dev/stdout by chance?

It is! Thank you @joshtrichards, I've updated it to the following and the error has now gone away, thank you:

'log_type' => 'errorlog',
'logfile' => '',

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

4 participants