Closed Ahiok closed 22 hours ago
暴露端口2200:22
应为9288:9288
。
如果可以,请帖一下docker的日志
9288:9288
点开日志里是空白的,小白只能找到docker的事件,只能看到docker在反复重启,我的软路由是旁路由网关的,默认容器是桥接 [2024-03-19 23:11:49] container start Container ID: 8064105c761e05f20592cc25f9abf599703f90f6009878239d92a7bb5f624827 Container Name: GrocyCN [2024-03-19 23:11:49] container die Container ID: 8064105c761e05f20592cc25f9abf599703f90f6009878239d92a7bb5f624827 Container Name: GrocyCN [2024-03-19 23:11:50] network disconnect Container ID: 8064105c761e05f20592cc25f9abf599703f90f6009878239d92a7bb5f624827 Network Name: bridge Network type: bridge 其中有个检查选项里面有许多内容,大佬能看看什么问题吗,感谢 { "Path": "python", "ProcessLabel": "", "ResolvConfPath": "\/mnt\/data_mmcblk0p4\/docker\/containers\/8064105c761e05f20592cc25f9abf599703f90f6009878239d92a7bb5f624827\/resolv.conf", "NetworkSettings": { "LinkLocalIPv6Address": "", "SandboxID": "e3fe0fbec75cc68d3a5ce2a76e2d4c8564f3f57ff26d31b52ac516c84c6585a3", "HairpinMode": false, "Networks": { "bridge": { "NetworkID": "95b265f5c392dc317f35540addcfb64826ecaf524ef477929928b72fb0d662a6", "IPAddress": "", "MacAddress": "", "IPPrefixLen": 0, "IPv6Gateway": "", "Gateway": "", "GlobalIPv6PrefixLen": 0, "EndpointID": "", "GlobalIPv6Address": "" } }, "Ports": [ ], "Bridge": "", "MacAddress": "", "IPv6Gateway": "", "IPPrefixLen": 0, "IPAddress": "", "EndpointID": "", "SandboxKey": "\/var\/run\/docker\/netns\/e3fe0fbec75c", "Gateway": "", "GlobalIPv6PrefixLen": 0, "LinkLocalIPv6PrefixLen": 0, "GlobalIPv6Address": "" }, "MountLabel": "", "HostsPath": "\/mnt\/data_mmcblk0p4\/docker\/containers\/8064105c761e05f20592cc25f9abf599703f90f6009878239d92a7bb5f624827\/hosts", "LogPath": "\/mnt\/data_mmcblk0p4\/docker\/containers\/8064105c761e05f20592cc25f9abf599703f90f6009878239d92a7bb5f624827\/8064105c761e05f20592cc25f9abf599703f90f6009878239d92a7bb5f624827-json.log", "RestartCount": 14, "Config": { "AttachStdout": false, "Labels": [ ], "User": "", "AttachStdin": false, "Tty": true, "WorkingDir": "\/usr\/src\/app", "AttachStderr": false, "OpenStdin": true, "Cmd": [ "python", ".\/app.py" ], "Image": "osnsyc\/grocycompanioncn:latest", "Hostname": "GrocyCN", "ExposedPorts": { "9288\/tcp": [ ], "22\/tcp": [ ] }, "Domainname": "", "Env": [ "PATH=\/usr\/local\/bin:\/usr\/local\/sbin:\/usr\/local\/bin:\/usr\/sbin:\/usr\/bin:\/sbin:\/bin", "LANG=C.UTF-8", "GPG_KEY=E3FF2839C048B25C084DEBE9B26995E310250568", "PYTHON_VERSION=3.8.18", "PYTHON_PIP_VERSION=23.0.1", "PYTHON_SETUPTOOLS_VERSION=57.5.0", "PYTHON_GET_PIP_URL=https:\/\/github.com\/pypa\/get-pip\/raw\/c6add47b0abf67511cdfb4734771cbab403af062\/public\/get-pip.py", "PYTHON_GET_PIP_SHA256=22b849a10f86f5ddf7ce148ca2a31214504ee6c83ef626840fde6e5dcd809d11" ], "StdinOnce": false }, "Mounts": [ { "Type": "bind", "Source": "\/mnt\/data_mmcblk0p4\/grocycn", "Mode": "", "Destination": "\/config", "RW": true, "Propagation": "rprivate" } ], "Id": "8064105c761e05f20592cc25f9abf599703f90f6009878239d92a7bb5f624827", "Platform": "linux", "HostConfig": { "PidMode": "", "MemorySwap": 0, "ConsoleSize": [ 0, 0 ], "IOMaximumIOps": 0, "KernelMemoryTCP": 0, "CpuPeriod": 0, "OomScoreAdj": 0, "BlkioWeight": 500, "ShmSize": 67108864, "Privileged": false, "PortBindings": { "9288\/tcp": [ { "HostIp": "", "HostPort": "9288" } ], "22\/tcp": [ { "HostIp": "", "HostPort": "2200" } ] }, "CpuShares": 0, "NetworkMode": "bridge", "CpuQuota": 0, "NanoCpus": 0, "CpuCount": 0, "Isolation": "", "Cgroup": "", "ContainerIDFile": "", "ReadonlyPaths": [ "\/proc\/bus", "\/proc\/fs", "\/proc\/irq", "\/proc\/sys", "\/proc\/sysrq-trigger" ], "AutoRemove": false, "UTSMode": "", "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" ], "VolumeDriver": "", "IOMaximumBandwidth": 0, "CpuPercent": 0, "CpuRealtimePeriod": 0, "KernelMemory": 0, "OomKillDisable": false, "Binds": [ "\/mnt\/data_mmcblk0p4\/grocycn:\/config" ], "MemoryReservation": 0, "UsernsMode": "", "RestartPolicy": { "Name": "unless-stopped", "MaximumRetryCount": 0 }, "PublishAllPorts": false, "CpusetMems": "", "CpusetCpus": "", "CgroupParent": "", "ReadonlyRootfs": false, "Runtime": "runc", "Memory": 0, "CpuRealtimeRuntime": 0, "IpcMode": "private", "CgroupnsMode": "host", "Dns": [ "192.168.123.1" ], "LogConfig": { "Config": { "max-size": "50m", "max-file": "2" }, "Type": "json-file" } }, "GraphDriver": { "Data": { "MergedDir": "\/mnt\/data_mmcblk0p4\/docker\/overlay2\/9208cc161d536d1738063f57bc6b90e7a1c15da836272d09334a3a17d1f00051\/merged", "WorkDir": "\/mnt\/data_mmcblk0p4\/docker\/overlay2\/9208cc161d536d1738063f57bc6b90e7a1c15da836272d09334a3a17d1f00051\/work", "UpperDir": "\/mnt\/data_mmcblk0p4\/docker\/overlay2\/9208cc161d536d1738063f57bc6b90e7a1c15da836272d09334a3a17d1f00051\/diff", "LowerDir": "\/mnt\/data_mmcblk0p4\/docker\/overlay2\/9208cc161d536d1738063f57bc6b90e7a1c15da836272d09334a3a17d1f00051-init\/diff:\/mnt\/data_mmcblk0p4\/docker\/overlay2\/e01efd7b5907a2edb90fd642deade16e1aaac15c48b81635f6f7f11f8033eb36\/diff:\/mnt\/data_mmcblk0p4\/docker\/overlay2\/d5b3811b9ea9dab77be75d37abb41e7af7bcb964f4a68676995e97b987c35c29\/diff:\/mnt\/data_mmcblk0p4\/docker\/overlay2\/fd2465cd56dc58430f665172842742f4305ba78645f2deeb76746d088770663a\/diff:\/mnt\/data_mmcblk0p4\/docker\/overlay2\/4ecdd8eeb58d1f69771537b489886965f7c52203b537a0244cac9b5d28216240\/diff:\/mnt\/data_mmcblk0p4\/docker\/overlay2\/a604c07bfbb7c3062f6eedc0fd624ea3ffbef2400b862d8255d75391cc4cf34d\/diff:\/mnt\/data_mmcblk0p4\/docker\/overlay2\/30f935fd3bf00c872ed1f3c5bd6e48b7c32a35ce98d0debfb4b3244599bb7412\/diff:\/mnt\/data_mmcblk0p4\/docker\/overlay2\/1596e33ef36892eb0153b9f667042a4530600dbf93fc3c05bc0c42a2c69e7e97\/diff:\/mnt\/data_mmcblk0p4\/docker\/overlay2\/db441ca72b45e98d576285bdd459edc3fc8a6bcee781ee9b651de6b68c57a7cb\/diff:\/mnt\/data_mmcblk0p4\/docker\/overlay2\/aafd3b6c8728586cfa7809c040b1d4ede7c9a161ae2d21d532b96bca2bebe604\/diff:\/mnt\/data_mmcblk0p4\/docker\/overlay2\/132fb48f06805337a5fec53f76d8af1b1f08273458a082744194b95beb369b98\/diff:\/mnt\/data_mmcblk0p4\/docker\/overlay2\/7f539afdd520bfcc84781d7ec09d8066b3c0fccbd9ddd7efee034115747335ec\/diff:\/mnt\/data_mmcblk0p4\/docker\/overlay2\/d6160a814b4775cd1eb82ce8b6c8033207bc6bc87dedb0ec0c3ea5a56c3c1f48\/diff" }, "Name": "overlay2" }, "State": { "Pid": 0, "FinishedAt": "2024-03-19T15:16:14.000653356Z", "StartedAt": "2024-03-19T15:16:13.934761889Z", "Error": "", "Running": true, "Paused": false, "OOMKilled": false, "Status": "restarting", "ExitCode": 1, "Restarting": true, "Dead": false }, "Driver": "overlay2", "Name": "\/GrocyCN", "Args": [ ".\/app.py" ], "HostnamePath": "\/mnt\/data_mmcblk0p4\/docker\/containers\/8064105c761e05f20592cc25f9abf599703f90f6009878239d92a7bb5f624827\/hostname", "Created": "2024-03-19T15:11:05.662709881Z", "AppArmorProfile": "", "Image": "sha256:f4b43776534711b3acda2216e65b06dc5b8e59e6f0f260ec6cc05b73386e05e0" }
绑定挂载改成指定的文件试试:/mnt/nvme0n1-4/Configs/grocycompanioncn/config.ini:/usr/src/app/config.ini
正确的日志获取:docker logs 容器名
按照按照上述命令更改后依旧不行, ,终端输入命令后显示standard_init_linux.go:228: exec user process caused: exec format error,前半段是指定文件但请问这个路径:/后的路径是什么意思呢?
绑定挂载改成指定的文件试试:
/mnt/nvme0n1-4/Configs/grocycompanioncn/config.ini:/usr/src/app/config.ini
正确的日志获取:
docker logs 容器名
按照按照上述命令更改后依旧不行, ,终端输入命令后显示standard_init_linux.go:228: exec user process caused: exec format error,前半段是指定文件但请问这个路径:/后的路径是什么意思呢?
绑定挂载改成指定的文件试试:
/mnt/nvme0n1-4/Configs/grocycompanioncn/config.ini:/usr/src/app/config.ini
正确的日志获取:docker logs 容器名
:
后为容器内部的配置文件路径,确保为/usr/src/app/config.ini
;
按照按照上述命令更改后依旧不行, ,终端输入命令后显示standard_init_linux.go:228: exec user process caused: exec format error,前半段是指定文件但请问这个路径:/后的路径是什么意思呢?
绑定挂载改成指定的文件试试:
/mnt/nvme0n1-4/Configs/grocycompanioncn/config.ini:/usr/src/app/config.ini
正确的日志获取:docker logs 容器名
- 已更新linux/arm64的image,请重新拉取osnsyc/grocycompanioncn:latest;
- 暴露端口应为:9288:9288;
- 配置文件挂载:/mnt/nvme0n1-4/Configs/grocycompanioncn/config.ini:/usr/src/app/config.ini
:
后为容器内部的配置文件路径,确保为/usr/src/app/config.ini
;
大佬现在docker跑起来不会重启了,但是web端还是打不开,系统日志和内核日志长这样
Tue Mar 26 22:39:32 2024 daemon.info netdata[6435]: Initializing file /var/cache/netdata/disk_space._mnt_data_mmcblk0p4_docker_overlay2_f1b0994686eb6583009a823b70b1ad82b9955e400e70b4667002916ea1e8b7e3_merged/main.db. Tue Mar 26 22:39:32 2024 daemon.info netdata[6435]: Initializing file /var/cache/netdata/disk_space._mnt_data_mmcblk0p4_docker_overlay2_f1b0994686eb6583009a823b70b1ad82b9955e400e70b4667002916ea1e8b7e3_merged/avail.db. Tue Mar 26 22:39:32 2024 daemon.info netdata[6435]: Initializing file /var/cache/netdata/disk_space._mnt_data_mmcblk0p4_docker_overlay2_f1b0994686eb6583009a823b70b1ad82b9955e400e70b4667002916ea1e8b7e3_merged/used.db. Tue Mar 26 22:39:32 2024 daemon.info netdata[6435]: Initializing file /var/cache/netdata/disk_space._mnt_data_mmcblk0p4_docker_overlay2_f1b0994686eb6583009a823b70b1ad82b9955e400e70b4667002916ea1e8b7e3_merged/reserved_for_root.db. Tue Mar 26 22:39:32 2024 daemon.info netdata[6435]: Initializing file /var/cache/netdata/disk_inodes._mnt_data_mmcblk0p4_docker_overlay2_f1b0994686eb6583009a823b70b1ad82b9955e400e70b4667002916ea1e8b7e3_merged/main.db. Tue Mar 26 22:39:32 2024 daemon.info netdata[6435]: Initializing file /var/cache/netdata/disk_inodes._mnt_data_mmcblk0p4_docker_overlay2_f1b0994686eb6583009a823b70b1ad82b9955e400e70b4667002916ea1e8b7e3_merged/avail.db. Tue Mar 26 22:39:32 2024 daemon.info netdata[6435]: Initializing file /var/cache/netdata/disk_inodes._mnt_data_mmcblk0p4_docker_overlay2_f1b0994686eb6583009a823b70b1ad82b9955e400e70b4667002916ea1e8b7e3_merged/used.db. Tue Mar 26 22:39:32 2024 daemon.info netdata[6435]: Initializing file /var/cache/netdata/disk_inodes._mnt_data_mmcblk0p4_docker_overlay2_f1b0994686eb6583009a823b70b1ad82b9955e400e70b4667002916ea1e8b7e3_merged/reserved_for_root.db. Tue Mar 26 22:39:32 2024 daemon.err netdata[6435]: DISKSPACE: Mount point '/tmp/run/docker/netns/2fd4036b0a16' (disk '_tmp_run_docker_netns_2fd4036b0a16', filesystem 'nsfs', root 'net:[4026532705]') is not a directory.
内核日志
[29761.217875] overlayfs: NFS export requires "index=on", falling back to nfs_export=off. [29761.307957] overlayfs: NFS export requires "index=on", falling back to nfs_export=off. [29766.636656] overlayfs: NFS export requires "index=on", falling back to nfs_export=off. [29766.641506] docker0: port 3(veth0867fd9) entered blocking state [29766.641514] docker0: port 3(veth0867fd9) entered disabled state [29766.641990] device veth0867fd9 entered promiscuous mode [29766.642670] IPv6: ADDRCONF(NETDEV_UP): veth0867fd9: link is not ready [29767.228485] eth0: renamed from vethfceca9d [29767.300922] IPv6: ADDRCONF(NETDEV_CHANGE): veth0867fd9: link becomes ready [29767.301378] docker0: port 3(veth0867fd9) entered blocking state [29767.301395] docker0: port 3(veth0867fd9) entered forwarding state
DISKSPACE: Mount point '/tmp/run/docker/netns/2fd4036b0a16' (disk '_tmp_run_docker_netns_2fd4036b0a16', filesystem 'nsfs', root 'net:[4026532705]') is not a directory.
对istore不熟悉,这个系统只能挂载目录?不能挂载单个文件?
检查一下挂载路径是否正确;如果可以的话还是ssh连到系统,用docker compose来启动
请大佬能不能看看按照这个步骤哪里有问题呢
拉取好grocycompanioncn:latest镜像 点击Docker→容器→新增容器名称 勾选:“交互”和“TTY” Docker镜像:选择刚刚下载的osnsyc/grocycompanioncn:latest 绑定挂载:/mnt/nvme0n1-4/Configs/grocycompanioncn:/config 其中在以上目录已经建好 config.ini 和 docker-compose.yml 文件 其中docker-compose.yml文件不变,config.ini 文件按照以下提示填写 其余不动 启动提交但是失败docker反复重启 无法访问http://127.0.0.1:9288