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

Permission denied apache2 could not open error log file /docker.stderr #1557

Closed
abstractk opened this issue May 24, 2018 · 4 comments
Closed
Labels

Comments

@abstractk
Copy link

Info:

  • Docker version ($ docker --version): Docker version 17.12.1-ce, build 7390fc6
  • Laradock commit ($ git rev-parse HEAD): 99b7a3a7fe38c2231dba43cd89ca185dd9747604
  • System info (Mac, PC, Linux): Linux
  • System info disto/version: Ubuntu 18.04 LTS

Issue:

Apache2 container builds and runs fine but getting error ERR_CONNECTION_RESET in the browser when trying to visit the domain.

Logs

(13)Permission denied: AH00091: apache2: could not open error log file /docker.stderr.
AH00015: Unable to open logs
2018-05-24 00:13:15,229 INFO exited: apached (exit status 1; not expected)
2018-05-24 00:13:16,233 INFO spawned: 'apached' with pid 1500
-> Executing /opt/docker/bin/service.d/httpd.d//10-init.sh
2018-05-24 00:13:16,249 INFO success: apached entered RUNNING state, process has stayed up for > than 0 seconds (startsecs)
(13)Permission denied: AH00091: apache2: could not open error log file /docker.stderr.
AH00015: Unable to open logs
2018-05-24 00:13:16,301 INFO exited: apached (exit status 1; not expected)
2018-05-24 00:13:17,305 INFO spawned: 'apached' with pid 1502
-> Executing /opt/docker/bin/service.d/httpd.d//10-init.sh
2018-05-24 00:13:17,321 INFO success: apached entered RUNNING state, process has stayed up for > than 0 seconds (startsecs)
(13)Permission denied: AH00091: apache2: could not open error log file /docker.stderr.
AH00015: Unable to open logs
2018-05-24 00:13:17,371 INFO exited: apached (exit status 1; not expected)

Docker inspect result

