Closed iiwenwen closed 4 months ago
Hi,提供一下你的启动命令,以及需要更详细的日志信息
我是clone仓库,然后使用docker-compose.yml修改了其中LITESTREAM和b2的信息,
docker inspect 信息
{ "Id": "ad70a98ebeacfe66bf57256afab46d5b6dbab74f800a412b15e5cbc18e0ab41b", "Created": "2024-06-21T13:25:03.639333232Z", "Path": "--name", "Args": [ "memos", "-p", "5230:5230", "-v", "/Users/1111/.memos/:/var/opt/memos", "--env", "LITESTREAM_REPLICA_PATH=memos_prod.db", "--env", "LITESTREAM_REPLICA_BUCKET=1111", "--env", "LITESTREAM_REPLICA_ENDPOINT=s3.us-east-005.backblazeb2.com", "--env", "LITESTREAM_ACCESS_KEY_ID=1111", "--env", "LITESTREAM_SECRET_ACCESS_KEY=1111" ], "State": { "Status": "created", "Running": false, "Paused": false, "Restarting": false, "OOMKilled": false, "Dead": false, "Pid": 0, "ExitCode": 127, "Error": "failed to create task for container: failed to create shim task: OCI runtime create failed: runc create failed: unable to start container process: exec: \"--name\": executable file not found in $PATH: unknown", "StartedAt": "0001-01-01T00:00:00Z", "FinishedAt": "0001-01-01T00:00:00Z" }, "Image": "sha256:4fbcc91b31b79e1e66850fec7982466206f1fa3a96804ed2f0495c7fc8419f26", "ResolvConfPath": "/var/lib/docker/containers/ad70a98ebeacfe66bf57256afab46d5b6dbab74f800a412b15e5cbc18e0ab41b/resolv.conf", "HostnamePath": "/var/lib/docker/containers/ad70a98ebeacfe66bf57256afab46d5b6dbab74f800a412b15e5cbc18e0ab41b/hostname", "HostsPath": "/var/lib/docker/containers/ad70a98ebeacfe66bf57256afab46d5b6dbab74f800a412b15e5cbc18e0ab41b/hosts", "LogPath": "/var/lib/docker/containers/ad70a98ebeacfe66bf57256afab46d5b6dbab74f800a412b15e5cbc18e0ab41b/ad70a98ebeacfe66bf57256afab46d5b6dbab74f800a412b15e5cbc18e0ab41b-json.log", "Name": "/pedantic_poitras", "RestartCount": 0, "Driver": "overlay2", "Platform": "linux", "MountLabel": "", "ProcessLabel": "", "AppArmorProfile": "", "ExecIDs": null, "HostConfig": { "Binds": null, "ContainerIDFile": "", "LogConfig": { "Type": "json-file", "Config": {} }, "NetworkMode": "bridge", "PortBindings": {}, "RestartPolicy": { "Name": "no", "MaximumRetryCount": 0 }, "AutoRemove": false, "VolumeDriver": "", "VolumesFrom": null, "ConsoleSize": [ 22, 131 ], "CapAdd": null, "CapDrop": null, "CgroupnsMode": "private", "Dns": [], "DnsOptions": [], "DnsSearch": [], "ExtraHosts": null, "GroupAdd": null, "IpcMode": "private", "Cgroup": "", "Links": null, "OomScoreAdj": 0, "PidMode": "", "Privileged": false, "PublishAllPorts": false, "ReadonlyRootfs": false, "SecurityOpt": null, "UTSMode": "", "UsernsMode": "", "ShmSize": 67108864, "Runtime": "runc", "Isolation": "", "CpuShares": 0, "Memory": 0, "NanoCpus": 0, "CgroupParent": "", "BlkioWeight": 0, "BlkioWeightDevice": [], "BlkioDeviceReadBps": [], "BlkioDeviceWriteBps": [], "BlkioDeviceReadIOps": [], "BlkioDeviceWriteIOps": [], "CpuPeriod": 0, "CpuQuota": 0, "CpuRealtimePeriod": 0, "CpuRealtimeRuntime": 0, "CpusetCpus": "", "CpusetMems": "", "Devices": [], "DeviceCgroupRules": null, "DeviceRequests": null, "MemoryReservation": 0, "MemorySwap": 0, "MemorySwappiness": null, "OomKillDisable": null, "PidsLimit": null, "Ulimits": [], "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", "/sys/devices/virtual/powercap" ], "ReadonlyPaths": [ "/proc/bus", "/proc/fs", "/proc/irq", "/proc/sys", "/proc/sysrq-trigger" ] }, "GraphDriver": { "Data": { "LowerDir": "/var/lib/docker/overlay2/ed3847bf828380c312e54c7e1cd6851b1a38fc2ceccf5a7dfd7fab1bd47e7d7a-init/diff:/var/lib/docker/overlay2/279f9d8816ca9ad7178ad2f756c9d8c89a93dc4f8a16d06b919d38314924bed2/diff:/var/lib/docker/overlay2/0407f280cc6e8d4a7a37cafb9a96977203560d91ac3ca8b669b4dc4a74af87cd/diff:/var/lib/docker/overlay2/baa0100fd5c64e11c0f24112cb5230f9c3804ce19fd3ee744464e8aedd46c33c/diff:/var/lib/docker/overlay2/8de15cf2e7307709fbc9b8dff265f7108181e183bcae70db4d908fb295630ecb/diff:/var/lib/docker/overlay2/90d6be37395a20aadf9e8f81dc9cb57827a370e44246b4ce6b880b549d667bb7/diff:/var/lib/docker/overlay2/d6adb5b6eee7c9b3647e729188c3566e89f99552309ab482fa9405179f1c5f79/diff:/var/lib/docker/overlay2/db43c0eca89f8131a1e1dbf9a5f53bf8fe2c37c7b59f3e0cff43e3e07ab6210b/diff:/var/lib/docker/overlay2/4ddc6b754761cd69a4fa6c7c0d0bda8c6cc215c0f8ebeb8c94084ff095f28b3a/diff:/var/lib/docker/overlay2/3085cc5f7b4b1233727749f644a4b994f36a42eb738f6a0a8ab816cb522b463c/diff:/var/lib/docker/overlay2/c6ce40fb91bba6b9df6790b5c752f1afba93303db4caaa5a7896f162b63c6ddc/diff:/var/lib/docker/overlay2/b2c18490976f44949e7b3979f55b68cffa4e2738c27a650625f7aa0661aeabdd/diff", "MergedDir": "/var/lib/docker/overlay2/ed3847bf828380c312e54c7e1cd6851b1a38fc2ceccf5a7dfd7fab1bd47e7d7a/merged", "UpperDir": "/var/lib/docker/overlay2/ed3847bf828380c312e54c7e1cd6851b1a38fc2ceccf5a7dfd7fab1bd47e7d7a/diff", "WorkDir": "/var/lib/docker/overlay2/ed3847bf828380c312e54c7e1cd6851b1a38fc2ceccf5a7dfd7fab1bd47e7d7a/work" }, "Name": "overlay2" }, "Mounts": [ { "Type": "volume", "Name": "4785b44b5c1a391b1317a5a78ceb0494cd2b45c7cbbb13016d50a14d4b73dd13", "Source": "/var/lib/docker/volumes/4785b44b5c1a391b1317a5a78ceb0494cd2b45c7cbbb13016d50a14d4b73dd13/_data", "Destination": "/var/opt/memos", "Driver": "local", "Mode": "", "RW": true, "Propagation": "" } ], "Config": { "Hostname": "ad70a98ebeac", "Domainname": "", "User": "", "AttachStdin": false, "AttachStdout": false, "AttachStderr": false, "ExposedPorts": { "5230/tcp": {} }, "Tty": false, "OpenStdin": false, "StdinOnce": false, "Env": [ "PATH=/usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin:/sbin:/bin", "TZ=UTC", "MEMOS_MODE=prod", "MEMOS_PORT=5230", "MEMOGRAM_TAG=0.1.2", "DB_PATH=/var/opt/memos/memos_prod.db", "SERVER_ADDR=dns:localhost:5230" ], "Cmd": [ "--name", "memos", "-p", "5230:5230", "-v", "/Users/1111/.memos/:/var/opt/memos", "--env", "LITESTREAM_REPLICA_PATH=memos_prod.db", "--env", "LITESTREAM_REPLICA_BUCKET=1111", "--env", "LITESTREAM_REPLICA_ENDPOINT=s3.us-east-005.backblazeb2.com", "--env", "LITESTREAM_ACCESS_KEY_ID=1111", "--env", "LITESTREAM_SECRET_ACCESS_KEY=1111" ], "Image": "ghcr.io/hu3rror/memos-litestream:stable", "Volumes": { "/var/opt/memos": {} }, "WorkingDir": "/usr/local/memos", "Entrypoint": null, "OnBuild": null, "Labels": { "org.opencontainers.image.created": "2024-06-14T02:26:19.510Z", "org.opencontainers.image.description": "✍️ Run memos with litestream.", "org.opencontainers.image.licenses": "GPL-3.0", "org.opencontainers.image.revision": "3b43ded5adc40883b072e2d17d9cf8c0affda287", "org.opencontainers.image.source": "https://github.com/hu3rror/memos-litestream", "org.opencontainers.image.title": "memos-litestream", "org.opencontainers.image.url": "https://github.com/hu3rror/memos-litestream", "org.opencontainers.image.version": "0.22.2" } }, "NetworkSettings": { "Bridge": "", "SandboxID": "d8b8323b35f17dbd333c24764d85ebaf01d670c58b60abfb238d41b8b595612e", "SandboxKey": "/var/run/docker/netns/d8b8323b35f1", "Ports": { "5230/tcp": null }, "HairpinMode": false, "LinkLocalIPv6Address": "", "LinkLocalIPv6PrefixLen": 0, "SecondaryIPAddresses": null, "SecondaryIPv6Addresses": null, "EndpointID": "4fcc21f29574ae3a409411da404abec36267acd3bba9244291c6d0188a128036", "Gateway": "192.168.215.1", "GlobalIPv6Address": "", "GlobalIPv6PrefixLen": 0, "IPAddress": "192.168.215.3", "IPPrefixLen": 24, "IPv6Gateway": "", "MacAddress": "02:42:c0:a8:d7:03", "Networks": { "bridge": { "IPAMConfig": null, "Links": null, "Aliases": null, "MacAddress": "02:42:c0:a8:d7:03", "NetworkID": "9192b8bad4b34b265ca0441fc445c6911fd6b2da9c5e94aa8ebb628be934786f", "EndpointID": "4fcc21f29574ae3a409411da404abec36267acd3bba9244291c6d0188a128036", "Gateway": "192.168.215.1", "IPAddress": "192.168.215.3", "IPPrefixLen": 24, "IPv6Gateway": "", "GlobalIPv6Address": "", "GlobalIPv6PrefixLen": 0, "DriverOpts": null, "DNSNames": null } } } }
使用docker run -it --entrypoint /bin/sh
Starting litestream replicate with the Memos service as the subprocess. /usr/local/memos # time=2024-06-21T14:03:57.970Z level=INFO msg=litestream version=v0.3.13 time=2024-06-21T14:03:57.970Z level=ERROR msg="failed to run" error="bucket required for s3 replica"
感谢你的日志,问题已经修复了,请重新 pull build 并更新上游镜像
本地构建容器,然后启动时会自动关闭容器,日志内容如下:
Database exists, skipping restore. Tips: If you want to restore the latest version of database from S3/B2, please delete the /var/opt/memos/memos_prod.db file and restart. Warning: Deleting the /var/opt/memos/memos_prod.db file may cause data loss. Make sure to backup your database before deleting the /var/opt/memos/memos_prod.db file. Starting litestream replicate with the Memos service as the subprocess.
环境:Docker Compose version v2.27.0