coollabsio / coolify

An open-source & self-hostable Heroku / Netlify / Vercel alternative.
https://coolify.io
Apache License 2.0
26.4k stars 1.34k forks source link

[Bug]: Rust application fails when running in Coolify #2673

Open Rinma opened 1 week ago

Rinma commented 1 week ago

Description

I built my own image from this repo https://gitlab.com/radiobrowser/radiobrowser-api-rust because the official Repo does not support arm64, but my coolify instance runs on arm CPU. After building, I could run the image on my MacBook, I could run it directly on the server, but as soon as I start it with Coolify as Docker Image Resource I get the error

thread 'main' panicked at /root/.cargo/registry/src/index.crates.io-6f17d22bba15001f/clap_builder-4.5.7/src/parser/error.rs:32:9:
Mismatch between definition and access of `listen-port`. Could not downcast to TypeId { t: (12568494433580311342, 18730179482622305) }, need to downcast to TypeId { t: (2319838699021154998, 17580291435477458652) }

Currently, I have no Idea what is different when this runs in Coolify.

Please tell me if you need additional information and where I can find them, to provide here.

Minimal Reproduction (if possible, example repository)

Exception or Error

No response

Version

v4.0.0-beta.302

Rinma commented 1 week ago

I could provide the result of docker inspect of the failing container, maybe this helps

