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

[docker-compose] Pulling newest Nextcloud-FPM-Alpine gives me an "Internal Server Error" #1277

Closed
bjarnemagnussen opened this issue Oct 17, 2020 · 1 comment

Comments

@bjarnemagnussen
Copy link

bjarnemagnussen commented Oct 17, 2020

I just ran docker-compose pull && docker-compose up -d, which updated my Nextcloud instance from 19.0.3 to 20.x. This however left me with an "Internal Server Error", that I cannot resolve.

I am using the configuration found at https://github.com/nextcloud/docker/tree/master/.examples/docker-compose/with-nginx-proxy-self-signed-ssl/mariadb/fpm.

I have also tried to use the very basic Apache installation, which leaves me with the same issue.

// Edit:
The logs for app simply shows "GET /index.php" 500, whereas when using the basic Apache version:

{
    "reqId": "zvJbAmLWqPJleaRZBapb",
    "level": 3,
    "time": "2020-10-17T11:46:17+00:00",
    "remoteAddr": "192.168.0.104",
    "user": "--",
    "app": "PHP",
    "method": "GET",
    "url": "/",
    "message": {
        "Exception": "Error",
        "Message": "touch(): Utime failed: Permission denied at /var/www/html/lib/private/Config.php#242",
        "Code": 0,
        "Trace": [{
            "function": "onError",
            "class": "OC\\\\Log\\\\ErrorHandler",
            "type": "::",
            "args": [2, "touch(): Utime failed: Permission denied", "/var/www/html/lib/private/Config.php", 242, {
                "content": "<?php\\n$CONFIG = array (\\n  'memcache.local' => '\\\\\\\\OC\\\\\\\\Memcache\\\\\\\\APCu',\\n  'apps_paths' => \\n  array (\\n    0 => \\n    array (\\n      'path' => '/var/www/html/apps',\\n      'url' => '/apps',\\n      'writable' => false,\\n    ),\\n    1 => \\n    array (\\n      'path' => '/var/www/html/custom_apps',\\n      'url' => '/custom_apps',\\n      'writable' => true,\\n    ),\\n  ),\\n  'memcache.distributed' => '\\\\\\\\OC\\\\\\\\Memcache\\\\\\\\Redis',\\n  'memcache.locking' => '\\\\\\\\OC\\\\\\\\Memcache\\\\\\\\Redis',\\n  'redis' => \\n  array (\\n    'host' => 'redis',\\n    'password' => false,\\n    'port' => 6379,\\n  ),\\n  'instanceid' => 'ocd8sshgm2jk',\\n);\\n"
            }]
        }, {
            "file": "/var/www/html/lib/private/Config.php",
            "line": 242,
            "function": "touch",
            "args": ["/var/www/html/config/config.php"]
        }, {
            "file": "/var/www/html/lib/private/Config.php",
            "line": 134,
            "function": "writeData",
            "class": "OC\\\\Config",
            "type": "->",
            "args": []
        }, {
            "file": "/var/www/html/lib/private/SystemConfig.php",
            "line": 111,
            "function": "setValue",
            "class": "OC\\\\Config",
            "type": "->",
            "args": ["instanceid", "ocd8sshgm2jk"]
        }, {
            "file": "/var/www/html/lib/private/legacy/OC_Util.php",
            "line": 1167,
            "function": "setValue",
            "class": "OC\\\\SystemConfig",
            "type": "->",
            "args": ["instanceid", "ocd8sshgm2jk"]
        }, {
            "file": "/var/www/html/lib/base.php",
            "line": 421,
            "function": "getInstanceId",
            "class": "OC_Util",
            "type": "::",
            "args": []
        }, {
            "file": "/var/www/html/lib/base.php",
            "line": 650,
            "function": "initSession",
            "class": "OC",
            "type": "::",
            "args": []
        }, {
            "file": "/var/www/html/lib/base.php",
            "line": 1092,
            "function": "init",
            "class": "OC",
            "type": "::",
            "args": []
        }, {
            "file": "/var/www/html/index.php",
            "line": 35,
            "args": ["/var/www/html/lib/base.php"],
            "function": "require_once"
        }],
        "File": "/var/www/html/lib/private/Log/ErrorHandler.php",
        "Line": 91,
        "CustomMessage": "--"
    },
    "userAgent": "Mozilla/5.0 (X11; Ubuntu; Linux x86_64; rv:81.0) Gecko/20100101 Firefox/81.0",
    "version": ""
}

However, docker-compose exec app ls -al /var/www/html shows:

drwxrwxrwx   14 www-data root          4096 Oct 17 10:28 .
drwxrwxr-x    1 www-data root          4096 Oct  8 19:48 ..
-rw-r--r--    1 www-data root          3032 Oct 17 10:28 .htaccess
-rw-r--r--    1 www-data root           101 Oct 17 10:28 .user.ini
drwxr-xr-x   41 www-data root          4096 Oct 17 10:28 3rdparty
-rw-r--r--    1 www-data root         17234 Oct 17 10:28 AUTHORS
-rw-r--r--    1 www-data root         34520 Oct 17 10:28 COPYING
drwxr-xr-x   47 www-data root          4096 Oct 17 10:28 apps
drwxr-xr-x    2 www-data root          4096 May  1 18:17 config
-rw-r--r--    1 www-data root          3967 Oct 17 10:28 console.php
drwxr-xr-x   22 www-data root          4096 Oct 17 10:28 core
-rw-r--r--    1 www-data root          5140 Oct 17 10:28 cron.php
drwxr-xr-x   13 www-data root          4096 Oct 17 08:58 custom_apps
drwxrwx---    7 www-data root          4096 Oct 16 17:45 data
-rw-r--r--    1 www-data root           156 Oct 17 10:28 index.html
-rw-r--r--    1 www-data root          2960 Oct 17 10:28 index.php
drwxr-xr-x    6 www-data root          4096 Oct 17 10:28 lib
-rwxr-xr-x    1 www-data root           283 Oct 17 10:28 occ
drwxr-xr-x    2 www-data root          4096 Oct 17 10:28 ocm-provider
drwxr-xr-x    2 www-data root          4096 Oct 17 10:28 ocs
drwxr-xr-x    2 www-data root          4096 Oct 17 10:28 ocs-provider
-rw-r--r--    1 www-data root          3102 Oct 17 10:28 public.php
-rw-r--r--    1 www-data root          5332 Oct 17 10:28 remote.php
drwxr-xr-x    4 www-data root          4096 Oct 17 10:28 resources
-rw-r--r--    1 www-data root            26 Oct 17 10:28 robots.txt
-rw-r--r--    1 www-data root          2379 Oct 17 10:28 status.php
drwxr-xr-x    3 www-data root          4096 May  1 18:14 themes
-rw-r--r--    1 www-data root           362 Oct 17 10:28 version.php

Which looks correct?

Any help would be very much appreciated.

@bjarnemagnussen
Copy link
Author

Ouch, just now saw that point 4 (redis needs a password) from issue #1275 solved this! I had to run the upgrade manually however and then turn off maintenance mode:
docker-compose exec --user www-data app php occ upgrade and then docker-compose exec --user www-data app php occ maintenance:mode --off

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

1 participant