OS Linux Centos 7
NC 26
Docker version 20.10.10, build b485636f
After update and after new install postgresql not started
Log from AIO:
Setting max connections…
chmod: /var/run/postgresql: Read-only file system
PostgreSQL Database directory appears to contain a database; Skipping initialization
2023-07-20 17:59:38.481 MSK [13] LOG: starting PostgreSQL 15.3 on x86_64-pc-linux-musl, compiled by gcc (Alpine 12.2.1_git20220924-r10) 12.2.1 20220924, 64-bit
2023-07-20 17:59:38.481 MSK [13] LOG: listening on IPv4 address “0.0.0.0”, port 5432
2023-07-20 17:59:38.481 MSK [13] LOG: listening on IPv6 address “::”, port 5432
2023-07-20 17:59:38.482 MSK [13] FATAL: could not create lock file “/var/run/postgresql/.s.PGSQL.5432.lock”: Read-only file system
2023-07-20 17:59:38.484 MSK [13] LOG: database system is shut down
pg_dump: error: connection to server on socket “/var/run/postgresql/.s.PGSQL.5432” failed: No such file or directory
Is the server running locally and accepting connections on that socket?
pg_ctl: PID file “/var/lib/postgresql/data/postmaster.pid” does not exist
Database dump unsuccessful!
Is server running?
Hi, this is weird. Can you post the output of
sudo docker inspect nextcloud-aio-database
?
New install
Спойлер
[
{
“Id”: “2220d30f0d3952b49528efbedf55e5e91a7b8e89f9fc607eee16262524077fb3”,
“Created”: “2023-07-20T14:52:52.180612975Z”,
“Path”: “/start.sh”,
“Args”: ,
“State”: {
“Status”: “exited”,
“Running”: false,
“Paused”: false,
“Restarting”: false,
“OOMKilled”: false,
“Dead”: false,
“Pid”: 0,
“ExitCode”: 1,
“Error”: “”,
“StartedAt”: “2023-07-20T15:34:24.435893463Z”,
“FinishedAt”: “2023-07-20T15:34:24.579609992Z”,
“Health”: {
“Status”: “unhealthy”,
“FailingStreak”: 0,
“Log”:
}
},
“Image”: “sha256:13382909fa48c1111622056979aa5a65c7cb48bcf43fcf159cfe5497e7d325e4”,
“ResolvConfPath”: “/var/lib/docker/containers/2220d30f0d3952b49528efbedf55e5e91a7b8e89f9fc607eee16262524077fb3/resolv.conf”,
“HostnamePath”: “/var/lib/docker/containers/2220d30f0d3952b49528efbedf55e5e91a7b8e89f9fc607eee16262524077fb3/hostname”,
“HostsPath”: “/var/lib/docker/containers/2220d30f0d3952b49528efbedf55e5e91a7b8e89f9fc607eee16262524077fb3/hosts”,
“LogPath”: “”,
“Name”: “/nextcloud-aio-database”,
“RestartCount”: 50,
“Driver”: “overlay2”,
“Platform”: “linux”,
“MountLabel”: “”,
“ProcessLabel”: “”,
“AppArmorProfile”: “”,
“ExecIDs”: null,
“HostConfig”: {
“Binds”: [
“nextcloud_aio_database:/var/lib/postgresql/data:rw”,
“nextcloud_aio_database_dump:/mnt/data:rw”
],
“ContainerIDFile”: “”,
“LogConfig”: {
“Type”: “journald”,
“Config”: {}
},
“NetworkMode”: “nextcloud-aio”,
“PortBindings”: null,
“RestartPolicy”: {
“Name”: “unless-stopped”,
“MaximumRetryCount”: 0
},
“AutoRemove”: false,
“VolumeDriver”: “”,
“VolumesFrom”: null,
“CapAdd”: null,
“CapDrop”: null,
“CgroupnsMode”: “private”,
“Dns”: null,
“DnsOptions”: null,
“DnsSearch”: null,
“ExtraHosts”: null,
“GroupAdd”: null,
“IpcMode”: “private”,
“Cgroup”: “”,
“Links”: null,
“OomScoreAdj”: 0,
“PidMode”: “”,
“Privileged”: false,
“PublishAllPorts”: false,
“ReadonlyRootfs”: true,
“SecurityOpt”: null,
“Tmpfs”: {
“/var/run/postgresql”: “”
},
“UTSMode”: “”,
“UsernsMode”: “”,
“ShmSize”: 268435456,
“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,
“DeviceRequests”: null,
“KernelMemory”: 0,
“KernelMemoryTCP”: 0,
“MemoryReservation”: 0,
“MemorySwap”: 0,
“MemorySwappiness”: null,
“OomKillDisable”: null,
“PidsLimit”: null,
“Ulimits”: null,
“CpuCount”: 0,
“CpuPercent”: 0,
“IOMaximumIOps”: 0,
“IOMaximumBandwidth”: 0,
“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”
],
“ReadonlyPaths”: [
“/proc/bus”,
“/proc/fs”,
“/proc/irq”,
“/proc/sys”,
“/proc/sysrq-trigger”
]
},
“GraphDriver”: {
“Data”: {
“LowerDir”: “/var/lib/docker/overlay2/6ee13ed61d3d948a7e1093a3af1a0e8302bda87b5825f26be91fbc5b0018839c-init/diff:/var/lib/docker/overlay2/688f99cc12e98bf2d559d886660d16d145f5f9de949b6b60a4559a42d76960e8/diff:/var/lib/docker/overlay2/2dd2464137b738f8035909ef81c81b256dcdcb5625d5a6f59eb6ae5a9ae56cf6/diff:/var/lib/docker/overlay2/f2adb0ccccc86f11c6f5ec27b141e78b17bebbdf2371136df0a7563e72972da6/diff:/var/lib/docker/overlay2/f525ab876b8e70163dc91b3794e8f7944118f1d10f076696193b16c7a2cf01b7/diff:/var/lib/docker/overlay2/883dd564b613373b0c2c3e31528ffc5457dfd791438c781f1a55fcf74177354e/diff:/var/lib/docker/overlay2/b61e87ee94d7491aa86271ac25fadaff2a9faa09aa7527b40e967b5d15e50066/diff:/var/lib/docker/overlay2/53d9cb5d72798d62ecf7967397e3f6f01887e0e124ab4a0c880c0ea1f4843d11/diff:/var/lib/docker/overlay2/1a49972f8cfdf79bb100e1e947e5e81531b14f36aefa6e1c17239f2748c490d6/diff:/var/lib/docker/overlay2/e048b232122b6afb34ad73e3ac37aa14c4e91817d9a6118cb791f19efa1203a2/diff:/var/lib/docker/overlay2/45e0388901f63edeb209982c340de7e1c2b0d256cd8b8428a6b5d6c6db4496e5/diff:/var/lib/docker/overlay2/71b6428703773eee01d3b7e3db27818278f443632c6422dc3b85b98101c6adac/diff:/var/lib/docker/overlay2/8fc7c528f43a96852dbdc9f259fa609f1e4e43db502dda480105738c23be907e/diff”,
“MergedDir”: “/var/lib/docker/overlay2/6ee13ed61d3d948a7e1093a3af1a0e8302bda87b5825f26be91fbc5b0018839c/merged”,
“UpperDir”: “/var/lib/docker/overlay2/6ee13ed61d3d948a7e1093a3af1a0e8302bda87b5825f26be91fbc5b0018839c/diff”,
“WorkDir”: “/var/lib/docker/overlay2/6ee13ed61d3d948a7e1093a3af1a0e8302bda87b5825f26be91fbc5b0018839c/work”
},
“Name”: “overlay2”
},
“Mounts”: [
{
“Type”: “volume”,
“Name”: “nextcloud_aio_database”,
“Source”: “/var/lib/docker/volumes/nextcloud_aio_database/_data”,
“Destination”: “/var/lib/postgresql/data”,
“Driver”: “local”,
“Mode”: “rw”,
“RW”: true,
“Propagation”: “”
},
{
“Type”: “volume”,
“Name”: “nextcloud_aio_database_dump”,
“Source”: “/var/lib/docker/volumes/nextcloud_aio_database_dump/_data”,
“Destination”: “/mnt/data”,
“Driver”: “local”,
“Mode”: “rw”,
“RW”: true,
“Propagation”: “”
}
],
“Config”: {
“Hostname”: “2220d30f0d39”,
“Domainname”: “”,
“User”: “postgres”,
“AttachStdin”: false,
“AttachStdout”: false,
“AttachStderr”: false,
“ExposedPorts”: {
“5432/tcp”: {}
},
“Tty”: false,
“OpenStdin”: false,
“StdinOnce”: false,
“Env”: [
“POSTGRES_PASSWORD=a9c783d70f81830febc52600ee8211aacdef4860eb4b7012”,
“POSTGRES_DB=nextcloud_database”,
“POSTGRES_USER=nextcloud”,
“TZ=Europe/Moscow”,
“PGTZ=Europe/Moscow”,
“PATH=/usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin:/sbin:/bin”,
“LANG=en_US.utf8”,
“PG_MAJOR=15”,
“PG_VERSION=15.3”,
“PG_SHA256=ffc7d4891f00ffbf5c3f4eab7fbbced8460b8c0ee63c5a5167133b9e6599d932”,
“DOCKER_PG_LLVM_DEPS=llvm15-dev \t\tclang15”,
“PGDATA=/var/lib/postgresql/data”
],
“Cmd”: null,
“Healthcheck”: {
“Test”: [
“CMD-SHELL”,
“/healthcheck.sh”
]
},
“Image”: “nextcloud/aio-postgresql:latest”,
“Volumes”: {
“/mnt/data”: {},
“/var/lib/postgresql/data”: {}
},
“WorkingDir”: “”,
“Entrypoint”: [
“/start.sh”
],
“OnBuild”: null,
“Labels”: {
“com.centurylinklabs.watchtower.enable”: “false”
},
“StopSignal”: “SIGINT”
},
“NetworkSettings”: {
“Bridge”: “”,
“SandboxID”: “383376ac6402d0d999d72152de1fb0bc5b53ecf46e2783567f3443fb50bbd3fc”,
“HairpinMode”: false,
“LinkLocalIPv6Address”: “”,
“LinkLocalIPv6PrefixLen”: 0,
“Ports”: {},
“SandboxKey”: “/var/run/docker/netns/383376ac6402”,
“SecondaryIPAddresses”: null,
“SecondaryIPv6Addresses”: null,
“EndpointID”: “”,
“Gateway”: “”,
“GlobalIPv6Address”: “”,
“GlobalIPv6PrefixLen”: 0,
“IPAddress”: “”,
“IPPrefixLen”: 0,
“IPv6Gateway”: “”,
“MacAddress”: “”,
“Networks”: {
“nextcloud-aio”: {
“IPAMConfig”: null,
“Links”: null,
“Aliases”: [
“2220d30f0d39”
],
“NetworkID”: “d11eaa1da346ac52da018c6c2073a983878230469fd6057cfe9aff9b670a7141”,
“EndpointID”: “”,
“Gateway”: “”,
“IPAddress”: “”,
“IPPrefixLen”: 0,
“IPv6Gateway”: “”,
“GlobalIPv6Address”: “”,
“GlobalIPv6PrefixLen”: 0,
“MacAddress”: “”,
“DriverOpts”: null
}
}
}
}
]
So it should actually not be read-only. It is also not in my testing.
Update
Спойлер
[
{
“Id”: “d8efbcbd18b531dc0db60bedb498e240129bbedab87e20f15735bf0d3f1cc1c6”,
“Created”: “2023-07-20T14:59:36.284596656Z”,
“Path”: “/start.sh”,
“Args”: ,
“State”: {
“Status”: “exited”,
“Running”: false,
“Paused”: false,
“Restarting”: false,
“OOMKilled”: false,
“Dead”: false,
“Pid”: 0,
“ExitCode”: 1,
“Error”: “”,
“StartedAt”: “2023-07-20T15:34:49.117557563Z”,
“FinishedAt”: “2023-07-20T15:34:49.23834671Z”,
“Health”: {
“Status”: “unhealthy”,
“FailingStreak”: 0,
“Log”:
}
},
“Image”: “sha256:13382909fa48c1111622056979aa5a65c7cb48bcf43fcf159cfe5497e7d325e4”,
“ResolvConfPath”: “/var/lib/docker/containers/d8efbcbd18b531dc0db60bedb498e240129bbedab87e20f15735bf0d3f1cc1c6/resolv.conf”,
“HostnamePath”: “/var/lib/docker/containers/d8efbcbd18b531dc0db60bedb498e240129bbedab87e20f15735bf0d3f1cc1c6/hostname”,
“HostsPath”: “/var/lib/docker/containers/d8efbcbd18b531dc0db60bedb498e240129bbedab87e20f15735bf0d3f1cc1c6/hosts”,
“LogPath”: “”,
“Name”: “/nextcloud-aio-database”,
“RestartCount”: 44,
“Driver”: “overlay2”,
“Platform”: “linux”,
“MountLabel”: “”,
“ProcessLabel”: “”,
“AppArmorProfile”: “”,
“ExecIDs”: null,
“HostConfig”: {
“Binds”: [
“nextcloud_aio_database:/var/lib/postgresql/data:rw”,
“nextcloud_aio_database_dump:/mnt/data:rw”
],
“ContainerIDFile”: “”,
“LogConfig”: {
“Type”: “journald”,
“Config”: {}
},
“NetworkMode”: “nextcloud-aio”,
“PortBindings”: null,
“RestartPolicy”: {
“Name”: “unless-stopped”,
“MaximumRetryCount”: 0
},
“AutoRemove”: false,
“VolumeDriver”: “”,
“VolumesFrom”: null,
“CapAdd”: null,
“CapDrop”: null,
“CgroupnsMode”: “private”,
“Dns”: null,
“DnsOptions”: null,
“DnsSearch”: null,
“ExtraHosts”: null,
“GroupAdd”: null,
“IpcMode”: “private”,
“Cgroup”: “”,
“Links”: null,
“OomScoreAdj”: 0,
“PidMode”: “”,
“Privileged”: false,
“PublishAllPorts”: false,
“ReadonlyRootfs”: true,
“SecurityOpt”: null,
“Tmpfs”: {
“/var/run/postgresql”: “”
},
“UTSMode”: “”,
“UsernsMode”: “”,
“ShmSize”: 268435456,
“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,
“DeviceRequests”: null,
“KernelMemory”: 0,
“KernelMemoryTCP”: 0,
“MemoryReservation”: 0,
“MemorySwap”: 0,
“MemorySwappiness”: null,
“OomKillDisable”: null,
“PidsLimit”: null,
“Ulimits”: null,
“CpuCount”: 0,
“CpuPercent”: 0,
“IOMaximumIOps”: 0,
“IOMaximumBandwidth”: 0,
“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”
],
“ReadonlyPaths”: [
“/proc/bus”,
“/proc/fs”,
“/proc/irq”,
“/proc/sys”,
“/proc/sysrq-trigger”
]
},
“GraphDriver”: {
“Data”: {
“LowerDir”: “/var/lib/docker/overlay2/4f215887f39f2911f216f7a86b529eac5c843dbba4893154db0d5973543b4a45-init/diff:/var/lib/docker/overlay2/e72bc747c8e270c82d9deb52dd1dee84d3fb994b534ded863066257601e6e8fc/diff:/var/lib/docker/overlay2/943593e670edf58fd82bd0407563e8fb7afd4d28b04313a3c17abc61d4f485b6/diff:/var/lib/docker/overlay2/ae86312de0f080877636be311e71ba0c38835078736760ef6094bb98a1f5628f/diff:/var/lib/docker/overlay2/190fcc80073de28fcb0788ae800c1750c6cbb2acba7e39c29c2be7381cd38f2d/diff:/var/lib/docker/overlay2/23f94877fe54e0d3e5aed001686329553a54d6dcd45ba48c31f85246b7598e96/diff:/var/lib/docker/overlay2/6a27f52df4651ba8bb11f650d37c4f56aad6a4ea7fcf1e49746d9015387ec48c/diff:/var/lib/docker/overlay2/6105f1079ecc6693573f60124b69655277aabd9fd52db2f95e6f24ef4afc2dbd/diff:/var/lib/docker/overlay2/2ea5b1d211693fdedda2b032f66887367c528be1b526af14c14d1ffaa5a20a3f/diff:/var/lib/docker/overlay2/4eea6138b385ac1ecf8393cc3df046a3e413bbde5d5812b766033a2522656711/diff:/var/lib/docker/overlay2/5aeea37b67e1ba044e6a623ffae5bc093c3030d4cf98f491d139ad8e0fa7e9c7/diff:/var/lib/docker/overlay2/ecd01b07cb72cb22b3880b2af6f3c6bd80b4700f7000f59d878a7c9e0604192c/diff:/var/lib/docker/overlay2/1b90dfacf9e3feac87bf21727d8c43cdf10fdd0e88139f33e2fa131659547c06/diff”,
“MergedDir”: “/var/lib/docker/overlay2/4f215887f39f2911f216f7a86b529eac5c843dbba4893154db0d5973543b4a45/merged”,
“UpperDir”: “/var/lib/docker/overlay2/4f215887f39f2911f216f7a86b529eac5c843dbba4893154db0d5973543b4a45/diff”,
“WorkDir”: “/var/lib/docker/overlay2/4f215887f39f2911f216f7a86b529eac5c843dbba4893154db0d5973543b4a45/work”
},
“Name”: “overlay2”
},
“Mounts”: [
{
“Type”: “volume”,
“Name”: “nextcloud_aio_database”,
“Source”: “/var/lib/docker/volumes/nextcloud_aio_database/_data”,
“Destination”: “/var/lib/postgresql/data”,
“Driver”: “local”,
“Mode”: “rw”,
“RW”: true,
“Propagation”: “”
},
{
“Type”: “volume”,
“Name”: “nextcloud_aio_database_dump”,
“Source”: “/var/lib/docker/volumes/nextcloud_aio_database_dump/_data”,
“Destination”: “/mnt/data”,
“Driver”: “local”,
“Mode”: “rw”,
“RW”: true,
“Propagation”: “”
}
],
“Config”: {
“Hostname”: “d8efbcbd18b5”,
“Domainname”: “”,
“User”: “postgres”,
“AttachStdin”: false,
“AttachStdout”: false,
“AttachStderr”: false,
“ExposedPorts”: {
“5432/tcp”: {}
},
“Tty”: false,
“OpenStdin”: false,
“StdinOnce”: false,
“Env”: [
“POSTGRES_PASSWORD=a98a1911e983508350036aae6d8676b6624669f97cd16e37”,
“POSTGRES_DB=nextcloud_database”,
“POSTGRES_USER=nextcloud”,
“TZ=Europe/Moscow”,
“PGTZ=Europe/Moscow”,
“PATH=/usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin:/sbin:/bin”,
“LANG=en_US.utf8”,
“PG_MAJOR=15”,
“PG_VERSION=15.3”,
“PG_SHA256=ffc7d4891f00ffbf5c3f4eab7fbbced8460b8c0ee63c5a5167133b9e6599d932”,
“DOCKER_PG_LLVM_DEPS=llvm15-dev \t\tclang15”,
“PGDATA=/var/lib/postgresql/data”
],
“Cmd”: null,
“Healthcheck”: {
“Test”: [
“CMD-SHELL”,
“/healthcheck.sh”
]
},
“Image”: “nextcloud/aio-postgresql:latest”,
“Volumes”: {
“/mnt/data”: {},
“/var/lib/postgresql/data”: {}
},
“WorkingDir”: “”,
“Entrypoint”: [
“/start.sh”
],
“OnBuild”: null,
“Labels”: {
“com.centurylinklabs.watchtower.enable”: “false”
},
“StopSignal”: “SIGINT”
},
“NetworkSettings”: {
“Bridge”: “”,
“SandboxID”: “5bbd9cfc4394d5fab18d97668d97f6db798a58d59372a7c9d012db332f9b16e1”,
“HairpinMode”: false,
“LinkLocalIPv6Address”: “”,
“LinkLocalIPv6PrefixLen”: 0,
“Ports”: {},
“SandboxKey”: “/var/run/docker/netns/5bbd9cfc4394”,
“SecondaryIPAddresses”: null,
“SecondaryIPv6Addresses”: null,
“EndpointID”: “”,
“Gateway”: “”,
“GlobalIPv6Address”: “”,
“GlobalIPv6PrefixLen”: 0,
“IPAddress”: “”,
“IPPrefixLen”: 0,
“IPv6Gateway”: “”,
“MacAddress”: “”,
“Networks”: {
“nextcloud-aio”: {
“IPAMConfig”: null,
“Links”: null,
“Aliases”: [
“d8efbcbd18b5”
],
“NetworkID”: “aa2ddb7f441c74dc4dca5bfd7829dac22420ac13c122c4f9d8477c1ec3a2b81a”,
“EndpointID”: “”,
“Gateway”: “”,
“IPAddress”: “”,
“IPPrefixLen”: 0,
“IPv6Gateway”: “”,
“GlobalIPv6Address”: “”,
“GlobalIPv6PrefixLen”: 0,
“MacAddress”: “”,
“DriverOpts”: null
}
}
}
}
]
So it should actually not be read-only. It is also not in my testing.
Can you maybe try if updating docker to a higher version makes things work - just for a test? Otherwise I have no clue why it does not work in your case.
Do you maybe have SELinux enabled? If yes can you disable it for a test?
After updating to docker v.24 everything worked properly