[
    {
        "Id": "e342883037148f31e261f61b85276f5e6768c92040ff385662f87bfe6bf75b51",
        "Created": "2018-05-24T00:00:04.885742669Z",
        "Path": "/opt/docker/bin/entrypoint.sh",
        "Args": [
            "supervisord"
        ],
        "State": {
            "Status": "running",
            "Running": true,
            "Paused": false,
            "Restarting": false,
            "OOMKilled": false,
            "Dead": false,
            "Pid": 13390,
            "ExitCode": 0,
            "Error": "",
            "StartedAt": "2018-05-24T00:00:06.53093175Z",
            "FinishedAt": "0001-01-01T00:00:00Z"
        },
        "Image": "sha256:7fb11b27c115f31908d38e597e48466140b569eae00a8f03886cae5ea6019853",
        "ResolvConfPath": "/var/snap/docker/common/var-lib-docker/containers/e342883037148f31e261f61b85276f5e6768c92040ff385662f87bfe6bf75b51/resolv.conf",
        "HostnamePath": "/var/snap/docker/common/var-lib-docker/containers/e342883037148f31e261f61b85276f5e6768c92040ff385662f87bfe6bf75b51/hostname",
        "HostsPath": "/var/snap/docker/common/var-lib-docker/containers/e342883037148f31e261f61b85276f5e6768c92040ff385662f87bfe6bf75b51/hosts",
        "LogPath": "/var/snap/docker/common/var-lib-docker/containers/e342883037148f31e261f61b85276f5e6768c92040ff385662f87bfe6bf75b51/e342883037148f31e261f61b85276f5e6768c92040ff385662f87bfe6bf75b51-json.log",
        "Name": "/localserver_apache2_1",
        "RestartCount": 0,
        "Driver": "aufs",
        "MountLabel": "",
        "ProcessLabel": "",
        "AppArmorProfile": "docker-default",
        "ExecIDs": null,
        "HostConfig": {
            "Binds": [
                "/home/abstract/data/Projects/local_server/logs/apache2-56:/var/log/apache2:rw",
                "/home/abstract/data/Projects/local_server/apache2/sites:/etc/apache2/sites-available:rw"
            ],
            "ContainerIDFile": "",
            "LogConfig": {
                "Type": "json-file",
                "Config": {}
            },
            "NetworkMode": "localserver_frontend",
            "PortBindings": {
                "443/tcp": [
                    {
                        "HostIp": "",
                        "HostPort": "443"
                    }
                ],
                "80/tcp": [
                    {
                        "HostIp": "",
                        "HostPort": "8002"
                    }
                ]
            },
            "RestartPolicy": {
                "Name": "",
                "MaximumRetryCount": 0
            },
            "AutoRemove": false,
            "VolumeDriver": "",
            "VolumesFrom": [
                "b581d518f605071ab6f59b7639789f40bd6e47f435f2e62eab153e317081f804:rw"
            ],
            "CapAdd": null,
            "CapDrop": null,
            "Dns": null,
            "DnsOptions": null,
            "DnsSearch": null,
            "ExtraHosts": null,
            "GroupAdd": null,
            "IpcMode": "",
            "Cgroup": "",
            "Links": null,
            "OomScoreAdj": 0,
            "PidMode": "",
            "Privileged": false,
            "PublishAllPorts": false,
            "ReadonlyRootfs": false,
            "SecurityOpt": null,
            "UTSMode": "",
            "UsernsMode": "",
            "ShmSize": 67108864,
            "Runtime": "runc",
            "ConsoleSize": [
                0,
                0
            ],
            "Isolation": "",
            "CpuShares": 0,
            "Memory": 0,
            "NanoCpus": 0,
            "CgroupParent": "",
            "BlkioWeight": 0,
            "BlkioWeightDevice": null,
            "BlkioDeviceReadBps": null,
            "BlkioDeviceWriteBps": null,
            "BlkioDeviceReadIOps": null,
            "BlkioDeviceWriteIOps": null,
            "CpuPeriod": 0,
            "CpuQuota": 0,
            "CpuRealtimePeriod": 0,
            "CpuRealtimeRuntime": 0,
            "CpusetCpus": "",
            "CpusetMems": "",
            "Devices": null,
            "DeviceCgroupRules": null,
            "DiskQuota": 0,
            "KernelMemory": 0,
            "MemoryReservation": 0,
            "MemorySwap": 0,
            "MemorySwappiness": -1,
            "OomKillDisable": false,
            "PidsLimit": 0,
            "Ulimits": null,
            "CpuCount": 0,
            "CpuPercent": 0,
            "IOMaximumIOps": 0,
            "IOMaximumBandwidth": 0
        },
        "GraphDriver": {
            "Data": null,
            "Name": "aufs"
        },
        "Mounts": [
            {
                "Type": "bind",
                "Source": "/home/abstract/data/Projects",
                "Destination": "/var/www",
                "Mode": "",
                "RW": true,
                "Propagation": "rprivate"
            },
            {
                "Type": "bind",
                "Source": "/home/abstract/data/Projects/local_server/logs/apache2-56",
                "Destination": "/var/log/apache2",
                "Mode": "rw",
                "RW": true,
                "Propagation": "rprivate"
            },
            {
                "Type": "bind",
                "Source": "/home/abstract/data/Projects/local_server/apache2/sites",
                "Destination": "/etc/apache2/sites-available",
                "Mode": "rw",
                "RW": true,
                "Propagation": "rprivate"
            }
        ],
        "Config": {
            "Hostname": "e34288303714",
            "Domainname": "",
            "User": "",
            "AttachStdin": false,
            "AttachStdout": false,
            "AttachStderr": false,
            "ExposedPorts": {
                "443/tcp": {},
                "80/tcp": {}
            },
            "Tty": false,
            "OpenStdin": false,
            "StdinOnce": false,
            "Env": [
                "PATH=/usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin:/sbin:/bin",
                "TERM=xterm",
                "LANG=C.UTF-8",
                "LC_ALL=C.UTF-8",
                "DOCKER_CONF_HOME=/opt/docker/",
                "LOG_STDOUT=",
                "LOG_STDERR=",
                "WEB_DOCUMENT_ROOT=/var/www/",
                "WEB_DOCUMENT_INDEX=index.php",
                "WEB_ALIAS_DOMAIN=*.vm",
                "WEB_PHP_TIMEOUT=60",
                "WEB_PHP_SOCKET=php-fpm:9000"
            ],
            "Cmd": [
                "supervisord"
            ],
            "ArgsEscaped": true,
            "Image": "localserver_apache2",
            "Volumes": {
                "/etc/apache2/sites-available": {},
                "/var/log/apache2": {}
            },
            "WorkingDir": "/var/www",
            "Entrypoint": [
                "/opt/docker/bin/entrypoint.sh"
            ],
            "OnBuild": null,
            "Labels": {
                "com.docker.compose.config-hash": "b00bfd92a1bdf29432c48292d9a2a7f806d9796d52bc09d965308b1934201f58",
                "com.docker.compose.container-number": "1",
                "com.docker.compose.oneoff": "False",
                "com.docker.compose.project": "localserver",
                "com.docker.compose.service": "apache2",
                "com.docker.compose.version": "1.17.1",
                "io.webdevops.layout": "8",
                "io.webdevops.version": "1.5.0",
                "maintainer": "Eric Pfeiffer <computerfr33k@users.noreply.github.com>",
                "vendor": "WebDevOps.io"
            }
        },
        "NetworkSettings": {
            "Bridge": "",
            "SandboxID": "27f659cff713d9d36975940d846a72b7e3060b904079d4604ebc107b2a3cc778",
            "HairpinMode": false,
            "LinkLocalIPv6Address": "",
            "LinkLocalIPv6PrefixLen": 0,
            "Ports": {
                "443/tcp": [
                    {
                        "HostIp": "0.0.0.0",
                        "HostPort": "443"
                    }
                ],
                "80/tcp": [
                    {
                        "HostIp": "0.0.0.0",
                        "HostPort": "8002"
                    }
                ]
            },
            "SandboxKey": "/var/snap/docker/179/run/docker/netns/27f659cff713",
            "SecondaryIPAddresses": null,
            "SecondaryIPv6Addresses": null,
            "EndpointID": "",
            "Gateway": "",
            "GlobalIPv6Address": "",
            "GlobalIPv6PrefixLen": 0,
            "IPAddress": "",
            "IPPrefixLen": 0,
            "IPv6Gateway": "",
            "MacAddress": "",
            "Networks": {
                "localserver_backend": {
                    "IPAMConfig": null,
                    "Links": null,
                    "Aliases": [
                        "e34288303714",
                        "apache2"
                    ],
                    "NetworkID": "019fa7219014b18412a6ffbc7d63887fdc0f845d3fbf85658f8d872890d6fe3e",
                    "EndpointID": "dbf88458fe7cfec3b181cae9a5a411d956d8e98324359a6c02720fbb23d44886",
                    "Gateway": "172.24.0.1",
                    "IPAddress": "172.24.0.8",
                    "IPPrefixLen": 16,
                    "IPv6Gateway": "",
                    "GlobalIPv6Address": "",
                    "GlobalIPv6PrefixLen": 0,
                    "MacAddress": "02:42:ac:18:00:08",
                    "DriverOpts": null
                },
                "localserver_frontend": {
                    "IPAMConfig": null,
                    "Links": null,
                    "Aliases": [
                        "e34288303714",
                        "apache2"
                    ],
                    "NetworkID": "e39dee8a9582f36b36c4b0ecdb2ea2bf54e50814e92e4fe0a4f3751e1b619175",
                    "EndpointID": "963d43a901e6d9a6029722534a9d33c3c5556c5b771d3901384b148b4056bbd5",
                    "Gateway": "172.23.0.1",
                    "IPAddress": "172.23.0.5",
                    "IPPrefixLen": 16,
                    "IPv6Gateway": "",
                    "GlobalIPv6Address": "",
                    "GlobalIPv6PrefixLen": 0,
                    "MacAddress": "02:42:ac:17:00:05",
                    "DriverOpts": null
                }
            }
        }
    }
]

