linuxserver / docker-grocy

A container for grocy - the ERP application for your kitchen https://grocy.info
GNU General Public License v3.0
321 stars 44 forks source link

Login page no longer works (most likely after the latest upgrade) #59

Closed Dinth closed 1 year ago

Dinth commented 1 year ago

linuxserver.io


Expected Behavior

When i want to access my instance of Grocy on a new machine, i should be presented with a login form.

Current Behavior

Right now when im trying to access Grocy on a new machine, im presented with a completely blank page. But on the machines where i have already been signed in, Grocy works perfectly fine, so the problem is only with the login page.

Grocy's nginx log file shows: FastCGI sent in stderr: "Unable to open primary script: /app/www/public/login.php (No such file or directory)" while reading the response header from upstream, client: 172.17.0.1, server: _, request: "GET /login.php HTTP/1.1", upstream: "fastcgi://127.0.0.1:9000", host: "https://grocery.xxxx.xx"

But the only file in /app/www/public/ is index.htm

Steps to Reproduce

I am not 100% sure what is the main cause of the problem

Environment

OS: Debian 11.5, Docker 20.10.17 CPU architecture: x86_64 How docker service was installed: distro repo

Command used to create docker container (run/create/compose/screenshot)

{
    "AppArmorProfile": "docker-default",
    "Args": [],
    "Config": {
        "AttachStderr": false,
        "AttachStdin": false,
        "AttachStdout": false,
        "Cmd": null,
        "Domainname": "",
        "Entrypoint": [
            "/init"
        ],
        "Env": [
            "HOME=/root",
            "PATH=/usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin:/sbin:/bin",
            "PS1=$(whoami)@$(hostname):$(pwd)\\$ ",
            "S6_CMD_WAIT_FOR_SERVICES_MAXTIME=0",
            "TERM=xterm"
        ],
        "ExposedPorts": {
            "443/tcp": {},
            "80/tcp": {},
            "9283/tcp": {}
        },
        "Hostname": "6a9403d6f49f",
        "Image": "linuxserver/grocy:amd64-latest",
        "Labels": {
            "build_version": "Linuxserver.io version:- v2.7.1-ls58 Build-date:- 2020-05-02T20:24:41+00:00",
            "com.centurylinklabs.watchtower.enable": "true",
            "maintainer": "alex-phillips, homerr",
            "org.opencontainers.image.authors": "linuxserver.io",
            "org.opencontainers.image.created": "2022-11-12T19:34:48+01:00",
            "org.opencontainers.image.description": "[Grocy](https://github.com/grocy/grocy) is an ERP system for your kitchen! Cut down on food waste, and manage your chores with this brilliant utility.    Keep track of your purchases, how much food you are wasting, what chores need doing and what batteries need charging with this proudly Open Source tool    For more information on grocy visit their website and check it out: https://grocy.info  ",
            "org.opencontainers.image.documentation": "https://docs.linuxserver.io/images/docker-grocy",
            "org.opencontainers.image.licenses": "GPL-3.0-only",
            "org.opencontainers.image.ref.name": "5377ceccce75198de70d8cffecec2e6f7209ac84",
            "org.opencontainers.image.revision": "5377ceccce75198de70d8cffecec2e6f7209ac84",
            "org.opencontainers.image.source": "https://github.com/linuxserver/docker-grocy",
            "org.opencontainers.image.title": "Grocy",
            "org.opencontainers.image.url": "https://github.com/linuxserver/docker-grocy/packages",
            "org.opencontainers.image.vendor": "linuxserver.io",
            "org.opencontainers.image.version": "v3.3.2-ls173"
        },
        "OnBuild": null,
        "OpenStdin": false,
        "StdinOnce": false,
        "Tty": false,
        "User": "",
        "Volumes": {
            "/config": {}
        },
        "WorkingDir": ""
    },
    "Created": "2022-11-30T10:33:15.890157921Z",
    "Driver": "overlay2",
    "ExecIDs": null,
    "GraphDriver": {
        "Data": {
            "LowerDir": "/var/lib/docker/overlay2/323c7062624c2017d05e4df0b37fc4cfdb5e3a71f53bea2275d7eb2b1ad4b12b-init/diff:/var/lib/docker/overlay2/9764620c761583a9458305ceeb97c8b3c7673624a026aa490304b886c8011c64/diff:/var/lib/docker/overlay2/f85e93e24397c0dbe0b577d6edf77c895e9bbf71b35341c65127956d62695fd7/diff:/var/lib/docker/overlay2/d36a95d77726e9dfbbd4e13be6c56ff26a66ecf18a9288765c30b98fcb077ec2/diff:/var/lib/docker/overlay2/5172597c49e1dc5b17c1dc7be9cbbb2753c5af740b35067c5e71504e1f2cf5da/diff:/var/lib/docker/overlay2/ca643f139ddcd5a3842fe02a3f3dfc265c894f59af289301d22251e20dab1e29/diff:/var/lib/docker/overlay2/6aba96ffda401eba568ef0e66cbf555976377877e7efdd619fa82b746c37fc01/diff:/var/lib/docker/overlay2/6bef34b8748e5a85655403e831cc194f4685cf67cd4877f71b9f79cfda2aa982/diff",
            "MergedDir": "/var/lib/docker/overlay2/323c7062624c2017d05e4df0b37fc4cfdb5e3a71f53bea2275d7eb2b1ad4b12b/merged",
            "UpperDir": "/var/lib/docker/overlay2/323c7062624c2017d05e4df0b37fc4cfdb5e3a71f53bea2275d7eb2b1ad4b12b/diff",
            "WorkDir": "/var/lib/docker/overlay2/323c7062624c2017d05e4df0b37fc4cfdb5e3a71f53bea2275d7eb2b1ad4b12b/work"
        },
        "Name": "overlay2"
    },
    "HostConfig": {
        "AutoRemove": false,
        "Binds": [
            "grocy:/config"
        ],
        "BlkioDeviceReadBps": null,
        "BlkioDeviceReadIOps": null,
        "BlkioDeviceWriteBps": null,
        "BlkioDeviceWriteIOps": null,
        "BlkioWeight": 0,
        "BlkioWeightDevice": null,
        "CapAdd": [
            "AUDIT_WRITE",
            "CHOWN",
            "DAC_OVERRIDE",
            "FOWNER",
            "FSETID",
            "KILL",
            "MKNOD",
            "NET_BIND_SERVICE",
            "NET_RAW",
            "SETFCAP",
            "SETGID",
            "SETPCAP",
            "SETUID",
            "SYS_CHROOT"
        ],
        "CapDrop": [
            "AUDIT_CONTROL",
            "BLOCK_SUSPEND",
            "DAC_READ_SEARCH",
            "IPC_LOCK",
            "IPC_OWNER",
            "LEASE",
            "LINUX_IMMUTABLE",
            "MAC_ADMIN",
            "MAC_OVERRIDE",
            "NET_ADMIN",
            "NET_BROADCAST",
            "SYSLOG",
            "SYS_ADMIN",
            "SYS_BOOT",
            "SYS_MODULE",
            "SYS_NICE",
            "SYS_PACCT",
            "SYS_PTRACE",
            "SYS_RAWIO",
            "SYS_RESOURCE",
            "SYS_TIME",
            "SYS_TTY_CONFIG",
            "WAKE_ALARM"
        ],
        "Cgroup": "",
        "CgroupParent": "",
        "CgroupnsMode": "host",
        "ConsoleSize": [
            0,
            0
        ],
        "ContainerIDFile": "",
        "CpuCount": 0,
        "CpuPercent": 0,
        "CpuPeriod": 0,
        "CpuQuota": 0,
        "CpuRealtimePeriod": 0,
        "CpuRealtimeRuntime": 0,
        "CpuShares": 0,
        "CpusetCpus": "",
        "CpusetMems": "",
        "DeviceCgroupRules": null,
        "DeviceRequests": null,
        "Devices": [],
        "Dns": [],
        "DnsOptions": [],
        "DnsSearch": [],
        "ExtraHosts": [],
        "GroupAdd": null,
        "IOMaximumBandwidth": 0,
        "IOMaximumIOps": 0,
        "IpcMode": "private",
        "Isolation": "",
        "KernelMemory": 0,
        "KernelMemoryTCP": 0,
        "Links": null,
        "LogConfig": {
            "Config": {},
            "Type": "json-file"
        },
        "MaskedPaths": [
            "/proc/asound",
            "/proc/acpi",
            "/proc/kcore",
            "/proc/keys",
            "/proc/latency_stats",
            "/proc/timer_list",
            "/proc/timer_stats",
            "/proc/sched_debug",
            "/proc/scsi",
            "/sys/firmware"
        ],
        "Memory": 0,
        "MemoryReservation": 0,
        "MemorySwap": 0,
        "MemorySwappiness": null,
        "NanoCpus": 0,
        "NetworkMode": "bridge",
        "OomKillDisable": false,
        "OomScoreAdj": 0,
        "PidMode": "",
        "PidsLimit": null,
        "PortBindings": {
            "80/tcp": [
                {
                    "HostIp": "",
                    "HostPort": "9283"
                }
            ]
        },
        "Privileged": false,
        "PublishAllPorts": false,
        "ReadonlyPaths": [
            "/proc/bus",
            "/proc/fs",
            "/proc/irq",
            "/proc/sys",
            "/proc/sysrq-trigger"
        ],
        "ReadonlyRootfs": false,
        "RestartPolicy": {
            "MaximumRetryCount": 0,
            "Name": "unless-stopped"
        },
        "Runtime": "runc",
        "SecurityOpt": null,
        "ShmSize": 67108864,
        "UTSMode": "",
        "Ulimits": null,
        "UsernsMode": "",
        "VolumeDriver": "",
        "VolumesFrom": null
    },
    "HostnamePath": "/var/lib/docker/containers/44d01f902877b083291e335bd8caf0ad51f2ffbebb9b1ded09abc406a3ccceaf/hostname",
    "HostsPath": "/var/lib/docker/containers/44d01f902877b083291e335bd8caf0ad51f2ffbebb9b1ded09abc406a3ccceaf/hosts",
    "Id": "44d01f902877b083291e335bd8caf0ad51f2ffbebb9b1ded09abc406a3ccceaf",
    "Image": "sha256:e6ef6095fb6aaf07812dcdb0f3fa4b4592bcbee065a969cdfc3682583d1a42a5",
    "LogPath": "/var/lib/docker/containers/44d01f902877b083291e335bd8caf0ad51f2ffbebb9b1ded09abc406a3ccceaf/44d01f902877b083291e335bd8caf0ad51f2ffbebb9b1ded09abc406a3ccceaf-json.log",
    "MountLabel": "",
    "Mounts": [
        {
            "Destination": "/config",
            "Driver": "local",
            "Mode": "z",
            "Name": "grocy",
            "Propagation": "",
            "RW": true,
            "Source": "/var/lib/docker/volumes/grocy/_data",
            "Type": "volume"
        }
    ],
    "Name": "/grocy",
    "NetworkSettings": {
        "Bridge": "",
        "EndpointID": "35f6f42f073bff9901169e608b642af7b50f3a686dc05830f55ffbcb78890164",
        "Gateway": "172.17.0.1",
        "GlobalIPv6Address": "",
        "GlobalIPv6PrefixLen": 0,
        "HairpinMode": false,
        "IPAddress": "172.17.0.11",
        "IPPrefixLen": 16,
        "IPv6Gateway": "",
        "LinkLocalIPv6Address": "",
        "LinkLocalIPv6PrefixLen": 0,
        "MacAddress": "02:42:ac:11:00:0b",
        "Networks": {
            "bridge": {
                "Aliases": null,
                "DriverOpts": null,
                "EndpointID": "35f6f42f073bff9901169e608b642af7b50f3a686dc05830f55ffbcb78890164",
                "Gateway": "172.17.0.1",
                "GlobalIPv6Address": "",
                "GlobalIPv6PrefixLen": 0,
                "IPAMConfig": {},
                "IPAddress": "172.17.0.11",
                "IPPrefixLen": 16,
                "IPv6Gateway": "",
                "Links": null,
                "MacAddress": "02:42:ac:11:00:0b",
                "NetworkID": "09a61ec9b53a5e67325500be32a6490346c8c527326cfd7fd57a3f389538a61c"
            }
        },
        "Ports": {
            "443/tcp": null,
            "80/tcp": [
                {
                    "HostIp": "0.0.0.0",
                    "HostPort": "9283"
                }
            ],
            "9283/tcp": null
        },
        "SandboxID": "748191dda0da0a20704511295ae6fea75e90312f3b2da37dd08a9674d59e456f",
        "SandboxKey": "/var/run/docker/netns/748191dda0da",
        "SecondaryIPAddresses": null,
        "SecondaryIPv6Addresses": null
    },
    "Path": "/init",
    "Platform": "linux",
    "Portainer": {
        "ResourceControl": {
            "Id": 289,
            "ResourceId": "44d01f902877b083291e335bd8caf0ad51f2ffbebb9b1ded09abc406a3ccceaf",
            "SubResourceIds": [],
            "Type": 1,
            "UserAccesses": [],
            "TeamAccesses": [],
            "Public": false,
            "AdministratorsOnly": true,
            "System": false
        }
    },
    "ProcessLabel": "",
    "ResolvConfPath": "/var/lib/docker/containers/44d01f902877b083291e335bd8caf0ad51f2ffbebb9b1ded09abc406a3ccceaf/resolv.conf",
    "RestartCount": 0,
    "State": {
        "Dead": false,
        "Error": "",
        "ExitCode": 0,
        "FinishedAt": "2022-11-30T10:48:04.512311428Z",
        "OOMKilled": false,
        "Paused": false,
        "Pid": 4047432,
        "Restarting": false,
        "Running": true,
        "StartedAt": "2022-11-30T10:48:05.352041263Z",
        "Status": "running"
    }
}

