EricJMarti / inventory-hunter

⚡️ Get notified as soon as your next CPU, GPU, or game console is in stock
MIT License
1.12k stars 263 forks source link

Container exiting immediately #69

Closed Utherellus closed 3 years ago

Utherellus commented 3 years ago

I created container with Discord webhook but it exits immediately:

pi@raspberrypi:~/inventory-hunter $ docker ps -a -f name=newegg_rtx_3070 CONTAINER ID IMAGE COMMAND CREATED STATUS PORTS NAMES 4a01407b39e0 ericjmarti/inventory-hunter:latest "python /src/run.py …" 15 minutes ago Exited (139) 15 minutes ago

My command was looking like this:

./docker_run.bash -c ./config/newegg_rtx_3070.yaml -a discord -w https://discordapp.com/api/webhooks/78449045994.........etc etc

I did git pull. No luck.

EricJMarti commented 3 years ago

What does it say when you run:

$ docker logs newegg_rtx_3070
SAMLCSE commented 3 years ago

I have same issue for newegg_rtx_3060_ti. Exited just after running.

here is the log

pi@raspberrypi:~/Downloads/inventory-hunter $ docker logs -f newegg_rtx_3060_ti D2020-12-06 05:17:47,478 [root] starting v1.0.1 with args: /src/run.py --alerter discord --webhook https://discord.com/api/webhooks/7xxxxxxxZ D2020-12-06 05:17:48,849 [root] using parser: lxml D2020-12-06 05:17:48,850 [root] registering custom scraper for domain: amazon D2020-12-06 05:17:48,854 [root] registering custom scraper for domain: bestbuy D2020-12-06 05:17:48,857 [root] registering custom scraper for domain: bhphotovideo D2020-12-06 05:17:48,861 [root] registering custom scraper for domain: microcenter D2020-12-06 05:17:48,865 [root] registering custom scraper for domain: newegg D2020-12-06 05:17:48,882 [root] registering custom scraper for domain: walmart E2020-12-06 05:17:48,972 [root] caught exception Traceback (most recent call last): File "/src/run.py", line 51, in main drivers = init_drivers(config) File "/src/driver.py", line 71, in init_drivers timeout = max(config.refresh_interval, 5) # in seconds TypeError: '>' not supported between instances of 'int' and 'str'

EricJMarti commented 3 years ago

@SAMLCSE that error should be fixed by this commit: https://github.com/EricJMarti/inventory-hunter/commit/2626909a47fc55de760ac047a30109ab7242fc4e

Please pull the latest image using:

$ docker pull ericjmarti/inventory-hunter:latest
2k4rolla commented 3 years ago

@EricJMarti thanks so much overall for the project, Newb here so please excuse my ignorance but for some reason all my containers are exiting as soon as they start.

pi@raspberrypi:~/inventory-hunter $ docker ps -a CONTAINER ID IMAGE COMMAND CREATED STATUS PORTS NAMES d00a4f4f09.. ericjmarti/inventory-hunter:latest "python /src/run.py …" 21 minutes ago Exited (139) 13 minutes ago amazon_rtx_3080 d74cde0a1e.. ericjmarti/inventory-hunter:latest "python /src/run.py …" 24 minutes ago Exited (139) 24 minutes ago microcenter_r7_5800x b209038a49.. ericjmarti/inventory-hunter:latest "python /src/run.py …" 25 minutes ago Exited (139) 25 minutes ago bestbuy_rx_6800_xt 3373d34207.. ericjmarti/inventory-hunter:latest "python /src/run.py …" 25 minutes ago Exited (139) 25 minutes ago ryzen_5_5600 55289db0ae.. ericjmarti/inventory-hunter:latest "python /src/run.py …" 26 minutes ago Exited (139) 25 minutes ago newegg_rtx_3060_ti 2be087bb62.. ericjmarti/inventory-hunter:latest "python /src/run.py …" 26 minutes ago Exited (139) 26 minutes ago bestbuy_rtx_3070 4b36a5c3e9.. ericjmarti/inventory-hunter:latest "python /src/run.py …" 32 minutes ago Exited (139) 32 minutes ago newegg_rtx_3070

EricJMarti commented 3 years ago

@2k4rolla Can you copy-paste the error you see when you run docker logs on one of the containers?

2k4rolla commented 3 years ago

@2k4rolla Can you copy-paste the error you see when you run docker logs on one of the containers?