@prezire
Copy link

prezire commented Mar 5, 2019

Just experienced this today on openSUSE Leap 15. Previous versions such as 42.3 seem to be okay.
I got both /docker.stdout and /docker.stderr as errors after issuing docker-compose up apache2:

Attaching to laradock_apache2_1
apache2_1 | ln: failed to access '/docker.stdout': Permission denied
laradock_apache2_1 exited with code 1

apache2_1 | AH00015: Unable to open logs
apache2_1 | 2019-03-05 07:35:11,861 INFO exited: apached (exit status 1; not expected)
apache2_1 | 2019-03-05 07:35:12,864 INFO spawned: 'apached' with pid 248
apache2_1 | -> Executing /opt/docker/bin/service.d/httpd.d//10-init.sh
apache2_1 | 2019-03-05 07:35:12,869 INFO success: apached entered RUNNING state, process has stayed up for > than 0 seconds (startsecs)
apache2_1 | (13)Permission denied: AH00091: apache2: could not open error log file /docker.stderr.

@DaniDantur
Copy link
Contributor

#2190 may fix this.

@stale
Copy link

stale bot commented Feb 2, 2020

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.

@stale stale bot added the Stale label Feb 2, 2020
@stale
Copy link

stale bot commented Feb 23, 2020

Hi again 👋 we would like to inform you that this issue has been automatically closed 🔒 because it had not recent activity during the stale period. We really really appreciate your contributions, and looking forward for more in the future 🎈.

@stale stale bot closed this as completed Feb 23, 2020
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

3 participants