Docker logs

[custom-init] No custom services found, skipping...
s6-rc: info: service s6rc-oneshot-runner: starting
s6-rc: info: service s6rc-oneshot-runner successfully started
s6-rc: info: service fix-attrs: starting
s6-rc: info: service 00-legacy: starting
s6-rc: info: service 00-legacy successfully started
s6-rc: info: service fix-attrs successfully started
s6-rc: info: service legacy-cont-init: starting
cont-init: info: running /etc/cont-init.d/01-envfile
cont-init: info: /etc/cont-init.d/01-envfile exited 0
cont-init: info: running /etc/cont-init.d/01-migrations
[migrations] started
[migrations] 01-nginx-site-confs-default: skipped
[migrations] 02-default-location: skipped
[migrations] done
cont-init: info: /etc/cont-init.d/01-migrations exited 0
cont-init: info: running /etc/cont-init.d/10-adduser
usermod: no changes
-------------------------------------
          _         ()
         | |  ___   _    __
         | | / __| | |  /  \
         | | \__ \ | | | () |
         |_| |___/ |_|  \__/

Brought to you by linuxserver.io

-------------------------------------
To support LSIO projects visit:
https://www.linuxserver.io/donate/
-------------------------------------
GID/UID
-------------------------------------
User uid:    911
User gid:    911
-------------------------------------
cont-init: info: /etc/cont-init.d/10-adduser exited 0
cont-init: info: running /etc/cont-init.d/11-folders
cont-init: info: /etc/cont-init.d/11-folders exited 0
cont-init: info: running /etc/cont-init.d/12-samples
cont-init: info: /etc/cont-init.d/12-samples exited 0
cont-init: info: running /etc/cont-init.d/13-nginx
cont-init: info: /etc/cont-init.d/13-nginx exited 0
cont-init: info: running /etc/cont-init.d/14-php
cont-init: info: /etc/cont-init.d/14-php exited 0
cont-init: info: running /etc/cont-init.d/15-keygen
using keys found in /config/keys
cont-init: info: /etc/cont-init.d/15-keygen exited 0
cont-init: info: running /etc/cont-init.d/20-permissions
cont-init: info: /etc/cont-init.d/20-permissions exited 0
cont-init: info: running /etc/cont-init.d/50-config
cont-init: info: /etc/cont-init.d/50-config exited 0
cont-init: info: running /etc/cont-init.d/85-version-checks
**** The following active confs have different version dates than the samples that are shipped. ****
**** This may be due to user customization or an update to the samples. ****
**** You should compare the following files to the samples in the same folder and update them. ****
**** Use the link at the top of the file to view the changelog. ****
/config/nginx/nginx.conf
/config/nginx/site-confs/default.conf
cont-init: info: /etc/cont-init.d/85-version-checks exited 0
cont-init: info: running /etc/cont-init.d/99-custom-files
[custom-init] No custom files found, skipping...
cont-init: info: /etc/cont-init.d/99-custom-files exited 0
s6-rc: info: service legacy-cont-init successfully started
s6-rc: info: service init-mods: starting
s6-rc: info: service init-mods successfully started
s6-rc: info: service init-mods-package-install: starting
s6-rc: info: service init-mods-package-install successfully started
s6-rc: info: service init-mods-end: starting
s6-rc: info: service init-mods-end successfully started
s6-rc: info: service init-services: starting
s6-rc: info: service init-services successfully started
s6-rc: info: service legacy-services: starting
services-up: info: copying legacy longrun cron (no readiness notification)
services-up: info: copying legacy longrun nginx (no readiness notification)
services-up: info: copying legacy longrun php-fpm (no readiness notification)
s6-rc: info: service legacy-services successfully started
s6-rc: info: service 99-ci-service-check: starting
[ls.io-init] done.
 s6-rc: info: service 99-ci-service-check successfully started