pi@raspberrypi:~/inventory-hunter $ docker logs d00a4f4f0980 pi@raspberrypi:~/inventory-hunter $ docker container inspect d00a4f4f0980 [ { "Id": "d00a4f4f0980c00702f7e6a5cab0f97535737953d77fa8812678df2e53e6e1d5", "Created": "2020-12-06T18:23:20.916594388Z", "Path": "python", "Args": [ "/src/run.py", "--alerter", "slack", "--webhook", "https://hooks.slack.com/services/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" ], "State": { "Status": "exited", "Running": false, "Paused": false, "Restarting": false, "OOMKilled": false, "Dead": false, "Pid": 0, "ExitCode": 139, "Error": "", "StartedAt": "2020-12-06T18:59:45.57491516Z", "FinishedAt": "2020-12-06T18:59:45.656886686Z" }, "Image": "sha256:dd90f8d069bbabb2d7be846073bbcb3f38eb273c113090f14519c7cd2a8ac618", "ResolvConfPath": "/var/lib/docker/containers/d00a4f4f0980c00702f7e6a5cab0f97535737953d77fa8812678df2e53e6e1d5/resolv.conf", "HostnamePath": "/var/lib/docker/containers/d00a4f4f0980c00702f7e6a5cab0f97535737953d77fa8812678df2e53e6e1d5/hostname", "HostsPath": "/var/lib/docker/containers/d00a4f4f0980c00702f7e6a5cab0f97535737953d77fa8812678df2e53e6e1d5/hosts", "LogPath": "/var/lib/docker/containers/d00a4f4f0980c00702f7e6a5cab0f97535737953d77fa8812678df2e53e6e1d5/d00a4f4f0980c00702f7e6a5cab0f97535737953d77fa8812678df2e53e6e1d5-json.log", "Name": "/amazon_rtx_3080", "RestartCount": 0, "Driver": "overlay2", "Platform": "linux", "MountLabel": "", "ProcessLabel": "", "AppArmorProfile": "", "ExecIDs": null, "HostConfig": { "Binds": [ "/home/pi/inventory-hunter/config/amazon_rtx_3080.yaml:/config.yaml" ], "ContainerIDFile": "", "LogConfig": { "Type": "json-file", "Config": {} }, "NetworkMode": "host", "PortBindings": {}, "RestartPolicy": { "Name": "no", "MaximumRetryCount": 0 }, "AutoRemove": false, "VolumeDriver": "", "VolumesFrom": null, "CapAdd": null, "CapDrop": null, "Capabilities": null, "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", "ConsoleSize": [ 0, 0 ], "Isolation": "", "CpuShares": 0, "Memory": 0, "NanoCpus": 0, "CgroupParent": "", "BlkioWeight": 0, "BlkioWeightDevice": [], "BlkioDeviceReadBps": null, "BlkioDeviceWriteBps": null, "BlkioDeviceReadIOps": null, "BlkioDeviceWriteIOps": null, "CpuPeriod": 0, "CpuQuota": 0, "CpuRealtimePeriod": 0, "CpuRealtimeRuntime": 0, "CpusetCpus": "", "CpusetMems": "", "Devices": [], "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/7a8757b63cbd4aeda92f2a75d05a8594bd65bd0c7725ed3ca137dcd74720ab3a-init/diff:/var/lib/docker/overlay2/e38697bcda0c95c12c9f6a7b22492c3df561dfa1977c874c7e8128ad1d8e7453/diff:/var/lib/docker/overlay2/ac162bcffd0d026171c4c2b5bc503277a8170c0d98ed1f13356ee50a261304d3/diff:/var/lib/docker/overlay2/279687263b161fcb4cddf3d3c104517541a8b5e494d153f25cce34ab2871c9cd/diff:/var/lib/docker/overlay2/b42e7b0f9320480b7d5294c192b5a5ef1a67548a8534a7dbf91b4dd8bd7e7846/diff:/var/lib/docker/overlay2/dc3d557b151c0fb880665a1ca223a4d12a31336542e1ab9b8e377be12c152a90/diff:/var/lib/docker/overlay2/6700b6cc72eda41741d94df2c237fb6a9b8d5aa5942afb9b067d09e5272588df/diff:/var/lib/docker/overlay2/e49c84cebb5a37ae400340f10f6cb562da0818c4a50a28d9e4f40ec265f2750e/diff:/var/lib/docker/overlay2/a1f7e4cb7ebcc8853620f06f12ecf6a3cf7f62914873b05680d7a50303e29aeb/diff:/var/lib/docker/overlay2/924080b44c8dca7f0359e747c0ad5d78b5c09f790a51b0b8d76cd788efab4c83/diff:/var/lib/docker/overlay2/f2c0e6cf2f77a76a89368810eb1c914ff0e8542e8fcc2c196ec21d26054b3e09/diff:/var/lib/docker/overlay2/f318af139efd6e844b4a60718a1d2ab1a97bf1262b460e51358d2ab72373c79c/diff:/var/lib/docker/overlay2/9740bfe4876f5042a9ad611d7a8ebb67b9e81c6fef0ba14d428f0aa4e9bd21f0/diff:/var/lib/docker/overlay2/1854e4a27d6a7c3e450fd4aa42ea4770d12ba734a17d3863dc212b0bf701c359/diff:/var/lib/docker/overlay2/1d234d7bf97b111f5612a47459e7101d796f19f3477be38c1c4cec7ad2dbac84/diff:/var/lib/docker/overlay2/53edff165122e5f8d9b7aa1fab6e02588c8db9efb7cfad8ad59d869817423bc2/diff", "MergedDir": "/var/lib/docker/overlay2/7a8757b63cbd4aeda92f2a75d05a8594bd65bd0c7725ed3ca137dcd74720ab3a/merged", "UpperDir": "/var/lib/docker/overlay2/7a8757b63cbd4aeda92f2a75d05a8594bd65bd0c7725ed3ca137dcd74720ab3a/diff", "WorkDir": "/var/lib/docker/overlay2/7a8757b63cbd4aeda92f2a75d05a8594bd65bd0c7725ed3ca137dcd74720ab3a/work" }, "Name": "overlay2" }, "Mounts": [ { "Type": "bind", "Source": "/home/pi/inventory-hunter/config/amazon_rtx_3080.yaml", "Destination": "/config.yaml", "Mode": "", "RW": true, "Propagation": "rprivate" } ], "Config": { "Hostname": "raspberrypi", "Domainname": "", "User": "", "AttachStdin": false, "AttachStdout": false, "AttachStderr": false, "Tty": false, "OpenStdin": false, "StdinOnce": false, "Env": [ "PATH=/usr/local/bin:/usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin:/sbin:/bin", "LANG=en_US.UTF-8", "GPG_KEY=E3FF2839C048B25C084DEBE9B26995E310250...", "PYTHON_VERSION=3.9.0", "PYTHON_PIP_VERSION=20.3.1", "PYTHON_GET_PIP_URL=https://github.com/pypa/get-pip/raw/91630a4867b1f93ba0a12aa81d0ec4ecc1e7eeb9/get-pip.py", "PYTHON_GET_PIP_SHA256=d48ae68f297cac54db17e4107b800faae0e5210131f9f386c30c0166bf8d8...", "LC_ALL=en_US.UTF-8", "LANGUAGE=en_US.UTF-8" ], "Cmd": [ "--alerter", "slack", "--webhook", "https://hooks.slack.com/services/T01G9F1SR7D/B01G99CB1RQ/Hq6i13lDfymhrG6Aj5fcY..." ], "Image": "ericjmarti/inventory-hunter:latest", "Volumes": null, "WorkingDir": "/", "Entrypoint": [ "python", "/src/run.py" ], "OnBuild": null, "Labels": {} }, "NetworkSettings": { "Bridge": "", "SandboxID": "5d1111ab1db29963cab43caac4dabb877bc4281a1a472015431d6ecbae439...", "HairpinMode": false, "LinkLocalIPv6Address": "", "LinkLocalIPv6PrefixLen": 0, "Ports": {}, "SandboxKey": "/var/run/docker/netns/default", "SecondaryIPAddresses": null, "SecondaryIPv6Addresses": null, "EndpointID": "", "Gateway": "", "GlobalIPv6Address": "", "GlobalIPv6PrefixLen": 0, "IPAddress": "", "IPPrefixLen": 0, "IPv6Gateway": "", "MacAddress": "", "Networks": { "host": { "IPAMConfig": null, "Links": null, "Aliases": null, "NetworkID": "b8b69a4752af49317a20147dcd545d79d04b49e3c15891fc85cb4437ff19b...", "EndpointID": "", "Gateway": "", "IPAddress": "", "IPPrefixLen": 0, "IPv6Gateway": "", "GlobalIPv6Address": "", "GlobalIPv6PrefixLen": 0, "MacAddress": "", "DriverOpts": null } } } } ]

2k4rolla commented 3 years ago

@EricJMarti problem tested and resolved! I've been working all day on this! Come to find out the problems had to due with the Pi Zero I was running, I'm assuming this is due to the architectural differences on the Pi Zero versus the Pi 4. I now running it on the Pi 4, tested the 2080 config file and I'm receiving my Slack notifications!

EricJMarti commented 3 years ago

Ah yes, the Pi Zero runs requires an armv6 image, but I wasn't able to get this project to build on that architecture.