Docker Inspect ``` [ { "Id": "3e40f4982d13205cd4276ea852d30c609e3db47e6cbdc8910c28c4c3c8f56d6b", "Created": "2024-06-24T21:58:37.751939606Z", "Path": "radiobrowser-api-rust", "Args": [ "-f", "/etc/radiobrowser/config.toml", "-vvv" ], "State": { "Status": "restarting", "Running": true, "Paused": false, "Restarting": true, "OOMKilled": false, "Dead": false, "Pid": 0, "ExitCode": 101, "Error": "", "StartedAt": "2024-06-24T21:59:32.071931242Z", "FinishedAt": "2024-06-24T21:59:32.267182708Z" }, "Image": "sha256:5e67aa2e0f6b3d74e3f7922bbff309145eef8c71596c300269863a416dee7bb1", "ResolvConfPath": "/var/lib/docker/containers/3e40f4982d13205cd4276ea852d30c609e3db47e6cbdc8910c28c4c3c8f56d6b/resolv.conf", "HostnamePath": "/var/lib/docker/containers/3e40f4982d13205cd4276ea852d30c609e3db47e6cbdc8910c28c4c3c8f56d6b/hostname", "HostsPath": "/var/lib/docker/containers/3e40f4982d13205cd4276ea852d30c609e3db47e6cbdc8910c28c4c3c8f56d6b/hosts", "LogPath": "/var/lib/docker/containers/3e40f4982d13205cd4276ea852d30c609e3db47e6cbdc8910c28c4c3c8f56d6b/3e40f4982d13205cd4276ea852d30c609e3db47e6cbdc8910c28c4c3c8f56d6b-json.log", "Name": "/yw4swwg-215834847857", "RestartCount": 10, "Driver": "overlay2", "Platform": "linux", "MountLabel": "", "ProcessLabel": "", "AppArmorProfile": "docker-default", "ExecIDs": null, "HostConfig": { "Binds": [ "/data/coolify/applications/yw4swwg/etc/radiobrowser/config.toml:/etc/radiobrowser/config.toml:rw" ], "ContainerIDFile": "", "LogConfig": { "Type": "json-file", "Config": { "max-file": "3", "max-size": "10m" } }, "NetworkMode": "f704611d283596aa9e5ea86760e1a6d293c8fecc0aaecf6a347bce7a0af32f30", "PortBindings": {}, "RestartPolicy": { "Name": "unless-stopped", "MaximumRetryCount": 0 }, "AutoRemove": false, "VolumeDriver": "", "VolumesFrom": null, "ConsoleSize": [ 0, 0 ], "CapAdd": null, "CapDrop": null, "CgroupnsMode": "private", "Dns": null, "DnsOptions": null, "DnsSearch": null, "ExtraHosts": [], "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": 1024, "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, "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", "/sys/devices/virtual/powercap" ], "ReadonlyPaths": [ "/proc/bus", "/proc/fs", "/proc/irq", "/proc/sys", "/proc/sysrq-trigger" ] }, "GraphDriver": { "Data": { "LowerDir": "/var/lib/docker/overlay2/f3502e7709869df3274c74021f7c2b5957022492ff99ef2293c88eeb6e16d4fc-init/diff:/var/lib/docker/overlay2/xnat1hf613egtl0zy0lv6rhph/diff:/var/lib/docker/overlay2/l5isyg80hm9kcj1agx4n29qpy/diff:/var/lib/docker/overlay2/trjg1151mufecxu3lak3bgqe7/diff:/var/lib/docker/overlay2/ab4t1svq0pjhzykn1n5v08pwm/diff:/var/lib/docker/overlay2/a25gh8fbkqd47rsywhndd7qu8/diff:/var/lib/docker/overlay2/c88c09d2fb3185114b90ba8a2ff48612a0da722dc999b0990a5178491b677dfc/diff", "MergedDir": "/var/lib/docker/overlay2/f3502e7709869df3274c74021f7c2b5957022492ff99ef2293c88eeb6e16d4fc/merged", "UpperDir": "/var/lib/docker/overlay2/f3502e7709869df3274c74021f7c2b5957022492ff99ef2293c88eeb6e16d4fc/diff", "WorkDir": "/var/lib/docker/overlay2/f3502e7709869df3274c74021f7c2b5957022492ff99ef2293c88eeb6e16d4fc/work" }, "Name": "overlay2" }, "Mounts": [ { "Type": "bind", "Source": "/data/coolify/applications/yw4swwg/etc/radiobrowser/config.toml", "Destination": "/etc/radiobrowser/config.toml", "Mode": "rw", "RW": true, "Propagation": "rprivate" } ], "Config": { "Hostname": "3e40f4982d13", "Domainname": "", "User": "radiobrowser:radiobrowser", "AttachStdin": false, "AttachStdout": true, "AttachStderr": true, "ExposedPorts": { "8080": {}, "8080/tcp": {} }, "Tty": false, "OpenStdin": false, "StdinOnce": false, "Env": [ "PORT=8080", "COOLIFY_FQDN=https://nkocgks.example.org", "COOLIFY_URL=nkocgks.example.org", "CACHETTL=60sec", "DATABASE_URL=mysql://radiouser:xxxx@dos088s:3306/radio", "CACHETYPE=redis", "HOST=0.0.0.0", "CACHEURL=redis://:xxxx@f04cckw:6379/0", "COOLIFY_CONTAINER_NAME=yw4swwg-215834847857", "SOURCE_COMMIT=HEAD", "COOLIFY_BRANCH=", "PATH=/usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin:/sbin:/bin", "STATIC_FILES_DIR=/usr/lib/radiobrowser/static/" ], "Cmd": [ "radiobrowser-api-rust", "-f", "/etc/radiobrowser/config.toml", "-vvv" ], "Image": "registry.example.org/over-world/radiobrowser-api-rust:0.8.1", "Volumes": null, "WorkingDir": "", "Entrypoint": null, "OnBuild": null, "Labels": { "caddy_0": "https://nkocgks.example.org", "caddy_0.encode": "zstd gzip", "caddy_0.handle_path": "/*", "caddy_0.handle_path.0_reverse_proxy": "{{upstreams 8080}}", "caddy_0.header": "-Server", "caddy_0.try_files": "{path} /index.html /index.php", "caddy_ingress_network": "w0400sc", "com.docker.compose.config-hash": "362d54fadd54888d5021172291974d793c9f9ec91ab19534fa90a8129e410d60", "com.docker.compose.container-number": "1", "com.docker.compose.depends_on": "", "com.docker.compose.image": "sha256:5e67aa2e0f6b3d74e3f7922bbff309145eef8c71596c300269863a416dee7bb1", "com.docker.compose.oneoff": "False", "com.docker.compose.project": "gs8sc4o", "com.docker.compose.project.config_files": "/artifacts/gs8sc4o/docker-compose.yml", "com.docker.compose.project.working_dir": "/artifacts/gs8sc4o", "com.docker.compose.service": "yw4swwg-215834847857", "com.docker.compose.version": "2.27.1", "coolify.applicationId": "8", "coolify.managed": "true", "coolify.name": "yw4swwg", "coolify.pullRequestId": "0", "coolify.type": "application", "coolify.version": "4.0.0-beta.302", "org.opencontainers.image.ref.name": "ubuntu", "org.opencontainers.image.version": "23.10", "traefik.enable": "true", "traefik.http.middlewares.gzip.compress": "true", "traefik.http.middlewares.redirect-to-https.redirectscheme.scheme": "https", "traefik.http.routers.http-0-yw4swwg.entryPoints": "http", "traefik.http.routers.http-0-yw4swwg.middlewares": "redirect-to-https", "traefik.http.routers.http-0-yw4swwg.rule": "Host(`nkocgks.example.org`) && PathPrefix(`/`)", "traefik.http.routers.http-0-yw4swwg.service": "http-0-yw4swwg", "traefik.http.routers.https-0-yw4swwg.entryPoints": "https", "traefik.http.routers.https-0-yw4swwg.middlewares": "gzip", "traefik.http.routers.https-0-yw4swwg.rule": "Host(`nkocgks.example.org`) && PathPrefix(`/`)", "traefik.http.routers.https-0-yw4swwg.service": "https-0-yw4swwg", "traefik.http.routers.https-0-yw4swwg.tls": "true", "traefik.http.routers.https-0-yw4swwg.tls.certresolver": "letsencrypt", "traefik.http.services.http-0-yw4swwg.loadbalancer.server.port": "8080", "traefik.http.services.https-0-yw4swwg.loadbalancer.server.port": "8080" } }, "NetworkSettings": { "Bridge": "", "SandboxID": "6adcc4dff195617c969b9827bd7c6535ba11e17ff0be0023aa1ee2a42be16b87", "SandboxKey": "/var/run/docker/netns/6adcc4dff195", "Ports": {}, "HairpinMode": false, "LinkLocalIPv6Address": "", "LinkLocalIPv6PrefixLen": 0, "SecondaryIPAddresses": null, "SecondaryIPv6Addresses": null, "EndpointID": "", "Gateway": "", "GlobalIPv6Address": "", "GlobalIPv6PrefixLen": 0, "IPAddress": "", "IPPrefixLen": 0, "IPv6Gateway": "", "MacAddress": "", "Networks": { "w0400sc": { "IPAMConfig": {}, "Links": null, "Aliases": [ "yw4swwg-215834847857", "yw4swwg-215834847857", "yw4swwg-215834847857" ], "MacAddress": "", "NetworkID": "f704611d283596aa9e5ea86760e1a6d293c8fecc0aaecf6a347bce7a0af32f30", "EndpointID": "", "Gateway": "", "IPAddress": "", "IPPrefixLen": 0, "IPv6Gateway": "", "GlobalIPv6Address": "", "GlobalIPv6PrefixLen": 0, "DriverOpts": null, "DNSNames": [ "yw4swwg-215834847857", "3e40f4982d13" ] } } } } ] ```