After generating the above, i have followed the advice and replaced nginx.conf and default.conf with the relevant sample files, but this havent changed anything.

github-actions[bot] commented 1 year ago

Thanks for opening your first issue here! Be sure to follow the bug or feature issue templates!

github-actions[bot] commented 1 year ago

This issue has been automatically marked as stale because it has not had recent activity. It will be closed if no further activity occurs. Thank you for your contributions.

nemchik commented 1 year ago
**** The following active confs have different version dates than the samples that are shipped. ****
**** This may be due to user customization or an update to the samples. ****
**** You should compare the following files to the samples in the same folder and update them. ****
**** Use the link at the top of the file to view the changelog. ****
/config/nginx/nginx.conf
/config/nginx/site-confs/default.conf

Can you update these and see if you still have an issue?

CM000n commented 1 year ago

Same for me. I did a fresh installation today, without preexisting old config files, and I can't log in with the default settings described in the documentation. The only thing I see when trying to log in on port :9283 is a 502 error from the nginx server.

Dinth commented 1 year ago

I actually managed to fix my problem by reinstalling while preserving the database and config file (copied them to a backup location prior to removing the container)

CM000n commented 1 year ago

Ok, I revise my error message. The connection via port 9283 still works. It just takes what feels like an eternity. For me, a connection was only possible after ~5 minutes. Perhaps this information should be added to the documentation to avoid misunderstandings.

github-actions[bot] commented 1 year ago

This issue has been automatically marked as stale because it has not had recent activity. It will be closed if no further activity occurs. Thank you for your contributions.

homerr commented 1 year ago

Did a fresh install of this, and given no further reports of issues, I think it could have been an issue with the rebase at the time. All seems OK now, so closing unless anything else shows up as broken